Skip to content

Commit 20611dd

Browse files
fix(tabbar): issue of tabbar duplicate of note setting fixed
1 parent 258d7b5 commit 20611dd

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/presentation/pages/NoteSettings.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,16 @@ import useNoteSettings from '@/application/services/useNoteSettings';
102102
import useNote from '@/application/services/useNote';
103103
import { useHead } from 'unhead';
104104
import { useI18n } from 'vue-i18n';
105-
import { computed, ref, onMounted } from 'vue';
105+
import { computed, ref, onMounted, watch } from 'vue';
106106
import { useDebounceFn } from '@vueuse/core';
107107
import Team from '@/presentation/components/team/Team.vue';
108108
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card } from 'codex-ui/vue';
109109
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
110110
import { getTitle } from '@/infrastructure/utils/note';
111111
import { getTimeFromNow } from '@/infrastructure/utils/date';
112112
import InviteLink from '@/presentation/components/noteSettings/InviteLink.vue';
113+
import useHeader from '@/application/services/useHeader';
114+
import { useRoute } from 'vue-router';
113115
114116
const { t } = useI18n();
115117
@@ -120,6 +122,8 @@ const props = defineProps<{
120122
id: NoteId;
121123
}>();
122124
125+
const { patchOpenedPageByUrl } = useHeader();
126+
const route = useRoute();
123127
const { noteSettings, load: loadSettings, updateIsPublic, deleteNoteById, parentNote, setParent } = useNoteSettings();
124128
const { noteTitle, unlinkParent } = useNote({
125129
id: props.id,
@@ -201,7 +205,16 @@ function getParentURL(id: NoteId | undefined): string {
201205
* Changing the title in the browser
202206
*/
203207
useHead({
204-
title: t('noteSettings.title'),
208+
title: 'Note Settings',
209+
});
210+
211+
watch(noteTitle, (newTitle) => {
212+
const openPageInfo = {
213+
title: `Note Settings (${newTitle})`,
214+
url: route.path,
215+
};
216+
217+
patchOpenedPageByUrl(route.path, openPageInfo);
205218
});
206219
207220
onMounted(async () => {

0 commit comments

Comments
 (0)