Skip to content

Commit

Permalink
Merge pull request #49419 from nextcloud/backport/49380/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Nov 21, 2024
2 parents 09ad395 + 9647bb5 commit 688d69e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 13 additions & 1 deletion apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,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}`
},

/**
Expand Down Expand Up @@ -426,6 +431,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
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 688d69e

Please sign in to comment.