File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed
src/lib/components/workspace Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 22 import { DropdownMenu } from ' bits-ui' ;
33 import { flyAndScale } from ' $lib/utils/transitions' ;
44 import { getContext } from ' svelte' ;
5+ import { config } from ' $lib/stores' ;
56
67 import Dropdown from ' $lib/components/common/Dropdown.svelte' ;
78 import GarbageBin from ' $lib/components/icons/GarbageBin.svelte' ;
4445 align =" start"
4546 transition ={flyAndScale }
4647 >
47- <DropdownMenu .Item
48- class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
49- on:click ={() => {
50- shareHandler ();
51- }}
52- >
53- <Share />
54- <div class ="flex items-center" >{$i18n .t (' Share' )}</div >
55- </DropdownMenu .Item >
48+ {#if $config .features .enable_community_sharing }
49+ <DropdownMenu .Item
50+ class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
51+ on:click ={() => {
52+ shareHandler ();
53+ }}
54+ >
55+ <Share />
56+ <div class ="flex items-center" >{$i18n .t (' Share' )}</div >
57+ </DropdownMenu .Item >
58+ {/if }
5659
5760 <DropdownMenu .Item
5861 class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
Original file line number Diff line number Diff line change 1212 import ArchiveBox from ' $lib/components/icons/ArchiveBox.svelte' ;
1313 import DocumentDuplicate from ' $lib/components/icons/DocumentDuplicate.svelte' ;
1414 import ArrowDownTray from ' $lib/components/icons/ArrowDownTray.svelte' ;
15+ import { config } from ' $lib/stores' ;
1516
1617 const i18n = getContext (' i18n' );
1718
6970 <div class ="flex items-center" >{$i18n .t (' Edit' )}</div >
7071 </DropdownMenu .Item >
7172
72- <DropdownMenu .Item
73- class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
74- on:click ={() => {
75- shareHandler ();
76- }}
77- >
78- <Share />
79- <div class ="flex items-center" >{$i18n .t (' Share' )}</div >
80- </DropdownMenu .Item >
73+ {#if $config .features .enable_community_sharing }
74+ <DropdownMenu .Item
75+ class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
76+ on:click ={() => {
77+ shareHandler ();
78+ }}
79+ >
80+ <Share />
81+ <div class ="flex items-center" >{$i18n .t (' Share' )}</div >
82+ </DropdownMenu .Item >
83+ {/if }
8184
8285 <DropdownMenu .Item
8386 class =" flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
You can’t perform that action at this time.
0 commit comments