UX: Disable back button in full-screen viewers and editors
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
13bd176f0f
commit
9be5f332d2
|
@ -109,7 +109,10 @@ const router = new Router({
|
|||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) {
|
||||
if (document.documentElement.className) {
|
||||
// Disable back button in full-screen viewers and editors.
|
||||
next(false);
|
||||
} else if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) {
|
||||
next({ name: "home" });
|
||||
} else if (to.matched.some((record) => record.meta.admin)) {
|
||||
if (isPublic || session.isAdmin()) {
|
||||
|
|
|
@ -109,7 +109,10 @@ const router = new Router({
|
|||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) {
|
||||
if (document.documentElement.className) {
|
||||
// Disable back button in full-screen viewers and editors.
|
||||
next(false);
|
||||
} else if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) {
|
||||
next({ name: "home" });
|
||||
} else if (to.matched.some((record) => record.meta.admin)) {
|
||||
if (isPublic || session.isAdmin()) {
|
||||
|
|
Loading…
Reference in a new issue