Skip to content

Commit 1134b3e

Browse files
authored
Merge pull request #49380 from nextcloud/fix/files-page-title
2 parents 37936bc + 1e4a01f commit 1134b3e

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

apps/files/src/views/FilesList.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@ export default defineComponent({
301301
},
302302
303303
pageHeading(): string {
304-
return this.currentView?.name ?? t('files', 'Files')
304+
const title = this.currentView?.name ?? t('files', 'Files')
305+
306+
if (this.currentFolder === undefined || this.directory === '/') {
307+
return title
308+
}
309+
return `${this.currentFolder.displayname} - ${title}`
305310
},
306311
307312
/**
@@ -467,6 +472,13 @@ export default defineComponent({
467472
},
468473
469474
watch: {
475+
/**
476+
* Update the window title to match the page heading
477+
*/
478+
pageHeading() {
479+
document.title = `${this.pageHeading} - ${getCapabilities().theming?.productName ?? 'Nextcloud'}`
480+
},
481+
470482
/**
471483
* Handle rendering the custom empty view
472484
* @param show The current state if the custom empty view should be rendered

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)