diff --git a/src/svelte/properties-filter-app/components/base-view.svelte b/src/svelte/properties-filter-app/components/base-view.svelte deleted file mode 100644 index 19090b9..0000000 --- a/src/svelte/properties-filter-app/components/base-view.svelte +++ /dev/null @@ -1,87 +0,0 @@ - - -
- {#if groups.length > 0} - - - {#each groups as group (group.id)} - handleGroupClick(group.id)} - >{group.name} - {/each} - - - - {/if} - {#if selectedGroup == undefined} - handleAddGroupClick()} - /> - {/if} - {#if selectedGroup !== undefined} - - - handleEditClick()} - /> - handleAddGroupClick()} - /> - - handleGroupToggle()} - /> - handleDeleteGroupClick()} - /> - - - {/if} -
diff --git a/src/svelte/properties-filter-app/components/group-button.svelte b/src/svelte/properties-filter-app/components/group-button.svelte new file mode 100644 index 0000000..7c3f4d2 --- /dev/null +++ b/src/svelte/properties-filter-app/components/group-button.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/src/svelte/properties-filter-app/components/group-edit-view.svelte b/src/svelte/properties-filter-app/components/group-edit-view.svelte index 642ecb2..77cbdf1 100644 --- a/src/svelte/properties-filter-app/components/group-edit-view.svelte +++ b/src/svelte/properties-filter-app/components/group-edit-view.svelte @@ -2,13 +2,8 @@ import Divider from "src/svelte/shared/components/divider.svelte"; import IconButton from "src/svelte/shared/components/icon-button.svelte"; import Stack from "src/svelte/shared/components/stack.svelte"; - import { generateUUID } from "src/svelte/shared/services/uuid"; - import { - PropertyFilterGroup, - TextFilterCondition, - TextPropertyFilter, - } from "src/types"; + import { PropertyFilterGroup } from "src/types"; import PropertyFilterList from "./property-filter-list.svelte"; import { createEventDispatcher } from "svelte"; @@ -27,27 +22,18 @@ const name = (e.target as HTMLInputElement).value; dispatch("groupNameChange", { name }); } - - function handleBackClick() { - dispatch("backClick"); - } - - - + +
- +
-
+
{#if selectedGroup.filters.length > 0} - + {/if} @@ -70,10 +56,13 @@ diff --git a/src/svelte/properties-filter-app/components/group-list.svelte b/src/svelte/properties-filter-app/components/group-list.svelte new file mode 100644 index 0000000..c69947b --- /dev/null +++ b/src/svelte/properties-filter-app/components/group-list.svelte @@ -0,0 +1,65 @@ + + +
+ + + handleAddGroupClick()} + /> + handleDeleteGroupClick()} + /> + +
+ + {#each groups as group (group.id)} + handleGroupClick(group.id)} + /> + {/each} + +
+
+
+ + diff --git a/src/svelte/properties-filter-app/components/property-filter.svelte b/src/svelte/properties-filter-app/components/property-filter.svelte index 225fb51..0566e15 100644 --- a/src/svelte/properties-filter-app/components/property-filter.svelte +++ b/src/svelte/properties-filter-app/components/property-filter.svelte @@ -33,6 +33,7 @@ import store from "src/svelte/shared/services/store"; import VaultExplorerPlugin from "src/main"; import { ObsidianProperty } from "src/obsidian/types"; + import Wrap from "src/svelte/shared/components/wrap.svelte"; const dispatch = createEventDispatcher(); function handleDeleteClick() { @@ -94,7 +95,7 @@
- +