display CLI & UI versions in Settings

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-08-13 00:13:50 +02:00
parent ff75f1bc58
commit 6137965d22
2 changed files with 52 additions and 2 deletions
+32 -1
View File
@@ -25,8 +25,39 @@ function getAuthHeader() {
}
/* DATA */
export async function getVersion() {
console.log('[getVersion]')
const r = await fetch('http://localhost:5572/core/version', {
method: 'POST',
headers: getAuthHeader(),
})
.catch((e) => {
console.log('error', e)
throw e
})
.then(
(res) =>
res.json() as Promise<{
version: `v${string}`
decomposed: [number, number, number]
isGit: boolean
isBeta: boolean
os: string
arch: string
goVersion: string
linking: string
goTags: string
}>
)
console.log('[getVersion] r', r)
return r
}
export async function listRemotes() {
console.log('[listRemotes] CALLED')
console.log('[listRemotes]')
const r = await fetch('http://localhost:5572/config/listremotes', {
method: 'POST',