From 4582c71583108ca82432080e6c55ad7445d06af8 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 28 Oct 2024 21:23:53 -0400 Subject: [PATCH] [Refactor] Rework modelStore and ModelLibrarySidebarTab (#1350) * nit * Rename * nit * Move load model folders to app level * Various fixes * nit * nit * wip * nit * nit * nit * Split * nit * Add back spinner * nit * nit * Add refresh button * nit * nit * Preserve model folder order * Avoid order change on folder open --- .../sidebar/tabs/ModelLibrarySidebarTab.vue | 134 +++++++++--------- .../tabs/modelLibrary/ModelTreeLeaf.vue | 11 +- src/i18n.ts | 6 + src/scripts/api.ts | 9 +- src/scripts/app.ts | 5 +- src/stores/modelStore.ts | 107 +++++++------- src/views/GraphView.vue | 4 + tests-ui/tests/store/modelStore.test.ts | 18 ++- 8 files changed, 154 insertions(+), 140 deletions(-) diff --git a/src/components/sidebar/tabs/ModelLibrarySidebarTab.vue b/src/components/sidebar/tabs/ModelLibrarySidebarTab.vue index 9d7231fd4..5dc561ad0 100644 --- a/src/components/sidebar/tabs/ModelLibrarySidebarTab.vue +++ b/src/components/sidebar/tabs/ModelLibrarySidebarTab.vue @@ -3,6 +3,22 @@ :title="$t('sideToolbar.modelLibrary')" class="bg-[var(--p-tree-background)]" > +