commit e699cd5c2b5caec7c07d098b19cb7e29bd4e8460 parent 65324a5c030e997115e2b240dcdc5560052c1117 Author: Sebastian <sebasjm@gmail.com> Date: Wed, 30 Apr 2025 16:10:56 -0300 wip rename acc token to password Diffstat:
7 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx @@ -85,7 +85,7 @@ export function InputSecured<T>({ <i class="mdi mdi-lock-reset" /> </div> <span> - <i18n.Translate>Manage access token</i18n.Translate> + <i18n.Translate>Manage password</i18n.Translate> </span> </button> <TokenStatus prev={initial} post={value} /> diff --git a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx @@ -252,7 +252,7 @@ export function Sidebar({ mobile }: Props): VNode { <i class="mdi mdi-security" /> </span> <span class="menu-item-label"> - <i18n.Translate>Access token</i18n.Translate> + <i18n.Translate>Password</i18n.Translate> </span> </a> </li> diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -218,8 +218,8 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { /> <Input<TokenForm> name="token" - label={i18n.str`New access token`} - tooltip={i18n.str`Next access token to be used`} + label={i18n.str`New password`} + tooltip={i18n.str`Next password to be used`} readonly={ tokenForm.accessControl === false || tokenForm.accessControl === undefined @@ -228,8 +228,8 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { /> <Input<TokenForm> name="repeat" - label={i18n.str`Repeat access token`} - tooltip={i18n.str`Confirm the same access token`} + label={i18n.str`Repeat password`} + tooltip={i18n.str`Confirm the same password`} readonly={ tokenForm.accessControl === false || tokenForm.accessControl === undefined diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx @@ -63,7 +63,7 @@ export function InstanceCreatedSuccessfully({ <div class="field is-horizontal"> <div class="field-label is-normal"> <label class="label"> - <i18n.Translate>Access token</i18n.Translate> + <i18n.Translate>Password</i18n.Translate> </label> </div> <div class="field-body is-flex-grow-3"> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx @@ -54,12 +54,12 @@ export function DetailPage({ const errors = undefinedIfEmpty({ old_token: hasToken && !form.old_token - ? i18n.str`You need your access token to perform the operation` + ? i18n.str`You need your password to perform the operation` : undefined, new_token: !form.new_token ? i18n.str`Required` : form.new_token === form.old_token - ? i18n.str`Can't be the same as the old token` + ? i18n.str`Can't be the same as the old password` : undefined, repeat_token: form.new_token !== form.repeat_token @@ -71,7 +71,7 @@ export function DetailPage({ const { state } = useSessionContext(); - const text = i18n.str`You are updating the access token from instance with id "${state.instance}"`; + const text = i18n.str`You are updating the password from instance with id "${state.instance}"`; async function submitForm() { if (hasErrors) return; @@ -102,7 +102,7 @@ export function DetailPage({ {!hasToken && ( <NotificationCard notification={{ - message: i18n.str`This instance does not have authentication token.`, + message: i18n.str`This instance does not have authentication password.`, description: i18n.str`You can leave it empty if there is another layer of security.`, type: "WARN", }} @@ -118,13 +118,13 @@ export function DetailPage({ <Fragment> <Input<State> name="old_token" - label={i18n.str`Current access token`} - tooltip={i18n.str`Access token currently in use`} + label={i18n.str`Current passowrd`} + tooltip={i18n.str`Password currently in use`} inputType="password" /> <p> <i18n.Translate> - Clearing the access token will mean public access to the + Clearing the password will mean public access to the instance. </i18n.Translate> </p> @@ -139,7 +139,7 @@ export function DetailPage({ } }} > - <i18n.Translate>Clear token</i18n.Translate> + <i18n.Translate>Clear password</i18n.Translate> </button> </div> </Fragment> @@ -147,14 +147,14 @@ export function DetailPage({ <Input<State> name="new_token" - label={i18n.str`New access token`} - tooltip={i18n.str`Next access token to be used`} + label={i18n.str`New password`} + tooltip={i18n.str`Next password to be used`} inputType="password" /> <Input<State> name="repeat_token" - label={i18n.str`Repeat access token`} - tooltip={i18n.str`Confirm the same access token`} + label={i18n.str`Repeat password`} + tooltip={i18n.str`Confirm the same password`} inputType="password" /> </Fragment> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx @@ -81,14 +81,14 @@ export default function Token({ onChange, onCancel }: Props): VNode { onChange(); } else { return setNotif({ - message: i18n.str`Failed to clear token`, + message: i18n.str`Failed to clear password`, type: "ERROR", description: resp.detail?.hint, }); } } catch (error) { return setNotif({ - message: i18n.str`Failed to clear token`, + message: i18n.str`Failed to clear password`, type: "ERROR", description: error instanceof Error ? error.message : String(error), @@ -108,7 +108,7 @@ export default function Token({ onChange, onCancel }: Props): VNode { ); if (resp.type === "fail") { return setNotif({ - message: i18n.str`Failed to set new token`, + message: i18n.str`Failed to set new password`, type: "ERROR", description: resp.detail?.hint, }); @@ -126,13 +126,13 @@ export default function Token({ onChange, onCancel }: Props): VNode { return onChange(); } else { return setNotif({ - message: i18n.str`Failed to set new token`, + message: i18n.str`Failed to set new password`, type: "ERROR", }); } } catch (error) { return setNotif({ - message: i18n.str`Failed to set new token`, + message: i18n.str`Failed to set new password`, type: "ERROR", description: error instanceof Error ? error.message : String(error), diff --git a/packages/merchant-backoffice-ui/src/paths/login/index.tsx b/packages/merchant-backoffice-ui/src/paths/login/index.tsx @@ -96,13 +96,13 @@ export function LoginPage(_p: Props): VNode { style={{ border: "1px solid", borderTop: 0, borderBottom: 0 }} > <i18n.Translate> - Please enter your access token for <b>"{state.instance}"</b>. + Please enter your password for <b>"{state.instance}"</b>. </i18n.Translate> <div class="field is-horizontal"> <div class="field-label is-normal"> <label class="label"> - <i18n.Translate>Access Token</i18n.Translate> + <i18n.Translate>Password</i18n.Translate> </label> </div> <div class="field-body"> @@ -111,7 +111,7 @@ export function LoginPage(_p: Props): VNode { <input class="input" type="password" - placeholder={"current access token"} + placeholder={"current password"} name="token" onKeyPress={(e) => e.keyCode === 13 ? doLoginImpl() : null