Skip to content

Commit

Permalink
feat: flag
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Nov 6, 2023
1 parent d995621 commit f980d4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_IC_CMC_CANISTER_ID=rkp4c-7iaaa-aaaaa-aaaca-cai
VITE_BN_REGISTRATIONS_URL=https://icp0.io/registrations
VITE_JUNO_CDN_URL=https://fmkjf-bqaaa-aaaal-acpza-cai.raw.icp0.io
VITE_ADD_DOCUMENT=true
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ VITE_IC_CMC_CANISTER_ID=rkp4c-7iaaa-aaaaa-aaaca-cai
VITE_LEDGER_CANISTER_ID=ryjl3-tyaaa-aaaaa-aaaba-cai
VITE_BN_REGISTRATIONS_URL=https://icp0.io/registrations
VITE_JUNO_CDN_URL=https://fmkjf-bqaaa-aaaal-acpza-cai.raw.icp0.io
VITE_ADD_DOCUMENT=false
14 changes: 9 additions & 5 deletions src/frontend/src/lib/components/docs/Docs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
resetData();
await list();
})();
const ADD_DOCUMENT_FEATURE = import.meta.env.VITE_ADD_DOCUMENT === 'true';
</script>

<div class="title">
Expand All @@ -101,11 +103,13 @@
</CollectionEmpty>
{/if}

<button
class="text action start"
on:click={() => docsStore.set({ key: undefined, data: undefined, action: 'create' })}
><IconNew size="16px" /> <span>{$i18n.document.btn_add_document}</span></button
>
{#if ADD_DOCUMENT_FEATURE}
<button
class="text action start"
on:click={() => docsStore.set({ key: undefined, data: undefined, action: 'create' })}
><IconNew size="16px" /> <span>{$i18n.document.btn_add_document}</span></button
>
{/if}

{#each $paginationStore.items as [key, doc]}
<button
Expand Down

0 comments on commit f980d4e

Please sign in to comment.