Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10670 Clean up 'back menu' as we always show the menu #476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading