X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fconfig.ts;h=38c521ecebd2772e968457419d55c90c85e36715;hb=7eddc52c1302a1f0d7189576ace44957d6b42d2a;hp=28e8ce5119a5046125e62c4f9b0e98f088926188;hpb=8e767f2331c1c5cfc34d7385812f12223f4e93b9;p=lemmy-ui.git diff --git a/src/shared/config.ts b/src/shared/config.ts index 28e8ce5..38c521e 100644 --- a/src/shared/config.ts +++ b/src/shared/config.ts @@ -1,5 +1,7 @@ -export const favIconUrl = "/static/assets/icons/favicon.svg"; -export const favIconPngUrl = "/static/assets/icons/apple-touch-icon.png"; +import { getStaticDir } from "@utils/env"; + +export const favIconUrl = `${getStaticDir()}/assets/icons/favicon.svg`; +export const favIconPngUrl = `${getStaticDir()}/assets/icons/apple-touch-icon.png`; export const repoUrl = "https://github.com/LemmyNet"; export const joinLemmyUrl = "https://join-lemmy.org"; @@ -21,8 +23,19 @@ export const markdownFieldCharacterLimit = 50000; export const maxUploadImages = 20; export const concurrentImageUpload = 4; export const updateUnreadCountsInterval = 30000; -export const fetchLimit = 40; +export const fetchLimit = 20; export const relTags = "noopener nofollow"; export const emDash = "\u2014"; +export const authCookieName = "jwt"; + +/** + * Accepted formats: + * !community@server.com + * /c/community@server.com + * /m/community@server.com + * /u/username@server.com + */ +export const instanceLinkRegex = + /(\/[cmu]\/|!)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g; export const testHost = "0.0.0.0:8536";