improve tag scope clarity

This commit is contained in:
Christoph Kluge 2024-09-25 12:23:21 +02:00
parent 8e3327ef6a
commit ede3da7a87

View File

@ -210,16 +210,6 @@
<span style="float: right;">
{#if pendingChange === utag.id}
<Spinner size="sm" secondary />
{:else}
{#if utag.scope === 'global' || utag.scope === 'admin'}
{#if isAdmin}
<Button
size="sm"
color="danger"
on:click={() => removeTagFromJob(utag)}
>
<Icon name="x" />
</Button>
{:else}
<Button
size="sm"
@ -227,10 +217,13 @@
outline
disabled
>
Global Tag
</Button>
{/if}
{#if utag.scope === 'global' || utag.scope === 'admin'}
{utag.scope.charAt(0).toUpperCase() + utag.scope.slice(1)} Tag
{:else}
Private Tag
{/if}
</Button>
{#if isAdmin || (utag.scope !== 'global' && utag.scope !== 'admin')}
<Button
size="sm"
color="danger"
@ -268,17 +261,19 @@
{#if pendingChange === uutag.id}
<Spinner size="sm" secondary />
{:else}
{#if uutag.scope === 'global' || uutag.scope === 'admin'}
{#if isAdmin}
<Button
size="sm"
color="success"
on:click={() => addTagToJob(uutag)}
color="dark"
outline
disabled
>
<Icon name="plus" />
</Button>
{/if}
{#if uutag.scope === 'global' || uutag.scope === 'admin'}
{uutag.scope.charAt(0).toUpperCase() + uutag.scope.slice(1)} Tag
{:else}
Private Tag
{/if}
</Button>
{#if isAdmin || (uutag.scope !== 'global' && uutag.scope !== 'admin')}
<Button
size="sm"
color="success"