Quellcode durchsuchen

feat: tabs in create do sort actions

nian vor 2 Monaten
Ursprung
Commit
8406e04ad4
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      src/stores/tabs.ts

+ 4 - 0
src/stores/tabs.ts

@@ -38,6 +38,10 @@ export const useTabsStore = defineStore('tabsStore', () => {
     if (!tabs.value.some(({ path }) => path === tab.path)) {
       const id = Date.now()
       tabs.value.push({ ...tab, id })
+
+      if (tab.pinned) {
+        sortTabs()
+      }
     }
 
     setTabActivePath(tab.path)