Skip to content

Commit

Permalink
Move heading to the main content
Browse files Browse the repository at this point in the history
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
  • Loading branch information
JuliaKirschenheuter committed Apr 24, 2023
1 parent 1c56305 commit 18bd159
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/Photos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</NcAppNavigationItem>
</template>
</NcAppNavigation>
<NcAppContent>
<NcAppContent :page-heading="pageHeading">
<router-view />

<!-- svg img loading placeholder (linked to the File component) -->
Expand Down Expand Up @@ -169,6 +169,12 @@ export default {
}
},
computed: {
pageHeading() {
return this.$route.meta.rootTitle?.(this.$route)
},
},
async beforeMount() {
// Register excluded paths
const files = loadState('photos', 'nomedia-paths', [])
Expand Down
1 change: 0 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ router.afterEach((to) => {
const rootTitle = to.meta.rootTitle?.(to)
if (rootTitle) {
document.title = `${rootTitle} - ${baseTitle}`
OCP.Accessibility.setPageHeading(rootTitle)
} else {
document.title = baseTitle
}
Expand Down

0 comments on commit 18bd159

Please sign in to comment.