Frontend: Disable route when PHOTOPRISM_SETTINGS_HIDDEN is true #474
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
c5beaeaddb
commit
b3bb2883fc
|
@ -268,6 +268,13 @@ export default [
|
|||
component: Settings,
|
||||
meta: {title: $gettext("Settings"), auth: true, background: "application-light"},
|
||||
props: {tab: 0},
|
||||
beforeEnter: (to, from, next) => {
|
||||
if (c.disableSettings) {
|
||||
next({name: "home"});
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "settings_sync",
|
||||
|
@ -275,6 +282,13 @@ export default [
|
|||
component: Settings,
|
||||
meta: {title: $gettext("Settings"), auth: true, background: "application-light"},
|
||||
props: {tab: 1},
|
||||
beforeEnter: (to, from, next) => {
|
||||
if (c.disableSettings) {
|
||||
next({name: "home"});
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "settings_account",
|
||||
|
@ -282,6 +296,13 @@ export default [
|
|||
component: Settings,
|
||||
meta: {title: $gettext("Settings"), auth: true, background: "application-light"},
|
||||
props: {tab: 2},
|
||||
beforeEnter: (to, from, next) => {
|
||||
if (c.disableSettings) {
|
||||
next({name: "home"});
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "discover",
|
||||
|
|
|
@ -136,6 +136,7 @@ func (c *Config) PublicConfig() ClientConfig {
|
|||
Copyright: c.Copyright(),
|
||||
Debug: c.Debug(),
|
||||
ReadOnly: c.ReadOnly(),
|
||||
DisableSettings: c.SettingsHidden(),
|
||||
Public: c.Public(),
|
||||
Experimental: c.Experimental(),
|
||||
Thumbs: Thumbs,
|
||||
|
|
Loading…
Reference in a new issue