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

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