fix prod build

This commit is contained in:
Lea 2024-01-17 23:30:39 +01:00
parent f7eb59e89e
commit dc0cc4b541
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
3 changed files with 12 additions and 10 deletions

View file

@ -3,6 +3,7 @@
import { aliasAvailable, changeOwnPassword, createAliasSelf, deleteAlias, fetchOwnAliases } from "@/lib/actions";
import GhostMessage from "@/lib/components/ui/GhostMessage";
import LoadingSpinner from "@/lib/components/ui/LoadingSpinner";
import { ALIAS_DOMAINS, EMAIL_HOST, IMAP_PORT, IMAP_SECURITY, SMTP_PORT, SMTP_SECURITY, WEBMAIL_URL } from "@/lib/constants";
import { AliasEntry } from "@/lib/db";
import useWindowDimensions from "@/lib/hooks/useWindowDimensions";
import { aliasesNeedApproval } from "@/lib/util";
@ -11,15 +12,6 @@ import { AlertCircleIcon, CheckIcon, ChevronDownIcon, CopyIcon, ExternalLinkIcon
import { useSession } from "next-auth/react";
import { useEffect, useState } from "react";
// TODO read these from environment
const EMAIL_HOST = "mx1.amogus.cloud";
const SMTP_PORT = "465";
const IMAP_PORT = "993";
const SMTP_SECURITY = "SSL/TLS";
const IMAP_SECURITY = "SSL/TLS";
export const WEBMAIL_URL = "https://webmail.amogus.cloud";
export const ALIAS_DOMAINS = ["amogus.cloud", "lea.pet", "futacockinside.me"];
export default function SelfService() {
const session = useSession().data;

View file

@ -4,7 +4,7 @@ import { Button, Flex, Heading, Text, Link } from "@radix-ui/themes";
import { Session } from "next-auth";
import { SessionProvider, signIn } from "next-auth/react";
import useThemePreference from "../hooks/useThemePreference";
import { WEBMAIL_URL } from "@/app/self-service/page";
import { WEBMAIL_URL } from "../constants";
export default function AuthWrapper({
children,

10
src/lib/constants.ts Normal file
View file

@ -0,0 +1,10 @@
// TODO read these from environment
export const EMAIL_HOST = "mx1.amogus.cloud";
export const SMTP_PORT = "465";
export const IMAP_PORT = "993";
export const SMTP_SECURITY = "SSL/TLS";
export const IMAP_SECURITY = "SSL/TLS";
export const WEBMAIL_URL = "https://webmail.amogus.cloud";
export const ALIAS_DOMAINS = ["amogus.cloud", "lea.pet", "futacockinside.me"];