mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-28 08:20:49 +08:00
feat: 增加 OpenWrt 系统管理入口
- 通过 ONE_KVM_OPENWRT=1 控制入口显示和跳转; - 读取 uhttpd 当前监听配置,并跳转到 LuCI 地址。
This commit is contained in:
@@ -161,6 +161,7 @@ export interface DeviceInfoEvent {
|
||||
|
||||
export const useSystemStore = defineStore('system', () => {
|
||||
const version = ref<string>('')
|
||||
const openwrtSystem = ref(false)
|
||||
const platform = ref<PlatformCapabilities | null>(null)
|
||||
const capabilities = ref<SystemCapabilities | null>(null)
|
||||
const diskSpace = ref<DiskSpaceInfo | null>(null)
|
||||
@@ -183,6 +184,7 @@ export const useSystemStore = defineStore('system', () => {
|
||||
try {
|
||||
const info = await systemApi.info()
|
||||
version.value = info.version
|
||||
openwrtSystem.value = info.openwrt_system === true
|
||||
platform.value = info.platform
|
||||
capabilities.value = info.capabilities
|
||||
diskSpace.value = info.disk_space ?? null
|
||||
@@ -442,6 +444,7 @@ export const useSystemStore = defineStore('system', () => {
|
||||
|
||||
return {
|
||||
version,
|
||||
openwrtSystem,
|
||||
platform,
|
||||
capabilities,
|
||||
diskSpace,
|
||||
|
||||
Reference in New Issue
Block a user