Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: default to custom instance if specified

Maya0a99044164ad
diff --git a/src/lib/sections/settings/vertdSettings.svelte.ts b/src/lib/sections/settings/vertdSettings.svelte.ts
index 4ecf8cf..ccdbf4d 100644
--- a/src/lib/sections/settings/vertdSettings.svelte.ts
+++ b/src/lib/sections/settings/vertdSettings.svelte.ts
@@ -1,5 +1,6 @@
import { ip, type IpInfo } from "$lib/ip";
import { Settings } from "./index.svelte";
+import { PUB_VERTD_URL } from "$env/static/public";
const LOCATIONS = [
{
@@ -51,6 +52,16 @@ export class VertdInstance {
public load() {
const ls = localStorage.getItem("vertdInstance");
+
+ // if custom vertd url and no saved setting, default to the custom url
+ if (!ls) {
+ const isCustomUrl = PUB_VERTD_URL !== "https://vertd.vert.sh";
+ if (isCustomUrl) {
+ this.inner = { type: "custom" };
+ return;
+ }
+ }
+
if (!ls) return;
const inner: VertdInner = JSON.parse(ls);
this.inner = {