settings: add fragment

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/888/head
Varun Patil 2023-10-24 11:33:55 -07:00
parent f7abbce9de
commit fc53e020cf
3 changed files with 15 additions and 1 deletions

View File

@ -26,7 +26,7 @@
<template #footer>
<ul class="app-navigation__settings">
<NcAppNavigationItem :name="t('memories', 'Settings')" @click="showSettings">
<NcAppNavigationItem :name="t('memories', 'Settings')" @click="showSettings" href="#ss">
<CogIcon slot="icon" :size="20" />
</NcAppNavigationItem>
</ul>

View File

@ -226,10 +226,23 @@ export default defineComponent({
},
},
watch: {
open(value: boolean) {
utils.fragment.if(value, utils.fragment.types.settings);
},
},
mounted() {
if (this.isNative) {
this.refreshNativeConfig();
}
// Fragment navigation
utils.bus.on('memories:fragment:pop:settings', this.onClose);
},
beforeDestroy() {
utils.bus.off('memories:fragment:pop:settings', this.onClose);
},
methods: {

View File

@ -7,6 +7,7 @@ enum FragmentType {
modal = 'm',
sidebar = 'i',
editor = 'e',
settings = 'ss',
}
/** Names of fragments */