]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): page h1 heading
authorGrigorii K. Shartsev <me@shgk.me>
Fri, 23 Feb 2024 13:48:10 +0000 (14:48 +0100)
committerGrigorii K. Shartsev <me@shgk.me>
Fri, 23 Feb 2024 13:48:41 +0000 (14:48 +0100)
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
apps/files/src/views/FilesList.vue
apps/files/src/views/Navigation.vue

index 4e80379f632ba59834fbc79da3861e87953086c7..641dcf78c541bda7b82bb0e0f38851d196b43676 100644 (file)
@@ -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()
index 38f7a980a91110d4f90b5e99bd8e5b12341c6f9d..020986d7c8530ad9ac2301e6ed1274e0bdfb317d 100644 (file)
@@ -84,7 +84,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 NavigationQuota from '../components/NavigationQuota.vue'
@@ -187,7 +186,6 @@ export default {
                        // Closing any opened sidebar
                        window?.OCA?.Files?.Sidebar?.close?.()
                        this.$navigation.setActive(view)
-                       setPageHeading(view.name)
                        emit('files:navigation:changed', view)
                },