Skip to content

Commit 59ee4af

Browse files
susnuxAndyScherzinger
authored andcommitted
fix(files): Restore page title (folder - view - product)
* Folder: Current folder if not root * View: Name of current view * Product: Nextcloud Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 34bccd1 commit 59ee4af

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

apps/files/src/views/FilesList.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ export default defineComponent({
255255
},
256256
257257
pageHeading(): string {
258-
return this.currentView?.name ?? this.t('files', 'Files')
258+
const title = this.currentView?.name ?? t('files', 'Files')
259+
260+
if (this.currentFolder === undefined || this.dir === '/') {
261+
return title
262+
}
263+
return `${this.currentFolder.displayname} - ${title}`
259264
},
260265
261266
/**
@@ -440,6 +445,13 @@ export default defineComponent({
440445
},
441446
442447
watch: {
448+
/**
449+
* Update the window title to match the page heading
450+
*/
451+
pageHeading() {
452+
document.title = `${this.pageHeading} - ${getCapabilities().theming?.productName ?? 'Nextcloud'}`
453+
},
454+
443455
currentView(newView, oldView) {
444456
if (newView?.id === oldView?.id) {
445457
return

0 commit comments

Comments
 (0)