@g9tm/aiassistant-lynx 1.4.2 → 1.6.0
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/dist/parts.jsx +3 -3
- package/package.json +2 -2
package/dist/parts.jsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* every interactive element has an accessibility label; the growing message is drawn below the recycled list.
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect, useState } from "@lynx-js/react";
|
|
7
|
-
import { arr, blockView, can, finished, needsCode, obj, parseText, str, visibleText, LONG_RUNNING_MS, REVEAL_MS, windowView } from "@g9tm/aiassistant";
|
|
7
|
+
import { arr, blockView, can, finished, needsCode, obj, parseText, str, visibleText, LONG_RUNNING_MS, REMOTE_EXPIRED, REVEAL_MS, windowView } from "@g9tm/aiassistant";
|
|
8
8
|
import { pageTexts, saveCsv } from "@g9tm/aiassistant/pages";
|
|
9
9
|
import { Chart } from "./chart.jsx";
|
|
10
10
|
import { blockOverride, cls, fill, override, rowOf, swappable, tok, useUi } from "./context.jsx";
|
|
@@ -121,7 +121,7 @@ export function ApprovalCard(props) {
|
|
|
121
121
|
const confirm = async () => {
|
|
122
122
|
if (needsCode(p.method) && code.length === 0)
|
|
123
123
|
return;
|
|
124
|
-
await ui.assistant.confirm(p.id, needsCode(p.method) ? code : null);
|
|
124
|
+
await ui.assistant.confirm(p.id, needsCode(p.method) || (p.failCode === REMOTE_EXPIRED && code.length > 0) ? code : null); // after the phone ran out, a code may stand in
|
|
125
125
|
setCode("");
|
|
126
126
|
setEpoch((n) => n + 1);
|
|
127
127
|
};
|
|
@@ -134,7 +134,7 @@ export function ApprovalCard(props) {
|
|
|
134
134
|
{s.diff.map((d, i) => <text key={"d" + String(i)} className={cls(ui, "card.approval.fact")} style={{ fontSize: "12px" }}>{say(d.name, d.args) + ": " + (d.before ?? "—") + " ← " + (d.after ?? "—")}</text>)}
|
|
135
135
|
</view>))}
|
|
136
136
|
{p.answered === null ? (<view>
|
|
137
|
-
{needsCode(p.method) ? <view className={cls(ui, "card.approval.code")}><PinPad key={epoch} label={t("card.code")} onInput={setCode}/></view> : null}
|
|
137
|
+
{needsCode(p.method) || p.failCode === REMOTE_EXPIRED ? <view className={cls(ui, "card.approval.code")}><PinPad key={epoch} label={t("card.code")} onInput={setCode}/></view> : null}
|
|
138
138
|
{p.failCode === "confirm.waiting" ? <text>{t("card.waiting")}</text> : p.failCode ? <text>{pageTexts(ui.texts).t(p.failCode)}{p.triesLeft !== null ? " · " + t("card.tries_left", { count: p.triesLeft }) : ""}</text> : null}
|
|
139
139
|
<view style={rowOf(ui)}>
|
|
140
140
|
<Button part="card.approval.confirm" primary label={t("card.confirm")} onTap={() => void confirm()}/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/aiassistant-lynx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "ReactLynx components for the G9 AI assistant, fully customisable (layouts, tokens, per-part classes, overrides, parts).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@g9tm/aiassistant": "1.
|
|
32
|
+
"@g9tm/aiassistant": "1.6.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@lynx-js/react": "0.129.2",
|