-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor version display in webconsole
- Loading branch information
Showing
8 changed files
with
167 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
{ | ||
"name": "template-vitejs-vue3-tailwindcss-fontawesome", | ||
"private": true, | ||
"version": "1.1.99-31", | ||
"version": "1.1.99-32", | ||
"type": "module", | ||
"scripts": { | ||
"build": "vite build && gulp licenses", | ||
"dev": "vite", | ||
"create-cert": "openssl req -x509 -newkey rsa:4096 -keyout localhost.key -out localhost.pem -sha256 -nodes -days 365", | ||
"devserver": "npx nodemon -V -w ./src -e js,vue,ts,css,html --exec 'npm run build && node devserver.js'", | ||
"preview": "vite preview" | ||
"preview": "vite preview", | ||
"create-cert": "openssl req -x509 -newkey rsa:4096 -keyout localhost.key -out localhost.pem -sha256 -nodes -days 365", | ||
"dev": "vite", | ||
"build": "vite build && gulp licenses" | ||
}, | ||
"dependencies": { | ||
"pinia": "^2.1.7", | ||
"@heroicons/vue": "^2.1.3", | ||
"vue": "^3.4.27", | ||
"@pqina/flip": "^1.8.3", | ||
"pinia": "^2.1.7", | ||
"@headlessui/vue": "^1.7.22", | ||
"axios": "^1.7.2", | ||
"jdenticon": "^3.3.0", | ||
"@pqina/flip": "^1.8.3", | ||
"@heroicons/vue": "^2.1.3", | ||
"vue-router": "^4.3.2", | ||
"axios": "^1.7.2" | ||
"vue-router": "^4.3.3" | ||
}, | ||
"devDependencies": { | ||
"sass": "^1.77.2", | ||
"gulp": "^5.0.0", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"@types/glob": "^8.1.0", | ||
"ts-node": "^10.9.2", | ||
"glob": "10.4.1", | ||
"nodemon": "^3.1.0", | ||
"gulp": "^5.0.0", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"sass": "^1.77.5", | ||
"gulp-append-prepend": "^1.0.9", | ||
"vite-plugin-static-copy": "^1.0.5", | ||
"postcss-purgefonts": "^1.0.2", | ||
"@fullhuman/postcss-purgecss": "^6.0.0", | ||
"gulp-if": "^3.0.0", | ||
"gulp-append-prepend": "^1.0.9", | ||
"typescript": "^5.4.5", | ||
"postcss": "^8.4.38", | ||
"express": "^4.19.2", | ||
"nodemon": "^3.1.3", | ||
"@vitejs/plugin-vue": "^5.0.5", | ||
"@fullhuman/postcss-purgecss": "^6.0.0", | ||
"@types/glob": "^8.1.0", | ||
"vite": "^5.2.13", | ||
"tailwindcss": "^3.4.4", | ||
"@tailwindcss/forms": "^0.5.7", | ||
"autoprefixer": "^10.4.19", | ||
"ts-node": "^10.9.2", | ||
"postcss": "^8.4.38", | ||
"npm-check-updates": "^16.14.20", | ||
"@tailwindcss/forms": "^0.5.7", | ||
"tailwindcss": "^3.4.3", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"vite": "^5.2.11" | ||
"typescript": "^5.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
import { Token, UserInfo,Configuration } from "@/api"; | ||
import { defineStore } from "pinia"; | ||
export const useUserStore = defineStore('user', { | ||
state: () => { | ||
return { | ||
user: null as UserInfo | null, | ||
api_configuration: null as Configuration | null, | ||
id: null as string | null, | ||
uuid_base64: null as string | null, | ||
oidc_code: null as string | null, | ||
oidc_provider: null as string | null, | ||
} | ||
}, | ||
}) | ||
|
||
import { Token, UserInfo, Configuration } from "@/api"; | ||
import { StoreDefinition, defineStore } from "pinia"; | ||
|
||
/** | ||
* The user store. | ||
* | ||
* @export | ||
* @type {StoreDefinition<"user", { user: UserInfo; api_configuration: Configuration; id: string; uuid_base64: string; oidc_code: string; oidc_provider: string; }, {}, {}>} | ||
* @property {UserInfo | null} user The user information. | ||
* @property {Configuration | null} api_configuration The API configuration. | ||
* @property {string | null} id The user ID. | ||
* @property {string | null} uuid_base64 The user UUID in base64. | ||
* @property {string | null} oidc_code The OIDC code. | ||
* @property {string | null} oidc_provider The OIDC provider. | ||
**/ | ||
export const useUserStore: StoreDefinition<"user", { | ||
user: UserInfo; | ||
api_configuration: Configuration; | ||
id: string; | ||
uuid_base64: string; | ||
oidc_code: string; | ||
oidc_provider: string; | ||
}, {}, {}> = defineStore('user', { | ||
state: () => { | ||
return { | ||
user: null as UserInfo | null, | ||
api_configuration: null as Configuration | null, | ||
id: null as string | null, | ||
uuid_base64: null as string | null, | ||
oidc_code: null as string | null, | ||
oidc_provider: null as string | null, | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { getClientVersion, getServerVersion } from "@/utilities/api"; | ||
import { StoreDefinition, defineStore } from "pinia"; | ||
|
||
/** | ||
* The versions store. | ||
* | ||
* @export | ||
* @type {StoreDefinition<"versions", { serverVersion: string; clientVersion: string; }, {}, { fetchVersion(): Promise<void>; }>} | ||
* @property {string} serverVersion The server version. | ||
* @property {string} clientVersion The client version. | ||
*/ | ||
export const useVersionsStore: StoreDefinition<"versions", { | ||
serverVersion: string | null; | ||
clientVersion: string | null; | ||
}, {}, { | ||
fetchVersions(): Promise<void>; | ||
}> = defineStore('versions', { | ||
state: () => ({ | ||
serverVersion: null as string, | ||
clientVersion: null as string, | ||
}), | ||
actions: { | ||
async fetchVersions() { | ||
// console.log("Fetching versions"); | ||
if (!this.serverVersion) { | ||
this.serverVersion = await getServerVersion(); | ||
} | ||
if (!this.clientVersion) { | ||
this.clientVersion = await getClientVersion(); | ||
} | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters