feat(wallets): subtle empty-state hint in the fixed-height list

With the list now pinned at max height, a few wallets leave blank space below
the cards. Fill it — only when there's real room to spare — with a subtle
centered folder glyph + "Scan a folder to find more wallets" (OnSurfaceDisabled),
so the area reads as a gentle nudge toward the scan action rather than dead
space. Purely decorative (draw-list only, clipped to the list); the actions stay
below. New i18n key wallets_empty_hint, translated across all 8 languages.

Verified on the sweep: the hint centers in the gap and reads subtly on both dark
and light themes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 07:17:34 -05:00
parent 6310f51f65
commit 2f86bec98e
12 changed files with 41 additions and 0 deletions

Binary file not shown.

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "erstellt",
"wallets_creating": "Wallet wird erstellt — der Node wird neu gestartet…",
"wallets_current": "aktuell",
"wallets_empty_hint": "Ordner durchsuchen, um weitere Wallets zu finden",
"wallets_exists": "Eine Wallet mit diesem Namen existiert bereits.",
"wallets_external_tt": "Außerhalb deines Datenverzeichnisses — Öffnen verlinkt sie an ihrem Ort (keine Kopie).",
"wallets_folder_hint": "/pfad/zum/ordner mit .dat-Wallet-Dateien",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "creada",
"wallets_creating": "Creando cartera — el nodo se reiniciará…",
"wallets_current": "actual",
"wallets_empty_hint": "Escanea una carpeta para encontrar más carteras",
"wallets_exists": "Ya existe una cartera con ese nombre.",
"wallets_external_tt": "Fuera de tu directorio de datos — Abrir lo enlaza en su lugar (sin copiar).",
"wallets_folder_hint": "/ruta/a/carpeta con archivos .dat de cartera",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "créé",
"wallets_creating": "Création du portefeuille — le nœud va redémarrer…",
"wallets_current": "actuel",
"wallets_empty_hint": "Analysez un dossier pour trouver d'autres portefeuilles",
"wallets_exists": "Un portefeuille portant ce nom existe déjà.",
"wallets_external_tt": "Hors de votre répertoire de données — Ouvrir le lie sur place (sans copie).",
"wallets_folder_hint": "/chemin/vers/le/dossier contenant les fichiers .dat",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "作成",
"wallets_creating": "ウォレットを作成中 — ノードが再起動します…",
"wallets_current": "現在",
"wallets_empty_hint": "フォルダーをスキャンして他のウォレットを探す",
"wallets_exists": "その名前のウォレットは既に存在します。",
"wallets_external_tt": "データディレクトリの外 —「開く」はその場でリンクします(コピーなし)。",
"wallets_folder_hint": "wallet .dat ファイルのあるフォルダのパス",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "생성",
"wallets_creating": "지갑을 만드는 중 — 노드가 재시작됩니다…",
"wallets_current": "현재",
"wallets_empty_hint": "폴더를 스캔하여 다른 지갑 찾기",
"wallets_exists": "같은 이름의 지갑이 이미 존재합니다.",
"wallets_external_tt": "데이터 디렉터리 밖 — '열기'는 제자리에 링크합니다 (복사 없음).",
"wallets_folder_hint": "wallet-*.dat 파일이 있는 폴더 경로",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "criada",
"wallets_creating": "Criando carteira — o nó será reiniciado…",
"wallets_current": "atual",
"wallets_empty_hint": "Verifique uma pasta para encontrar mais carteiras",
"wallets_exists": "Já existe uma carteira com esse nome.",
"wallets_external_tt": "Fora do seu diretório de dados — Abrir o vincula no lugar (sem cópia).",
"wallets_folder_hint": "/caminho/para/pasta com arquivos .dat de carteira",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "создан",
"wallets_creating": "Создание кошелька — узел будет перезапущен…",
"wallets_current": "текущий",
"wallets_empty_hint": "Просканируйте папку, чтобы найти другие кошельки",
"wallets_exists": "Кошелёк с таким именем уже существует.",
"wallets_external_tt": "Вне каталога данных — «Открыть» создаёт ссылку на месте (без копирования).",
"wallets_folder_hint": "/путь/к/папке с файлами кошельков .dat",

