mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
fix: country code
This commit is contained in:
parent
d36f740650
commit
d98a42fcd8
@ -134,13 +134,13 @@ export default function ServerDetailOverview() {
|
|||||||
</p>
|
</p>
|
||||||
<section className="flex items-start gap-1">
|
<section className="flex items-start gap-1">
|
||||||
<div className="text-xs text-start">
|
<div className="text-xs text-start">
|
||||||
{server.host.country_code?.toUpperCase() ||
|
{server.country_code?.toUpperCase() ||
|
||||||
t("serverDetail.unknown")}
|
t("serverDetail.unknown")}
|
||||||
</div>
|
</div>
|
||||||
{server.host.country_code && (
|
{server.country_code && (
|
||||||
<ServerFlag
|
<ServerFlag
|
||||||
className="text-[11px] -mt-[1px]"
|
className="text-[11px] -mt-[1px]"
|
||||||
country_code={server.host.country_code}
|
country_code={server.country_code}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
@ -23,7 +23,7 @@ export function formatNezhaInfo(serverInfo: NezhaAPI) {
|
|||||||
swap: (serverInfo.state.swap_used / serverInfo.host.swap_total) * 100 || 0,
|
swap: (serverInfo.state.swap_used / serverInfo.host.swap_total) * 100 || 0,
|
||||||
disk: (serverInfo.state.disk_used / serverInfo.host.disk_total) * 100 || 0,
|
disk: (serverInfo.state.disk_used / serverInfo.host.disk_total) * 100 || 0,
|
||||||
stg: (serverInfo.state.disk_used / serverInfo.host.disk_total) * 100 || 0,
|
stg: (serverInfo.state.disk_used / serverInfo.host.disk_total) * 100 || 0,
|
||||||
country_code: serverInfo.host.country_code,
|
country_code: serverInfo.country_code,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ export interface NezhaAPI {
|
|||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
last_active: string;
|
last_active: string;
|
||||||
|
country_code: string;
|
||||||
host: NezhaAPIHost;
|
host: NezhaAPIHost;
|
||||||
state: NezhaAPIStatus;
|
state: NezhaAPIStatus;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user