Skip to content

Commit a3e222d

Browse files
committed
clean up
1 parent dbe46ea commit a3e222d

File tree

3 files changed

+1
-71
lines changed

3 files changed

+1
-71
lines changed

src/lib/components/modals/CustomSourceModal.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
let {
1414
customDialog = $bindable(),
15-
outputVersion = $bindable(),
1615
editor,
1716
customType = $bindable(),
1817
} = $props();

src/lib/components/modals/ExportModal.svelte

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,6 @@
1313
} = $props();
1414
1515
let exportAsJSON = $state(false);
16-
17-
function exportThing(exportAsJSON: boolean) {
18-
if (!exportAsJSON) {
19-
return convert(
20-
editor.getJSON(),
21-
"item_lore",
22-
outputVersion,
23-
shouldOptimise,
24-
);
25-
}
26-
return translateJSON(editor.getJSON(), {
27-
exportType: "item_lore",
28-
exportVersion: outputVersion,
29-
optimise: shouldOptimise,
30-
});
31-
}
3216
</script>
3317

3418
<Modal title="More output formats" bind:this={outputDialog} big key="E">
@@ -122,58 +106,5 @@
122106
>{editor ? translateMOTD(editor.getJSON()) : "Loading..."}
123107
</code>
124108
</div>
125-
126-
<!-- <p class="mt-2">As JSON:</p>
127-
<div class="flex items-start space-x-3 rounded-lg bg-zinc-950 p-3">
128-
<button
129-
class="rounded-md p-1 text-lg font-medium hover:bg-zinc-900 active:bg-white/10"
130-
onclick={() => {
131-
navigator.clipboard.writeText(
132-
translateJSON(editor.getJSON(), {
133-
exportType: "standard",
134-
exportVersion: outputVersion,
135-
indent,
136-
indentSize,
137-
optimise: shouldOptimise,
138-
}),
139-
);
140-
recentlyCopied = true;
141-
setTimeout(() => (recentlyCopied = false), 2000);
142-
}}>
143-
<IconCopy />
144-
</button>
145-
<code class="inline-block max-h-56 w-full overflow-auto"
146-
><pre>{editor
147-
? translateJSON(editor.getJSON(), {
148-
exportType: "standard",
149-
exportVersion: outputVersion,
150-
indent,
151-
indentSize,
152-
optimise: shouldOptimise,
153-
})
154-
: "Loading..."}</pre>
155-
</code>
156-
</div>
157-
158-
<div class="mt-2 flex items-center gap-2">
159-
<p>Indent?</p>
160-
<button
161-
class="flex aspect-square size-8 flex-col items-center rounded-md bg-zinc-900"
162-
onclick={() => (indent = !indent)}>
163-
{#if indent}
164-
<IconTick class="m-auto text-lg" />
165-
{/if}
166-
</button>
167-
</div>
168-
{#if indent}
169-
<label for="indentSize" class="mt-2">Indent Size:</label>
170-
<input
171-
type="number"
172-
id="indentSize"
173-
max="8"
174-
min="1"
175-
bind:value={indentSize}
176-
class="w-fit rounded-md bg-zinc-900 p-2" />
177-
{/if} -->
178109
</div>
179110
</Modal>

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@
667667
</Modal>
668668

669669
{#await import("$lib/components/modals/CustomSourceModal.svelte") then modal}
670-
<modal.default bind:customDialog bind:customType {editor} {outputVersion} />
670+
<modal.default bind:customDialog bind:customType {editor} />
671671
{/await}
672672

673673
<Modal title="Custom Color" bind:this={colorDialog} small nopad key="C">

0 commit comments

Comments
 (0)