View File

@@ -1343,6 +1343,7 @@
"wallets_created": "创建于",
"wallets_creating": "正在创建钱包——节点将重启…",
"wallets_current": "当前",
"wallets_empty_hint": "扫描文件夹以查找更多钱包",
"wallets_exists": "已存在同名钱包。",
"wallets_external_tt": "在数据目录之外 —「打开」会就地链接(不复制)。",
"wallets_folder_hint": "/含 .dat 钱包文件的文件夹路径",

View File

@@ -2244,6 +2244,16 @@ TRANSLATIONS = {
"ru": "Больше не сканировать эту папку", "zh": "停止扫描此文件夹",
"ja": "このフォルダーのスキャンを停止", "ko": "이 폴더 스캔 중지"
},
"wallets_empty_hint": {
"es": "Escanea una carpeta para encontrar más carteras",
"de": "Ordner durchsuchen, um weitere Wallets zu finden",
"fr": "Analysez un dossier pour trouver d'autres portefeuilles",
"pt": "Verifique uma pasta para encontrar mais carteiras",
"ru": "Просканируйте папку, чтобы найти другие кошельки",
"zh": "扫描文件夹以查找更多钱包",
"ja": "フォルダーをスキャンして他のウォレットを探す",
"ko": "폴더를 스캔하여 다른 지갑 찾기"
},
}
def main():

View File

@@ -386,6 +386,28 @@ public:
ImGui::Dummy(ImVec2(rowW, walRowH));
if (i + 1 < s_rows.size()) ImGui::Dummy(ImVec2(rowW, cardGap));
}
// Empty-state nudge: the list sits at a fixed max height, so a handful of wallets leave blank
// space below. When there's real room to spare, fill it with a subtle centered hint (a folder
// glyph + one line) instead of dead space; it's purely decorative — the actions live below.
{
const float remainY = ImGui::GetContentRegionAvail().y;
if (remainY > walRowH * 1.6f) {
ImDrawList* wdl = ImGui::GetWindowDrawList();
ImFont* hIco = Type().iconLarge();
ImFont* hTxt = Type().caption();
const char* icon = ICON_MD_CREATE_NEW_FOLDER;
const char* hint = TR("wallets_empty_hint");
const ImU32 col = OnSurfaceDisabled();
const ImVec2 is = hIco->CalcTextSizeA(hIco->LegacySize, FLT_MAX, 0, icon);
const ImVec2 ts = hTxt->CalcTextSizeA(hTxt->LegacySize, FLT_MAX, 0, hint);
const float gap = Layout::spacingXs();
const ImVec2 o = ImGui::GetCursorScreenPos();
const float cx = o.x + ImGui::GetContentRegionAvail().x * 0.5f;
const float top = o.y + (remainY - (is.y + gap + ts.y)) * 0.5f;
wdl->AddText(hIco, hIco->LegacySize, ImVec2(cx - is.x * 0.5f, top), col, icon);
wdl->AddText(hTxt, hTxt->LegacySize, ImVec2(cx - ts.x * 0.5f, top + is.y + gap), col, hint);
}
}
ImGui::PopStyleVar(); // ItemSpacing
ImGui::EndChild();

View File

@@ -289,6 +289,7 @@ void I18n::loadBuiltinEnglish()
strings_["wallets_scan_folder"] = "Scan another folder for wallets\xE2\x80\xA6";
strings_["wallets_scanned_folders"] = "Scanned folders:";
strings_["wallets_remove_folder"] = "Stop scanning this folder";
strings_["wallets_empty_hint"] = "Scan a folder to find more wallets";
strings_["wallets_folder_invalid"] = "That folder doesn't exist.";
strings_["wallets_new_label"] = "Create a new wallet:";
strings_["wallets_new_hint"] = "Name (e.g. savings)";