diff --git a/packages/components/src/locale/ar.json b/packages/components/src/locale/ar.json index 03a50ff15a6..5ad949b6f54 100644 --- a/packages/components/src/locale/ar.json +++ b/packages/components/src/locale/ar.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "محفظة الأجهزة", "wallet__imported_accounts": "حسابات سلسلة واحدة", "wallet__wallet": "محفظة", - "wallet__watched_accounts": "حسابات مراقب" -} \ No newline at end of file + "wallet__watched_accounts": "حسابات مراقب", + "v4_to_v5_banner_text": "أنت حاليًا على OneKey v4، الذي لم يعد مدعومًا. انتقل إلى OneKey v5 للاستمتاع بالميزات والتحسينات الجديدة!" +} diff --git a/packages/components/src/locale/bn.json b/packages/components/src/locale/bn.json index 2e8c60424a1..8af332822a2 100644 --- a/packages/components/src/locale/bn.json +++ b/packages/components/src/locale/bn.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "হার্ডওয়্যার ওয়ালেট", "wallet__imported_accounts": "একক-চেইন অ্যাকাউন্ট", "wallet__wallet": "ওয়ালেট", - "wallet__watched_accounts": "অ্যাকাউন্ট দেখা" -} \ No newline at end of file + "wallet__watched_accounts": "অ্যাকাউন্ট দেখা", + "v4_to_v5_banner_text": "আপনি বর্তমানে OneKey v4 ব্যবহার করছেন, যা আর সমর্থিত নয়। নতুন বৈশিষ্ট্য এবং উন্নতিগুলি উপভোগ করতে OneKey v5 এ স্যুইচ করুন!" +} diff --git a/packages/components/src/locale/de.json b/packages/components/src/locale/de.json index 1fb581d2977..f1dc904e068 100644 --- a/packages/components/src/locale/de.json +++ b/packages/components/src/locale/de.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Hardware-Geldbörse", "wallet__imported_accounts": "Single-Chain-Konten", "wallet__wallet": "Brieftasche", - "wallet__watched_accounts": "Beobachtete Konten" -} \ No newline at end of file + "wallet__watched_accounts": "Beobachtete Konten", + "v4_to_v5_banner_text": "Sie verwenden derzeit OneKey v4, das nicht mehr unterstützt wird. Wechseln Sie zu OneKey v5, um neue Funktionen und Verbesserungen zu genießen!" +} diff --git a/packages/components/src/locale/en-US.json b/packages/components/src/locale/en-US.json index 7d196a26207..a4d7bbe44c1 100644 --- a/packages/components/src/locale/en-US.json +++ b/packages/components/src/locale/en-US.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Hardware Wallet", "wallet__imported_accounts": "Single-chain Accounts", "wallet__wallet": "Wallet", - "wallet__watched_accounts": "Watch-only Accounts" -} \ No newline at end of file + "wallet__watched_accounts": "Watch-only Accounts", + "v4_to_v5_banner_text": "You’re currently on OneKey v4, which is no longer supported. Switch to OneKey v5 to enjoy new features and improvements!" +} diff --git a/packages/components/src/locale/es.json b/packages/components/src/locale/es.json index ed6edd8711b..8f59d2dbec5 100644 --- a/packages/components/src/locale/es.json +++ b/packages/components/src/locale/es.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Billetera física", "wallet__imported_accounts": "Cuentas de cadena única", "wallet__wallet": "Billetera", - "wallet__watched_accounts": "Cuentas vigiladas" -} \ No newline at end of file + "wallet__watched_accounts": "Cuentas vigiladas", + "v4_to_v5_banner_text": "Actualmente estás en OneKey v4, que ya no está soportado. Cambia a OneKey v5 para disfrutar de nuevas funciones y mejoras." +} diff --git a/packages/components/src/locale/fil.json b/packages/components/src/locale/fil.json index cd23b226259..d8838a90ca5 100644 --- a/packages/components/src/locale/fil.json +++ b/packages/components/src/locale/fil.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Hardware Wallet", "wallet__imported_accounts": "Mga Single-chain na Account", "wallet__wallet": "wallet", - "wallet__watched_accounts": "Mga Napanood na Account" -} \ No newline at end of file + "wallet__watched_accounts": "Mga Napanood na Account", + "v4_to_v5_banner_text": "Kasalukuyan kang gumagamit ng OneKey v4, na hindi na sinusuportahan. Lumipat sa OneKey v5 upang ma-enjoy ang mga bagong tampok at pagpapabuti!" +} diff --git a/packages/components/src/locale/fr_FR.json b/packages/components/src/locale/fr_FR.json index 5be11850e24..29193d494f1 100644 --- a/packages/components/src/locale/fr_FR.json +++ b/packages/components/src/locale/fr_FR.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Portefeuille matériel", "wallet__imported_accounts": "Comptes à chaîne unique", "wallet__wallet": "Portefeuille", - "wallet__watched_accounts": "Comptes surveillés" -} \ No newline at end of file + "wallet__watched_accounts": "Comptes surveillés", + "v4_to_v5_banner_text": "Vous utilisez actuellement OneKey v4, qui n'est plus pris en charge. Passez à OneKey v5 pour profiter de nouvelles fonctionnalités et améliorations !" +} diff --git a/packages/components/src/locale/hi_IN.json b/packages/components/src/locale/hi_IN.json index d98e27a6f50..5987078807c 100644 --- a/packages/components/src/locale/hi_IN.json +++ b/packages/components/src/locale/hi_IN.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "हार्डवेयर वॉलेट", "wallet__imported_accounts": "एकल-श्रृंखला खाते", "wallet__wallet": "बटुआ", - "wallet__watched_accounts": "देखे गए खाते" -} \ No newline at end of file + "wallet__watched_accounts": "देखे गए खाते", + "v4_to_v5_banner_text": "आप वर्तमान में OneKey v4 पर हैं, जो अब समर्थित नहीं है। नए फीचर्स और सुधारों का आनंद लेने के लिए OneKey v5 पर स्विच करें!" +} diff --git a/packages/components/src/locale/id.json b/packages/components/src/locale/id.json index 5146389c325..5ed1cd7c936 100644 --- a/packages/components/src/locale/id.json +++ b/packages/components/src/locale/id.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Dompet Perangkat Keras", "wallet__imported_accounts": "Akun rantai tunggal", "wallet__wallet": "Dompet", - "wallet__watched_accounts": "Akun khusus tontonan" -} \ No newline at end of file + "wallet__watched_accounts": "Akun khusus tontonan", + "v4_to_v5_banner_text": "Anda saat ini menggunakan OneKey v4, yang tidak lagi didukung. Beralihlah ke OneKey v5 untuk menikmati fitur dan peningkatan baru!" +} diff --git a/packages/components/src/locale/it_IT.json b/packages/components/src/locale/it_IT.json index aecf9a1630a..6454c74cc5a 100644 --- a/packages/components/src/locale/it_IT.json +++ b/packages/components/src/locale/it_IT.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Portafoglio hardware", "wallet__imported_accounts": "Conti a catena singola", "wallet__wallet": "Portafoglio", - "wallet__watched_accounts": "Conti guardati" -} \ No newline at end of file + "wallet__watched_accounts": "Conti guardati", + "v4_to_v5_banner_text": "Attualmente stai utilizzando OneKey v4, che non è più supportato. Passa a OneKey v5 per usufruire di nuove funzionalità e miglioramenti!" +} diff --git a/packages/components/src/locale/ja_JP.json b/packages/components/src/locale/ja_JP.json index 1597bcfbd2f..75fca9ea73a 100644 --- a/packages/components/src/locale/ja_JP.json +++ b/packages/components/src/locale/ja_JP.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "ハードウェアウォレット", "wallet__imported_accounts": "シングルチェーンアカウント", "wallet__wallet": "ウォレット", - "wallet__watched_accounts": "閲覧用アカウント" -} \ No newline at end of file + "wallet__watched_accounts": "閲覧用アカウント", + "v4_to_v5_banner_text": "現在、サポートが終了したOneKey v4を使用しています。新機能と改善を楽しむために、OneKey v5に切り替えてください!" +} diff --git a/packages/components/src/locale/ko_KR.json b/packages/components/src/locale/ko_KR.json index ffcd478e379..d4651cf2071 100644 --- a/packages/components/src/locale/ko_KR.json +++ b/packages/components/src/locale/ko_KR.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "하드웨어 지갑", "wallet__imported_accounts": "단일 체인 계정", "wallet__wallet": "지갑", - "wallet__watched_accounts": "시청 계정" -} \ No newline at end of file + "wallet__watched_accounts": "시청 계정", + "v4_to_v5_banner_text": "현재 사용 중인 OneKey v4는 더 이상 지원되지 않습니다. 새로운 기능과 개선 사항을 즐기려면 OneKey v5로 전환하세요!" +} diff --git a/packages/components/src/locale/mn_MN.json b/packages/components/src/locale/mn_MN.json index 3a16f79c10a..1b64c27dd73 100644 --- a/packages/components/src/locale/mn_MN.json +++ b/packages/components/src/locale/mn_MN.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Техник хангамжийн түрийвч", "wallet__imported_accounts": "Нэг хэлхээтэй дансууд", "wallet__wallet": "Түрийвч", - "wallet__watched_accounts": "Үзсэн бүртгэлүүд" -} \ No newline at end of file + "wallet__watched_accounts": "Үзсэн бүртгэлүүд", + "v4_to_v5_banner_text": "Та одоогоор дэмжлэггүй болсон OneKey v4 дээр байна. Шинэ боломжууд болон сайжруулалтуудыг ашиглахын тулд OneKey v5 руу шилжээрэй!" +} diff --git a/packages/components/src/locale/pt.json b/packages/components/src/locale/pt.json index 650163c3f42..075103631c0 100644 --- a/packages/components/src/locale/pt.json +++ b/packages/components/src/locale/pt.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Carteira de Hardware", "wallet__imported_accounts": "Contas de cadeia única", "wallet__wallet": "Carteira", - "wallet__watched_accounts": "Contas monitoradas" -} \ No newline at end of file + "wallet__watched_accounts": "Contas monitoradas", + "v4_to_v5_banner_text": "Você está atualmente no OneKey v4, que não é mais suportado. Mude para OneKey v5 para aproveitar novos recursos e melhorias!" +} diff --git a/packages/components/src/locale/ru.json b/packages/components/src/locale/ru.json index f68f6e12176..4be061882eb 100644 --- a/packages/components/src/locale/ru.json +++ b/packages/components/src/locale/ru.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Аппаратный кошелек", "wallet__imported_accounts": "Счета с одной цепью", "wallet__wallet": "Бумажник", - "wallet__watched_accounts": "Просмотренные аккаунты" -} \ No newline at end of file + "wallet__watched_accounts": "Просмотренные аккаунты", + "v4_to_v5_banner_text": "Вы используете OneKey v4, который больше не поддерживается. Переключитесь на OneKey v5, чтобы воспользоваться новыми функциями и улучшениями!" +} diff --git a/packages/components/src/locale/th_TH.json b/packages/components/src/locale/th_TH.json index dbac9345c3f..688ad508ecb 100644 --- a/packages/components/src/locale/th_TH.json +++ b/packages/components/src/locale/th_TH.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "กระเป๋าเงินฮาร์ดแวร์", "wallet__imported_accounts": "บัญชีโซ่เดียว", "wallet__wallet": "กระเป๋าสตางค์", - "wallet__watched_accounts": "ดูบัญชี" -} \ No newline at end of file + "wallet__watched_accounts": "ดูบัญชี", + "v4_to_v5_banner_text": "คุณกำลังใช้ OneKey v4 ซึ่งไม่ได้รับการสนับสนุนอีกต่อไป เปลี่ยนไปใช้ OneKey v5 เพื่อเพลิดเพลินกับฟีเจอร์ใหม่และการปรับปรุง!" +} diff --git a/packages/components/src/locale/uk_UA.json b/packages/components/src/locale/uk_UA.json index d9032cd8ce6..92c3ee5f20d 100644 --- a/packages/components/src/locale/uk_UA.json +++ b/packages/components/src/locale/uk_UA.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Апаратний гаманець", "wallet__imported_accounts": "Одноланцюгові облікові записи", "wallet__wallet": "гаманець", - "wallet__watched_accounts": "Переглянуті акаунти" -} \ No newline at end of file + "wallet__watched_accounts": "Переглянуті акаунти", + "v4_to_v5_banner_text": "Ви зараз використовуєте OneKey v4, яка більше не підтримується. Перейдіть на OneKey v5, щоб насолоджуватися новими функціями та покращеннями!" +} diff --git a/packages/components/src/locale/vi.json b/packages/components/src/locale/vi.json index 86c748d9171..2ad99c9842e 100644 --- a/packages/components/src/locale/vi.json +++ b/packages/components/src/locale/vi.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "Ví phần cứng", "wallet__imported_accounts": "Tài khoản chuỗi đơn", "wallet__wallet": "Cái ví", - "wallet__watched_accounts": "Tài khoản đã theo dõi" -} \ No newline at end of file + "wallet__watched_accounts": "Tài khoản đã theo dõi", + "v4_to_v5_banner_text": "Bạn hiện đang sử dụng OneKey v4, phiên bản này không còn được hỗ trợ. Hãy chuyển sang OneKey v5 để tận hưởng các tính năng và cải tiến mới!" +} diff --git a/packages/components/src/locale/zh-CN.json b/packages/components/src/locale/zh-CN.json index f556126b239..8199021bfe1 100644 --- a/packages/components/src/locale/zh-CN.json +++ b/packages/components/src/locale/zh-CN.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "硬件钱包", "wallet__imported_accounts": "单链账户", "wallet__wallet": "钱包", - "wallet__watched_accounts": "观察账户" -} \ No newline at end of file + "wallet__watched_accounts": "观察账户", + "v4_to_v5_banner_text": "当前版本为 OneKey v4,此版本已不再维护。立即前往 OneKey v5,体验更安全、更丰富的功能!" +} diff --git a/packages/components/src/locale/zh_HK.json b/packages/components/src/locale/zh_HK.json index b48f369baef..1759a541752 100644 --- a/packages/components/src/locale/zh_HK.json +++ b/packages/components/src/locale/zh_HK.json @@ -3001,5 +3001,6 @@ "wallet__hardware_wallet": "硬件錢包", "wallet__imported_accounts": "單鏈賬戶", "wallet__wallet": "錢包", - "wallet__watched_accounts": "觀察賬戶" -} \ No newline at end of file + "wallet__watched_accounts": "觀察賬戶", + "v4_to_v5_banner_text": "目前版本為 OneKey v4,此版本已不再維護。立即前往 OneKey v5,體驗更安全、更豐富的功能!" +} diff --git a/packages/kit/src/views/Wallet/index.tsx b/packages/kit/src/views/Wallet/index.tsx index c3958b0f371..b7fea04ab2e 100644 --- a/packages/kit/src/views/Wallet/index.tsx +++ b/packages/kit/src/views/Wallet/index.tsx @@ -1,11 +1,18 @@ import type { FC } from 'react'; -import { memo, useCallback, useMemo, useRef } from 'react'; +import { memo, useCallback, useMemo, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; import type { ForwardRefHandle } from '@onekeyhq/app/src/views/NestedTabView/NestedTabView'; -import { Box, useIsVerticalLayout, useUserDevice } from '@onekeyhq/components'; +import { + Box, + Button, + Text, + useIsVerticalLayout, + useUserDevice, +} from '@onekeyhq/components'; import { Tabs } from '@onekeyhq/components/src/CollapsibleTabView'; +import Link from '@onekeyhq/components/src/Link'; import { isAllNetworks } from '@onekeyhq/engine/src/managers/network'; import { useActiveWalletAccount } from '@onekeyhq/kit/src/hooks'; import { MAX_PAGE_CONTAINER_WIDTH } from '@onekeyhq/shared/src/config/appConfig'; @@ -289,10 +296,63 @@ function WalletPreCheck() { } const WalletPreCheckMemo = memo(WalletPreCheck); +const storageKey = '$onekey-webapp-v4-warning-closed-time'; +function V4Warning() { + const intl = useIntl(); + const closedTime = localStorage.getItem(storageKey); + const [show, setShow] = useState( + // 检查是否显示警告: + // 如果没有关闭时间记录,或者上次关闭时间距今超过24小时,则显示警告 + !closedTime || Date.now() - Number(closedTime) > 1000 * 60 * 60 * 24, + ); + const renderLink = useCallback( + (chunks: string) => ( + + {chunks} + + ), + [], + ); + if (!show) { + return null; + } + return ( + + + {intl.formatMessage( + { id: 'v4_to_v5_banner_text' }, + { + tag: renderLink, + }, + )} + + + + ); +} + const Wallet = () => ( <> + {platformEnv.isWeb ? : null}