Skip to content

Commit

Permalink
pkp/pkp-lib#10670 Clean up 'back menu' as we always show the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Jan 5, 2025
1 parent 8d6954b commit 052cf65
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions src/components/Container/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,51 +45,7 @@ export default {
unreadTasksCount: 0,
};
},
computed: {
/**
* The menu item entry for a back-to-dashboard link
*
* @return {Object|null}
*/
backToDashboardLink() {
if (this.useBackToDashboard) {
return this.menu[Object.keys(this.menu)[0]];
}
return null;
},
/**
* The new label for the back-to-dashboard link
*
* Converts "Submissions" to "Back to Submissions"
*
* @return {String}
*/
backToDashboardLabel() {
if (this.backToDashboardLink) {
return this.t('navigation.backTo', {
page: this.backToDashboardLink.name,
});
}
return null;
},
/**
* Should a back-to-dashboard link be shown instead of a
* full navigation menu?
*
* This is the case when the nav menu contains only one link.
*
* @return {Boolean}
*/
useBackToDashboard() {
return (
!!this.menu &&
Object.keys(this.menu).length === 1 &&
!this.menu[Object.keys(this.menu)[0]].isCurrent
);
},
},
computed: {},
mounted() {
/**
* Fire a callback when the URL #hash is changed
Expand Down

0 comments on commit 052cf65

Please sign in to comment.