refactor(fend): character-level operations on the left, global operations on the right

This commit is contained in:
Lewis Wynne 2026-03-23 19:49:50 +00:00
parent ef0c982d98
commit b7fe539cf0
4 changed files with 77 additions and 59 deletions

View file

@ -1,7 +1,6 @@
<script lang="ts">
import type { Character } from '$lib/types';
import { generateRecord } from '$lib/output';
import { encodeCharacterURL } from '$lib/sharing';
import { species } from '$lib/data';
import OutputTab from './OutputTab.svelte';
@ -22,12 +21,6 @@
let output = $derived(
activeTab ? generateRecord(character.template, character.data, activeTab, species) : ''
);
async function share() {
const encoded = encodeCharacterURL(character);
const url = `${window.location.origin}${window.location.pathname}#${encoded}`;
await navigator.clipboard.writeText(url);
}
</script>
<div class="flex flex-col h-full min-h-0 rounded border" style="border-color: var(--border); background: var(--bg-card);">
@ -45,5 +38,5 @@
{/each}
</div>
<OutputTab {output} onShare={share} />
<OutputTab {output} />
</div>