v0.0.24: ETH display in TUI header/messages, web peer resolve, click-focus
TUI: - Header shows peer ETH address (resolved on /peer set) - Own messages show ETH format - Resolve display shows full formatted fingerprint (xxxx:xxxx:...) - peer_eth field stored on App for header display Web: - Pasting 0x address in peer input box now resolves via /v1/resolve/ - Send path resolves 0x/@ before encrypting - Click messages area → focuses text input - Own messages show ETH format Version: 0.0.23 → 0.0.24, SW cache wz-v4 → wz-v5 Build script: --local, --local-ship, --local-clean commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ async fn pwa_manifest() -> impl IntoResponse {
|
||||
|
||||
async fn service_worker() -> impl IntoResponse {
|
||||
([(header::CONTENT_TYPE, "application/javascript")], r##"
|
||||
const CACHE = 'wz-v4';
|
||||
const CACHE = 'wz-v5';
|
||||
const SHELL = ['/', '/wasm/warzone_wasm.js', '/wasm/warzone_wasm_bg.wasm', '/icon.svg', '/manifest.json'];
|
||||
|
||||
self.addEventListener('install', e => {
|
||||
@@ -242,7 +242,7 @@ let pollTimer = null;
|
||||
let ws = null; // WebSocket connection
|
||||
let wasmReady = false;
|
||||
|
||||
const VERSION = '0.0.23';
|
||||
const VERSION = '0.0.24';
|
||||
let DEBUG = true; // toggle with /debug command
|
||||
|
||||
// ── Receipt tracking ──
|
||||
@@ -1193,13 +1193,12 @@ async function doSend() {
|
||||
let peer = $peerInput.value.trim();
|
||||
if (!peer || peer.startsWith('#')) { addSys('Set a peer fingerprint/@alias or use /g <group>'); return; }
|
||||
|
||||
if (peer.startsWith('@')) {
|
||||
const aliasName = peer.slice(1);
|
||||
const resp = await fetch(SERVER + '/v1/alias/resolve/' + aliasName);
|
||||
if (peer.startsWith('@') || peer.startsWith('0x') || peer.startsWith('0X')) {
|
||||
const endpoint = peer.startsWith('@') ? '/v1/alias/resolve/' + peer.slice(1) : '/v1/resolve/' + peer;
|
||||
const resp = await fetch(SERVER + endpoint);
|
||||
const data = await resp.json();
|
||||
if (data.error) { addSys('Unknown alias @' + aliasName); return; }
|
||||
if (data.error) { addSys('Cannot resolve ' + peer + ': ' + data.error); return; }
|
||||
peer = data.fingerprint;
|
||||
addSys('Resolved @' + aliasName + ' → ' + peer.slice(0,16) + '...');
|
||||
}
|
||||
|
||||
localStorage.setItem('wz-peer', $peerInput.value.trim());
|
||||
|
||||
Reference in New Issue
Block a user