add new workspaces for users
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { ref } from 'vue';
|
||||
import type { Workspace } from './workspaces';
|
||||
|
||||
export const logo = ref('');
|
||||
export const appName = ref('Attendance Records');
|
||||
export const databaseName = ref('members.dba');
|
||||
export const logo = ref<string>('');
|
||||
export const appName = ref<string>('Attendance Records');
|
||||
export const databaseName = ref<string>('members.dba');
|
||||
export const workspace = ref<string>('');
|
||||
|
||||
export type Settings = {
|
||||
appName: string;
|
||||
icon: string;
|
||||
databaseName: string;
|
||||
workspace: Workspace | null;
|
||||
primaryColor: string;
|
||||
primaryColorText: string;
|
||||
secondaryColor: string;
|
||||
@@ -19,6 +22,7 @@ export function DefaultSettings(): Settings {
|
||||
appName: 'Attendance Records',
|
||||
icon: '',
|
||||
databaseName: 'members.dba',
|
||||
workspace: { name: '', description: '', uuid: workspace.value },
|
||||
primaryColor: document.documentElement.style.getPropertyValue('--q-primary-text'),
|
||||
primaryColorText: document.documentElement.style.getPropertyValue('--q-primary'),
|
||||
secondaryColor: document.documentElement.style.getPropertyValue('--q-secondary'),
|
||||
|
||||
@@ -4,11 +4,12 @@ import type { Settings } from './settings';
|
||||
|
||||
export interface User {
|
||||
id: number;
|
||||
username: string;
|
||||
user: string;
|
||||
role: Role;
|
||||
permissions?: Permissions;
|
||||
settings?: Settings;
|
||||
newDatabase?: boolean;
|
||||
workspaces?: string[];
|
||||
}
|
||||
|
||||
export interface UserState {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Role } from './roles';
|
||||
import type { Settings } from './settings';
|
||||
import type { Workspace } from './workspaces';
|
||||
|
||||
export interface User {
|
||||
id?: number;
|
||||
@@ -11,6 +12,7 @@ export interface User {
|
||||
password?: string;
|
||||
newPassword?: string;
|
||||
settings?: Settings;
|
||||
workspaces?: Workspace[];
|
||||
}
|
||||
|
||||
export type Users = User[];
|
||||
|
||||
8
src/vueLib/models/workspaces.ts
Normal file
8
src/vueLib/models/workspaces.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface Workspace {
|
||||
id?: number;
|
||||
name: string;
|
||||
uuid?: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export type Workspaces = Workspace[];
|
||||
Reference in New Issue
Block a user