@innspel/react-native 0.8.0 → 0.9.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/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -852,6 +852,9 @@ var tekst = {
|
|
|
852
852
|
provIgjen: "Pr\xF8v igjen",
|
|
853
853
|
// 2j — mine innspill
|
|
854
854
|
mineTittel: "Mine innspill",
|
|
855
|
+
/** Knappen på første steg med innspill fra før (DD-62): tallet er det som gjør den til en inngang. */
|
|
856
|
+
mineMedAntall: (n) => `Mine innspill \xB7 ${n}`,
|
|
857
|
+
mineEtikett: (n) => `Mine innspill, ${n} innspill`,
|
|
855
858
|
mineUnder: "Status og hva du kan vente deg.",
|
|
856
859
|
mineTom: "Du har ikke sendt noe enn\xE5.",
|
|
857
860
|
mineIkkeSendt: "Ikke sendt enn\xE5",
|
|
@@ -1856,7 +1859,11 @@ function Widget({
|
|
|
1856
1859
|
client.track({ name: "widget_opened" });
|
|
1857
1860
|
void client.queue.flush().catch(() => void 0);
|
|
1858
1861
|
void client.loadSettings().then((s) => setInnstillinger({ ...s })).catch(() => void 0);
|
|
1859
|
-
if (
|
|
1862
|
+
if (!client.isAnonymous) {
|
|
1863
|
+
void client.subjects.submissions().then(setMine).catch(() => void 0);
|
|
1864
|
+
}
|
|
1865
|
+
if (apneOpsjoner?.view === "mine" && !client.isAnonymous) void visMine();
|
|
1866
|
+
else if (apneOpsjoner?.track) velgSpor(apneOpsjoner.track);
|
|
1860
1867
|
}, [synlig]);
|
|
1861
1868
|
const hentKort = (0, import_react11.useCallback)(async () => {
|
|
1862
1869
|
setLasterKort(true);
|
|
@@ -2077,7 +2084,17 @@ function Widget({
|
|
|
2077
2084
|
!online && steg !== "kvittering" && steg !== "mine" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Banner, { ikon: "cloud-offline-outline", tone: "info", testID: "offline-banner", children: tekst.offlineBanner }) : null,
|
|
2078
2085
|
steg === "valg" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
2079
2086
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Valg, { onVelg: velgSpor }),
|
|
2080
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2087
|
+
!client.isAnonymous ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2088
|
+
Btn,
|
|
2089
|
+
{
|
|
2090
|
+
variant: mine.length > 0 ? "secondary" : "ghost",
|
|
2091
|
+
testID: "mine-innspill",
|
|
2092
|
+
ikon: "list-outline",
|
|
2093
|
+
label: mine.length > 0 ? tekst.mineMedAntall(mine.length) : tekst.mineTittel,
|
|
2094
|
+
accessibilityLabel: mine.length > 0 ? tekst.mineEtikett(mine.length) : tekst.mineTittel,
|
|
2095
|
+
onPress: visMine
|
|
2096
|
+
}
|
|
2097
|
+
) : null
|
|
2081
2098
|
] }) : null,
|
|
2082
2099
|
steg === "kjenteFeil" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2083
2100
|
KjenteFeil,
|