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> <template #footer>
<ul class="app-navigation__settings"> <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" /> <CogIcon slot="icon" :size="20" />
</NcAppNavigationItem> </NcAppNavigationItem>
</ul> </ul>

View File

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

View File

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