diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index 6cbaecfa023..9bb1cc05d81 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -301,7 +301,12 @@ export default defineComponent({ }, pageHeading(): string { - return this.currentView?.name ?? t('files', 'Files') + const title = this.currentView?.name ?? t('files', 'Files') + + if (this.currentFolder === undefined || this.directory === '/') { + return title + } + return `${this.currentFolder.displayname} - ${title}` }, /** @@ -467,6 +472,13 @@ export default defineComponent({ }, watch: { + /** + * Update the window title to match the page heading + */ + pageHeading() { + document.title = `${this.pageHeading} - ${getCapabilities().theming?.productName ?? 'Nextcloud'}` + }, + /** * Handle rendering the custom empty view * @param show The current state if the custom empty view should be rendered