This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from SkywardAI/info-page
Added information page for display frontend and backend version
- Loading branch information
Showing
5 changed files
with
39 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FRONTEND_APP_VERSION = '0.1.3' |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup> | ||
import getVersions from '~/tools/getVersions'; | ||
const frontendVersion = ref('Loading'); | ||
const backendVersion = ref('Loading'); | ||
getVersions('frontend').then(version=>frontendVersion.value = version); | ||
getVersions('backend').then(version=>backendVersion.value = version); | ||
</script> | ||
<template> | ||
<div class="p-10 pb-5"> | ||
<p class="mb-5">Frontend Version: v{{ frontendVersion }}</p> | ||
<p class="mb-5">Backend Version: v{{ backendVersion }}</p> | ||
</div> | ||
</template> |
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,11 @@ | ||
import request from "./request"; | ||
|
||
async function getVersions(ofEnd:'frontend'|'backend') { | ||
if(ofEnd === 'frontend') { | ||
return useRuntimeConfig().public.FRONTEND_APP_VERSION | ||
} else if(ofEnd === 'backend') { | ||
return (await request('/version')).version | ||
} | ||
} | ||
|
||
export default getVersions; |