添加对更多发行版图标的支持

This commit is contained in:
远野千束 2024-10-05 01:15:10 +08:00
parent 87091f454a
commit 86ad7e06aa
13 changed files with 27 additions and 7 deletions

View File

@ -0,0 +1 @@
<svg t="1728061797541" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16315" width="500" height="500"><path d="M378.327044 615.997446v-103.014401l-74.168321 74.260481c7.9872 5.56032 15.52384 10.1376 22.60992 13.84448 7.08608 3.72736 13.7216 6.6048 19.89632 8.78592 6.17472 2.2016 11.90912 3.6864 17.182721 4.66944 5.2736 0.96256 10.10688 1.39264 14.47936 1.45408m379.217924-8.56064c0.13312 0.1024 0.86016 0.7168 2.19136 1.56672 1.3312 0.86016 3.29728 1.9456 5.89824 3.03104 2.59072 1.08544 5.8368 2.1504 9.74848 2.94912 3.91168 0.79872 8.4992 1.3312 13.7728 1.3312 4.4032 0 9.2672-0.39936 14.592-1.32096 5.3248-0.93184 11.12064-2.4064 17.36704-4.58752a152.053762 152.053762 0 0 0 20.16256-8.82688 213.575682 213.575682 0 0 0 22.947841-14.0288L807.936008 532.418565 621.383686 345.169923l-81.858561 81.879041-110.417921-113.868801L151.982082 587.161606a213.391362 213.391362 0 0 0 22.91712 14.0288c7.17824 3.74784 13.89568 6.63552 20.14208 8.82688 6.2464 2.17088 12.032 3.65568 17.3568 4.57728 5.3248 0.93184 10.17856 1.3312 14.58176 1.3312a68.505601 68.505601 0 0 0 13.76256-1.3312c3.91168-0.79872 7.15776-1.87392 9.758721-2.94912 2.59072-1.08544 4.54656-2.18112 5.888-3.03104 1.3312-0.84992 2.05824-1.46432 2.19136-1.57696l125.102081-125.102081 44.73856-42.905601 123.883522 123.893762 43.27424 44.50304c0.13312 0.1024 0.86016 0.7168 2.19136 1.56672 1.34144 0.86016 3.29728 1.9456 5.89824 3.03104 2.59072 1.08544 5.8368 2.1504 9.74848 2.94912 3.91168 0.79872 8.4992 1.3312 13.78304 1.3312 4.4032 0 9.2672-0.39936 14.592-1.32096 5.3248-0.93184 11.1104-2.4064 17.367041-4.58752a152.371202 152.371202 0 0 0 20.15232-8.82688 213.575682 213.575682 0 0 0 22.9376-14.0288l-99.399681-97.341441 18.50368-18.50368 86.026241 86.016001 50.176001 49.7152m-1.0752-518.860805L1000.85761 512.000005 756.480008 935.424009h-488.960005L23.1424 512.000005 267.520003 88.576001z" p-id="16316"></path><path d="M603.985926 491.376645l-65.095681-64.972801 4.62848-4.6592 65.556481 64.839681z" p-id="16317"></path></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1 @@
<svg t="1728061341331" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8375" width="500" height="500"><path d="M928.768 750.592c-1.536 4.096-21.504 74.24-70.656 145.92-43.008 62.464-87.04 124.928-156.672 125.952-68.608 1.024-90.624-40.96-168.96-40.96s-102.912 39.936-167.936 41.984c-67.072 2.56-118.784-68.096-161.792-130.048C115.2 767.488 47.616 534.528 138.24 378.88c44.544-77.824 124.928-127.488 211.968-129.024 65.536-1.024 128.512 44.544 168.448 44.544 40.96 0 116.736-55.296 196.608-47.104 33.28 1.536 126.976 13.824 186.88 101.376-4.608 3.072-111.616 66.56-110.592 195.072 1.024 155.136 135.68 206.336 137.216 206.848m-266.24-586.24C698.368 120.32 722.432 59.904 715.776 0c-51.2 2.048-114.176 34.304-151.04 77.824-32.768 37.888-61.952 99.328-53.76 158.72 56.832 3.072 115.712-30.208 151.552-72.192" p-id="8376"></path></svg>

After

Width:  |  Height:  |  Size: 875 B

View File

