122122 :size =" size"
123123 :name =" modalTitle"
124124 @closing =" filesStore.disableIdentifySigner()" >
125- <NcAppSidebar :name =" modalTitle" >
125+ <NcAppSidebar :name =" modalTitle"
126+ :active =" activeTab"
127+ @update:active =" onTabChange" >
126128 <NcAppSidebarTab v-for =" method in enabledMethods()"
127129 :id =" `tab-${method.name}`"
128130 :key =" method.name"
@@ -225,6 +227,7 @@ import router from '../../router/router.js'
225227import { useFilesStore } from ' ../../store/files.js'
226228import { useSidebarStore } from ' ../../store/sidebar.js'
227229import { useSignStore } from ' ../../store/sign.js'
230+ import { useUserConfigStore } from ' ../../store/userconfig.js'
228231
229232const iconMap = {
230233 svgAccount,
@@ -274,7 +277,8 @@ export default {
274277 const filesStore = useFilesStore ()
275278 const signStore = useSignStore ()
276279 const sidebarStore = useSidebarStore ()
277- return { filesStore, signStore, sidebarStore }
280+ const userConfigStore = useUserConfigStore ()
281+ return { filesStore, signStore, sidebarStore, userConfigStore }
278282 },
279283 data () {
280284 return {
@@ -287,6 +291,7 @@ export default {
287291 showConfirmRequest: false ,
288292 showConfirmRequestSigner: false ,
289293 selectedSigner: null ,
294+ activeTab: ' ' ,
290295 }
291296 },
292297 computed: {
@@ -399,6 +404,8 @@ export default {
399404 async mounted () {
400405 subscribe (' libresign:edit-signer' , this .editSigner )
401406 this .filesStore .disableIdentifySigner ()
407+
408+ this .activeTab = this .userConfigStore .signer_identify_tab || ' '
402409 },
403410 beforeUnmount () {
404411 unsubscribe (' libresign:edit-signer' )
@@ -418,6 +425,10 @@ export default {
418425 }
419426 }
420427 }, 1000 )
428+
429+ this .debouncedTabChange = debounce ((tabId ) => {
430+ this .userConfigStore .update (' signer_identify_tab' , tabId)
431+ }, 500 )
421432 },
422433 methods: {
423434 getSvgIcon (name ) {
@@ -486,6 +497,12 @@ export default {
486497 this .signerToEdit = signer
487498 this .filesStore .enableIdentifySigner ()
488499 },
500+ onTabChange (tabId ) {
501+ if (this .activeTab !== tabId) {
502+ this .activeTab = tabId
503+ this .debouncedTabChange (tabId)
504+ }
505+ },
489506 updateSigningOrder (signer , value ) {
490507 const order = parseInt (value, 10 )
491508 const file = this .filesStore .getFile ()
0 commit comments