From 07ce5f4a1ba49ebdd3d27c121b3fadc9fa925ce6 Mon Sep 17 00:00:00 2001 From: Hiddify-Official <143534788+Hiddify-Official@users.noreply.github.com> Date: Thu, 29 Oct 2026 22:45:10 +0330 Subject: [PATCH] feat(admin): country flags beside the nodes in the dashboard's Node health Each node's country comes from its address, by the same cached MaxMind lookup as the Nodes page; This server's from its own public IP. The flag shows before the name in the legend, the table and the phone cards; the flag helpers move to shared/utils/country.ts for both pages. Co-Authored-By: Claude Opus 5.5 --- .../admin_v2/src/core/api/generated/index.ts | 2 ++ .../dashboard/components/NodeHealthCard.vue | 23 +++++++++++++++---- .../src/features/nodes/views/NodesView.vue | 16 +++---------- .../admin_v2/src/shared/utils/country.ts | 15 ++++++++++++ hiddifypanel/hutils/node_system.py | 19 +++++++++++++++ .../restapi/v2/admin/dashboard_api.py | 1 + .../restapi/v2/admin/dashboard_schema.py | 2 ++ 7 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 hiddifypanel/admin_v2/src/shared/utils/country.ts diff --git a/hiddifypanel/admin_v2/src/core/api/generated/index.ts b/hiddifypanel/admin_v2/src/core/api/generated/index.ts index a66f81fe7..4539460f2 100644 --- a/hiddifypanel/admin_v2/src/core/api/generated/index.ts +++ b/hiddifypanel/admin_v2/src/core/api/generated/index.ts @@ -466,6 +466,8 @@ export interface DashboardNodeStats { name: string mode: string panel_url?: string | null + /** The server's country (ISO code) from its address; '' when unknown. */ + country?: string ok: boolean error?: string | null error_code?: string | null diff --git a/hiddifypanel/admin_v2/src/features/dashboard/components/NodeHealthCard.vue b/hiddifypanel/admin_v2/src/features/dashboard/components/NodeHealthCard.vue index a74e02666..df7aac147 100644 --- a/hiddifypanel/admin_v2/src/features/dashboard/components/NodeHealthCard.vue +++ b/hiddifypanel/admin_v2/src/features/dashboard/components/NodeHealthCard.vue @@ -1,4 +1,5 @@