refac
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
|
||||
export let onClose: Function = () => {};
|
||||
|
||||
export let onSync: Function = () => {};
|
||||
export let onUpload: Function = (data) => {};
|
||||
|
||||
let show = false;
|
||||
</script>
|
||||
|
||||
@@ -59,7 +62,7 @@
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
dispatch('upload', { type: 'files' });
|
||||
onUpload({ type: 'files' });
|
||||
}}
|
||||
>
|
||||
<ArrowUpCircle strokeWidth="2" />
|
||||
@@ -69,7 +72,7 @@
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
dispatch('upload', { type: 'directory' });
|
||||
onUpload({ type: 'directory' });
|
||||
}}
|
||||
>
|
||||
<FolderOpen strokeWidth="2" />
|
||||
@@ -85,7 +88,7 @@
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
dispatch('sync', { type: 'directory' });
|
||||
onSync();
|
||||
}}
|
||||
>
|
||||
<ArrowPath strokeWidth="2" />
|
||||
@@ -96,7 +99,7 @@
|
||||
<DropdownMenu.Item
|
||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||
on:click={() => {
|
||||
dispatch('upload', { type: 'text' });
|
||||
onUpload({ type: 'text' });
|
||||
}}
|
||||
>
|
||||
<BarsArrowUp strokeWidth="2" />
|
||||
|
||||
Reference in New Issue
Block a user