update to v2.1.0 #5

Merged
crimsen merged 6 commits from develop into main 2024-10-08 13:23:44 +00:00
3 changed files with 45 additions and 5 deletions
Showing only changes of commit 58544c7563 - Show all commits

View File

@ -22,6 +22,7 @@ export const useUserStore = defineStore({
state: () => ({ state: () => ({
roles: [] as FG.Role[], roles: [] as FG.Role[],
permissions: [] as FG.Permission[], permissions: [] as FG.Permission[],
userSettings: {} as FG.UserSettings,
// list of all users, include deleted ones, use `users` getter for list of active ones // list of all users, include deleted ones, use `users` getter for list of active ones
_users: [] as FG.User[], _users: [] as FG.User[],
// Internal flags for deciding if lists need to force-loaded // Internal flags for deciding if lists need to force-loaded
@ -218,5 +219,35 @@ export const useUserStore = defineStore({
await api.delete(`/roles/${role}`); await api.delete(`/roles/${role}`);
this.roles = this.roles.filter((r) => r.id !== role); this.roles = this.roles.filter((r) => r.id !== role);
}, },
/** Get Settings for display name mode
* @param force If set to true a fresh list is loaded from backend even when a local copy is available
* @throws Probably an AxiosError if request failed
* @returns Settings for display name mode
*/
async getDisplayNameModeSetting(force = false): Promise<string> {
const mainStore = useMainStore();
if (force) {
const { data } = await api.get<{ data: string }>(
`users/${mainStore.currentUser.userid}/setting/display_name_mode`
);
this.userSettings['display_name'] = data.data;
}
return this.userSettings['display_name'];
},
/** Set Settings for display name mode
* @param mode New display name mode
* @throws Probably an AxiosError if request failed
* @returns Settings for display name mode
*/
async setDisplayNameModeSetting(mode: string): Promise<string> {
const mainStore = useMainStore();
await api.put(`users/${mainStore.currentUser.userid}/setting/display_name_mode`, {
data: mode,
});
this.userSettings['display_name'] = mode;
return mode;
},
}, },
}); });

View File

@ -3,4 +3,4 @@ module.exports = [
// '@flaschengeist/balance', // '@flaschengeist/balance',
// '@flaschengeist/schedule', // '@flaschengeist/schedule',
// '@flaschengeist/pricelist', // '@flaschengeist/pricelist',
] '@flaschengeist/schedule',

View File

@ -15,12 +15,18 @@ const { configure } = require('quasar/wrappers');
const operation = () => { const operation = () => {
const custom_plgns = require('./plugin.config.js'); const custom_plgns = require('./plugin.config.js');
const required_plgns = require('./src/vendor-plugin.config.js'); const required_plgns = require('./src/vendor-plugin.config.js');
const plugins = [...custom_plgns, ...required_plgns].map((v) => `import("${v}").catch(() => "${v}")`); const plugins = [...custom_plgns, ...required_plgns].map(
const replace = new ReplaceOperation('all', `\\/\\* *INSERT_PLUGIN_LIST *\\*\\/`, `${plugins.join(', ')}`); (v) => `import("${v}").catch(() => "${v}")`
);
const replace = new ReplaceOperation(
'all',
`\\/\\* *INSERT_PLUGIN_LIST *\\*\\/`,
`${plugins.join(', ')}`
);
return replace; return replace;
}; };
module.exports = configure(function(/* ctx */) { module.exports = configure(function (/* ctx */) {
return { return {
// https://quasar.dev/quasar-cli/supporting-ts // https://quasar.dev/quasar-cli/supporting-ts
supportTS: { supportTS: {
@ -60,7 +66,7 @@ module.exports = configure(function(/* ctx */) {
// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build: { build: {
vueRouterMode: 'history', // available values: 'hash', 'history' vueRouterMode: 'history', // available values: 'hash', 'history'
//publicPath: 'flaschengeist2',
// transpile: false, // transpile: false,
// Add dependencies for transpiling with Babel (Array of string/regex) // Add dependencies for transpiling with Babel (Array of string/regex)
@ -214,5 +220,8 @@ module.exports = configure(function(/* ctx */) {
// chainWebpack also available besides this extendWebpack // chainWebpack also available besides this extendWebpack
}, },
}, },
bin: {
linuxAndroidStudio: '/home/crimsen/.local/share/JetBrains/Toolbox/scripts/studio',
},
}; };
}); });