@ -0,0 +1 @@
<svg t="1728061738726" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15126" width="500" height="500"><path d="M687.07344 29.713441c-73.564437-26.878698-148.888788-34.142346-222.069244-27.294678-84.827891 6.687676-126.201887 32.926405-123.738006 28.190634-138.713281 49.501602-255.987601 156.024443-310.256972 305.361209-96.667318 265.971117 40.286049 560.10087 305.809187 656.960179 265.715129 96.859308 559.364906-40.318047 656.096221-306.289164 96.731315-265.939119-40.222052-560.068872-305.873184-656.896182zM354.321558 944.837114a455.337945 455.337945 0 0 1-81.628046-39.710076l1.983903 1.119946c123.738006 9.50354 285.266182-18.975081 394.188907-120.922143 0 0 207.605944-165.879965 57.373221-438.122779 0 0 24.222827 109.722685-6.655678 199.958315 0 0-29.438574 122.746054-160.280236 158.360329-192.726665 52.509457-412.300029-82.332012-504.135581-147.736844-6.911665-67.164747-0.767963-136.537386 23.902842-204.278105 36.478233-100.347139 105.08291-178.679345 188.886851-231.252799-20.894988 146.5849-4.351789 281.586361 19.455058 338.127622 31.966452 75.804328 87.451764 164.248044 195.830514 175.575496 108.37875 11.391448 168.087858-90.01164 168.087858-90.01164 55.645305-84.475908 64.348883-205.782032 63.484925-208.72589-0.863958-2.975856-14.815282-10.975468-14.815282-10.975468-37.406188 151.416666-99.0992 201.974217-99.0992 201.974216-97.275288 93.915451-166.167951 28.798605-166.167951 28.798606-74.076412-79.580145-22.174926-208.853884-22.174926-208.853884 29.022594-88.059735 113.498502-216.917493 209.269863-282.450319 15.967227 3.935809 31.99845 6.39969 47.773686 12.127413a458.857774 458.857774 0 0 1 151.96064 92.443522l-0.319985-0.287986c-70.012609 25.566762-183.063133 79.580145-183.063133 79.580145-179.223319 75.516342-191.350731 189.686812-191.350731 189.686812-18.559101 117.658301 74.844375 67.836714 74.844375 67.836714 96.091346-46.813732 143.321058-192.662668 143.321057-192.662667-29.982548-5.727723-53.629402 3.423834-53.629402 3.423834-38.366142 94.715412-116.602352 133.625528-116.602352 133.625527-30.814507 16.287211-37.98216-12.511394-37.98216-12.511394-5.215747-21.598954 22.270921-25.246777 22.270921-25.246777 42.653934-16.607196 69.916613-61.405026 76.124313-79.708139 6.143702-18.335112 17.567149-19.807041 17.567149-19.807041a530.086324 530.086324 0 0 1 109.402701-22.622904l2.335887-0.191991c72.540486-8.927568 183.575108 25.694755 183.575108 25.694756 24.926793 10.015515 48.797636 17.503152 70.012608 23.518861 40.702028 101.723073 47.133717 217.493465 6.81567 328.528087-87.003786 239.348407-351.37498 362.830425-590.531396 275.698645z" p-id="15127"></path></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1 @@
<svg t="1728061671403" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14056" width="500" height="500"><path d="M512 0C229.282909 0 0 229.282909 0 512s229.282909 512 512 512 512-229.282909 512-512S794.717091 0 512 0z m-0.930909 48.826182h0.093091a3.258182 3.258182 0 0 0 0.837818 0c211.688727 0 390.237091 142.056727 445.44 335.918545a805.934545 805.934545 0 0 1-196.096 255.813818c-39.424 34.117818-82.525091 64.372364-129.861818 85.736728-47.383273 21.317818-99.421091 33.466182-151.133091 30.533818a260.654545 260.654545 0 0 1-105.704727-29.463273 850.664727 850.664727 0 0 0 236.357818-191.767273c44.497455-51.944727 83.362909-111.243636 98.443636-178.408727 7.68-33.605818 8.843636-68.887273 1.861818-102.725818a189.858909 189.858909 0 0 0-46.498909-91.461818 186.786909 186.786909 0 0 0-86.341818-51.106909 225.745455 225.745455 0 0 0-100.212364-3.630546c-66.234182 12.148364-125.346909 50.548364-172.450909 98.117818-83.176727 83.781818-134.516364 202.007273-125.067636 320 4.747636 58.973091 24.389818 116.875636 58.274909 165.422546 6.656 9.541818 14.056727 18.525091 21.736727 27.182545a755.339636 755.339636 0 0 1-143.639272 34.397091A462.941091 462.941091 0 0 1 511.069091 48.826182z m3.258182 94.021818c0.186182-0.046545 0.744727 0.093091 0.558545 0.046545 32.209455 0 64.558545 9.821091 90.112 29.184a148.945455 148.945455 0 0 1 49.710546 69.352728 191.767273 191.767273 0 0 1 8.936727 86.016c-6.656 57.856-35.84 111.150545-71.354182 157.928727-63.022545 82.757818-146.897455 149.085091-240.128 195.490909-8.843636 4.421818-17.966545 8.704-27.089454 12.753455a238.033455 238.033455 0 0 1-48.872728-60.276364c-27.461818-48.593455-36.491636-106.309818-31.185454-162.071273 5.399273-55.808 24.482909-109.661091 50.362182-159.650909 29.928727-57.902545 70.562909-112.546909 127.162181-143.825454a192.698182 192.698182 0 0 1 91.834182-24.994909z m457.541818 316.974545c1.954909 17.082182 3.304727 34.397091 3.304727 51.991273 0 255.860364-207.220364 463.266909-463.127273 463.266909a461.591273 461.591273 0 0 1-353.28-164.305454 844.241455 844.241455 0 0 0 147.549091-49.338182c21.457455 16.104727 45.009455 29.509818 70.144 39.098182 74.007273 28.392727 157.882182 24.203636 232.541091-1.629091 74.612364-25.832727 140.613818-72.098909 198.097455-125.905455a850.106182 850.106182 0 0 0 164.770909-213.178182z" p-id="14057"></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1 @@
<svg t="1728061281077" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6300" width="500" height="500"><path d="M0 0v1024h288V288h368V0H0z m368 368V1024h288V368h-288zM736 0v1024H1024V0h-288z" p-id="6301"></path></svg>

