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) {
|
||||
switch (platform) {
|
||||
export function getSystemOSLabel(platform, short = false) {
|
||||
const platformStr = (platform || '').toLowerCase();
|
||||
// 匹配一些超长系统发行版本
|
||||
if (short && platformStr.includes('windows')) {
|
||||
return 'Windows';
|
||||
}
|
||||
switch (platformStr) {
|
||||
case 'windows':
|
||||
return 'Windows';
|
||||
case 'linux':
|
||||
|
||||
@ -92,7 +92,7 @@ const { cpuAndMemAndDisk } = handleServerInfo({
|
||||
props,
|
||||
});
|
||||
|
||||
const platformSystemLabel = computed(() => hostUtils.getSystemOSLabel(props.info?.Host?.Platform));
|
||||
const platformSystemLabel = computed(() => hostUtils.getSystemOSLabel(props.info?.Host?.Platform, true));
|
||||
|
||||
function openDetail() {
|
||||
router.push({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user