sanity-plugin-all-in-one-accessibility 1.1.3 → 1.1.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/dist/index.js +55 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useColorSchemeValue, useColorSchemeSetValue, useCurrentUser, definePlugin } from "sanity";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, createContext, useContext, useRef, useEffect, useState, useCallback, useMemo } from "react";
|
|
4
|
-
const AIOA_API_BASE = "https://ada.skynettechnologies.us/api/", AIOA_UPDATE_API = `${AIOA_API_BASE}widget-setting-update-platform`, AIOA_PLATFORM = "sanity",
|
|
4
|
+
const AIOA_API_BASE = "https://ada.skynettechnologies.us/api/", AIOA_UPDATE_API = `${AIOA_API_BASE}widget-setting-update-platform`, AIOA_PLATFORM = "sanity", AIOA_CHECK_WEBSITE_API = "https://ada.skynettechnologies.us/check-website", AIOA_GEO_API = "https://ipapi.co/json", AIOA_UPGRADE_URL = "https://ada.skynettechnologies.us/trial-subscription", AIOA_HTTP_TIMEOUT = 30, AIOA_GEO_TIMEOUT = 8e3, AIOA_SCAN_API = "https://skynetaccessibilityscan.com/api/ada-scanner/domain/details", AIOA_SCAN_LANG = "en", AIOA_SCORE_LEVELS = [
|
|
5
5
|
[85, "compliant", "Compliant"],
|
|
6
6
|
[50, "semi", "Semi Compliant"],
|
|
7
7
|
[0, "not", "Not Compliant"]
|
|
@@ -110,17 +110,7 @@ const storage = {
|
|
|
110
110
|
class PendingError extends Error {
|
|
111
111
|
pending = !0;
|
|
112
112
|
}
|
|
113
|
-
const
|
|
114
|
-
"is_mobile_position",
|
|
115
|
-
"is_widget_custom_position_mobile",
|
|
116
|
-
"widget_position_mobile",
|
|
117
|
-
"widget_position_top_mobile",
|
|
118
|
-
"widget_position_bottom_mobile",
|
|
119
|
-
"widget_position_left_mobile",
|
|
120
|
-
"widget_position_right_mobile",
|
|
121
|
-
"widget_position_vertical_center_offset_mobile",
|
|
122
|
-
"widget_position_horizontal_center_offset_mobile"
|
|
123
|
-
], INVALID_DOMAIN = "A valid domain is required, for example example.com or localhost.";
|
|
113
|
+
const INVALID_DOMAIN = "A valid domain is required, for example example.com or localhost.";
|
|
124
114
|
async function fetchWidgetSettings(domain) {
|
|
125
115
|
const url = normalizeDomain(domain);
|
|
126
116
|
if (!isValidDomain(url))
|
|
@@ -145,8 +135,8 @@ async function getDashboardLink(domain) {
|
|
|
145
135
|
const res = await post(AIOA_CHECK_WEBSITE_API, { domain: url });
|
|
146
136
|
if (res === null)
|
|
147
137
|
return { error: "Unable to load the dashboard link right now." };
|
|
148
|
-
const link = toStr(res.manage_domain);
|
|
149
|
-
return /^https
|
|
138
|
+
const link = toStr(res.manage_domain).trim();
|
|
139
|
+
return /^https:\/\/\S+$/i.test(link) ? { link } : { error: `No dashboard link was found for ${url}.` };
|
|
150
140
|
}
|
|
151
141
|
async function getScanDetails(domain) {
|
|
152
142
|
const url = normalizeDomain(domain);
|
|
@@ -218,18 +208,16 @@ async function getSettingsData(url) {
|
|
|
218
208
|
if (res === null)
|
|
219
209
|
return !1;
|
|
220
210
|
const data = res.Data;
|
|
221
|
-
return isEmpty(data) || !isObject(data) ? null :
|
|
211
|
+
return isEmpty(data) || !isObject(data) ? null : withPlanStatus(url, data);
|
|
222
212
|
}
|
|
223
|
-
async function
|
|
213
|
+
async function withPlanStatus(url, data) {
|
|
224
214
|
if (toInt(data.is_free_widget) === 1)
|
|
225
215
|
return data;
|
|
226
|
-
const res = await post(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
!Object.prototype.hasOwnProperty.call(merged, field) && field in widget && (merged[field] = widget[field]);
|
|
232
|
-
return merged;
|
|
216
|
+
const res = await post(AIOA_CHECK_WEBSITE_API, { domain: url });
|
|
217
|
+
return {
|
|
218
|
+
...data,
|
|
219
|
+
plan_expired: res !== null && (toStr(res.plan_status).trim().toLowerCase() === "expired" || toInt(res.status) === 3)
|
|
220
|
+
};
|
|
233
221
|
}
|
|
234
222
|
async function waitForSettings(url, attempts = 3) {
|
|
235
223
|
for (let i = 0; i < attempts; i++) {
|
|
@@ -343,7 +331,10 @@ function isValidIconSize(value) {
|
|
|
343
331
|
const size = wholeNumber(value, null);
|
|
344
332
|
return size !== null && size >= SIZE_MIN && size <= SIZE_MAX;
|
|
345
333
|
}
|
|
346
|
-
const POSITION_VALUES = AIOA_POSITIONS.flatMap((pos) => pos ? [pos[0]] : []), ICON_SIZE_VALUES = AIOA_ICON_SIZES.map((size) => size[0]), isSet = (value) => value != null && value !== "", isOn = (value) => Number(value) === 1, num$1 = (value) => wholeNumber(value, 0),
|
|
334
|
+
const POSITION_VALUES = AIOA_POSITIONS.flatMap((pos) => pos ? [pos[0]] : []), ICON_SIZE_VALUES = AIOA_ICON_SIZES.map((size) => size[0]), isSet = (value) => value != null && value !== "", isOn = (value) => Number(value) === 1, num$1 = (value) => wholeNumber(value, 0), clampOffset = (value) => String(Math.min(Math.max(num$1(value), 0), OFFSET_MAX));
|
|
335
|
+
function savedSide(first, second) {
|
|
336
|
+
return num$1(first) > 0 ? "first" : num$1(second) > 0 || isSet(second) && !isSet(first) ? "second" : "first";
|
|
337
|
+
}
|
|
347
338
|
function gridPosition(value) {
|
|
348
339
|
const position = positionValue(value);
|
|
349
340
|
return POSITION_VALUES.includes(position) ? position : "bottom_right";
|
|
@@ -352,7 +343,7 @@ function emptyAppearance() {
|
|
|
352
343
|
return appearanceFrom({});
|
|
353
344
|
}
|
|
354
345
|
function appearanceFrom(result) {
|
|
355
|
-
const hex = parseHex(result.widget_color_code || AIOA_DEFAULTS.widget_color_code) || AIOA_DEFAULT_COLOR, iconType = String(result.widget_icon_type || AIOA_DEFAULTS.widget_icon_type), iconSize = String(result.widget_icon_size || AIOA_DEFAULTS.widget_icon_size),
|
|
346
|
+
const hex = parseHex(result.widget_color_code || AIOA_DEFAULTS.widget_color_code) || AIOA_DEFAULT_COLOR, iconType = String(result.widget_icon_type || AIOA_DEFAULTS.widget_icon_type), iconSize = String(result.widget_icon_size || AIOA_DEFAULTS.widget_icon_size), useLeft = savedSide(result.widget_position_right, result.widget_position_left) === "second", useTop = savedSide(result.widget_position_bottom, result.widget_position_top) === "second";
|
|
356
347
|
return {
|
|
357
348
|
colorText: hex,
|
|
358
349
|
color: hex,
|
|
@@ -360,11 +351,10 @@ function appearanceFrom(result) {
|
|
|
360
351
|
widgetSize: String(result.widget_size) === "1" ? "1" : "0",
|
|
361
352
|
customPosition: Number(result.is_widget_custom_position) === 1,
|
|
362
353
|
position: gridPosition(result.widget_position || AIOA_DEFAULTS.widget_position),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
yDir: bottom > 0 || !(top > 0) ? "cust-pos-to-the-lower" : "cust-pos-to-the-upper",
|
|
354
|
+
x: clampOffset(useLeft ? result.widget_position_left : result.widget_position_right),
|
|
355
|
+
xDir: useLeft ? "cust-pos-to-the-left" : "cust-pos-to-the-right",
|
|
356
|
+
y: clampOffset(useTop ? result.widget_position_top : result.widget_position_bottom),
|
|
357
|
+
yDir: useTop ? "cust-pos-to-the-upper" : "cust-pos-to-the-lower",
|
|
368
358
|
positionCheck: !1,
|
|
369
359
|
iconType: /^aioa-icon-type-([1-9]|1\d|2\d)$/.test(iconType) ? iconType : "aioa-icon-type-1",
|
|
370
360
|
customSize: Number(result.is_widget_custom_size) === 1,
|
|
@@ -376,9 +366,9 @@ function appearanceFrom(result) {
|
|
|
376
366
|
function paidFrom(result) {
|
|
377
367
|
const r = result || {};
|
|
378
368
|
let mxDir = "right", mx = clampOffset(r.widget_position_right_mobile);
|
|
379
|
-
isSet(r.widget_position_horizontal_center_offset_mobile) ? (mxDir = "center", mx = clampOffset(r.widget_position_horizontal_center_offset_mobile)) :
|
|
369
|
+
isSet(r.widget_position_horizontal_center_offset_mobile) ? (mxDir = "center", mx = clampOffset(r.widget_position_horizontal_center_offset_mobile)) : savedSide(r.widget_position_right_mobile, r.widget_position_left_mobile) === "second" && (mxDir = "left", mx = clampOffset(r.widget_position_left_mobile));
|
|
380
370
|
let myDir = "bottom", my = clampOffset(r.widget_position_bottom_mobile);
|
|
381
|
-
return
|
|
371
|
+
return savedSide(r.widget_position_bottom_mobile, r.widget_position_top_mobile) === "second" && (myDir = "top", my = clampOffset(r.widget_position_top_mobile)), {
|
|
382
372
|
statement_link: typeof r.statement_link == "string" ? r.statement_link : "",
|
|
383
373
|
report_problem_link: typeof r.report_problem_link == "string" ? r.report_problem_link : "",
|
|
384
374
|
linkErrors: { statement_link: "", report_problem_link: "" },
|
|
@@ -1048,7 +1038,7 @@ function ReportIcon() {
|
|
|
1048
1038
|
/* @__PURE__ */ jsx("path", { d: "M12 10v4M12 17v.5" })
|
|
1049
1039
|
] });
|
|
1050
1040
|
}
|
|
1051
|
-
const UpgradeUrlContext = createContext(AIOA_UPGRADE_URL);
|
|
1041
|
+
const UpgradeUrlContext = createContext(AIOA_UPGRADE_URL), PlanExpiredContext = createContext(!1);
|
|
1052
1042
|
function Header({
|
|
1053
1043
|
theme,
|
|
1054
1044
|
onToggleTheme
|
|
@@ -1083,17 +1073,21 @@ function Header({
|
|
|
1083
1073
|
] });
|
|
1084
1074
|
}
|
|
1085
1075
|
function UpgradeBanner() {
|
|
1086
|
-
const upgradeHref = useContext(UpgradeUrlContext);
|
|
1076
|
+
const upgradeHref = useContext(UpgradeUrlContext), expired = useContext(PlanExpiredContext);
|
|
1087
1077
|
return /* @__PURE__ */ jsxs("section", { className: "aioa-upgrade", "aria-labelledby": "aioa-upgrade-title", children: [
|
|
1088
1078
|
/* @__PURE__ */ jsx(WatermarkIcon, {}),
|
|
1089
1079
|
/* @__PURE__ */ jsxs("div", { className: "aioa-upgrade-head", children: [
|
|
1090
1080
|
/* @__PURE__ */ jsxs("div", { className: "aioa-upgrade-intro", children: [
|
|
1091
|
-
/* @__PURE__ */ jsxs("p", { className:
|
|
1081
|
+
/* @__PURE__ */ jsxs("p", { className: `aioa-upgrade-tag${expired ? " is-expired" : ""}`, children: [
|
|
1092
1082
|
/* @__PURE__ */ jsx("i", { "aria-hidden": "true" }),
|
|
1093
|
-
"Free plan active"
|
|
1083
|
+
expired ? "Paid plan expired" : "Free plan active"
|
|
1094
1084
|
] }),
|
|
1095
|
-
/* @__PURE__ */ jsx("h2", { id: "aioa-upgrade-title", children: "With 24 Features" }),
|
|
1096
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
1085
|
+
/* @__PURE__ */ jsx("h2", { id: "aioa-upgrade-title", children: expired ? "Your paid plan has expired" : "With 24 Features" }),
|
|
1086
|
+
expired ? /* @__PURE__ */ jsxs("p", { children: [
|
|
1087
|
+
"Upgrade again to unlock ",
|
|
1088
|
+
/* @__PURE__ */ jsx("strong", { children: "100+ Premium Accessibility Features" }),
|
|
1089
|
+
". Paid Features and Accessibility Score are locked until then."
|
|
1090
|
+
] }) : /* @__PURE__ */ jsxs("p", { children: [
|
|
1097
1091
|
"Upgrade to unlock ",
|
|
1098
1092
|
/* @__PURE__ */ jsx("strong", { children: "90+ Premium Accessibility Features" }),
|
|
1099
1093
|
" and make your website even more inclusive."
|
|
@@ -1118,7 +1112,7 @@ function UpgradeBanner() {
|
|
|
1118
1112
|
]
|
|
1119
1113
|
}
|
|
1120
1114
|
),
|
|
1121
|
-
/* @__PURE__ */ jsx("small", { children: "10-day free trial \xB7 Cancel anytime" })
|
|
1115
|
+
!expired && /* @__PURE__ */ jsx("small", { children: "10-day free trial \xB7 Cancel anytime" })
|
|
1122
1116
|
] })
|
|
1123
1117
|
] }),
|
|
1124
1118
|
/* @__PURE__ */ jsxs("p", { className: "aioa-upgrade-note", children: [
|
|
@@ -1225,14 +1219,14 @@ function Lockable({
|
|
|
1225
1219
|
children,
|
|
1226
1220
|
contentClassName = ""
|
|
1227
1221
|
}) {
|
|
1228
|
-
const contentRef = useRef(null), upgradeHref = useContext(UpgradeUrlContext);
|
|
1222
|
+
const contentRef = useRef(null), upgradeHref = useContext(UpgradeUrlContext), expired = useContext(PlanExpiredContext);
|
|
1229
1223
|
return useEffect(() => {
|
|
1230
1224
|
contentRef.current && (contentRef.current.inert = locked);
|
|
1231
1225
|
}, [locked]), /* @__PURE__ */ jsxs("div", { className: `aioa-lockable${locked ? " is-locked" : ""}`, children: [
|
|
1232
1226
|
/* @__PURE__ */ jsx("div", { ref: contentRef, className: `aioa-lock-content ${contentClassName}`.trim(), children }),
|
|
1233
1227
|
locked && /* @__PURE__ */ jsx("div", { className: `aioa-lock${center ? " is-center" : ""}`, children: /* @__PURE__ */ jsxs("div", { className: "aioa-lock-card", role: "group", "aria-labelledby": `${lockId}-text`, children: [
|
|
1234
1228
|
/* @__PURE__ */ jsx("span", { className: "aioa-lock-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(LockIcon, {}) }),
|
|
1235
|
-
/* @__PURE__ */ jsx("p", { className: "aioa-lock-text", id: `${lockId}-text`, children: "Try a 10-day free trial to view all 90+ features." }),
|
|
1229
|
+
/* @__PURE__ */ jsx("p", { className: "aioa-lock-text", id: `${lockId}-text`, children: expired ? "Your paid plan has expired. Upgrade to view all 100+ features again." : "Try a 10-day free trial to view all 90+ features." }),
|
|
1236
1230
|
/* @__PURE__ */ jsxs(
|
|
1237
1231
|
"a",
|
|
1238
1232
|
{
|
|
@@ -1932,6 +1926,8 @@ const AIOA_CSS = `
|
|
|
1932
1926
|
font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .14); color: #f0e8ff;
|
|
1933
1927
|
}
|
|
1934
1928
|
.aioa-upgrade-tag i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
|
|
1929
|
+
/* "Paid plan expired": amber dot */
|
|
1930
|
+
.aioa-upgrade-tag.is-expired i { background: #fbbf24; }
|
|
1935
1931
|
|
|
1936
1932
|
/* 190+ languages / 12 profiles */
|
|
1937
1933
|
.aioa-upgrade-points { display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-weight: 600; }
|
|
@@ -2356,7 +2352,7 @@ function SettingsPage({ tool }) {
|
|
|
2356
2352
|
const upgradeHref = useMemo(
|
|
2357
2353
|
() => upgradeUrl(activeDomain, adminName, adminEmail),
|
|
2358
2354
|
[activeDomain, adminName, adminEmail]
|
|
2359
|
-
), { theme, toggleTheme } = useTheme(), { toasts, toast, dismiss } = useToasts(), [view, setView] = useState({ name: "load" }), [isPaid, setIsPaid] = useState(!1), [tab, setTab] = useState("appearance"), [appearance, setAppearance] = useState(emptyAppearance), [paid, setPaid] = useState(() => paidFrom({})), [dirty, setDirty] = useState(!1), [saving, setSaving] = useState(!1), [score, setScore] = useState({ status: "idle" }), [dashboardBusy, setDashboardBusy] = useState(!1), latest = useRef({ appearance, paid, isPaid });
|
|
2355
|
+
), { theme, toggleTheme } = useTheme(), { toasts, toast, dismiss } = useToasts(), [view, setView] = useState({ name: "load" }), [isPaid, setIsPaid] = useState(!1), [planExpired, setPlanExpired] = useState(!1), [tab, setTab] = useState("appearance"), [appearance, setAppearance] = useState(emptyAppearance), [paid, setPaid] = useState(() => paidFrom({})), [dirty, setDirty] = useState(!1), [saving, setSaving] = useState(!1), [score, setScore] = useState({ status: "idle" }), [dashboardBusy, setDashboardBusy] = useState(!1), latest = useRef({ appearance, paid, isPaid });
|
|
2360
2356
|
latest.current = { appearance, paid, isPaid };
|
|
2361
2357
|
const updateAppearance = useCallback((patch) => {
|
|
2362
2358
|
setAppearance((state) => ({ ...state, ...patch })), setDirty(!0);
|
|
@@ -2386,51 +2382,31 @@ function SettingsPage({ tool }) {
|
|
|
2386
2382
|
});
|
|
2387
2383
|
const selectTab = useCallback((name) => {
|
|
2388
2384
|
setTab(name), storage.set(STORAGE_TAB, name);
|
|
2389
|
-
}, []),
|
|
2390
|
-
|
|
2391
|
-
link: "",
|
|
2392
|
-
failure: null
|
|
2393
|
-
}), loadDashboard = useCallback(() => {
|
|
2394
|
-
if (dashboard.current.request)
|
|
2395
|
-
return;
|
|
2396
|
-
const request = getDashboardLink(activeDomain).then((result) => {
|
|
2397
|
-
const value = "link" in result ? result.link : "";
|
|
2398
|
-
if (!value || !/^https:\/\//i.test(value))
|
|
2399
|
-
throw new Error("error" in result && result.error || "Unable to load the dashboard link.");
|
|
2400
|
-
return dashboard.current.link = value, value;
|
|
2401
|
-
});
|
|
2402
|
-
dashboard.current.request = request, request.catch((err) => {
|
|
2403
|
-
dashboard.current.failure = err;
|
|
2404
|
-
});
|
|
2405
|
-
}, [activeDomain]), openIn = (win, url) => {
|
|
2406
|
-
win && !win.closed ? (win.opener = null, win.location.href = url) : toast("success", "Your dashboard link is ready", "Your browser blocked the new tab.", {
|
|
2385
|
+
}, []), openIn = (win, url) => {
|
|
2386
|
+
win && !win.closed ? (win.opener = null, win.location.href = url) : toast("success", "Your dashboard is ready to open", "Your browser blocked the new tab.", {
|
|
2407
2387
|
href: url,
|
|
2408
2388
|
label: "Open dashboard"
|
|
2409
2389
|
});
|
|
2410
2390
|
}, showDashboardError = (err) => {
|
|
2411
2391
|
const reason = err instanceof TypeError ? "Please check your connection." : err instanceof Error && err.message || "";
|
|
2412
|
-
toast(
|
|
2413
|
-
"error",
|
|
2414
|
-
"Could not open the dashboard",
|
|
2415
|
-
`${reason ? `${reason} ` : ""}Reload the page to try again.`
|
|
2416
|
-
);
|
|
2392
|
+
toast("error", "Could not open the dashboard", `${reason ? `${reason} ` : ""}Please try again.`);
|
|
2417
2393
|
}, openDashboard = () => {
|
|
2418
|
-
|
|
2419
|
-
if (link) {
|
|
2420
|
-
openIn(window.open("", "_blank"), link);
|
|
2421
|
-
return;
|
|
2422
|
-
}
|
|
2423
|
-
if (failure || !request) {
|
|
2424
|
-
showDashboardError(failure);
|
|
2394
|
+
if (dashboardBusy)
|
|
2425
2395
|
return;
|
|
2426
|
-
}
|
|
2427
2396
|
const win = window.open("", "_blank");
|
|
2428
2397
|
if (win)
|
|
2429
2398
|
try {
|
|
2430
2399
|
win.document.title = "Opening dashboard\u2026", win.document.body.style.cssText = "font-family:system-ui,sans-serif;display:grid;place-items:center;min-height:90vh;color:#420083", win.document.body.textContent = "Opening your All in One Accessibility dashboard\u2026";
|
|
2431
2400
|
} catch {
|
|
2432
2401
|
}
|
|
2433
|
-
setDashboardBusy(!0),
|
|
2402
|
+
setDashboardBusy(!0), getDashboardLink(activeDomain).then((result) => {
|
|
2403
|
+
const link = "link" in result ? result.link : "";
|
|
2404
|
+
if (!link || !/^https:\/\//i.test(link))
|
|
2405
|
+
throw new Error(
|
|
2406
|
+
"error" in result && result.error || "Unable to load the dashboard link."
|
|
2407
|
+
);
|
|
2408
|
+
openIn(win, link);
|
|
2409
|
+
}).catch((err) => {
|
|
2434
2410
|
win && !win.closed && win.close(), showDashboardError(err);
|
|
2435
2411
|
}).finally(() => setDashboardBusy(!1));
|
|
2436
2412
|
}, register2 = useRef({
|
|
@@ -2469,10 +2445,10 @@ function SettingsPage({ tool }) {
|
|
|
2469
2445
|
}, [activeDomain]), applyResult = useCallback(
|
|
2470
2446
|
(result) => {
|
|
2471
2447
|
storage.remove(STORAGE_REGISTERED + activeDomain);
|
|
2472
|
-
const paidPlan = toInt(result.is_free_widget) !== 1, order = paidPlan ? TAB_ORDER.paid : TAB_ORDER.free, stored = storage.get(STORAGE_TAB);
|
|
2473
|
-
setAppearance(appearanceFrom(result)), setPaid(paidFrom(result)), setIsPaid(paidPlan), setTab(TABS.includes(stored) ? stored : order[0]), setDirty(!1), setView({ name: "settings" })
|
|
2448
|
+
const flag = result.plan_expired, expired = flag === !0 || flag === 1 || flag === "1" || flag === "true", paidPlan = toInt(result.is_free_widget) !== 1 && !expired, order = paidPlan ? TAB_ORDER.paid : TAB_ORDER.free, stored = storage.get(STORAGE_TAB);
|
|
2449
|
+
setAppearance(appearanceFrom(result)), setPaid(paidFrom(result)), setIsPaid(paidPlan), setPlanExpired(expired), setTab(TABS.includes(stored) ? stored : order[0]), setDirty(!1), setView({ name: "settings" });
|
|
2474
2450
|
},
|
|
2475
|
-
[activeDomain
|
|
2451
|
+
[activeDomain]
|
|
2476
2452
|
), loadSettings = useCallback(() => {
|
|
2477
2453
|
if (!activeDomain) {
|
|
2478
2454
|
showError(
|
|
@@ -2553,7 +2529,7 @@ function SettingsPage({ tool }) {
|
|
|
2553
2529
|
/* @__PURE__ */ jsx("p", { children: view.message }),
|
|
2554
2530
|
view.retry && /* @__PURE__ */ jsx("button", { type: "button", className: "aioa-btn aioa-btn-primary", onClick: loadSettings, children: "Try again" })
|
|
2555
2531
|
] }),
|
|
2556
|
-
view.name === "settings" && /* @__PURE__ */
|
|
2532
|
+
view.name === "settings" && /* @__PURE__ */ jsx(UpgradeUrlContext.Provider, { value: upgradeHref, children: /* @__PURE__ */ jsxs(PlanExpiredContext.Provider, { value: planExpired, children: [
|
|
2557
2533
|
isPaid ? /* @__PURE__ */ jsx(PaidBanner, { busy: dashboardBusy, onDashboard: openDashboard }) : /* @__PURE__ */ jsx(UpgradeBanner, {}),
|
|
2558
2534
|
/* @__PURE__ */ jsx(SiteStrip, { domain: activeDomain }),
|
|
2559
2535
|
/* @__PURE__ */ jsx(
|
|
@@ -2644,7 +2620,7 @@ function SettingsPage({ tool }) {
|
|
|
2644
2620
|
/* @__PURE__ */ jsx("p", { className: "aioa-after-note", children: "It may take a few seconds for changes to appear on your website. If you don't see them, clear your browser cache or check in a private window." })
|
|
2645
2621
|
] })
|
|
2646
2622
|
] })
|
|
2647
|
-
] })
|
|
2623
|
+
] }) })
|
|
2648
2624
|
] })
|
|
2649
2625
|
] }),
|
|
2650
2626
|
/* @__PURE__ */ jsx(ToastRegion, { toasts, onDismiss: dismiss })
|