mirror of
https://github.com/hoornet/vega.git
synced 2026-07-25 01:38:11 -07:00
Release v0.14.1 — fix Support view crash, add proxy/Tor support
Fixes a crash that blanked the Support (About/donate) view with React error #130 on every release build since v0.13.2. react-qr-code ships CommonJS, and since the Vite 8 / Rolldown migration its default import resolved to the module namespace object ({ QRCode, default }) instead of the component, making <QRCode/> an invalid element. AboutView now unwraps the import to the real component. Reproduced against the production bundle and verified fixed the same way. Also ships the configurable HTTP/SOCKS5 network proxy (incl. Tor) from PR #10 by Anderseta, merged earlier: routes relay WebSockets, Rust-side fetches and update checks through the proxy. The proxy settings and the README/CHANGELOG note that DNS is not yet guaranteed private (issue #11). Adds a Contributors section to the README (Anderseta, SondreB).
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import { useState } from "react";
|
||||
import QRCode from "react-qr-code";
|
||||
import QRCodeImport from "react-qr-code";
|
||||
import { ZapModal } from "../zap/ZapModal";
|
||||
import pkg from "../../../package.json";
|
||||
|
||||
// react-qr-code ships CommonJS. Under the app's bundler (Vite 8 / Rolldown) the
|
||||
// default import can resolve to the module namespace object ({ QRCode, default })
|
||||
// rather than the component itself, which makes <QRCode/> an invalid React element
|
||||
// and crashes the whole view with "Element type is invalid" (#130). Unwrap to the
|
||||
// real component, tolerating both a correct default import and the namespace form.
|
||||
const QRCode =
|
||||
(QRCodeImport as unknown as { default?: typeof QRCodeImport }).default ??
|
||||
QRCodeImport;
|
||||
|
||||
const DEV_NPUB = "npub1ezt7xcq87ljj65jkjsuagwll4yp75tacgkuyjdhkw6mza8j3azfq2vrvl6";
|
||||
const DEV_PUBKEY = "c897e36007f7e52d52569439d43bffa903ea2fb845b84936f676b62e9e51e892";
|
||||
const LIGHTNING_ADDRESS = "jure@getalby.com";
|
||||
|
||||
@@ -525,6 +525,10 @@ function ProxySection() {
|
||||
<p className="text-text-dim text-[10px] mt-1.5 ml-12">
|
||||
Applies after restart. Example: socks5://127.0.0.1:9050
|
||||
</p>
|
||||
<p className="text-text-dim text-[10px] mt-1 ml-12 leading-relaxed">
|
||||
Note: this routes your traffic, but DNS may still be resolved locally, so
|
||||
relay hostnames can leak. Full DNS privacy (e.g. for Tor) is not guaranteed yet.
|
||||
</p>
|
||||
{(error || validationError) && (
|
||||
<p className="text-danger text-[10px] mt-1 ml-12">{error ?? validationError}</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user