feat(web): rework context menus: add icons and reorder items (#8090)
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
let isShowConfirmation = false;
|
||||
let loading = false;
|
||||
|
||||
$: label = force ? 'Permanently delete' : 'Delete';
|
||||
|
||||
const handleTrash = async () => {
|
||||
if (force) {
|
||||
isShowConfirmation = true;
|
||||
@@ -46,11 +48,11 @@
|
||||
</script>
|
||||
|
||||
{#if menuItem}
|
||||
<MenuOption text={force ? 'Permanently Delete' : 'Delete'} on:click={handleTrash} />
|
||||
<MenuOption text={label} icon={mdiDeleteOutline} on:click={handleTrash} />
|
||||
{:else if loading}
|
||||
<CircleIconButton title="Loading" icon={mdiTimerSand} />
|
||||
{:else}
|
||||
<CircleIconButton title="Delete" icon={mdiDeleteOutline} on:click={handleTrash} />
|
||||
<CircleIconButton title={label} icon={mdiDeleteOutline} on:click={handleTrash} />
|
||||
{/if}
|
||||
|
||||
{#if isShowConfirmation}
|
||||
|
||||
Reference in New Issue
Block a user