fix: 我的收藏分组独立保留 — 收藏的受控工具不再被抽进授权应用组, favorites置顶原样显示, 授权组仅从原始分类抽取

This commit is contained in:
personal82555 committed 2026-10-12 21:01:58 +08:00
1 parent 214a4486d3
commit 08fcce6517
2 files changed
+11 -5

No files matched your search

+5 -2
View File
@@ -31,8 +31,11 @@ const { favoriteTools, toolsByCategory } = storeToRefs(toolStore);
const NO_SIDEBAR = new Set(['/user-center', '/admin']);
const fullBleed = computed(() => NO_SIDEBAR.has(route.path));
const favoriteCategory = computed<ToolCategory | null>(() =>
favoriteTools.value.length > 0 ? { name: t('tools.categories.favorite-tools'), components: favoriteTools.value } : null,
);
const tools = computed<ToolCategory[]>(() => [
...(favoriteTools.value.length > 0 ? [{ name: t('tools.categories.favorite-tools'), components: favoriteTools.value }] : []),
...toolsByCategory.value,
]);
</script>
@@ -62,7 +65,7 @@ const tools = computed<ToolCategory[]>(() => [
</div>
</div>
<CollapsibleToolMenu :tools-by-category="tools" />
<CollapsibleToolMenu :tools-by-category="tools" :favorite-category="favoriteCategory" />
<div class="footer">
<div>