diff --git a/src/lib/common/InPlaceEdit.svelte b/src/lib/common/InPlaceEdit.svelte index a5993bb..2eed2a9 100644 --- a/src/lib/common/InPlaceEdit.svelte +++ b/src/lib/common/InPlaceEdit.svelte @@ -1,46 +1,73 @@ {#if editing} -
- -
+ +
submit()} on:keydown={e => keydown(e)}> + submit()} + /> +
{:else} -
- {value} -
+ + +
edit()}> + {#if !!value?.trim()} + {value} + {:else} + {placeholder} + {/if} +
{/if} \ No newline at end of file diff --git a/src/lib/common/nav-bar/NavItem.svelte b/src/lib/common/nav-bar/NavItem.svelte index 45ca229..8ebed82 100644 --- a/src/lib/common/nav-bar/NavItem.svelte +++ b/src/lib/common/nav-bar/NavItem.svelte @@ -1,4 +1,6 @@
  • @@ -78,8 +101,27 @@ disabled={disabled} on:click={(e) => handleTabClick(e)} > - {navBtnText} + {#if allowEdit} + + {:else} +
    +
    {navBtnText}
    +
    + {/if} + + {#if allowDelete} + + + +
    + handleTabDelete(e)} + /> +
    +
    + {/if}