@@ -102,14 +102,16 @@ import useNoteSettings from '@/application/services/useNoteSettings';
102
102
import useNote from ' @/application/services/useNote' ;
103
103
import { useHead } from ' unhead' ;
104
104
import { useI18n } from ' vue-i18n' ;
105
- import { computed , ref , onMounted } from ' vue' ;
105
+ import { computed , ref , onMounted , watch } from ' vue' ;
106
106
import { useDebounceFn } from ' @vueuse/core' ;
107
107
import Team from ' @/presentation/components/team/Team.vue' ;
108
108
import { Section , Row , Switch , Button , Heading , Fieldset , Input , Card } from ' codex-ui/vue' ;
109
109
import ThreeColsLayout from ' @/presentation/layouts/ThreeColsLayout.vue' ;
110
110
import { getTitle } from ' @/infrastructure/utils/note' ;
111
111
import { getTimeFromNow } from ' @/infrastructure/utils/date' ;
112
112
import InviteLink from ' @/presentation/components/noteSettings/InviteLink.vue' ;
113
+ import useHeader from ' @/application/services/useHeader' ;
114
+ import { useRoute } from ' vue-router' ;
113
115
114
116
const { t } = useI18n ();
115
117
@@ -120,6 +122,8 @@ const props = defineProps<{
120
122
id: NoteId ;
121
123
}>();
122
124
125
+ const { patchOpenedPageByUrl } = useHeader ();
126
+ const route = useRoute ();
123
127
const { noteSettings, load : loadSettings, updateIsPublic, deleteNoteById, parentNote, setParent } = useNoteSettings ();
124
128
const { noteTitle, unlinkParent } = useNote ({
125
129
id: props .id ,
@@ -204,6 +208,15 @@ useHead({
204
208
title: t (' noteSettings.title' ),
205
209
});
206
210
211
+ watch (noteTitle , (newTitle ) => {
212
+ const openPageInfo = {
213
+ title: ` ${t (' noteSettings.settings' )} (${newTitle }) ` ,
214
+ url: route .path ,
215
+ };
216
+
217
+ patchOpenedPageByUrl (route .path , openPageInfo );
218
+ });
219
+
207
220
onMounted (async () => {
208
221
await loadSettings (props .id );
209
222
parentURL .value = getParentURL (parentNote .value ?.id );
0 commit comments