Add certificate model for http and dns

change is_ecc to boolean, its still stored as int in sqlite
This commit is contained in:
Jamie Curnow
2023-02-28 20:55:40 +10:00
parent 7455accf58
commit fc2df47753
22 changed files with 599 additions and 71 deletions

View File

@ -9,14 +9,17 @@ import {
MenuDivider,
} from "@chakra-ui/react";
import { HelpDrawer, PrettyMenuButton } from "components";
import { useDNSProviders } from "hooks";
import { intl } from "locale";
import { CertificateCreateModal } from "modals";
import { FiGlobe, FiServer, FiUpload } from "react-icons/fi";
import { FiGlobe, FiServer, FiShieldOff, FiUpload } from "react-icons/fi";
import TableWrapper from "./TableWrapper";
function Certificates() {
const [createShown, setCreateShown] = useState("");
const { data: dnsProviders, isLoading: dnsProvidersIsLoading } =
useDNSProviders(0, 999);
return (
<>
@ -37,6 +40,7 @@ function Certificates() {
{intl.formatMessage({ id: "type.http" })}
</MenuItem>
<MenuItem
isDisabled={dnsProvidersIsLoading || !dnsProviders?.total}
icon={<FiServer />}
onClick={() => setCreateShown("dns")}>
{intl.formatMessage({ id: "type.dns" })}
@ -47,6 +51,11 @@ function Certificates() {
onClick={() => setCreateShown("custom")}>
{intl.formatMessage({ id: "type.custom" })}
</MenuItem>
<MenuItem
icon={<FiShieldOff />}
onClick={() => setCreateShown("mkcert")}>
{intl.formatMessage({ id: "type.mkcert" })}
</MenuItem>
</MenuList>
</Menu>
</HStack>