{pageTitle}
Prefix
Color
White
Blue
Yellow
Green
Orange
Red
Weight
Actions
{ if (editPrefix.prefix) { const req = await fetch('/api/prefixes', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify([editPrefix]) }); if (req.ok) window.location.reload(); } }}>Add/Change
Colors:
editPrefix.color = "white"}>White
editPrefix.color = "blue"}>Blue
editPrefix.color = "yellow"}>Yellow
editPrefix.color = "green"}>Green
editPrefix.color = "orange"}>Orange
editPrefix.color = "red"}>Red
Prefix
Color
Weight
Actions
{#each prefixes as prefix (prefix.prefix)}
{prefix.prefix}
{prefix.color.charAt(0).toUpperCase() + prefix.color.slice(1)}
{prefix.weight}
editPrefix = {...prefix}}>Edit
{ const res = await fetch(`/api/prefixes?p=${prefix.prefix}`, { method: 'DELETE' }); if (res.ok) window.location.reload(); }}>Delete
{/each}