diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json index 6e6e3512..b18b375a 100644 --- a/web/i18n/en/settings.json +++ b/web/i18n/en/settings.json @@ -113,10 +113,6 @@ "advanced.data": "data management", - "processing.override": "default instance override", - "processing.override.title": "use the instance-provided processing server", - "processing.override.description": "if web instance provides its own default processing server, you can choose to use it over the main processing server. make sure it's a server by someone you trust.", - "processing.community": "community instances", "processing.enable_custom.title": "use a custom processing server", diff --git a/web/src/lib/api/api-url.ts b/web/src/lib/api/api-url.ts index d5392c4b..2779fd5f 100644 --- a/web/src/lib/api/api-url.ts +++ b/web/src/lib/api/api-url.ts @@ -10,7 +10,7 @@ export const currentApiURL = () => { return new URL(customInstanceURL).origin; } - if (env.DEFAULT_API && processingSettings.allowDefaultOverride) { + if (env.DEFAULT_API) { return new URL(env.DEFAULT_API).origin; } diff --git a/web/src/lib/api/api.ts b/web/src/lib/api/api.ts index 6d836380..fb265f54 100644 --- a/web/src/lib/api/api.ts +++ b/web/src/lib/api/api.ts @@ -6,7 +6,6 @@ import lazySettingGetter from "$lib/settings/lazy-get"; import { getSession } from "$lib/api/session"; import { currentApiURL } from "$lib/api/api-url"; import { turnstileLoaded } from "$lib/state/turnstile"; -import { apiOverrideWarning } from "$lib/api/safety-warning"; import { cachedInfo, getServerInfo } from "$lib/api/server-info"; import type { Optional } from "$lib/types/generic"; @@ -37,8 +36,6 @@ const request = async (url: string) => { alwaysProxy: getSetting("privacy", "alwaysProxy"), } - await apiOverrideWarning(); - await getServerInfo(); const getCachedInfo = get(cachedInfo); diff --git a/web/src/lib/api/safety-warning.ts b/web/src/lib/api/safety-warning.ts index d9869128..0c28107d 100644 --- a/web/src/lib/api/safety-warning.ts +++ b/web/src/lib/api/safety-warning.ts @@ -1,68 +1,9 @@ import { get } from "svelte/store"; - -import env from "$lib/env"; import { t } from "$lib/i18n/translations"; import settings, { updateSetting } from "$lib/state/settings"; import { createDialog } from "$lib/state/dialogs"; -export const apiOverrideWarning = async () => { - if (!env.DEFAULT_API || get(settings).processing.seenOverrideWarning) { - return; - } - - let _actions: { - resolve: () => void; - reject: () => void; - }; - - const promise = new Promise( - (resolve, reject) => (_actions = { resolve, reject }) - ).catch(() => { - return {} - }); - - createDialog({ - id: "security-api-override", - type: "small", - icon: "warn-red", - title: get(t)("dialog.api.override.title"), - bodyText: get(t)("dialog.api.override.body", { value: env.DEFAULT_API }), - dismissable: false, - buttons: [ - { - text: get(t)("button.cancel"), - main: false, - action: () => { - _actions.reject(); - updateSetting({ - processing: { - seenOverrideWarning: true, - }, - }) - }, - }, - { - text: get(t)("button.continue"), - color: "red", - main: true, - timeout: 5000, - action: () => { - _actions.resolve(); - updateSetting({ - processing: { - allowDefaultOverride: true, - seenOverrideWarning: true, - }, - }) - }, - }, - ], - }) - - await promise; -} - export const customInstanceWarning = async () => { if (get(settings).processing.seenCustomWarning) { return; diff --git a/web/src/routes/settings/instances/+page.svelte b/web/src/routes/settings/instances/+page.svelte index 3f35c9ee..31b7934f 100644 --- a/web/src/routes/settings/instances/+page.svelte +++ b/web/src/routes/settings/instances/+page.svelte @@ -1,5 +1,4 @@ -{#if env.DEFAULT_API} - - - -{/if} -