diff --git a/frontend/src/routes/auth/about/[id]/+page.svelte b/frontend/src/routes/auth/about/[id]/+page.svelte index afd681d..c178846 100644 --- a/frontend/src/routes/auth/about/[id]/+page.svelte +++ b/frontend/src/routes/auth/about/[id]/+page.svelte @@ -23,12 +23,12 @@ /** @type {App.Locals['licence_categories']} */ $: licence_categories = $page.data.licence_categories; - /** @typedef {{name: string, src: string}} Avatar */ - const avatarFiles = import.meta.glob("$lib/img/Avatar-*.jpeg", { - eager: true, - }); - /** @type{Avatar[]} */ - let avatars = []; + // /** @typedef {{name: string, src: string}} Avatar */ + // const avatarFiles = import.meta.glob("$lib/img/Avatar-*.jpeg", { + // eager: true, + // }); + // /** @type{Avatar[]} */ + // let avatars = []; const TABS = ["profile", "licence", "membership", "bankaccount"]; let activeTab = TABS[0]; @@ -67,13 +67,13 @@ let showModal = false, isUploading = false, isUpdating = false, - showAvatars = false, + // showAvatars = false, password = "", password2 = ""; const open = () => (showModal = true); const close = () => (showModal = false); - const toggleAvatars = () => (showAvatars = !showAvatars); + // const toggleAvatars = () => (showAvatars = !showAvatars); $: selectedSubscriptionModel = subscriptions.find( @@ -83,26 +83,26 @@ onMount(() => { console.dir(user); console.dir(licence_categories); - avatars = Object.entries(avatarFiles).map(([path, module]) => { - if (typeof path !== "string") { - throw new Error("Unexpected non-string path"); - } - if ( - typeof module !== "object" || - module === null || - !("default" in module) - ) { - throw new Error("Unexpected module format"); - } - const src = module.default; - if (typeof src !== "string") { - throw new Error("Unexpected default export type"); - } - return { - name: path.split("/").pop()?.split(".")[0] ?? "Unknown", - src: src, - }; - }); + // avatars = Object.entries(avatarFiles).map(([path, module]) => { + // if (typeof path !== "string") { + // throw new Error("Unexpected non-string path"); + // } + // if ( + // typeof module !== "object" || + // module === null || + // !("default" in module) + // ) { + // throw new Error("Unexpected module format"); + // } + // const src = module.default; + // if (typeof src !== "string") { + // throw new Error("Unexpected default export type"); + // } + // return { + // name: path.split("/").pop()?.split(".")[0] ?? "Unknown", + // src: src, + // }; + // }); }); /** @@ -126,28 +126,28 @@ }; /** @type {import('./$types').SubmitFunction} */ - const handleUpload = async () => { - isUploading = true; - return async ({ result }) => { - isUploading = false; - /** @type {any} */ - const res = result; - if (result.type === "success" || result.type === "redirect") { - user.profile_picture = res.data.profile_picture; - } - await applyAction(result); - }; - }; + // const handleUpload = async () => { + // isUploading = true; + // return async ({ result }) => { + // isUploading = false; + // /** @type {any} */ + // const res = result; + // if (result.type === "success" || result.type === "redirect") { + // user.profile_picture = res.data.profile_picture; + // } + // await applyAction(result); + // }; + // };