mirror of
https://github.com/hoornet/vega.git
synced 2026-05-09 13:49:12 -07:00
Rename Wrystr to Vega
Named after Jurij Vega (1754-1802), Slovenian mathematician who made knowledge accessible through his logarithm tables. Rebrand before OpenSats application (April 1). - Product name, window title, identifiers, binary name all renamed - Cargo package: wrystr -> vega, wrystr_lib -> vega_lib - PKGBUILD: wrystr -> vega (new AUR package name) - Release workflow: artifact names, release text updated - README: new tagline referencing Jurij Vega - DB migration: auto-renames wrystr.db -> vega.db on first launch - Keyring service name kept as "wrystr" for backward compatibility - localStorage keys kept as wrystr_* to preserve existing user data Pending manual steps: - Rename GitHub repo hoornet/wrystr -> hoornet/vega - Create new AUR package vega-git, orphan wrystr-git - Update local .desktop launcher
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
const isDev = import.meta.env.DEV;
|
||||
|
||||
export const debug = {
|
||||
log: (...args: unknown[]) => { if (isDev) console.log("[Wrystr]", ...args); },
|
||||
warn: (...args: unknown[]) => { if (isDev) console.warn("[Wrystr]", ...args); },
|
||||
error: (...args: unknown[]) => { if (isDev) console.error("[Wrystr]", ...args); },
|
||||
log: (...args: unknown[]) => { if (isDev) console.log("[Vega]", ...args); },
|
||||
warn: (...args: unknown[]) => { if (isDev) console.warn("[Vega]", ...args); },
|
||||
error: (...args: unknown[]) => { if (isDev) console.error("[Vega]", ...args); },
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ export function withTimeout<T>(promise: Promise<T>, ms: number, fallback: T): Pr
|
||||
return Promise.race([
|
||||
promise,
|
||||
new Promise<T>((resolve) => setTimeout(() => {
|
||||
console.warn(`[Wrystr] Fetch timed out after ${ms}ms`);
|
||||
console.warn(`[Vega] Fetch timed out after ${ms}ms`);
|
||||
resolve(fallback);
|
||||
}, ms)),
|
||||
]);
|
||||
@@ -110,12 +110,12 @@ export async function resetNDK(): Promise<void> {
|
||||
}
|
||||
|
||||
// Connect fresh
|
||||
console.log("[Wrystr] NDK instance reset — connecting fresh relays");
|
||||
console.log("[Vega] NDK instance reset — connecting fresh relays");
|
||||
await ndk.connect();
|
||||
await waitForConnectedRelay(ndk, 5000);
|
||||
const relays = Array.from(ndk.pool?.relays?.values() ?? []);
|
||||
const connected = relays.filter((r) => r.connected).length;
|
||||
console.log(`[Wrystr] Fresh connection: ${connected}/${relays.length} relays connected`);
|
||||
console.log(`[Vega] Fresh connection: ${connected}/${relays.length} relays connected`);
|
||||
}
|
||||
|
||||
export function addRelay(url: string): void {
|
||||
@@ -186,17 +186,17 @@ export async function ensureConnected(): Promise<boolean> {
|
||||
return true; // Trust relay.connected — don't probe or disconnect
|
||||
}
|
||||
|
||||
console.warn(`[Wrystr] No relays connected (${relays.length} in pool) — attempting reconnect`);
|
||||
console.warn(`[Vega] No relays connected (${relays.length} in pool) — attempting reconnect`);
|
||||
|
||||
try {
|
||||
await withTimeout(instance.connect(), 4000, undefined);
|
||||
await waitForConnectedRelay(instance, 3000);
|
||||
const after = Array.from(instance.pool?.relays?.values() ?? []);
|
||||
const nowConnected = after.some((r) => r.connected);
|
||||
console.log(`[Wrystr] Reconnect ${nowConnected ? "succeeded" : "failed"}`);
|
||||
console.log(`[Vega] Reconnect ${nowConnected ? "succeeded" : "failed"}`);
|
||||
return nowConnected;
|
||||
} catch {
|
||||
console.error("[Wrystr] Reconnect failed");
|
||||
console.error("[Vega] Reconnect failed");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ async function getSearchNDK(): Promise<NDK> {
|
||||
if (searchNDK) return searchNDK;
|
||||
searchNDK = new NDK({ explicitRelayUrls: SEARCH_RELAYS });
|
||||
searchNDKConnecting = searchNDK.connect().then(() => {
|
||||
console.log("[Wrystr] Search relays connected");
|
||||
console.log("[Vega] Search relays connected");
|
||||
searchNDKConnecting = null;
|
||||
});
|
||||
await withTimeout(searchNDKConnecting, 5000, undefined);
|
||||
|
||||
@@ -20,7 +20,7 @@ async function apiHeaders(): Promise<Record<string, string>> {
|
||||
"X-Auth-Key": API_KEY,
|
||||
"X-Auth-Date": apiHeaderTime,
|
||||
"Authorization": hash,
|
||||
"User-Agent": "Wrystr/1.0",
|
||||
"User-Agent": "Vega/1.0",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export async function uploadImage(file: File): Promise<string> {
|
||||
* through Tauri's HTTP plugin, so we construct the raw bytes ourselves.
|
||||
*/
|
||||
function buildMultipart(fieldName: string, data: Uint8Array, fileName: string, mimeType: string): { body: Uint8Array; contentType: string } {
|
||||
const boundary = "----WrystrUpload" + Math.random().toString(36).slice(2);
|
||||
const boundary = "----VegaUpload" + Math.random().toString(36).slice(2);
|
||||
const encoder = new TextEncoder();
|
||||
|
||||
const header = encoder.encode(
|
||||
|
||||
Reference in New Issue
Block a user