mirror of
https://github.com/nextcloud/server.git
synced 2026-02-21 17:01:34 -05:00
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 <opensource@fthiessen.de>
This commit is contained in:
parent
09ad3951e3
commit
2fed7bcf82
1 changed files with 13 additions and 1 deletions
|
|
@ -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}`
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue