diff --git a/public/svg/system-alpine.svg b/public/svg/system-alpine.svg
new file mode 100644
index 0000000..3588585
--- /dev/null
+++ b/public/svg/system-alpine.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-darwin.svg b/public/svg/system-darwin.svg
new file mode 100644
index 0000000..1e9bace
--- /dev/null
+++ b/public/svg/system-darwin.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-deepin.svg b/public/svg/system-deepin.svg
new file mode 100644
index 0000000..0ba781e
--- /dev/null
+++ b/public/svg/system-deepin.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-elementary.svg b/public/svg/system-elementary.svg
new file mode 100644
index 0000000..d674e9f
--- /dev/null
+++ b/public/svg/system-elementary.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-fedora.svg b/public/svg/system-fedora.svg
new file mode 100644
index 0000000..e69de29
diff --git a/public/svg/system-kali.svg b/public/svg/system-kali.svg
new file mode 100644
index 0000000..72957e2
--- /dev/null
+++ b/public/svg/system-kali.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-manjaro.svg b/public/svg/system-manjaro.svg
new file mode 100644
index 0000000..0ca209f
--- /dev/null
+++ b/public/svg/system-manjaro.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-mint.svg b/public/svg/system-mint.svg
new file mode 100644
index 0000000..17a12b1
--- /dev/null
+++ b/public/svg/system-mint.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-redhat.svg b/public/svg/system-redhat.svg
new file mode 100644
index 0000000..35020c6
--- /dev/null
+++ b/public/svg/system-redhat.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/svg/system-zorin.svg b/public/svg/system-zorin.svg
new file mode 100644
index 0000000..7c4fd71
--- /dev/null
+++ b/public/svg/system-zorin.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/utils.ts b/src/api/utils.ts
index 9e061f7..92d7da1 100644
--- a/src/api/utils.ts
+++ b/src/api/utils.ts
@@ -1,15 +1,26 @@
export const onlineTimeout = 30
-export function getLinuxReleaseIcon(name: string, release: string): { name: string, icon: string } {
+export function getReleaseInfo(name: string, release: string): { name: string, icon: string } {
if (name.toLowerCase() == 'windows') {
return {name: 'Windows', icon: '/svg/system-windows.svg'}
+ } else if (name.toLowerCase() == 'darwin') {
+ return {name: 'macOS', icon: '/svg/system-darwin.svg'}
} else {
const map: Record = {
+ 'alpine': {name: 'Alpine Linux', icon: '/svg/system-alpine.svg'},
'arch': {name: 'Arch Linux', icon: '/svg/system-archlinux.svg'},
- 'opensuse': {name: 'openSUSE', icon: '/svg/system-opensuse.svg'},
- 'ubuntu': {name: 'Ubuntu', icon: '/svg/system-ubuntu.svg'},
'centos': {name: 'CentOS', icon: '/svg/system-centos.svg'},
'debian': {name: 'Debian', icon: '/svg/system-debian.svg'},
+ 'deepin': {name: 'Deepin', icon: '/svg/system-deepin.svg'},
+ 'elementary': {name: 'elementary OS', icon: '/svg/system-elementary.svg'},
+ 'fedora': {name: 'Fedora', icon: '/svg/system-fedora.svg'},
+ 'kali': {name: 'Kali Linux', icon: '/svg/system-kali.svg'},
+ 'manjaro': {name: 'Manjaro', icon: '/svg/system-manjaro.svg'},
+ 'opensuse': {name: 'openSUSE', icon: '/svg/system-opensuse.svg'},
+ 'redhat': {name: 'Red Hat', icon: '/svg/system-redhat.svg'},
+ 'suse': {name: 'SUSE', icon: '/svg/system-opensuse.svg'}, // SUSE Linux Enterprise Server
+ 'ubuntu': {name: 'Ubuntu', icon: '/svg/system-ubuntu.svg'},
+ 'zorin': {name: 'Zorin OS', icon: '/svg/system-zorin.svg'},
}
release = release.toLowerCase()
for (const key in map) {
@@ -97,7 +108,7 @@ export function getBlankColor(percent: number, disable: boolean = false) {
// 1727998501
-export function formatUptime(uptime: number ): string {
+export function formatUptime(uptime: number): string {
const seconds = uptime
const d = Math.floor(seconds / 86400)
diff --git a/src/components/Host.vue b/src/components/Host.vue
index 81eb2d2..51ff58e 100644
--- a/src/components/Host.vue
+++ b/src/components/Host.vue
@@ -9,7 +9,7 @@ import {
formatUptime,
getBaseColor,
getBlankColor,
- getLinuxReleaseIcon,
+ getReleaseInfo,
onlineTimeout
} from "../api/utils.ts";
@@ -41,7 +41,7 @@ const spreadColor = computed(
)
const deltaTime = ref('0')
const os = computed(() => {
- return getLinuxReleaseIcon(status.value.meta.os.name, status.value.meta.os.version)
+ return getReleaseInfo(status.value.meta.os.name, status.value.meta.os.version)
})
const memDetail = computed(() => {
diff --git a/tsconfig.app.tsbuildinfo b/tsconfig.app.tsbuildinfo
index 6f86b91..a79ea4b 100644
--- a/tsconfig.app.tsbuildinfo
+++ b/tsconfig.app.tsbuildinfo
@@ -1 +1 @@
-{"root":["./src/main.ts","./src/vite-env.d.ts","./src/api/index.ts","./src/api/node.ts","./src/api/utils.ts","./src/router/index.ts","./src/app.vue","./src/components/helloworld.vue","./src/components/host.vue","./src/components/hostdisks.vue","./src/components/nav.vue","./src/views/home.vue","./src/views/test.vue"],"version":"5.6.2"}
\ No newline at end of file
+{"root":["./src/main.ts","./src/vite-env.d.ts","./src/api/index.ts","./src/api/node.ts","./src/api/utils.ts","./src/router/index.ts","./src/app.vue","./src/components/helloworld.vue","./src/components/host.vue","./src/components/hostdisks.vue","./src/components/nav.vue","./src/components/outlineanime.vue","./src/views/home.vue","./src/views/test.vue"],"version":"5.6.2"}
\ No newline at end of file