diff --git a/src/equicordplugins/fileUpload/settings.tsx b/src/equicordplugins/fileUpload/settings.tsx index d5451d3b3..b580f07c2 100644 --- a/src/equicordplugins/fileUpload/settings.tsx +++ b/src/equicordplugins/fileUpload/settings.tsx @@ -24,6 +24,7 @@ const serviceOptions = [ { label: "Zipline", value: ServiceType.ZIPLINE, default: true }, { label: "E-Z Host", value: ServiceType.EZHOST }, { label: "Nest", value: ServiceType.NEST }, + { label: "Encrypting.host", value: ServiceType.ENCRYPTINGHOST }, { label: "S3-Compatible", value: ServiceType.S3 }, { label: "Catbox.moe", value: ServiceType.CATBOX }, ...(IS_DISCORD_DESKTOP ? [{ label: "0x0.st", value: ServiceType.ZEROX0 }] : []), @@ -50,6 +51,13 @@ const embedProxyOptions = [ { label: "discord.nfp.is", value: "nfp" } ]; +const encryptingHostUrlStyleOptions = [ + { label: "Query", value: "query", default: true }, + { label: "Param", value: "param" }, + { label: "Fake Link", value: "fakelink" }, + { label: "Embed", value: "embed" } +]; + export const settings = definePluginSettings({ serviceType: { type: OptionType.SELECT, @@ -87,6 +95,43 @@ export const settings = definePluginSettings({ default: "", hidden: true }, + encryptingHostKey: { + type: OptionType.STRING, + description: "Encrypting.host API key", + default: "", + hidden: true + }, + encryptingHostUrlStyle: { + type: OptionType.SELECT, + description: "Encrypting.host URL style", + options: encryptingHostUrlStyleOptions, + default: "query", + hidden: true + }, + encryptingHostDomains: { + type: OptionType.STRING, + description: "Encrypting.host domains JSON list", + default: "[\"offensive\"]", + hidden: true + }, + encryptingHostTitle: { + type: OptionType.STRING, + description: "Optional Encrypting.host embed title", + default: "", + hidden: true + }, + encryptingHostColor: { + type: OptionType.STRING, + description: "Optional Encrypting.host embed color", + default: "", + hidden: true + }, + encryptingHostFakelink: { + type: OptionType.STRING, + description: "Optional Encrypting.host fake link", + default: "", + hidden: true + }, s3Endpoint: { type: OptionType.STRING, description: "S3-compatible endpoint URL", @@ -421,6 +466,7 @@ export function SettingsComponent() { const sharexFileInputRef = React.useRef(null); const isNest = store.serviceType === ServiceType.NEST; const isEzHost = store.serviceType === ServiceType.EZHOST; + const isEncryptingHost = store.serviceType === ServiceType.ENCRYPTINGHOST; const isS3 = store.serviceType === ServiceType.S3; const isZipline = store.serviceType === ServiceType.ZIPLINE; const isCatbox = store.serviceType === ServiceType.CATBOX; @@ -527,6 +573,59 @@ export function SettingsComponent() { )} + {isEncryptingHost && ( + + (store as { encryptingHostKey?: string; }).encryptingHostKey = v} + placeholder="Your Encrypting.host API key" + /> + +