Completes the desktop feature surface ahead of the v2.2.0 tag. Only
auto-update + packaging remain.
Settings — now two-paned (nav on the left, pages on the right):
* NodePage — URL ping-on-commit + API token field.
* IdentityPage — pub key / X25519 pub, Export (safe-save dialog) /
Import (open dialog + wipe + replace) / Delete identity.
* DevicesPage — full multi-device UI: list every active device with
a THIS DEVICE badge; Unlink button on every other row submits
UNLINK_DEVICE + optimistic local remove; Link new device modal
takes {code, device key, name}, submits LINK_DEVICE, then ships
the handshake envelope (master Ed25519 priv encrypted for the
new X25519) — same protocol as mobile's primary-device modal.
* AboutPage — version, platform, Gitea links.
* store.settingsPage discriminated union keeps selection across
section switches.
Contacts section (now real):
* ContactsList — alphabetical, filter-as-you-type; each row shows
avatar letter + name + short address.
* ContactsDetail — profile card (username/alias/pub) + Open chat /
View posts / Copy address actions + stats grid
(Balance, Devices, Encryption, Added) + Identity card with
DC address, username, published X25519, device_count.
* store.selectedContact persists across navigation.
Profile section (expanded):
* ProfileList — big avatar + pub key + contacts count.
* ProfileDetail — balance hero, quick actions (My posts →
feed author wall, Manage devices → Settings→Devices, Copy
address), Identity card, inline Linked devices list with a
THIS DEVICE badge matching the Settings page.
Receive modal — canvas QR via `qrcode` (new dep, ~5 KB gzipped),
white-on-transparent so it sits inside the same black modal chrome.
Global keybinds (useGlobalKeybinds hook mounted in Shell):
* Ctrl/Cmd+W — close the current conversation (drops activeChat,
keeps section). Does NOT close the window.
* Ctrl/Cmd+K — jump to Contacts.
* Ctrl/Cmd+, — Settings.
Each guards against being in a text field so typing `k,` in a
composer / search doesn't hijack.
docs/ROADMAP.md — rc1 row flipped to done; v2.2.0 narrows to
auto-update + packaging + optional attachments in Compose.
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
// AboutPage — version info, platform, build links. Reads app.version
|
|
// via the preload IPC bridge.
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
import { PageLayout } from './PageLayout';
|
|
import { Card, Label, Hint } from './NodePage';
|
|
|
|
export function AboutPage(): React.ReactElement {
|
|
const [version, setVersion] = useState('dev');
|
|
const [platform, setPlatform] = useState('');
|
|
|
|
useEffect(() => {
|
|
window.dchain?.app.version().then(setVersion).catch(() => {});
|
|
window.dchain?.app.platform().then(setPlatform).catch(() => {});
|
|
}, []);
|
|
|
|
return (
|
|
<PageLayout title="About">
|
|
<Card>
|
|
<Label>Build</Label>
|
|
<div style={{ color: '#fff', fontSize: 14, fontFamily: 'monospace' }}>
|
|
DChain Desktop v{version}
|
|
</div>
|
|
<Hint>
|
|
Running on {platform || 'unknown'} · Electron / Chromium
|
|
</Hint>
|
|
</Card>
|
|
|
|
<Card>
|
|
<Label>Links</Label>
|
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
|
<LinkRow
|
|
href="https://git.vsecoder.vodka/vsecoder/dchain"
|
|
label="Source code (Gitea)"
|
|
/>
|
|
<LinkRow
|
|
href="https://git.vsecoder.vodka/vsecoder/dchain/releases"
|
|
label="Releases"
|
|
/>
|
|
<LinkRow
|
|
href="https://git.vsecoder.vodka/vsecoder/dchain/src/branch/main/docs"
|
|
label="Documentation"
|
|
/>
|
|
</div>
|
|
</Card>
|
|
</PageLayout>
|
|
);
|
|
}
|
|
|
|
function LinkRow({ href, label }: { href: string; label: string }) {
|
|
return (
|
|
<a
|
|
href={href}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
style={{ color: '#1d9bf0', fontSize: 13, textDecoration: 'none' }}
|
|
>{label} ↗</a>
|
|
);
|
|
}
|