mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-12 07:10:43 +08:00
✨ 匹配一些超长系统发行版本,比如Windows的server版本
This commit is contained in:
parent
bdbd083d45
commit
786d6c0a87
@ -212,8 +212,13 @@ export function getPlatformLogoIconClassName(platform) {
|
|||||||
/**
|
/**
|
||||||
* 获取系统发行版本
|
* 获取系统发行版本
|
||||||
*/
|
*/
|
||||||
export function getSystemOSLabel(platform) {
|
export function getSystemOSLabel(platform, short = false) {
|
||||||
switch (platform) {
|
const platformStr = (platform || '').toLowerCase();
|
||||||
|
// 匹配一些超长系统发行版本
|
||||||
|
if (short && platformStr.includes('windows')) {
|
||||||
|
return 'Windows';
|
||||||
|
}
|
||||||
|
switch (platformStr) {
|
||||||
case 'windows':
|
case 'windows':
|
||||||
return 'Windows';
|
return 'Windows';
|
||||||
case 'linux':
|
case 'linux':
|
||||||
|
|||||||
@ -92,7 +92,7 @@ const { cpuAndMemAndDisk } = handleServerInfo({
|
|||||||
props,
|
props,
|
||||||
});
|
});
|
||||||
|
|
||||||
const platformSystemLabel = computed(() => hostUtils.getSystemOSLabel(props.info?.Host?.Platform));
|
const platformSystemLabel = computed(() => hostUtils.getSystemOSLabel(props.info?.Host?.Platform, true));
|
||||||
|
|
||||||
function openDetail() {
|
function openDetail() {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user