After

Width:  |  Height:  |  Size: 260 B

View File

@ -0,0 +1 @@
<svg t="1728061313768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7370" width="500" height="500"><path d="M0 72.234667v178.901333h77.994667c54.442667 0 64.085333 36.906667 64.085333 87.808l0.426667 316.245333c0 163.84 146.773333 296.576 327.68 296.576h446.464c57.258667 0 107.349333-35.413333 107.349333-89.941333V371.456c0-163.84-146.773333-296.533333-327.808-296.533333h-187.946667v-0.554667L0 72.234667z m244.181333 109.482666h89.685334V632.32c0 60.288 41.984 107.093333 91.264 107.093333l305.92 1.28c63.829333 0 113.536-43.093333 113.536-94.122666l-0.512-239.232a51.2 51.2 0 0 0-16.469334-38.826667 52.224 52.224 0 0 0-39.125333-16.384c-15.957333 0-27.733333 5.12-39.168 16.384a51.2 51.2 0 0 0-16.469333 38.826667v204.714666h-94.848V407.381333c0-15.530667-5.290667-27.648-16.597334-38.826666a51.541333 51.541333 0 0 0-39.125333-16.384c-15.616 0-27.605333 5.12-38.997333 16.384-11.306667 11.178667-16.64 23.296-16.64 38.826666v204.714667H431.786667V407.381333c0-40.533333 15.36-76.458667 44.458666-105.216a146.986667 146.986667 0 0 1 106.026667-43.605333 146.346667 146.346667 0 0 1 102.954667 41.386667 147.114667 147.114667 0 0 1 103.253333-41.386667c40.704 0 76.928 14.848 106.026667 43.605333a144.426667 144.426667 0 0 1 44.416 105.216l0.384 255.616c-4.48 42.837333-22.997333 80.810667-54.613334 112.512h-0.085333a186.325333 186.325333 0 0 1-135.424 56.064H408.490667v-1.621333c-41.642667-4.394667-78.762667-22.144-109.653334-51.925333-36.053333-35.2-54.656-78.762667-54.656-128.426667V181.76z" p-id="7371"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg t="1728061127184" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5302" width="500" height="500"><path d="M683.050667 571.136c67.285333 0 164.693333-13.909333 164.693333-93.952a75.306667 75.306667 0 0 0-1.706667-18.389333l-40.106666-174.08c-9.216-38.314667-17.322667-55.68-84.565334-89.301334-52.181333-26.666667-165.888-70.741333-199.509333-70.741333-31.274667 0-40.405333 40.362667-77.738667 40.362667-35.925333 0-62.592-30.122667-96.213333-30.122667-32.298667 0-53.333333 21.973333-69.546667 67.242667 0 0-45.226667 127.573333-51.072 146.090666a34.56 34.56 0 0 0-1.194666 10.453334c0 49.578667 195.285333 212.224 456.96 212.224m174.976-61.226667c9.301333 44.032 9.301333 48.64 9.301333 54.485333 0 75.306667-84.650667 117.12-195.968 117.12-251.52 0.170667-471.893333-147.242667-471.893333-244.650666a99.242667 99.242667 0 0 1 8.106666-39.466667C117.162667 401.706667 0 417.877333 0 521.258667c0 169.344 401.28 378.069333 718.976 378.069333 243.626667 0 305.024-110.165333 305.024-197.12 0-68.48-59.178667-146.133333-165.845333-192.512" p-id="5303"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg t="1728061563073" class="icon" viewBox="0 0 1159 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10221" width="500" height="500"><path d="M304.867307 54.334925L237.629153 172.197198h614.90728l-66.461779-117.862273H304.867307zM154.42175 318.439431L63.649866 478.714677l84.564649 150.250054h32.649079l461.489694-310.5253H154.42175z m750.094168 0L442.964189 628.964731h498.857174L1026.128473 480.006128l-90.901593-161.566697h-30.709083zM230.842927 775.208844l72.926553 129.175156h481.207347l73.704807-129.175156H230.841047z" p-id="10222"></path></svg>

After

Width:  |  Height:  |  Size: 566 B

View File

@ -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<string, { name: string, icon: string }> = {
'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)

View File

@ -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(() => {

View File

@ -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"}
{"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"}