Skip to content

Commit 81b1d51

Browse files
committed
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 a2590a4 commit 81b1d51

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
@@ -300,7 +300,12 @@ export default defineComponent({
300300
},
301301
302302
pageHeading(): string {
303-
return this.currentView?.name ?? t('files', 'Files')
303+
const title = this.currentView?.name ?? t('files', 'Files')
304+
305+
if (this.currentFolder === undefined || this.directory === '/') {
306+
return title
307+
}
308+
return `${this.currentFolder.displayname} - ${title}`
304309
},
305310
306311
/**
@@ -466,6 +471,13 @@ export default defineComponent({
466471
},
467472
468473
watch: {
474+
/**
475+
* Update the window title to match the page heading
476+
*/
477+
pageHeading() {
478+
document.title = `${this.pageHeading} - ${getCapabilities().theming?.productName ?? 'Nextcloud'}`
479+
},
480+
469481
/**
470482
* Handle rendering the custom empty view
471483
* @param show The current state if the custom empty view should be rendered

0 commit comments

Comments
 (0)