Skip to content

Commit a9b4e2f

Browse files
author
Test User
committed
fix: address AI review suggestions - add localStorage persistence and increase switch width
1 parent 607b382 commit a9b4e2f

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

dashboard/src/views/extension/InstalledPluginsTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ const pinnedPlugins = computed(() => {
362362
density="compact"
363363
hide-details
364364
class="ml-4"
365-
style="max-width: 160px"
365+
style="max-width: 200px"
366366
/>
367367
</div>
368368
</div>

dashboard/src/views/extension/useExtensionPage.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,19 @@ export const useExtensionPage = () => {
188188
const installedStatusFilter = ref("all");
189189
const installedSortBy = ref("default");
190190
const installedSortOrder = ref("desc");
191-
const pinUpdatesOnTop = ref(true);
191+
const getInitialPinUpdatesOnTop = () => {
192+
if (typeof window !== "undefined" && window.localStorage) {
193+
const saved = localStorage.getItem("pinUpdatesOnTop");
194+
return saved !== "false";
195+
}
196+
return true;
197+
};
198+
const pinUpdatesOnTop = ref(getInitialPinUpdatesOnTop());
199+
watch(pinUpdatesOnTop, (val) => {
200+
if (typeof window !== "undefined" && window.localStorage) {
201+
localStorage.setItem("pinUpdatesOnTop", val.toString());
202+
}
203+
});
192204
const loading_ = ref(false);
193205

194206
// 分页相关

0 commit comments

Comments
 (0)