diff options
author | Grigorii K. Shartsev <me@shgk.me> | 2024-02-23 14:48:10 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-02-23 18:41:26 +0000 |
commit | d31455414807bdfede0aa55d2625184cfc4d84c3 (patch) | |
tree | f6fb32c56f0c1cea8a3583176326b38c3b611d89 | |
parent | 5087de9f9892e97f5f72b96230a7067fbe8063ea (diff) | |
download | nextcloud-server-d31455414807bdfede0aa55d2625184cfc4d84c3.tar.gz nextcloud-server-d31455414807bdfede0aa55d2625184cfc4d84c3.zip |
fix(files): page h1 heading
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
-rw-r--r-- | apps/files/src/views/FilesList.vue | 8 | ||||
-rw-r--r-- | apps/files/src/views/Navigation.vue | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index 4e80379f632..641dcf78c54 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -20,7 +20,7 @@ - --> <template> - <NcAppContent data-cy-files-content> + <NcAppContent :page-heading="pageHeading" data-cy-files-content> <div class="files-list__header"> <!-- Current folder breadcrumbs --> <BreadCrumbs :path="dir" @reload="fetchContent"> @@ -225,6 +225,10 @@ export default defineComponent({ return this.$navigation.active || this.$navigation.views.find((view) => view.id === (this.$route.params?.view ?? 'files')) }, + pageHeading(): string { + return this.currentView?.name ?? this.t('files', 'Files') + }, + /** * The current directory query. */ @@ -567,7 +571,7 @@ export default defineComponent({ * Refreshes the current folder on update. * * @param node is the file/folder being updated. - */ + */ onUpdatedNode(node?: Node) { if (node?.fileid === this.currentFolder?.fileid) { this.fetchContent() diff --git a/apps/files/src/views/Navigation.vue b/apps/files/src/views/Navigation.vue index ef82a036cee..38b6fcb7f49 100644 --- a/apps/files/src/views/Navigation.vue +++ b/apps/files/src/views/Navigation.vue @@ -82,7 +82,6 @@ import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js' import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js' import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js' -import { setPageHeading } from '../../../../core/src/OCP/accessibility.js' import { useViewConfigStore } from '../store/viewConfig.ts' import logger from '../logger.js' import type { View } from '@nextcloud/files' @@ -186,7 +185,6 @@ export default { // Closing any opened sidebar window?.OCA?.Files?.Sidebar?.close?.() this.$navigation.setActive(view) - setPageHeading(view.name) emit('files:navigation:changed', view) }, |