From f7171827e053e737e08b5bf672e3dfb1ddae272a Mon Sep 17 00:00:00 2001 From: tobinio Date: Fri, 16 Aug 2024 13:21:57 +0200 Subject: [PATCH 1/6] feat: keep library settings --- .../src/components/GridDisplay.vue | 6 ++-- apps/app-frontend/src/pages/Library.vue | 25 ++++++++++++++-- ...de8767987e430d47e12232bab5b391362859.json} | 22 ++++++++++++-- ...cdcf73da199ea6ac05ee3ee798ece80d877cf.json | 2 +- ...427a01d47a200c109e9c1e08e1710a268832.json} | 6 ++-- .../20240816103233_store_library_settings.sql | 6 ++++ packages/app-lib/src/state/settings.rs | 29 ++++++++++++++----- 7 files changed, 78 insertions(+), 18 deletions(-) rename packages/app-lib/.sqlx/{query-03d1aeddf7788320530c447a82342aecdb4099ce183dd9106c4bcc47604cb080.json => query-1b46483074db12bbe5090faccc02de8767987e430d47e12232bab5b391362859.json} (85%) rename packages/app-lib/.sqlx/{query-d645daf951ff6fead3c86df685d99bacc81cb0a999c0f8d2ff7755b0089a79d8.json => query-fc37b8887bd48354bc479c62b8ae427a01d47a200c109e9c1e08e1710a268832.json} (82%) create mode 100644 packages/app-lib/migrations/20240816103233_store_library_settings.sql diff --git a/apps/app-frontend/src/components/GridDisplay.vue b/apps/app-frontend/src/components/GridDisplay.vue index 3fe50e72a..ab7653674 100644 --- a/apps/app-frontend/src/components/GridDisplay.vue +++ b/apps/app-frontend/src/components/GridDisplay.vue @@ -121,9 +121,9 @@ const handleOptionsClick = async (args) => { } const search = ref('') -const group = ref('Category') -const filters = ref('All profiles') -const sortBy = ref('Name') +const group = defineModel('group') +const filters = defineModel('filters') +const sortBy = defineModel('sortBy') const filteredResults = computed(() => { let instances = props.instances.filter((instance) => { diff --git a/apps/app-frontend/src/pages/Library.vue b/apps/app-frontend/src/pages/Library.vue index 03b8970ad..7517dc46d 100644 --- a/apps/app-frontend/src/pages/Library.vue +++ b/apps/app-frontend/src/pages/Library.vue @@ -1,5 +1,5 @@