@oxy.so/services 14.1.2 → 14.2.1
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/lib/commonjs/ui/components/accountSettings/AccountSettings.js +8 -7
- package/lib/commonjs/ui/components/accountSettings/AccountSettings.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +0 -5
- package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +2 -1
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +13 -24
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +11 -22
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAccountColor.js +16 -8
- package/lib/commonjs/ui/hooks/useAccountColor.js.map +1 -1
- package/lib/commonjs/ui/hooks/useApiErrorToast.js +24 -0
- package/lib/commonjs/ui/hooks/useApiErrorToast.js.map +1 -0
- package/lib/commonjs/ui/hooks/useUsernameAvailability.js +2 -2
- package/lib/commonjs/ui/hooks/useUsernameAvailability.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +14 -17
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DomainsScreen.js +5 -4
- package/lib/commonjs/ui/screens/DomainsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -5
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/apiErrorMessage.js +18 -27
- package/lib/commonjs/ui/utils/apiErrorMessage.js.map +1 -1
- package/lib/commonjs/ui/utils/followErrors.js +2 -3
- package/lib/commonjs/ui/utils/followErrors.js.map +1 -1
- package/lib/commonjs/ui/utils/usernamePolicy.js +10 -6
- package/lib/commonjs/ui/utils/usernamePolicy.js.map +1 -1
- package/lib/module/ui/components/accountSettings/AccountSettings.js +8 -7
- package/lib/module/ui/components/accountSettings/AccountSettings.js.map +1 -1
- package/lib/module/ui/components/signIn/OxyPasswordPanel.js +0 -5
- package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignInPanel.js +3 -2
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +13 -24
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +11 -22
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/useAccountColor.js +16 -8
- package/lib/module/ui/hooks/useAccountColor.js.map +1 -1
- package/lib/module/ui/hooks/useApiErrorToast.js +21 -0
- package/lib/module/ui/hooks/useApiErrorToast.js.map +1 -0
- package/lib/module/ui/hooks/useUsernameAvailability.js +2 -2
- package/lib/module/ui/hooks/useUsernameAvailability.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +14 -17
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/DomainsScreen.js +5 -4
- package/lib/module/ui/screens/DomainsScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +2 -5
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/utils/apiErrorMessage.js +17 -24
- package/lib/module/ui/utils/apiErrorMessage.js.map +1 -1
- package/lib/module/ui/utils/followErrors.js +2 -3
- package/lib/module/ui/utils/followErrors.js.map +1 -1
- package/lib/module/ui/utils/usernamePolicy.js +11 -7
- package/lib/module/ui/utils/usernamePolicy.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAccountColor.d.ts +6 -4
- package/lib/typescript/commonjs/ui/hooks/useAccountColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useApiErrorToast.d.ts +7 -0
- package/lib/typescript/commonjs/ui/hooks/useApiErrorToast.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/DomainsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/apiErrorMessage.d.ts +6 -4
- package/lib/typescript/commonjs/ui/utils/apiErrorMessage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/followErrors.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts +2 -2
- package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAccountColor.d.ts +6 -4
- package/lib/typescript/module/ui/hooks/useAccountColor.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useApiErrorToast.d.ts +7 -0
- package/lib/typescript/module/ui/hooks/useApiErrorToast.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/DomainsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/apiErrorMessage.d.ts +6 -4
- package/lib/typescript/module/ui/utils/apiErrorMessage.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/followErrors.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/usernamePolicy.d.ts +2 -2
- package/lib/typescript/module/ui/utils/usernamePolicy.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ui/components/accountSettings/AccountSettings.tsx +8 -7
- package/src/ui/components/signIn/OxyPasswordPanel.tsx +0 -3
- package/src/ui/components/signIn/OxySignInPanel.tsx +3 -7
- package/src/ui/hooks/mutations/useAccountMutations.ts +13 -12
- package/src/ui/hooks/mutations/useServicesMutations.ts +11 -12
- package/src/ui/hooks/useAccountColor.ts +21 -8
- package/src/ui/hooks/useApiErrorToast.ts +19 -0
- package/src/ui/hooks/useUsernameAvailability.ts +2 -2
- package/src/ui/screens/AccountMembersScreen.tsx +14 -24
- package/src/ui/screens/DomainsScreen.tsx +5 -4
- package/src/ui/screens/EditProfileFieldScreen.tsx +2 -5
- package/src/ui/utils/apiErrorMessage.ts +19 -24
- package/src/ui/utils/followErrors.ts +2 -3
- package/src/ui/utils/usernamePolicy.ts +13 -11
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
* "Something went wrong".
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { ErrorCodes } from '@oxy.so/core';
|
|
15
|
+
import { BOT_USERNAME_INVALID_MESSAGE, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAME_MESSAGE, USERNAME_INVALID_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, usernameCheckForAccountKind } from '@oxy.so/contracts/client';
|
|
16
|
+
import { errorCode } from "./apiErrorMessage.js";
|
|
15
17
|
/**
|
|
16
18
|
* Hold a typed username to the policy for `kind` (`bot` handles end in `bot`).
|
|
17
19
|
* On success `username` is the trimmed handle to send; on failure `error` is
|
|
@@ -37,12 +39,12 @@ export function checkUsernameDraft(value, t, kind) {
|
|
|
37
39
|
/**
|
|
38
40
|
* The server's refusal of `username` (a 400 naming the `username` field, whose
|
|
39
41
|
* message is the policy's), in the same words as {@link checkUsernameDraft};
|
|
40
|
-
* `null` when `reason` is something else.
|
|
41
|
-
*
|
|
42
|
+
* `null` when `reason` is something else. A message this client does not know
|
|
43
|
+
* reads as "something you entered isn't valid", never as a rule it did not break.
|
|
42
44
|
*/
|
|
43
45
|
export function describeUsernameRefusal(reason, username, t) {
|
|
44
46
|
const error = reason;
|
|
45
|
-
if (
|
|
47
|
+
if (errorCode(reason) !== ErrorCodes.BAD_REQUEST || error?.details?.field !== 'username') return null;
|
|
46
48
|
const message = typeof error.message === 'string' ? error.message : '';
|
|
47
49
|
return describeUsernameIssue(username.trim(), message, t);
|
|
48
50
|
}
|
|
@@ -54,9 +56,9 @@ function describeUsernameIssue(username, message, t) {
|
|
|
54
56
|
return t('usernamePolicy.reserved');
|
|
55
57
|
case BOT_USERNAME_INVALID_MESSAGE:
|
|
56
58
|
return t('usernamePolicy.mustEndInBot');
|
|
57
|
-
|
|
58
|
-
//
|
|
59
|
-
//
|
|
59
|
+
case USERNAME_INVALID_MESSAGE:
|
|
60
|
+
// One message covers length and shape alike; the length is read here so
|
|
61
|
+
// the reason names the rule that actually failed.
|
|
60
62
|
if (username.length < USERNAME_MIN_LENGTH) return t('usernamePolicy.tooShort', {
|
|
61
63
|
min: USERNAME_MIN_LENGTH
|
|
62
64
|
});
|
|
@@ -65,6 +67,8 @@ function describeUsernameIssue(username, message, t) {
|
|
|
65
67
|
});
|
|
66
68
|
if (/\s/.test(username)) return t('usernamePolicy.noSpaces');
|
|
67
69
|
return t('usernamePolicy.characters');
|
|
70
|
+
default:
|
|
71
|
+
return t('signin.errors.invalidInput');
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
//# sourceMappingURL=usernamePolicy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BOT_USERNAME_INVALID_MESSAGE","NUMERIC_USERNAME_MESSAGE","RESERVED_USERNAME_MESSAGE","USERNAME_MAX_LENGTH","USERNAME_MIN_LENGTH","usernameCheckForAccountKind","checkUsernameDraft","value","t","kind","username","trim","ok","error","checked","describeUsernameIssue","issue","message","describeUsernameRefusal","reason","
|
|
1
|
+
{"version":3,"names":["ErrorCodes","BOT_USERNAME_INVALID_MESSAGE","NUMERIC_USERNAME_MESSAGE","RESERVED_USERNAME_MESSAGE","USERNAME_INVALID_MESSAGE","USERNAME_MAX_LENGTH","USERNAME_MIN_LENGTH","usernameCheckForAccountKind","errorCode","checkUsernameDraft","value","t","kind","username","trim","ok","error","checked","describeUsernameIssue","issue","message","describeUsernameRefusal","reason","BAD_REQUEST","details","field","length","min","max","test"],"sourceRoot":"../../../../src","sources":["ui/utils/usernamePolicy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAQ,cAAc;AACzC,SACEC,4BAA4B,EAC5BC,wBAAwB,EACxBC,yBAAyB,EACzBC,wBAAwB,EACxBC,mBAAmB,EACnBC,mBAAmB,EACnBC,2BAA2B,QACtB,0BAA0B;AAEjC,SAASC,SAAS,QAAQ,sBAAmB;AAI7C;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,KAAa,EACbC,CAAY,EACZC,IAAyB,EACJ;EACrB,MAAMC,QAAQ,GAAGH,KAAK,CAACI,IAAI,CAAC,CAAC;EAC7B,IAAI,CAACD,QAAQ,EAAE,OAAO;IAAEE,EAAE,EAAE,KAAK;IAAEC,KAAK,EAAEL,CAAC,CAAC,yBAAyB;EAAE,CAAC;EACxE,MAAMM,OAAO,GAAGV,2BAA2B,CAACK,IAAI,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AAM,GAAGrB,mBAAmB,EACvC,OAAOM,CAAC,CAAC,wBAAwB,EAAE;QAAEiB,GAAG,EAAEvB;MAAoB,CAAC,CAAC;MAClE,IAAI,IAAI,CAACwB,IAAI,CAAChB,QAAQ,CAAC,EAAE,OAAOF,CAAC,CAAC,yBAAyB,CAAC;MAC5D,OAAOA,CAAC,CAAC,2BAA2B,CAAC;IACvC;MACE,OAAOA,CAAC,CAAC,4BAA4B,CAAC;EAC1C;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;QAAE,OAAO,EAAE,kBAAkB,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;EAYvD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,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,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyH5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyD/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAoBtB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAOQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA2EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAyFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eA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AAED,4EAA4E;AAC5E,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;EAgD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EAgDpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,uFAmBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,aAAa;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
|
|
@@ -34,11 +34,13 @@ export declare function entitledAccountColors(user: EntitlementSubject, now?: nu
|
|
|
34
34
|
/**
|
|
35
35
|
* Choose the account's colour: one `updateMe` writes `color` and the portable
|
|
36
36
|
* `themePreference.colorPreset` together (the mode already on the account is
|
|
37
|
-
* kept), the Bloom theme follows at once
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* kept), the Bloom theme follows at once and goes back if the write fails.
|
|
38
|
+
* `colors` is what the picker should list; an app with a stricter rule of its
|
|
39
|
+
* own passes the same `canUse` it gives `useAccountColor`.
|
|
40
40
|
*/
|
|
41
|
-
export declare function useAccountColorSave(
|
|
41
|
+
export declare function useAccountColorSave({ canUse, }?: {
|
|
42
|
+
canUse?: (name: AppColorName) => boolean;
|
|
43
|
+
}): {
|
|
42
44
|
colors: readonly AppColorName[];
|
|
43
45
|
value: AppColorName;
|
|
44
46
|
saveColor: (name: AppColorName) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountColor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAccountColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAW1F,2EAA2E;AAC3E,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,GAC/D,YAAY,GAAG,IAAI,CAGrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useAccountColor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAccountColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAW1F,2EAA2E;AAC3E,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,GAC/D,YAAY,GAAG,IAAI,CAGrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG,IAAI,CAgBZ;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAExF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EACxB,GAAG,GAAE,MAAmB,GACvB,SAAS,YAAY,EAAE,CAYzB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG;IACP,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,EAAE,OAAO,CAAC;CACjB,CA+BA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast a failed API call in the person's language: the reason when the error
|
|
3
|
+
* names one (offline, invalid input, rate limit, server fault), else the
|
|
4
|
+
* `fallbackKey` string saying what failed. Never the server's `message`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useApiErrorToast(): (error: unknown, fallbackKey: string) => void;
|
|
7
|
+
//# sourceMappingURL=useApiErrorToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useApiErrorToast.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useApiErrorToast.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAQhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAufnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAsM3D,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAoB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA6oBD,wBAAkD"}
|
|
@@ -10,10 +10,12 @@ import type { Translate } from '../hooks/useI18n';
|
|
|
10
10
|
export declare const RATE_LIMIT_SECONDS = 60;
|
|
11
11
|
/** The API error code a thrown SDK error carries (`error.code`), if any. */
|
|
12
12
|
export declare function errorCode(error: unknown): string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The transport codes (core's `ErrorCodes`) for a request that never got an
|
|
15
|
+
* answer: offline, or timed out. Literals, so a module-load read never depends
|
|
16
|
+
* on core's values being initialised first.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OFFLINE_ERROR_CODES: ReadonlySet<string>;
|
|
17
19
|
/** How long to wait after a 429, from the API's `retryAfterSeconds` when it sent one. */
|
|
18
20
|
export declare function retryAfterSeconds(error: unknown): number;
|
|
19
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAiDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
|
|
@@ -26,8 +26,8 @@ export declare function checkUsernameDraft(value: string, t: Translate, kind?: A
|
|
|
26
26
|
/**
|
|
27
27
|
* The server's refusal of `username` (a 400 naming the `username` field, whose
|
|
28
28
|
* message is the policy's), in the same words as {@link checkUsernameDraft};
|
|
29
|
-
* `null` when `reason` is something else.
|
|
30
|
-
*
|
|
29
|
+
* `null` when `reason` is something else. A message this client does not know
|
|
30
|
+
* reads as "something you entered isn't valid", never as a rule it did not break.
|
|
31
31
|
*/
|
|
32
32
|
export declare function describeUsernameRefusal(reason: unknown, username: string, t: Translate): string | null;
|
|
33
33
|
//# sourceMappingURL=usernamePolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kCAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;QAAE,OAAO,EAAE,kBAAkB,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;EAYvD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/accountSettings/AccountSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAQL,KAAK,WAAW,EAEhB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kCAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,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C;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"OxyPasswordPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyPasswordPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyH5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyD/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkuBxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAoBtB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAOQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA2EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAyFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BASpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBATnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAS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CAAC,CAAC;CACJ;AAED,4EAA4E;AAC5E,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;EAgD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EAgDpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,uFAmBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,aAAa;iBACX,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAO5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;YAMyB,MAAM;mBAAiB,MAAM;;;EAiBxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useServicesMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useServicesMutations.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,gBAAgB,8GAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAkD5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,qFAwBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;0BAwB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,yFAqB3B,CAAC"}
|
|
@@ -34,11 +34,13 @@ export declare function entitledAccountColors(user: EntitlementSubject, now?: nu
|
|
|
34
34
|
/**
|
|
35
35
|
* Choose the account's colour: one `updateMe` writes `color` and the portable
|
|
36
36
|
* `themePreference.colorPreset` together (the mode already on the account is
|
|
37
|
-
* kept), the Bloom theme follows at once
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* kept), the Bloom theme follows at once and goes back if the write fails.
|
|
38
|
+
* `colors` is what the picker should list; an app with a stricter rule of its
|
|
39
|
+
* own passes the same `canUse` it gives `useAccountColor`.
|
|
40
40
|
*/
|
|
41
|
-
export declare function useAccountColorSave(
|
|
41
|
+
export declare function useAccountColorSave({ canUse, }?: {
|
|
42
|
+
canUse?: (name: AppColorName) => boolean;
|
|
43
|
+
}): {
|
|
42
44
|
colors: readonly AppColorName[];
|
|
43
45
|
value: AppColorName;
|
|
44
46
|
saveColor: (name: AppColorName) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountColor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAccountColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAW1F,2EAA2E;AAC3E,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,GAC/D,YAAY,GAAG,IAAI,CAGrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useAccountColor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAccountColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAW1F,2EAA2E;AAC3E,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,GAC/D,YAAY,GAAG,IAAI,CAGrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG,IAAI,CAgBZ;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAExF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EACxB,GAAG,GAAE,MAAmB,GACvB,SAAS,YAAY,EAAE,CAYzB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,GACP,GAAE;IACD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CACrC,GAAG;IACP,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,EAAE,OAAO,CAAC;CACjB,CA+BA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast a failed API call in the person's language: the reason when the error
|
|
3
|
+
* names one (offline, invalid input, rate limit, server fault), else the
|
|
4
|
+
* `fallbackKey` string saying what failed. Never the server's `message`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useApiErrorToast(): (error: unknown, fallbackKey: string) => void;
|
|
7
|
+
//# sourceMappingURL=useApiErrorToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useApiErrorToast.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useApiErrorToast.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAQhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAY3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAufnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"DomainsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/DomainsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;AAsM3D,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAoB3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AA4BZ,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AA6oBD,wBAAkD"}
|
|
@@ -10,10 +10,12 @@ import type { Translate } from '../hooks/useI18n.js';
|
|
|
10
10
|
export declare const RATE_LIMIT_SECONDS = 60;
|
|
11
11
|
/** The API error code a thrown SDK error carries (`error.code`), if any. */
|
|
12
12
|
export declare function errorCode(error: unknown): string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The transport codes (core's `ErrorCodes`) for a request that never got an
|
|
15
|
+
* answer: offline, or timed out. Literals, so a module-load read never depends
|
|
16
|
+
* on core's values being initialised first.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OFFLINE_ERROR_CODES: ReadonlySet<string>;
|
|
17
19
|
/** How long to wait after a 429, from the API's `retryAfterSeconds` when it sent one. */
|
|
18
20
|
export declare function retryAfterSeconds(error: unknown): number;
|
|
19
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAiDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"followErrors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/followErrors.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,oCAAoC;AAClC,aAAa;AACf,wCAAwC;GACtC,eAAe;AACjB,yEAAyE;GACvE,aAAa;AACf,4EAA4E;GAC1E,SAAS;AACX,6DAA6D;GAC3D,YAAY;AACd,6DAA6D;GAC3D,WAAW;AACb,uDAAuD;GACrD,WAAW;AACb,yCAAyC;GACvC,cAAc,CAAC;AAEnB,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAYhG"}
|
|
@@ -26,8 +26,8 @@ export declare function checkUsernameDraft(value: string, t: Translate, kind?: A
|
|
|
26
26
|
/**
|
|
27
27
|
* The server's refusal of `username` (a 400 naming the `username` field, whose
|
|
28
28
|
* message is the policy's), in the same words as {@link checkUsernameDraft};
|
|
29
|
-
* `null` when `reason` is something else.
|
|
30
|
-
*
|
|
29
|
+
* `null` when `reason` is something else. A message this client does not know
|
|
30
|
+
* reads as "something you entered isn't valid", never as a rule it did not break.
|
|
31
31
|
*/
|
|
32
32
|
export declare function describeUsernameRefusal(reason: unknown, username: string, t: Translate): string | null;
|
|
33
33
|
//# sourceMappingURL=usernamePolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "14.1
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"@commitlint/config-conventional": "^21.2.0",
|
|
186
186
|
"@expo/app-integrity": "~58.0.2",
|
|
187
187
|
"@expo/vector-icons": "^15.0.3",
|
|
188
|
-
"@oxy.so/core": "7.13.
|
|
188
|
+
"@oxy.so/core": "7.13.1",
|
|
189
189
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
190
190
|
"@react-native-community/netinfo": "^12.0.1",
|
|
191
191
|
"@react-native/babel-preset": "^0.88.0",
|
|
@@ -35,7 +35,7 @@ import type { BaseScreenProps } from '../../types/navigation';
|
|
|
35
35
|
import { OrganizationSettings } from '../organizations/OrganizationSettings';
|
|
36
36
|
import { SettingsIcon } from '../SettingsIcon';
|
|
37
37
|
import { AccountCategoriesSection, accountCategoriesEqual } from './AccountCategoriesSection';
|
|
38
|
-
import {
|
|
38
|
+
import { useApiErrorToast } from '../../hooks/useApiErrorToast';
|
|
39
39
|
|
|
40
40
|
const BIO_MAX = 160;
|
|
41
41
|
const AVATAR_SIZE = 64;
|
|
@@ -132,6 +132,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
|
|
|
132
132
|
}) => {
|
|
133
133
|
const { colors } = useTheme();
|
|
134
134
|
const { t } = useI18n();
|
|
135
|
+
const showApiError = useApiErrorToast();
|
|
135
136
|
const { oxyServices, user, accounts, switchToAccount, showBottomSheet } = useOxy();
|
|
136
137
|
const queryClient = useQueryClient();
|
|
137
138
|
const id = accountId;
|
|
@@ -183,7 +184,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
|
|
|
183
184
|
toast.success(t('accounts.settings.toasts.saved'));
|
|
184
185
|
},
|
|
185
186
|
onError: (error) => {
|
|
186
|
-
|
|
187
|
+
showApiError(error, 'accounts.settings.toasts.saveFailed');
|
|
187
188
|
},
|
|
188
189
|
});
|
|
189
190
|
|
|
@@ -209,7 +210,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
|
|
|
209
210
|
else onClose?.();
|
|
210
211
|
},
|
|
211
212
|
onError: (error) => {
|
|
212
|
-
|
|
213
|
+
showApiError(error, 'accounts.settings.toasts.archiveFailed');
|
|
213
214
|
},
|
|
214
215
|
});
|
|
215
216
|
|
|
@@ -227,11 +228,11 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
|
|
|
227
228
|
destructive: true,
|
|
228
229
|
});
|
|
229
230
|
} catch (error) {
|
|
230
|
-
|
|
231
|
+
showApiError(error, 'accounts.settings.toasts.archiveFailed');
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
233
234
|
if (confirmed) archiveMutation.mutate(node);
|
|
234
|
-
}, [archive, archiveMutation, node, t]);
|
|
235
|
+
}, [archive, archiveMutation, node, showApiError, t]);
|
|
235
236
|
|
|
236
237
|
const handleDisplayNameChange = useCallback(
|
|
237
238
|
(value: string) => {
|
|
@@ -285,9 +286,9 @@ export const AccountSettings: React.FC<AccountSettingsProps> = ({
|
|
|
285
286
|
});
|
|
286
287
|
if (avatar !== undefined) updateMutation.mutate({ avatar });
|
|
287
288
|
} catch (error) {
|
|
288
|
-
|
|
289
|
+
showApiError(error, 'accounts.settings.toasts.saveFailed');
|
|
289
290
|
}
|
|
290
|
-
}, [account?.avatar, oxyServices,
|
|
291
|
+
}, [account?.avatar, oxyServices, showApiError, storedName, updateMutation]);
|
|
291
292
|
|
|
292
293
|
const avatarUri = useMemo(
|
|
293
294
|
() => (account?.avatar ? oxyServices.assets.publicUrl(account.avatar, 'thumb') : undefined),
|
|
@@ -95,9 +95,6 @@ export const OxyPasswordPanel: React.FC<OxyPasswordPanelProps> = ({ onDone, onCa
|
|
|
95
95
|
if (password.length < PASSWORD_MIN_LENGTH) {
|
|
96
96
|
return t('signInSecurity.password.tooShort', { min: PASSWORD_MIN_LENGTH });
|
|
97
97
|
}
|
|
98
|
-
if (password.length > PASSWORD_MAX_LENGTH) {
|
|
99
|
-
return t('signInSecurity.password.tooLong', { max: PASSWORD_MAX_LENGTH });
|
|
100
|
-
}
|
|
101
98
|
return password === repeat ? null : t('signInSecurity.password.mismatch');
|
|
102
99
|
}}
|
|
103
100
|
onSubmit={async (reauth) => {
|
|
@@ -35,6 +35,7 @@ import { Divider } from '@oxy.so/bloom/divider';
|
|
|
35
35
|
import { useTheme } from '@oxy.so/bloom/theme';
|
|
36
36
|
import { toast } from '@oxy.so/bloom/toast';
|
|
37
37
|
import { Text } from '@oxy.so/bloom/typography';
|
|
38
|
+
import { isRateLimitError } from '@oxy.so/core';
|
|
38
39
|
import type { SwitcherContextRow } from '@oxy.so/core/session';
|
|
39
40
|
import type {
|
|
40
41
|
EmailSignInAccountOption,
|
|
@@ -76,12 +77,7 @@ import {
|
|
|
76
77
|
} from './accountFlowParts';
|
|
77
78
|
import { readSignInFlow, writeSignInFlow } from './signInFlowStore';
|
|
78
79
|
import { resolveSignInMethods } from './signInMethods';
|
|
79
|
-
import {
|
|
80
|
-
describeApiError,
|
|
81
|
-
errorCode,
|
|
82
|
-
isRateLimited,
|
|
83
|
-
retryAfterSeconds,
|
|
84
|
-
} from '../../utils/apiErrorMessage';
|
|
80
|
+
import { describeApiError, errorCode, retryAfterSeconds } from '../../utils/apiErrorMessage';
|
|
85
81
|
import { withoutWhitespace } from '../../utils/withoutWhitespace';
|
|
86
82
|
|
|
87
83
|
/** Bloom `AuthCard`'s split card width, which the account dialog grows to for it. */
|
|
@@ -237,7 +233,7 @@ export const OxySignInPanel: React.FC<OxySignInPanelProps> = ({
|
|
|
237
233
|
|
|
238
234
|
const fail = useCallback(
|
|
239
235
|
(reason: unknown) => {
|
|
240
|
-
if (
|
|
236
|
+
if (isRateLimitError(reason)) setRateLimitSeconds(retryAfterSeconds(reason));
|
|
241
237
|
else setError(describeApiError(reason, t));
|
|
242
238
|
},
|
|
243
239
|
[t],
|