trail save fix
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import ConfirmModal from "$lib/components/confirm_modal.svelte";
|
||||
import EmailModal from "$lib/components/settings/email_modal.svelte";
|
||||
import PasswordModal from "$lib/components/settings/password_modal.svelte";
|
||||
import { show_toast } from "$lib/stores/toast_store";
|
||||
import { show_toast } from "$lib/stores/toast_store.svelte";
|
||||
import {
|
||||
currentUser,
|
||||
logout,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { } from "$lib/components/settings/upload_dialog.svelte";
|
||||
import TrailExportModal from "$lib/components/trail/trail_export_modal.svelte";
|
||||
import { theme } from "$lib/stores/theme_store";
|
||||
import { show_toast } from "$lib/stores/toast_store";
|
||||
import { show_toast } from "$lib/stores/toast_store.svelte";
|
||||
import { fetchGPX, trails_index, trails_upload } from "$lib/stores/trail_store";
|
||||
import { processUploadQueue, uploadStore, type Upload } from "$lib/stores/upload_store.svelte";
|
||||
import { getFileURL, saveAs } from "$lib/util/file_util";
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
integrations_create,
|
||||
integrations_update,
|
||||
} from "$lib/stores/integration_store.js";
|
||||
import { show_toast } from "$lib/stores/toast_store.js";
|
||||
import { show_toast } from "$lib/stores/toast_store.svelte.js";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
let { data } = $props();
|
||||
@@ -102,9 +102,7 @@
|
||||
}
|
||||
|
||||
show_toast({
|
||||
text:
|
||||
"strava " +
|
||||
$_("integration-disabled"),
|
||||
text: "strava " + $_("integration-disabled"),
|
||||
icon: "check",
|
||||
type: "success",
|
||||
});
|
||||
@@ -117,9 +115,13 @@
|
||||
}
|
||||
if (value) {
|
||||
try {
|
||||
await pb.send("/integration/komoot/login", {
|
||||
const r = await fetch("/api/v1/integration/komoot/login", {
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
if (!r.ok) {
|
||||
throw Error();
|
||||
}
|
||||
} catch (e) {
|
||||
komootToggleValue = false;
|
||||
show_toast({
|
||||
@@ -127,6 +129,7 @@
|
||||
icon: "close",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
integration.komoot.active = true;
|
||||
} else {
|
||||
@@ -140,6 +143,7 @@
|
||||
icon: "close",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
show_toast({
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import Textarea from "$lib/components/base/textarea.svelte";
|
||||
import type { Category } from "$lib/models/category.js";
|
||||
import { settings_update } from "$lib/stores/settings_store";
|
||||
import { show_toast } from "$lib/stores/toast_store";
|
||||
import { show_toast } from "$lib/stores/toast_store.svelte.js";
|
||||
import { currentUser, users_update } from "$lib/stores/user_store";
|
||||
import { getFileURL } from "$lib/util/file_util";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
Reference in New Issue
Block a user