Skip to content

Commit

Permalink
Merge pull request #43784 from nextcloud/fix/files--h1
Browse files Browse the repository at this point in the history
fix(files): page h1 heading
  • Loading branch information
ShGKme authored Feb 23, 2024
2 parents 1629b41 + e7361df commit 152b841
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 29 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 @@ -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'
Expand Down Expand Up @@ -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)
},
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions dist/files-main.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,6 @@
*
*/

/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
*
Expand Down
2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 152b841

Please sign in to comment.