From 1c93ac00eb11279a159045d00a8110a29edeae74 Mon Sep 17 00:00:00 2001 From: gouki Date: Sat, 8 Aug 2026 22:00:30 +0000 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E8=B4=A6=E5=8F=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BB=A5=E8=AF=B4=E6=98=8E=E4=B8=BA=E4=B8=BB=E6=A0=87?= =?UTF-8?q?=E9=A2=98(=E9=80=82=E9=85=8D=E4=BB=A3=E7=AE=A1=E5=9C=BA?= =?UTF-8?q?=E6=99=AF),=E8=B4=A6=E5=8F=B7=E6=A0=87=E8=AF=86=E4=B8=BA?= =?UTF-8?q?=E5=89=AF;=E5=BC=B9=E7=AA=97=E8=A1=A8=E5=8D=95=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=AD=97=E6=AE=B5=E5=89=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- static/js/modals.js | 17 +++++++++-------- static/js/views/providers.js | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/VERSION b/VERSION index 0d91a54..9e11b32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/static/js/modals.js b/static/js/modals.js index 855e51d..a385aa0 100644 --- a/static/js/modals.js +++ b/static/js/modals.js @@ -43,7 +43,7 @@ const AssetModal = {
@@ -131,12 +131,13 @@ const AssetModal = { const p = store.providers.find(x => x.id === f.value.provider_id); if (p) f.value.provider = p.slug; } - // 账号候选显示平台名:platform 存的是 slug,回退显示原值 - function platformName(slug) { - const p = store.providers.find(x => x.slug === slug); - return p ? p.name : slug; + // 账号候选显示:说明优先,其次平台名(platform 存的是 slug,回退原值) + function accountLabel(a) { + if (a.remark) return a.remark + ' · ' + a.name; + const p = store.providers.find(x => x.slug === a.platform); + return p ? a.name + '(' + p.name + ')' : a.name; } - return { store, Fmt, f, providersForType, onProviderChange, platformName, save: saveAsset }; + return { store, Fmt, f, providersForType, onProviderChange, accountLabel, save: saveAsset }; }, }; @@ -224,6 +225,8 @@ const AccountModal = {
+ -

修改账号标识后,引用该账号的资产会自动同步更新。

diff --git a/static/js/views/providers.js b/static/js/views/providers.js index ba0c78e..e0c881a 100644 --- a/static/js/views/providers.js +++ b/static/js/views/providers.js @@ -22,10 +22,10 @@ const ProvidersView = {
-
{{ a.name }} +
{{ a.remark || a.name }} @ {{ platformName(a.platform) }}
-
关联 {{ a.asset_count }} 个资产 · {{ a.remark }}
+
{{ a.name }} · 关联 {{ a.asset_count }} 个资产