From 7564ddc7c98fb7a35af086236fd07cddfc83ad36 Mon Sep 17 00:00:00 2001 From: LC mac Date: Fri, 30 Jan 2026 19:09:45 +0800 Subject: [PATCH] feat: Implement UI polish and layout fixes --- index.html | 2 +- src/App.tsx | 13 ++++++++----- src/components/Header.tsx | 6 ++++-- vite.config.ts | 10 +++++++++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index e251856..2804302 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - SeedPGP v1.4.2 + SeedPGP v__APP_VERSION__ diff --git a/src/App.tsx b/src/App.tsx index 5dae2e6..5724b89 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -333,6 +333,7 @@ function App() { setActiveTab={setActiveTab} encryptedMnemonicCache={encryptedMnemonicCache} handleLockAndClear={handleLockAndClear} + appVersion={__APP_VERSION__} />
@@ -358,7 +359,7 @@ function App() { )} {/* Main Content Grid */} -
+
{activeTab === 'backup' ? ( <> @@ -441,11 +442,13 @@ function App() {
{/* Security Panel */} -
+
{/* Added space-y-2 wrapper */} + +
-

- Security Options -

+ {/* Removed h3 */}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index e9814af..361114d 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -28,6 +28,7 @@ interface HeaderProps { setActiveTab: (tab: 'backup' | 'restore') => void; encryptedMnemonicCache: any; handleLockAndClear: () => void; + appVersion: string; } const Header: React.FC = ({ @@ -40,7 +41,8 @@ const Header: React.FC = ({ activeTab, setActiveTab, encryptedMnemonicCache, - handleLockAndClear + handleLockAndClear, + appVersion }) => { return (
@@ -53,7 +55,7 @@ const Header: React.FC = ({

- SeedPGP v1.4.2 + SeedPGP v{appVersion}

OpenPGP-secured BIP39 backup

diff --git a/vite.config.ts b/vite.config.ts index 80d1747..65e28d4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,7 +11,15 @@ const appVersion = packageJson.version const gitHash = execSync('git rev-parse --short HEAD').toString().trim() export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + { + name: 'html-transform', + transformIndexHtml(html) { + return html.replace(/__APP_VERSION__/g, appVersion); + } + } + ], base: '/', // Always use root, since we're Cloudflare Pages only publicDir: 'public', // ← Explicitly set (should be default) build: {