Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Service/AccountService.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public function getConfig(?IUser $user = null): array {
$info['crl_filters'] = $this->getUserConfigCrlFilters($user);
$info['crl_sort'] = $this->getUserConfigCrlSort($user);
$info['grid_view'] = $this->getUserConfigByKey('grid_view', $user) === '1';
$info['signer_identify_tab'] = $this->getUserConfigByKey('signer_identify_tab', $user);

return array_filter($info);
}
Expand Down
21 changes: 19 additions & 2 deletions src/Components/RightSidebar/RequestSignatureTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@
:size="size"
:name="modalTitle"
@closing="filesStore.disableIdentifySigner()">
<NcAppSidebar :name="modalTitle">
<NcAppSidebar :name="modalTitle"
:active="activeTab"
@update:active="onTabChange">
<NcAppSidebarTab v-for="method in enabledMethods()"
:id="`tab-${method.name}`"
:key="method.name"
Expand Down Expand Up @@ -225,6 +227,7 @@ import router from '../../router/router.js'
import { useFilesStore } from '../../store/files.js'
import { useSidebarStore } from '../../store/sidebar.js'
import { useSignStore } from '../../store/sign.js'
import { useUserConfigStore } from '../../store/userconfig.js'

const iconMap = {
svgAccount,
Expand Down Expand Up @@ -274,7 +277,8 @@ export default {
const filesStore = useFilesStore()
const signStore = useSignStore()
const sidebarStore = useSidebarStore()
return { filesStore, signStore, sidebarStore }
const userConfigStore = useUserConfigStore()
return { filesStore, signStore, sidebarStore, userConfigStore }
},
data() {
return {
Expand All @@ -287,6 +291,7 @@ export default {
showConfirmRequest: false,
showConfirmRequestSigner: false,
selectedSigner: null,
activeTab: '',
}
},
computed: {
Expand Down Expand Up @@ -399,6 +404,8 @@ export default {
async mounted() {
subscribe('libresign:edit-signer', this.editSigner)
this.filesStore.disableIdentifySigner()

this.activeTab = this.userConfigStore.signer_identify_tab || ''
},
beforeUnmount() {
unsubscribe('libresign:edit-signer')
Expand All @@ -418,6 +425,10 @@ export default {
}
}
}, 1000)

this.debouncedTabChange = debounce((tabId) => {
this.userConfigStore.update('signer_identify_tab', tabId)
}, 500)
},
methods: {
getSvgIcon(name) {
Expand Down Expand Up @@ -486,6 +497,12 @@ export default {
this.signerToEdit = signer
this.filesStore.enableIdentifySigner()
},
onTabChange(tabId) {
if (this.activeTab !== tabId) {
this.activeTab = tabId
this.debouncedTabChange(tabId)
}
},
updateSigningOrder(signer, value) {
const order = parseInt(value, 10)
const file = this.filesStore.getFile()
Expand Down
Loading