Settings tabs brought closer to the approved mockup: - ActionButton/renderCardButton retune (settings-scoped): 7px radius, 9px padX, Primary → accent-outline chip, Secondary/card buttons more defined. - Daemon-binary card: compact status right-aligned on the DAEMON BINARY heading (Up to date / Version differs / Not installed), filled/rounded status box, neutral danger divider (was alarming red), roomier spacing. - RPC Connection: two-row column-aligned layout (Host | Port, then Username | Password) so the password no longer clips off the card edge. - Chat settings tab: live conversation preview below the Appearance / Messaging cards; "Focus input on open" checkbox reflowed onto the console color-toggle row. - Debug Options: "Current theme only" toggle restricts either screenshot sweep to the active theme instead of cycling every skin. - Tabs fill the full content width (content-max-width cap disabled) and the sidebar nav panel centers within the true visible area. - i18n: new keys for the above (untranslated keys fall back to English). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
// DragonX Wallet - ImGui Edition
|
|
// Copyright 2024-2026 The Hush Developers
|
|
// Released under the GPLv3
|
|
|
|
#pragma once
|
|
|
|
namespace dragonx {
|
|
|
|
class App;
|
|
|
|
namespace ui {
|
|
|
|
/**
|
|
* @brief Render the Chat tab (HushChat conversation view).
|
|
*
|
|
* A two-pane view: a conversation list on the left and the selected thread on the
|
|
* right, both read from the App-owned ChatService store (App::chatService()). Peer
|
|
* z-addresses are resolved to contact names via the address book when known.
|
|
* Composing/sending and starting new conversations are wired (App::sendChatMessage /
|
|
* startChatConversation). Reachable when built with DRAGONX_ENABLE_CHAT
|
|
* (gated via WalletUiSurface::Chat).
|
|
*
|
|
* @param app Pointer to the app instance.
|
|
*/
|
|
void RenderChatTab(App* app);
|
|
|
|
/**
|
|
* @brief Render the chat-customization controls (emoji style, poll rate, bubble style/color,
|
|
* density, text size, chat timestamps, Enter-to-send). Shared by the Chat tab's settings
|
|
* "notch" modal and the Settings tab's Chat & Contacts section. The app-wide clock format
|
|
* (which chat timestamps fall back to) lives separately in Settings → General.
|
|
* @param app Pointer to the app instance.
|
|
* @param contentWidth Explicit row width for right-aligning controls; pass the card's inner content
|
|
* width from the Settings tab (whose GlassCard doesn't narrow the content region). 0 = auto
|
|
* (use the current content region, correct inside the chat modal's dialog).
|
|
*/
|
|
void RenderChatSettingsControls(App* app, float contentWidth = 0.0f, bool drawCards = false);
|
|
|
|
/**
|
|
* @brief Securely wipe the Chat tab's UI-local state (composer / new-conversation
|
|
* plaintext buffers + the selected-conversation ids). Called by
|
|
* App::resetChatSession() on a wallet switch/lock so one wallet's typed
|
|
* plaintext can't resurface (or linger unwiped in RAM) under the next wallet.
|
|
*/
|
|
void ResetChatTab();
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|