mirror of
https://github.com/Stef-00012/Zipline-Android-App.git
synced 2025-05-18 23:33:50 +02:00
185 lines
5.3 KiB
TypeScript
185 lines
5.3 KiB
TypeScript
import type { APISettings, ShortenEmbed, UploadEmbed } from "@/types/zipline";
|
|
import type { SelectProps } from "@/components/Select";
|
|
|
|
export const defaultUploadEmbed: UploadEmbed = {
|
|
imageOrVideo: false,
|
|
description: null,
|
|
timestamp: false,
|
|
thumbnail: false,
|
|
footer: null,
|
|
title: null,
|
|
color: null,
|
|
url: false,
|
|
};
|
|
|
|
export const defaultShortenEmbed: ShortenEmbed = {
|
|
imageOrVideo: false,
|
|
description: null,
|
|
timestamp: false,
|
|
thumbnail: false,
|
|
footer: null,
|
|
title: null,
|
|
color: null,
|
|
url: false,
|
|
};
|
|
|
|
export type SettingPath<T extends keyof APISettings = keyof APISettings> =
|
|
T extends "discordOnUploadEmbed"
|
|
? T | `${T}.${keyof UploadEmbed}`
|
|
: T extends "discordOnShortenEmbed"
|
|
? T | `${T}.${keyof ShortenEmbed}`
|
|
: T;
|
|
|
|
export const settingNames: Partial<Record<SettingPath, string>> = {
|
|
coreDefaultDomain: "Default Domain",
|
|
coreReturnHttpsUrls: "Return HTTPS URLs",
|
|
coreTempDirectory: "Temporary Directory",
|
|
|
|
chunksEnabled: "Enable Chunks",
|
|
chunksMax: "Max Chunks Size",
|
|
chunksSize: "Chunks Size",
|
|
|
|
tasksDeleteInterval: "Delete Files Interval",
|
|
tasksClearInvitesInterval: "Clear Invites Interval",
|
|
tasksMaxViewsInterval: "Max Views Interval",
|
|
tasksThumbnailsInterval: "Thumbnail Interval",
|
|
tasksMetricsInterval: "Metrics Interval",
|
|
|
|
mfaPasskeys: "Passkeys",
|
|
mfaTotpEnabled: "Enable TOTP",
|
|
mfaTotpIssuer: "Issuer",
|
|
|
|
featuresImageCompression: "Image Compression",
|
|
featuresRobotsTxt: "/robots.txt",
|
|
featuresHealthcheck: "Healthcheck",
|
|
featuresUserRegistration: "User Registration",
|
|
featuresOauthRegistration: "OAuth Registration",
|
|
featuresDeleteOnMaxViews: "Delete on Max Views",
|
|
featuresMetricsEnabled: "Enable Metrics",
|
|
featuresMetricsAdminOnly: "Admin Only Metrics",
|
|
featuresMetricsShowUserSpecific: "Show User Specific Metrics",
|
|
featuresThumbnailsEnabled: "Enable Thumbnails",
|
|
featuresThumbnailsNumberThreads: "Thumbnails Number Threads",
|
|
|
|
filesRoute: "Route",
|
|
filesLength: "Length",
|
|
filesAssumeMimetypes: "Assume Mimetypes",
|
|
filesRemoveGpsMetadata: "Remove GPS Metadata",
|
|
filesDefaultFormat: "Default Format",
|
|
filesDisabledExtensions: "Disabled Extensions",
|
|
filesMaxFileSize: "Max File Size",
|
|
filesDefaultExpiration: "Default Expiration",
|
|
filesDefaultDateFormat: "Default Date Format",
|
|
|
|
urlsRoute: "Route",
|
|
urlsLength: "Length",
|
|
|
|
invitesEnabled: "Enable Invites",
|
|
invitesLength: "Length",
|
|
|
|
ratelimitEnabled: "Enable Ratelimit",
|
|
ratelimitAdminBypass: "Admin Bypass",
|
|
ratelimitMax: "Max Requests",
|
|
ratelimitWindow: "Window",
|
|
ratelimitAllowList: "Allow List",
|
|
|
|
websiteTitle: "Title",
|
|
websiteTitleLogo: "Title Logo",
|
|
websiteExternalLinks: "External Links",
|
|
websiteLoginBackground: "Login Background",
|
|
websiteLoginBackgroundBlur: "Login Background Blur",
|
|
websiteDefaultAvatar: "Default Avatar",
|
|
websiteTos: "Terms of Service",
|
|
websiteThemeDefault: "Default Theme",
|
|
websiteThemeDark: "Dark Theme",
|
|
websiteThemeLight: "Light Theme",
|
|
|
|
oauthBypassLocalLogin: "Bypass Local Login",
|
|
oauthLoginOnly: "Login Only",
|
|
|
|
oauthDiscordClientId: "Discord Client ID",
|
|
oauthDiscordClientSecret: "Discord Client Secret",
|
|
oauthDiscordRedirectUri: "Discord Redirect URL",
|
|
|
|
oauthGoogleClientId: "Google Client ID",
|
|
oauthGoogleClientSecret: "Google Client Secret",
|
|
oauthGoogleRedirectUri: "Google Redirect URL",
|
|
|
|
oauthGithubClientId: "GitHub Client ID",
|
|
oauthGithubClientSecret: "GitHub Client Secret",
|
|
oauthGithubRedirectUri: "GitHub Redirect URL",
|
|
|
|
oauthOidcClientId: "OIDC Client ID",
|
|
oauthOidcClientSecret: "OIDC Client Secret",
|
|
oauthOidcAuthorizeUrl: "OIDC Authorize URL",
|
|
oauthOidcTokenUrl: "OIDC Token URL",
|
|
oauthOidcUserinfoUrl: "OIDC Userinfo URL",
|
|
oauthOidcRedirectUri: "OIDC Redirect URL",
|
|
|
|
pwaEnabled: "PWA Enabled",
|
|
pwaTitle: "Title",
|
|
pwaShortName: "Short Name",
|
|
pwaDescription: "Description",
|
|
pwaThemeColor: "Theme Color",
|
|
pwaBackgroundColor: "Background Color",
|
|
|
|
httpWebhookOnUpload: "On Upload",
|
|
httpWebhookOnShorten: "On Shorten",
|
|
|
|
discordWebhookUrl: "Webhook URL",
|
|
discordUsername: "Username",
|
|
discordAvatarUrl: "Avatar URL",
|
|
|
|
discordOnUploadWebhookUrl: "Webhook URL",
|
|
discordOnUploadAvatarUrl: "Avatar URL",
|
|
discordOnUploadUsername: "Username",
|
|
discordOnUploadContent: "Content",
|
|
discordOnUploadEmbed: "Embed",
|
|
|
|
"discordOnUploadEmbed.color": "Color",
|
|
"discordOnUploadEmbed.description": "Description",
|
|
"discordOnUploadEmbed.footer": "Footer",
|
|
"discordOnUploadEmbed.imageOrVideo": "Image/Video",
|
|
"discordOnUploadEmbed.thumbnail": "Thumbnail",
|
|
"discordOnUploadEmbed.timestamp": "Timestamp",
|
|
"discordOnUploadEmbed.title": "Title",
|
|
"discordOnUploadEmbed.url": "URL",
|
|
|
|
discordOnShortenWebhookUrl: "Webhook URL",
|
|
discordOnShortenUsername: "Username",
|
|
discordOnShortenAvatarUrl: "Avatar URL",
|
|
discordOnShortenContent: "Content",
|
|
discordOnShortenEmbed: "Embed",
|
|
|
|
"discordOnShortenEmbed.color": "Color",
|
|
"discordOnShortenEmbed.description": "Description",
|
|
"discordOnShortenEmbed.footer": "Footer",
|
|
"discordOnShortenEmbed.imageOrVideo": "Image/Video",
|
|
"discordOnShortenEmbed.thumbnail": "Thumbnail",
|
|
"discordOnShortenEmbed.timestamp": "Timestamp",
|
|
"discordOnShortenEmbed.title": "Title",
|
|
"discordOnShortenEmbed.url": "URL",
|
|
};
|
|
|
|
export const formats: SelectProps["data"] = [
|
|
{
|
|
label: "Random",
|
|
value: "random",
|
|
},
|
|
{
|
|
label: "Date",
|
|
value: "date",
|
|
},
|
|
{
|
|
label: "UUID",
|
|
value: "uuid",
|
|
},
|
|
{
|
|
label: "Use File Name",
|
|
value: "name",
|
|
},
|
|
{
|
|
label: "Gfycat-style Name",
|
|
value: "gfycat",
|
|
},
|
|
];
|