Skip to content

Commit

Permalink
fix(files): page h1 heading
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme authored and backportbot[bot] committed Feb 23, 2024
1 parent 5087de9 commit d314554
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions apps/files/src/views/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
},
Expand Down

0 comments on commit d314554

Please sign in to comment.