@soyeht/soyeht 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/qr.ts +12 -4
- package/src/service.ts +3 -2
- package/src/version.ts +1 -1
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/qr.ts
CHANGED
|
@@ -426,11 +426,19 @@ export function renderQrTerminal(text: string): string | null {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
// ▄ (lower half block): foreground = lower half, background = upper half
|
|
429
|
+
// Use 24-bit true color (ESC[48;2;R;G;Bm) for pure black/white contrast.
|
|
430
|
+
// Generic ANSI colors (40/47) map to theme colors which may not be pure B&W.
|
|
431
|
+
const BG_BLACK = "\x1b[48;2;0;0;0m";
|
|
432
|
+
const BG_WHITE = "\x1b[48;2;255;255;255m";
|
|
433
|
+
const FG_BLACK = "\x1b[38;2;0;0;0m";
|
|
434
|
+
const FG_WHITE = "\x1b[38;2;255;255;255m";
|
|
435
|
+
const RST = "\x1b[0m";
|
|
436
|
+
|
|
429
437
|
function cell(top: number, bottom: number): string {
|
|
430
|
-
if (top === 1 && bottom === 1) return
|
|
431
|
-
if (top === 0 && bottom === 0) return
|
|
432
|
-
if (top === 1 && bottom === 0) return
|
|
433
|
-
return
|
|
438
|
+
if (top === 1 && bottom === 1) return `${BG_BLACK} ${RST}`;
|
|
439
|
+
if (top === 0 && bottom === 0) return `${BG_WHITE} ${RST}`;
|
|
440
|
+
if (top === 1 && bottom === 0) return `${FG_WHITE}${BG_BLACK}\u2584${RST}`;
|
|
441
|
+
return `${FG_BLACK}${BG_WHITE}\u2584${RST}`;
|
|
434
442
|
}
|
|
435
443
|
|
|
436
444
|
const lines: string[] = [];
|
package/src/service.ts
CHANGED
|
@@ -139,8 +139,9 @@ async function showPairingQr(api: OpenClawPluginApi, v2deps: SecurityV2Deps): Pr
|
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
// Compact QR: soyeht://pair?g=<gatewayUrl>&t=<token>&fp=<fingerprint>
|
|
142
|
-
//
|
|
143
|
-
|
|
142
|
+
// No encodeURIComponent — custom scheme, no escaping needed.
|
|
143
|
+
// App fetches full key material via HTTP GET /soyeht/pairing/info
|
|
144
|
+
const qrText = `soyeht://pair?g=${gatewayUrl}&t=${pairingToken}&fp=${fingerprint}`;
|
|
144
145
|
const rendered = renderQrTerminal(qrText);
|
|
145
146
|
|
|
146
147
|
if (rendered) {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PLUGIN_VERSION = "0.2.
|
|
1
|
+
export const PLUGIN_VERSION = "0.2.5";
|