diff --git a/src/lib/components/control-panel/general-panel.svelte b/src/lib/components/control-panel/general-panel.svelte index f1b3c7e..6e4c0c8 100644 --- a/src/lib/components/control-panel/general-panel.svelte +++ b/src/lib/components/control-panel/general-panel.svelte @@ -12,8 +12,6 @@ let dirty = $state(false); let busy = $state(false); let error = $state(""); - let skinFile = $state(null); - let skinInput = $state(null); $effect(() => { if (!dirty) displayName = $profile?.displayName ?? ""; @@ -23,15 +21,12 @@ onMount(() => register("general", { apply, reset }, { dirty, busy })); function updateDirty() { - dirty = - displayName.trim() !== ($profile?.displayName ?? "") || skinFile !== null; + dirty = displayName.trim() !== ($profile?.displayName ?? ""); error = ""; } function reset() { displayName = $profile?.displayName ?? ""; - skinFile = null; - if (skinInput) skinInput.value = ""; dirty = false; error = ""; } @@ -47,13 +42,8 @@ busy = true; error = ""; try { - const skinData = skinFile - ? Array.from(new Uint8Array(await skinFile.arrayBuffer())) - : null; - await commands.updateProfile(nextName, skinData); + await commands.updateProfile(nextName, null); displayName = nextName; - skinFile = null; - if (skinInput) skinInput.value = ""; dirty = false; return true; } catch (cause) { @@ -88,34 +78,6 @@ This name can be changed at any time.

- -
- - -
- { - skinFile = event.currentTarget.files?.[0] ?? null; - updateDirty(); - }} - /> -

64×64 Minecraft-format PNG, base layer only.

-