forked from WikiDeck/wikideck
- Capacitor deps (core, cli, android, ios, app, browser); additive lockfile
regenerated with npm 11 (node:24) so libc fields are kept.
- capacitor.config.ts: webDir dist, CapacitorHttp on (native fetch: no CORS,
no WebView Origin header for the node's POST origin check), cleartext for
the LAN testnet, edge-to-edge margins on Android 15.
- android/: generated project + SSO deep link (dev.eom.wikideck:), cleartext,
adjustResize for the keyboard; build-debug.sh builds against the testnet.
- src/native.ts: isNativeApp(), VITE_NODE_URL (default testnet node) applied to
relative /api and /auth fetches, sets WIKIDECK_NODE_URL for src/auth, fixes
the interceptor's merged content-length header, back button closes dialogs
first, onDeepLink() for the SSO redirect. No-op on the web.
- App.tsx: one import + hidden={isNativeApp()} on the mining panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
881 B
TypeScript
27 lines
881 B
TypeScript
import type { CapacitorConfig } from '@capacitor/cli';
|
|
|
|
// WikiDeck mobile shell. Build the web UI with the node URL baked in, then sync:
|
|
// VITE_WIKIDECK_NETWORK=testnet VITE_WIKIDECK_GENESIS_TIME=1792411200 \
|
|
// VITE_NODE_URL=http://192.168.1.32:3101 npm run build && npx cap sync android
|
|
// (see android/build-debug.sh)
|
|
const config: CapacitorConfig = {
|
|
appId: 'dev.eom.wikideck',
|
|
appName: 'WikiDeck',
|
|
webDir: 'dist',
|
|
server: {
|
|
androidScheme: 'https',
|
|
// The private testnet node is plain HTTP on the LAN.
|
|
cleartext: true,
|
|
},
|
|
android: {
|
|
// Android 15 (targetSdk 35) draws edge-to-edge; keep the WebView clear of the system bars.
|
|
adjustMarginsForEdgeToEdge: 'auto',
|
|
},
|
|
plugins: {
|
|
// Route fetch through native HTTP: avoids CORS and the node's browser Origin check.
|
|
CapacitorHttp: { enabled: true },
|
|
},
|
|
};
|
|
|
|
export default config;
|