5 Commits

Author SHA1 Message Date
GL.iNet-Yongping.Xie 1c473458cf Merge remote-tracking branch 'origin/dev-ui-0105' into feature/version 2026-01-05 18:41:05 -08:00
GL.iNet-Yongping.Xie c6c09dbae1 feat: show version in GUI
Display the current application version in the GUI.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2026-01-05 18:40:03 -08:00
GL.iNet-Yongping.Xie 9258aa5f43 feat: show version in GUI
Display the current application version in the GUI.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2026-01-05 18:36:16 -08:00
pengyu.lu 8994cccb25 feat: Add the display of version numbers 2026-01-05 14:36:34 +08:00
GL.iNet-Yongping.Xie 60994b9513 fix: update documentation formatting
Update documentation formatting.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-12-29 00:22:03 -08:00
9 changed files with 41 additions and 21 deletions
+1
View File
@@ -67,6 +67,7 @@ We provide **two** ways to install GLKVM Cloud:
#### A) One-line installer (recommended, x86_64/amd64)
> **Note:** The one-line installer is **Docker-based**. It automates Docker/Compose setup, pulls images, renders configs from templates, and starts services for you.
>
> **Platform:** currently supports **x86_64 (amd64)** only.
Run **as root**:
+2
View File
@@ -67,6 +67,7 @@
#### A) 一键安装脚本(推荐,仅支持 x86_64 / amd64)
> **注意:** 一键安装脚本基于 **Docker**。它会自动完成 Docker / Docker Compose 的安装、拉取镜像、根据模板渲染配置文件,并启动所有服务。
>
> **平台支持:** 当前仅支持 **x86_64(amd64)** 平台。
使用 **root 权限** 运行以下命令安装 GLKVM 轻量云:
@@ -78,6 +79,7 @@
#### B) 使用 Docker 手动安装
> 完整参考文档请查看:[`docker-compose/README-CN.md`](https://github.com/gl-inet/glkvm-cloud/blob/main/docker-compose/README-CN.md)
>
> 平台支持: 同时支持 x86_64(amd64) 与 arm64(AArch64) 平台。
+4 -3
View File
@@ -432,9 +432,10 @@ func (srv *RttyServer) ListenAPI() error {
r.GET("/auth-config", func(c *gin.Context) {
authConfig := gin.H{
"ldapEnabled": cfg.LdapEnabled,
"legacyPassword": cfg.Password != "",
"oidcEnabled": cfg.OIDCEnabled,
"ldapEnabled": cfg.LdapEnabled,
"legacyPassword": cfg.Password != "",
"oidcEnabled": cfg.OIDCEnabled,
"kvmCloudVersion": KVMCloudVersion,
}
c.JSON(http.StatusOK, authConfig)
})
+1
View File
@@ -41,6 +41,7 @@ import (
)
const RttysVersion = "5.2.0"
const KVMCloudVersion = "v1.6.0"
var (
GitCommit = ""
+10 -9
View File
@@ -2,8 +2,8 @@
* @Author: LPY
* @Date: 2025-06-09 09:29:48
* @LastEditors: LPY
* @LastEditTime: 2025-07-21 10:04:25
* @FilePath: /kvm-cloud-frontend/src/components/base/baseWhitePage.vue
* @LastEditTime: 2026-01-05 14:30:56
* @FilePath: \glkvm-cloud\ui\src\components\base\baseWhitePage.vue
* @Description: 基础白名单页。
-->
<template>
@@ -13,6 +13,7 @@
<img src="@/assets/svg/logo.svg" height="20">
</div>
<div class="base-white-page-header-right">
<BaseText style="margin-right: 24px;">{{ appStore.state.version || '--' }}</BaseText>
<BaseDropdownSelect :value="currentLang" :options="languageOptions" @update:value="changeLang">
<div class="language-box flex">
<BaseSvg name="gl-icon-language-regular" style="margin-right: 8px;font-size: 16px;"></BaseSvg>
@@ -25,13 +26,13 @@
<div class="base-white-page-footer">
<!-- 步骤条 -->
<div v-if="route.query.bindToken" class="base-white-page-step">
<!-- <div v-if="route.query.bindToken" class="base-white-page-step">
<BaseStep
v-model:value="useUserStore().bindingStep"
:items="[{title: $t('login.accountSetup')}, {title: $t('login.deviceSetup')}]"
titlePosition="bottom"
/>
</div>
</div> -->
<div class="base-white-page-content">
<slot></slot>
@@ -54,19 +55,17 @@
<script setup lang="ts">
import useLanguage from '@/hooks/useLanguage'
import { languageOptions, Languages } from 'gl-web-main'
import BaseStep from './baseStep.vue'
import { useRoute } from 'vue-router'
import { useUserStore } from '@/stores/modules/user'
import { BaseDropdownSelect } from 'gl-web-main/components'
import { isForeignEnv } from '@/utils'
const route = useRoute()
import { useAppStore } from '@/stores/modules/app'
const { currentLang, currentLangLabel } = useLanguage()
const changeLang = (key: Languages) => {
useLanguage().setLanguage(key)
}
const appStore = useAppStore()
</script>
<style scoped lang="scss">
@@ -85,6 +84,8 @@ const changeLang = (key: Languages) => {
border-bottom: 1px solid var(--gl-color-line-divider1);
.base-white-page-header-right {
display: flex;
align-items: center;
.language-box {
color: var(--gl-color-text-level2);
user-select: none;
+4 -2
View File
@@ -2,8 +2,8 @@
* @Author: LPY
* @Date: 2025-05-30 10:18:18
* @LastEditors: LPY
* @LastEditTime: 2025-06-25 10:03:27
* @FilePath: /kvm-cloud-frontend/src/hooks/useLocalStorage.ts
* @LastEditTime: 2026-01-05 14:22:12
* @FilePath: \glkvm-cloud\ui\src\hooks\useLocalStorage.ts
* @Description: 存储hook
*/
import { ref } from 'vue'
@@ -18,6 +18,8 @@ export enum LocalStorageKeys {
TWO_FACTOR_INFO_KEY = 'two-factor-info',
/** 侧边栏手动控制展开收缩状态 */
SIDEBAR_MANUAL_CONTROL_KEY = 'sidebar-manual-control',
/** 版本号 */
VERSION = 'version',
}
/**
+10 -3
View File
@@ -2,8 +2,8 @@
* @Author: LPY
* @Date: 2025-05-30 09:37:06
* @LastEditors: LPY
* @LastEditTime: 2025-06-13 15:55:51
* @FilePath: /kvm-cloud-frontend/src/stores/modules/app.ts
* @LastEditTime: 2026-01-05 14:35:02
* @FilePath: \glkvm-cloud\ui\src\stores\modules\app.ts
* @Description: app相关状态存储
*/
import { LocalStorageKeys, useLocalStorage } from '@/hooks/useLocalStorage'
@@ -24,6 +24,8 @@ export const useAppStore = defineStore('appGlobal', () => {
const state = reactive({
/** 当前的主题模式 */
themeMode: getThemeFromStorage(),
/** 版本号 */
version: (useLocalStorage(LocalStorageKeys.VERSION).getValue() as string)?.toUpperCase() || 'V1.0.0',
})
/** 获取主题模式 */
@@ -114,6 +116,11 @@ export const useAppStore = defineStore('appGlobal', () => {
sidebar.manualSetting = false
}
/** 设置版本号 */
const setVersion = (version: string) =>{
state.version = version.toUpperCase()
useLocalStorage(LocalStorageKeys.VERSION).setValue(version)
}
return { antdTheme, setThemeMode, state, sidebar, isCollapse, manualToggleSidebar, autoCloseSidebar, autoOpenSidebar, resetManualSetting }
return { antdTheme, setThemeMode, state, sidebar, isCollapse, manualToggleSidebar, autoCloseSidebar, autoOpenSidebar, resetManualSetting, setVersion }
})
+6 -2
View File
@@ -2,8 +2,8 @@
* @Author: LPY
* @Date: 2025-05-30 15:21:14
* @LastEditors: LPY
* @LastEditTime: 2025-08-26 17:57:09
* @FilePath: \glkvm-cloud\web-ui\src\views\layout\layHeader\layHeader.vue
* @LastEditTime: 2026-01-05 14:32:56
* @FilePath: \glkvm-cloud\ui\src\views\layout\layHeader\layHeader.vue
* @Description: 顶部集成页
-->
<template>
@@ -12,6 +12,8 @@
<img src="@/assets/svg/logo.svg" height="20">
</div>
<div class="lay-header-right">
<!-- version -->
<BaseText style="margin-right: 24px;">{{ appStore.state.version || '--' }}</BaseText>
<!-- github -->
<ATooltip>
<template #title>{{ githubLink }}</template>
@@ -38,9 +40,11 @@
</template>
<script setup lang="ts">
import { useAppStore } from '@/stores/modules/app'
import { useUserStore } from '@/stores/modules/user'
const userStore = useUserStore()
const appStore = useAppStore()
// github链接
const githubLink = 'https://github.com/gl-inet/glkvm-cloud'
+3 -2
View File
@@ -2,7 +2,7 @@
* @Author: LPY
* @Date: 2025-05-30 10:48:43
* @LastEditors: LPY
* @LastEditTime: 2025-11-12 17:01:59
* @LastEditTime: 2026-01-05 14:25:45
* @FilePath: \glkvm-cloud\ui\src\views\login\loginPage.vue
* @Description: 登录页面
-->
@@ -103,6 +103,7 @@ import { useRouter } from 'vue-router'
import { LoginParams, AuthConfig } from '@/models/user'
import { message, Input, Form } from 'ant-design-vue'
import { reqAuthConfig } from '@/api/user'
import { useAppStore } from '@/stores/modules/app'
const AInput = Input
const AForm = Form
@@ -153,7 +154,7 @@ onMounted(async () => {
// 提取配置数据 (Extract config data)
const configData = response?.info || response?.data?.info || response?.data || response
authConfig.value = configData
useAppStore().setVersion(configData.kvmCloudVersion)
} catch (error) {
console.error('Failed to load auth config:', error)
// 回退 - 无LDAP可用 (Fallback - no LDAP available)