UX: Prevent unnecessary transition when loading Settings
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
e8d11deb49
commit
4232a02a4f
3 changed files with 19 additions and 1 deletions
|
@ -108,6 +108,10 @@ export default {
|
|||
active = tabs.findIndex((t) => t.name === this.tab);
|
||||
}
|
||||
|
||||
if (active < 0) {
|
||||
active = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
tabs: tabs,
|
||||
demo: isDemo,
|
||||
|
|
|
@ -70,13 +70,23 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
let active = 0;
|
||||
|
||||
if (typeof this.$route.name === 'string' && this.$route.name !== '') {
|
||||
active = tabs.findIndex((t) => t.name === this.$route.name);
|
||||
}
|
||||
|
||||
if (active < 0) {
|
||||
active = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
tabs: tabs,
|
||||
demo: isDemo,
|
||||
public: isPublic,
|
||||
config: config,
|
||||
readonly: isReadOnly,
|
||||
active: 0,
|
||||
active: active,
|
||||
rtl: this.$rtl,
|
||||
};
|
||||
},
|
||||
|
|
|
@ -137,6 +137,10 @@ export default {
|
|||
active = tabs.findIndex((t) => t.name === this.tab);
|
||||
}
|
||||
|
||||
if (active < 0) {
|
||||
active = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
tabs: tabs,
|
||||
demo: isDemo,
|
||||
|
|
Loading…
Reference in a new issue