Merge pull request #17865 from martenson/config-type

[24.0] wait for config to load with user prefs options
This commit is contained in:
Marius van den Beek
2024-03-29 22:24:25 +01:00
committed by GitHub
+12 -4
View File
@@ -204,12 +204,20 @@ export default {
return Object.fromEntries(enabledPreferences);
},
hasLogout() {
const Galaxy = getGalaxyInstance();
return !!Galaxy.session_csrf_token && !this.config.single_user;
if (this.isConfigLoaded) {
const Galaxy = getGalaxyInstance();
return !!Galaxy.session_csrf_token && !this.config.single_user;
} else {
return false;
}
},
hasThemes() {
const themes = Object.keys(this.config.themes);
return themes?.length > 1 ?? false;
if (this.isConfigLoaded) {
const themes = Object.keys(this.config.themes);
return themes?.length > 1 ?? false;
} else {
return false;
}
},
userPermissionsUrl() {
return withPrefix("/user/permissions");