Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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]>
  • Loading branch information
susnux authored and nextcloud-command committed Nov 21, 2024
commit 2fed7bcf82df5ccaee83745ec379b573df962a70
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