Skip to content

Commit

Permalink
🚸 Show hint for browser issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt committed Jul 20, 2024
1 parent b6f5d42 commit edff277
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
32 changes: 22 additions & 10 deletions src/components/authcore-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,30 @@ export const AuthcoreDialog: FC<AuthcoreDialogProps> = ({
onClose={closeDialog}
>
<div id={AUTHCORE_DIALOG_ID} />
{isHideSocialLogin && (
<div className="lk-flex lk-flex-col lk-flex-col lk-w-full lk-items-center lk-gap-y-2 lk-mt-[12px]">
<p className="lk-text-like-gray lk-text-center lk-w-full lk-text-[12px]">
<FormattedMessage
id="wallet_connect_hint_reset_password"
values={{
span: chunks => <span className="lk-text-like-green">{chunks}</span>,
}}

<aside className="lk-mt-[12px] lk-px-[35px]">
<div className="lk-flex lk-flex-col lk-items-center lk-gap-y-1 lk-w-full lk-p-[8px] lk-text-[#F6A721] lk-text-center lk-text-[12px] lk-bg-[#FFFBEB] lk-border lk-border-[#FEF0CF] lk-rounded-[3px]">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="lk-w-[20px]"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"
/>
</p>
</svg>

<p><FormattedMessage id="wallet_connect_hint_browser_warning" /></p>
{isHideSocialLogin && (
<p><FormattedMessage id="wallet_connect_hint_reset_password" /></p>
)}
</div>
)}
</aside>
</Dialog>
);
};
3 changes: 2 additions & 1 deletion src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"wallet_connect_header_title_open_app": "Launch App",
"wallet_connect_header_title_scan_qrcode": "Scan QR Code",
"wallet_connect_hint_approve": "Please approve the connection request in the app by clicking the button below.",
"wallet_connect_hint_reset_password": "If you can't find your login method,<span>reset your password</span>.",
"wallet_connect_hint_browser_warning": "Using a third-party browser, VPN, or private browsing may prevent login.",
"wallet_connect_hint_reset_password": "Can't find login method? Try resetting password.",
"wallet_connect_hint_scan_qrcode_cosmostation_mobile": "Please scan the QR code with Cosmostation Mobile Wallet app",
"wallet_connect_hint_scan_qrcode_keplr_mobile": "Please scan the QR code with Keplr Mobile Wallet app",
"wallet_connect_hint_scan_qrcode_liker_land_app": "Please scan the QR code with Liker Land app",
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"connect_wallet_method_description_keplr": "使用 Keplr 瀏覽器外掛",
"connect_wallet_method_description_keplr_mobile": "使用 Keplr Mobile app 掃描二維碼",
"connect_wallet_method_description_leap": "使用 Leap 瀏覽器外掛",
"connect_wallet_method_description_metamask": "使用 MetaMask 瀏覽器外掛 Snap",
"connect_wallet_method_description_liker_land_app": "使用 Liker Land app 掃描二維碼",
"connect_wallet_method_description_metamask": "使用 MetaMask 瀏覽器外掛 Snap",
"connect_wallet_method_description_wallet_connect_v2": "使用支援 Wallet Connect V2 的錢包掃描二維碼",
"connect_wallet_other_methods": "其他連接方法",
"connect_wallet_title": "連接錢包",
Expand All @@ -22,7 +22,8 @@
"wallet_connect_header_title_open_app": "啟動 App",
"wallet_connect_header_title_scan_qrcode": "掃描二維碼",
"wallet_connect_hint_approve": "請點擊以下按鈕打開 App 並批准連接請求。",
"wallet_connect_hint_reset_password": "若找不到您原先的登入方式,請<span>重設密碼</span>。",
"wallet_connect_hint_browser_warning": "使用第三方瀏覽器、 VPN 或私密瀏覽可能無法登入。",
"wallet_connect_hint_reset_password": "找不到登入方式?請嘗試重設密碼。",
"wallet_connect_hint_scan_qrcode_cosmostation_mobile": "請使用 Cosmostation Mobile Wallet app 掃描二維碼",
"wallet_connect_hint_scan_qrcode_keplr_mobile": "請使用 Keplr Mobile app 掃描二維碼",
"wallet_connect_hint_scan_qrcode_liker_land_app": "請使用 Liker Land app 掃描二維碼",
Expand Down

0 comments on commit edff277

Please sign in to comment.