diff --git a/index.html b/index.html index ba7f476ce..e7259fd6d 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + diff --git a/package-lock.json b/package-lock.json index c1db1c3ea..6970dbdc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tari-universe", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tari-universe", - "version": "0.7.0", + "version": "0.7.1", "dependencies": { "@floating-ui/react": "^0.26.28", "@sentry/react": "^8.38.0", diff --git a/package.json b/package.json index 023c869f9..8aedf2147 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tari-universe", "private": true, - "version": "0.7.0", + "version": "0.7.1", "type": "module", "scripts": { "dev": "vite dev --mode development", diff --git a/public/locales/af/mining-view.json b/public/locales/af/mining-view.json index b4419eb7a..6ea93e6a7 100644 --- a/public/locales/af/mining-view.json +++ b/public/locales/af/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU Krag", - "gpu-power": "GPU Krag", - "estimated-day": "Est tXTM/dag", "connection-to-node-lost": "Kontak met mynwerker verloor. Wag asseblief vir mynwerker om kontak te maak of begin weer.", + "cpu-power": "CPU Krag", "current-block-time": "Huidige bloktyd", "day": "day", + "estimated-day": "Est tXTM/dag", "estimated-earnings": "Geskatte verdienste", "floor": "Vloer", + "gpu-power": "GPU Krag", "mining-button-text": { "cancel-mining": "Kanselleer myn", "changing-mode": "Verander modus", @@ -18,6 +18,7 @@ "waiting-for-idle": "Wag tot onaktief" }, "you-earn-rewards-separately": "Jy verdien belonings vir die myn van CPU en GPU afsonderlik", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Jy het {{ blocks }} gewen terwyl jy weg was", "your-reward-is": "Jou beloning is" } \ No newline at end of file diff --git a/public/locales/af/sidebar.json b/public/locales/af/sidebar.json index a300717f7..d68f8b147 100644 --- a/public/locales/af/sidebar.json +++ b/public/locales/af/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Volg jou XTM oral deur jou Universe beursie met Tari Aurora te sinkroniseer.", "paper-wallet-tooltip-title": "Sinkroniseer met Foon", "recent-wins": "Onlangse oorwinnings", + "rewards": "Rewards", "setup-scheduler": "Stel skeduleerder op", - "show-history": "Wys geskiedenis", - "wallet-balance": "Beursie balans", "share": { + "button-text": "FLEX & NOOI", + "copied": "Skakel Gekopieer!", "history-item-button": "Flex & Nooi", + "reward": "my beloning", "title": "Ek het pas tari gemyn", - "winner-pill": "Wenner van blok", - "copied": "Skakel Gekopieer!", - "button-text": "FLEX & NOOI", - "reward": "my beloning" - } + "winner-pill": "Wenner van blok" + }, + "show-history": "Wys geskiedenis", + "wallet-balance": "Beursie balans" } \ No newline at end of file diff --git a/public/locales/cn/mining-view.json b/public/locales/cn/mining-view.json index dc2543495..4edf31723 100644 --- a/public/locales/cn/mining-view.json +++ b/public/locales/cn/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU 功率", - "gpu-power": "GPU 功率", - "estimated-day": "预估 tXTM/天", "connection-to-node-lost": "与矿工的连接丢失。请等待矿机重新连接或重启矿机.", + "cpu-power": "CPU 功率", "current-block-time": "当前区块时间", "day": "day", + "estimated-day": "预估 tXTM/天", "estimated-earnings": "预计收益", "floor": "地板", + "gpu-power": "GPU 功率", "mining-button-text": { "cancel-mining": "取消挖矿", "changing-mode": "更改模式", @@ -18,6 +18,7 @@ "waiting-for-idle": "等待空闲" }, "you-earn-rewards-separately": "您分别为 CPU 和 GPU 挖矿获得奖励", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "您在离开时赢得了 {{ blocks }}", "your-reward-is": "你的奖励是" } \ No newline at end of file diff --git a/public/locales/cn/sidebar.json b/public/locales/cn/sidebar.json index fa2049ad8..e6298196a 100644 --- a/public/locales/cn/sidebar.json +++ b/public/locales/cn/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "通过将您的宇宙钱包同步到 Tari Aurora,随时随地跟踪您的 XTM。", "paper-wallet-tooltip-title": "与手机同步", "recent-wins": "最近的胜利", + "rewards": "Rewards", "setup-scheduler": "安装计划程序", - "show-history": "显示历史记录", - "wallet-balance": "钱包余额", "share": { + "button-text": "炫耀并邀请", + "copied": "链接已复制!", "history-item-button": "炫耀并邀请", + "reward": "我的奖励", "title": "我刚刚挖掘了Tari", - "winner-pill": "区块赢家", - "copied": "链接已复制!", - "button-text": "炫耀并邀请", - "reward": "我的奖励" - } + "winner-pill": "区块赢家" + }, + "show-history": "显示历史记录", + "wallet-balance": "钱包余额" } \ No newline at end of file diff --git a/public/locales/de/mining-view.json b/public/locales/de/mining-view.json index 5a25872ab..57a9be2c4 100644 --- a/public/locales/de/mining-view.json +++ b/public/locales/de/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU-Leistung", - "gpu-power": "GPU-Leistung", - "estimated-day": "Geschätzte tXTM/Tag", "connection-to-node-lost": "Verbindung zum Miner verloren. Bitte warte, bis der Miner sich wieder verbindet, oder starte den Miner neu.", + "cpu-power": "CPU-Leistung", "current-block-time": "Aktuelle Blockzeit", "day": "day", + "estimated-day": "Geschätzte tXTM/Tag", "estimated-earnings": "Geschätzte Einnahmen", "floor": "Stockwerk", + "gpu-power": "GPU-Leistung", "mining-button-text": { "cancel-mining": "Mining abbrechen", "changing-mode": "Modus wird geändert", @@ -17,6 +17,7 @@ "waiting-for-idle": "Warten auf Leerlauf" }, "you-earn-rewards-separately": "Sie verdienen Belohnungen für das Mining von CPU und GPU separat", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Sie haben {{ blocks }} gewonnen, während Sie weg waren", "your-reward-is": "Deine Belohnung ist" } \ No newline at end of file diff --git a/public/locales/de/sidebar.json b/public/locales/de/sidebar.json index bda83aac7..dc7723c4a 100644 --- a/public/locales/de/sidebar.json +++ b/public/locales/de/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Verfolgen Sie Ihr XTM überall, indem Sie Ihr Universum-Wallet mit Tari Aurora synchronisieren.", "paper-wallet-tooltip-title": "Mit Telefon synchronisieren", "recent-wins": "Kürzliche Gewinne", + "rewards": "Rewards", "setup-scheduler": "Scheduler einrichten", - "show-history": "Verlauf anzeigen", - "wallet-balance": "Wallet-Balance", "share": { + "button-text": "FLEX & EINLADEN", + "copied": "Link kopiert!", "history-item-button": "Flex & Einladen", + "reward": "meine Belohnung", "title": "Ich habe gerade Tari gemined", - "winner-pill": "Gewinner des Blocks", - "copied": "Link kopiert!", - "button-text": "FLEX & EINLADEN", - "reward": "meine Belohnung" - } + "winner-pill": "Gewinner des Blocks" + }, + "show-history": "Verlauf anzeigen", + "wallet-balance": "Wallet-Balance" } \ No newline at end of file diff --git a/public/locales/en/mining-view.json b/public/locales/en/mining-view.json index 4bef06e6f..822262fbc 100644 --- a/public/locales/en/mining-view.json +++ b/public/locales/en/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU Power", - "gpu-power": "GPU Power", - "estimated-day":"Est tXTM/day", "connection-to-node-lost": "Connection to miner lost. Please wait for the miner to reconnect or restart the miner.", + "cpu-power": "CPU Power", "current-block-time": "Current block time", "day": "day", + "estimated-day": "Est tXTM/day", "estimated-earnings": "Estimated earnings", "floor": "Floor", + "gpu-power": "GPU Power", "mining-button-text": { "cancel-mining": "Cancel Mining", "changing-mode": "Changing mode", @@ -17,6 +17,7 @@ "waiting-for-idle": "Waiting for Idle" }, "you-earn-rewards-separately": "You earn rewards for mining CPU and GPU separately", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "You won {{ blocks }} while you were away", "your-reward-is": "Your reward is" -} +} \ No newline at end of file diff --git a/public/locales/en/sidebar.json b/public/locales/en/sidebar.json index f2add1b81..d6fac3160 100644 --- a/public/locales/en/sidebar.json +++ b/public/locales/en/sidebar.json @@ -1,27 +1,28 @@ { - "auto-miner": "Auto Miner", - "auto-miner-description": "Auto miner will turn on your miner when your machine is idle", - "block": "Block", - "hide-history": "Hide history", - "history-hide-button": "Hide History", - "history-show-button": "History", - "lost-connection": "Lost connection to the Tari Network. Reconnecting..", - "mining-schedules": "Mining Schedules", - "mining-schedules-description": "Schedule your mining activity", - "next-milestone": "Next Milestone", - "paper-wallet-button": "Sync with Phone", - "paper-wallet-tooltip-message": "Track your XTM balance anywhere by syncing Universe with Tari Aurora.", - "paper-wallet-tooltip-title": "Sync with Phone", - "recent-wins": "Recent wins", - "setup-scheduler": "Setup Scheduler", - "show-history": "Show history", - "wallet-balance": "Wallet Balance", - "share": { - "history-item-button": "Flex & Invite", - "title": "I just mined tari", - "winner-pill": "Winner of block", - "copied": "Link Copied!", - "button-text": "FLEX & INVITE", - "reward": "my reward" - } -} + "auto-miner": "Auto Miner", + "auto-miner-description": "Auto miner will turn on your miner when your machine is idle", + "block": "Block", + "hide-history": "Hide history", + "history-hide-button": "Hide History", + "history-show-button": "History", + "lost-connection": "Lost connection to the Tari Network. Reconnecting..", + "mining-schedules": "Mining Schedules", + "mining-schedules-description": "Schedule your mining activity", + "next-milestone": "Next Milestone", + "paper-wallet-button": "Sync with Phone", + "paper-wallet-tooltip-message": "Track your XTM balance anywhere by syncing Universe with Tari Aurora.", + "paper-wallet-tooltip-title": "Sync with Phone", + "recent-wins": "Recent wins", + "rewards": "Rewards", + "setup-scheduler": "Setup Scheduler", + "share": { + "button-text": "FLEX & INVITE", + "copied": "Link Copied!", + "history-item-button": "Flex & Invite", + "reward": "my reward", + "title": "I just mined tari", + "winner-pill": "Winner of block" + }, + "show-history": "Show history", + "wallet-balance": "Wallet Balance" +} \ No newline at end of file diff --git a/public/locales/fr/mining-view.json b/public/locales/fr/mining-view.json index cfb3346a4..fb7aa74ca 100644 --- a/public/locales/fr/mining-view.json +++ b/public/locales/fr/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "Puissance CPU", - "gpu-power": "Puissance GPU", - "estimated-day": "Est tXTM/jour", "connection-to-node-lost": "Connexion au mineur perdue. Attends que le mineur se reconnecte ou redémarre le mineur.", + "cpu-power": "Puissance CPU", "current-block-time": "Temps actuelle du bloc", "day": "day", + "estimated-day": "Est tXTM/jour", "estimated-earnings": "Gains estimés", "floor": "Étage", + "gpu-power": "Puissance GPU", "mining-button-text": { "cancel-mining": "Annuler le minage", "changing-mode": "Changement de mode", @@ -17,6 +17,7 @@ "waiting-for-idle": "En attente d'inactivité" }, "you-earn-rewards-separately": "Vous gagnez des récompenses pour le minage CPU et GPU séparément", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Vous avez gagné {{ blocks }} pendant votre absence", "your-reward-is": "Votre récompense est" } \ No newline at end of file diff --git a/public/locales/fr/sidebar.json b/public/locales/fr/sidebar.json index e2171ffb5..5256dc792 100644 --- a/public/locales/fr/sidebar.json +++ b/public/locales/fr/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Suivez votre XTM partout en synchronisant votre portefeuille Universe avec Tari Aurora.", "paper-wallet-tooltip-title": "Synchroniser avec le téléphone", "recent-wins": "Gains récents", + "rewards": "Rewards", "setup-scheduler": "Configurer le planificateur", - "show-history": "Afficher l\"historique", - "wallet-balance": "Solde du portefeuille", "share": { + "button-text": "FLEX & INVITER", + "copied": "Lien copié !", "history-item-button": "Flex & Inviter", + "reward": "ma récompense", "title": "Je viens de miner du tari", - "winner-pill": "Gagnant du bloc", - "copied": "Lien copié !", - "button-text": "FLEX & INVITER", - "reward": "ma récompense" - } + "winner-pill": "Gagnant du bloc" + }, + "show-history": "Afficher l\"historique", + "wallet-balance": "Solde du portefeuille" } \ No newline at end of file diff --git a/public/locales/hi/mining-view.json b/public/locales/hi/mining-view.json index 56e964921..99d481881 100644 --- a/public/locales/hi/mining-view.json +++ b/public/locales/hi/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU पावर", - "gpu-power": "GPU पावर", - "estimated-day": "Est tXTM/दिन", "connection-to-node-lost": "माइनर से कनेक्शन खो गया। कृपया माइनर के पुनः कनेक्ट होने या पुनः आरंभ करने की प्रतीक्षा करें।", + "cpu-power": "CPU पावर", "current-block-time": "वर्तमान ब्लॉक समय", "day": "day", + "estimated-day": "Est tXTM/दिन", "estimated-earnings": "अनुमानित कमाई", "floor": "न्यूनतम स्तर", + "gpu-power": "GPU पावर", "mining-button-text": { "cancel-mining": "माइनिंग रद्द करें", "changing-mode": "मोड बदल रहा है", @@ -18,6 +18,7 @@ "waiting-for-idle": "निष्क्रिय होने की प्रतीक्षा" }, "you-earn-rewards-separately": "आप CPU और GPU माइनिंग के लिए अलग-अलग पुरस्कार अर्जित करते हैं", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "आपने {{ blocks }} जीते जब आप दूर थे", "your-reward-is": "आपका इनाम है" } \ No newline at end of file diff --git a/public/locales/hi/sidebar.json b/public/locales/hi/sidebar.json index d658063e1..6ec2e7854 100644 --- a/public/locales/hi/sidebar.json +++ b/public/locales/hi/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "अपने यूनिवर्स वॉलेट को तारी ऑरोरा से सिंक करके कहीं भी अपने XTM को ट्रैक करें।", "paper-wallet-tooltip-title": "फोन के साथ सिंक करें", "recent-wins": "हाल की जीत", + "rewards": "Rewards", "setup-scheduler": "शेड्यूलर सेटअप करें", - "show-history": "इतिहास दिखाएं", - "wallet-balance": "वॉलेट शेष", "share": { + "button-text": "फ्लेक्स और आमंत्रित करें", + "copied": "लिंक कॉपी हो गया!", "history-item-button": "फ्लेक्स और आमंत्रित करें", + "reward": "मेरा इनाम", "title": "मैंने अभी तारी माइन किया", - "winner-pill": "ब्लॉक का विजेता", - "copied": "लिंक कॉपी हो गया!", - "button-text": "फ्लेक्स और आमंत्रित करें", - "reward": "मेरा इनाम" - } + "winner-pill": "ब्लॉक का विजेता" + }, + "show-history": "इतिहास दिखाएं", + "wallet-balance": "वॉलेट शेष" } \ No newline at end of file diff --git a/public/locales/id/mining-view.json b/public/locales/id/mining-view.json index 6994546ee..771aa581a 100644 --- a/public/locales/id/mining-view.json +++ b/public/locales/id/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "Daya CPU", - "gpu-power": "Daya GPU", - "estimated-day": "Perkiraan tXTM/hari", "connection-to-node-lost": "Koneksi ke penambang terputus. Harap tunggu penambang untuk menyambung kembali atau mulai ulang penambang.", + "cpu-power": "Daya CPU", "current-block-time": "Waktu blok saat ini", "day": "day", + "estimated-day": "Perkiraan tXTM/hari", "estimated-earnings": "Perkiraan penghasilan", "floor": "Batas Bawah", + "gpu-power": "Daya GPU", "mining-button-text": { "cancel-mining": "Batalkan Penambangan", "changing-mode": "Mengubah mode", @@ -18,6 +18,7 @@ "waiting-for-idle": "Menunggu Tidak Aktif" }, "you-earn-rewards-separately": "Anda mendapatkan hadiah untuk menambang CPU dan GPU secara terpisah", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Anda memenangkan {{ blocks }} saat Anda pergi", "your-reward-is": "Hadiah Anda adalah" } \ No newline at end of file diff --git a/public/locales/id/sidebar.json b/public/locales/id/sidebar.json index c78ac2e85..8fc1193a2 100644 --- a/public/locales/id/sidebar.json +++ b/public/locales/id/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Lacak XTM Anda di mana saja dengan menyinkronkan dompet Universe Anda ke Tari Aurora.", "paper-wallet-tooltip-title": "Sinkronkan dengan Ponsel", "recent-wins": "Kemenangan terbaru", + "rewards": "Rewards", "setup-scheduler": "Atur Penjadwal", - "show-history": "Tampilkan riwayat", - "wallet-balance": "Saldo Dompet", "share": { + "button-text": "PAMER & UNDANG", + "copied": "Tautan Tersalin!", "history-item-button": "Pamer & Undang", + "reward": "hadiah saya", "title": "Saya baru saja menambang tari", - "winner-pill": "Pemenang blok", - "copied": "Tautan Tersalin!", - "button-text": "PAMER & UNDANG", - "reward": "hadiah saya" - } + "winner-pill": "Pemenang blok" + }, + "show-history": "Tampilkan riwayat", + "wallet-balance": "Saldo Dompet" } \ No newline at end of file diff --git a/public/locales/ja/mining-view.json b/public/locales/ja/mining-view.json index c49487090..b9bd9f1bb 100644 --- a/public/locales/ja/mining-view.json +++ b/public/locales/ja/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPUパワー", - "gpu-power": "GPUパワー", - "estimated-day": "推定 tXTM/日", "connection-to-node-lost": "マイナーへの接続が失われました。マイナーが再接続するか、再起動するのをお待ちください。", + "cpu-power": "CPUパワー", "current-block-time": "現在のブロック時間", "day": "day", + "estimated-day": "推定 tXTM/日", "estimated-earnings": "推定収益", "floor": "フロア", + "gpu-power": "GPUパワー", "mining-button-text": { "cancel-mining": "マイニングをキャンセル", "changing-mode": "モードを変更中", @@ -18,6 +18,7 @@ "waiting-for-idle": "アイドル待機中" }, "you-earn-rewards-separately": "CPUとGPUのマイニングで別々に報酬を得ます", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "不在中に{{ blocks }}を獲得しました", "your-reward-is": "あなたの報酬は" } \ No newline at end of file diff --git a/public/locales/ja/sidebar.json b/public/locales/ja/sidebar.json index 35c7fb7e3..18a4853c2 100644 --- a/public/locales/ja/sidebar.json +++ b/public/locales/ja/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Tari AuroraにUniverseウォレットを同期して、どこでもXTMを追跡できます。", "paper-wallet-tooltip-title": "電話と同期", "recent-wins": "最近の勝利", + "rewards": "Rewards", "setup-scheduler": "スケジューラの設定", - "show-history": "履歴を表示", - "wallet-balance": "ウォレット残高", "share": { + "button-text": "フレックス&招待", + "copied": "リンクをコピーしました!", "history-item-button": "フレックス&招待", + "reward": "私の報酬", "title": "Tariをマイニングしました", - "winner-pill": "ブロックの勝者", - "copied": "リンクをコピーしました!", - "button-text": "フレックス&招待", - "reward": "私の報酬" - } + "winner-pill": "ブロックの勝者" + }, + "show-history": "履歴を表示", + "wallet-balance": "ウォレット残高" } \ No newline at end of file diff --git a/public/locales/ko/mining-view.json b/public/locales/ko/mining-view.json index 98fe5ee55..62b509815 100644 --- a/public/locales/ko/mining-view.json +++ b/public/locales/ko/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU 전력", - "gpu-power": "GPU 전력", - "estimated-day": "Est tXTM/일", "connection-to-node-lost": "마이너와의 연결이 끊어졌습니다. 마이너가 다시 연결되거나 재시작될 때까지 기다려주세요.", + "cpu-power": "CPU 전력", "current-block-time": "현재 블록 시간", "day": "day", + "estimated-day": "Est tXTM/일", "estimated-earnings": "예상 수익", "floor": "최저값", + "gpu-power": "GPU 전력", "mining-button-text": { "cancel-mining": "채굴 취소", "changing-mode": "모드 변경 중", @@ -18,6 +18,7 @@ "waiting-for-idle": "유휴 상태 대기 중" }, "you-earn-rewards-separately": "CPU와 GPU 채굴에 대해 각각 보상을 받습니다", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "자리를 비운 동안 {{ blocks }}를 획득했습니다", "your-reward-is": "당신의 보상은" } \ No newline at end of file diff --git a/public/locales/ko/sidebar.json b/public/locales/ko/sidebar.json index 036394f8c..8bc7e5cbb 100644 --- a/public/locales/ko/sidebar.json +++ b/public/locales/ko/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Universe 지갑을 Tari Aurora에 동기화하여 어디서든 XTM을 추적하세요.", "paper-wallet-tooltip-title": "휴대폰과 동기화", "recent-wins": "최근 승리", + "rewards": "Rewards", "setup-scheduler": "스케줄러 설정", - "show-history": "기록 보기", - "wallet-balance": "지갑 잔액", "share": { + "button-text": "자랑하고 초대하기", + "copied": "링크가 복사되었습니다!", "history-item-button": "자랑하고 초대하기", + "reward": "내 보상", "title": "방금 타리를 채굴했습니다", - "winner-pill": "블록 승자", - "copied": "링크가 복사되었습니다!", - "button-text": "자랑하고 초대하기", - "reward": "내 보상" - } + "winner-pill": "블록 승자" + }, + "show-history": "기록 보기", + "wallet-balance": "지갑 잔액" } \ No newline at end of file diff --git a/public/locales/pl/mining-view.json b/public/locales/pl/mining-view.json index 994b8740f..d421dd0d5 100644 --- a/public/locales/pl/mining-view.json +++ b/public/locales/pl/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "Moc CPU", - "gpu-power": "Moc GPU", - "estimated-day": "Est tXTM/dzień", "connection-to-node-lost": "Połączenie z węzłem kopania zostało utracone. Poczekaj, aż wznowi połącznie lub uruchom go ponownie.", + "cpu-power": "Moc CPU", "current-block-time": "Aktualny czas bloku", "day": "day", + "estimated-day": "Est tXTM/dzień", "estimated-earnings": "Szacowane zarobki", "floor": "Poziom", + "gpu-power": "Moc GPU", "mining-button-text": { "cancel-mining": "Anuluj kopanie", "changing-mode": "Zmiana trybu", @@ -18,6 +18,7 @@ "waiting-for-idle": "Oczekiwanie na bezczynność" }, "you-earn-rewards-separately": "Zarabiasz nagrody za kopanie CPU i GPU osobno", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Wygrałeś {{ blocks }} podczas swojej nieobecności", "your-reward-is": "Twoja nagroda wynosi" } \ No newline at end of file diff --git a/public/locales/pl/sidebar.json b/public/locales/pl/sidebar.json index 467978e13..0a18179a5 100644 --- a/public/locales/pl/sidebar.json +++ b/public/locales/pl/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Śledź swoje XTM wszędzie, synchronizując portfel Universe z Tari Aurora.", "paper-wallet-tooltip-title": "Synchronizuj z telefonem", "recent-wins": "Ostanie wygrane", + "rewards": "Rewards", "setup-scheduler": "Ustawienia harmonogramu", - "show-history": "Pokaż historię", - "wallet-balance": "Saldo portfela", "share": { + "button-text": "POCHWAL SIĘ I ZAPROŚ", + "copied": "Link skopiowany!", "history-item-button": "Pochwal się i zaproś", + "reward": "moja nagroda", "title": "Właśnie wykopałem tari", - "winner-pill": "Zwycięzca bloku", - "copied": "Link skopiowany!", - "button-text": "POCHWAL SIĘ I ZAPROŚ", - "reward": "moja nagroda" - } + "winner-pill": "Zwycięzca bloku" + }, + "show-history": "Pokaż historię", + "wallet-balance": "Saldo portfela" } \ No newline at end of file diff --git a/public/locales/ru/mining-view.json b/public/locales/ru/mining-view.json index 9bdf0572f..61e2b52e5 100644 --- a/public/locales/ru/mining-view.json +++ b/public/locales/ru/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "ЦП Мощность", - "gpu-power": "ГПУ Мощность", - "estimated-day": "Est tXTM/день", "connection-to-node-lost": "Соединение с майнером потеряно. Пожалуйста, подождите, пока майнер переподключится, или перезапустите его.", + "cpu-power": "ЦП Мощность", "current-block-time": "Текущее время блока", "day": "day", + "estimated-day": "Est tXTM/день", "estimated-earnings": "Ожидаемый доход", "floor": "Минимум", + "gpu-power": "ГПУ Мощность", "mining-button-text": { "cancel-mining": "Отмена майнинга", "changing-mode": "Изменение режима", @@ -18,6 +18,7 @@ "waiting-for-idle": "Ожидание простоя" }, "you-earn-rewards-separately": "Вы получаете награды за майнинг на CPU и GPU отдельно", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Вы выиграли {{ blocks }}, пока вас не было", "your-reward-is": "Ваше вознаграждение" } \ No newline at end of file diff --git a/public/locales/ru/sidebar.json b/public/locales/ru/sidebar.json index 77f785da5..e1b8c57cd 100644 --- a/public/locales/ru/sidebar.json +++ b/public/locales/ru/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Отслеживайте свои XTM в любом месте, синхронизируя кошелек Universe с Tari Aurora.", "paper-wallet-tooltip-title": "Синхронизировать с телефоном", "recent-wins": "Последние выигрыши", + "rewards": "Rewards", "setup-scheduler": "Настройка планировщика", - "show-history": "Показать историю", - "wallet-balance": "Баланс кошелька", "share": { + "button-text": "ПОХВАСТАТЬСЯ И ПРИГЛАСИТЬ", + "copied": "Ссылка скопирована!", "history-item-button": "Похвастаться и пригласить", + "reward": "моя награда", "title": "Я только что намайнил Tari", - "winner-pill": "Победитель блока", - "copied": "Ссылка скопирована!", - "button-text": "ПОХВАСТАТЬСЯ И ПРИГЛАСИТЬ", - "reward": "моя награда" - } + "winner-pill": "Победитель блока" + }, + "show-history": "Показать историю", + "wallet-balance": "Баланс кошелька" } \ No newline at end of file diff --git a/public/locales/tr/mining-view.json b/public/locales/tr/mining-view.json index 8437fcfce..15c86693c 100644 --- a/public/locales/tr/mining-view.json +++ b/public/locales/tr/mining-view.json @@ -1,12 +1,12 @@ { - "cpu-power": "CPU Gücü", - "gpu-power": "GPU Gücü", - "estimated-day": "Est tXTM/gün", "connection-to-node-lost": "Madenciyle bağlantı kesildi. Lütfen madencinin yeniden bağlanmasını bekleyin veya madenciyi yeniden başlatın.", + "cpu-power": "CPU Gücü", "current-block-time": "Geçerli blok zamanı", "day": "day", + "estimated-day": "Est tXTM/gün", "estimated-earnings": "Tahmini kazançlar", "floor": "Zemin", + "gpu-power": "GPU Gücü", "mining-button-text": { "cancel-mining": "Madenciyi İptal Et", "changing-mode": "Mod değiştirme", @@ -18,6 +18,7 @@ "waiting-for-idle": "Boşta Bekliyor" }, "you-earn-rewards-separately": "CPU ve GPU madenciliği için ayrı ayrı ödüller kazanırsınız", + "you-won-block": "You were the winner of block #{{ blockHeight }}", "you-won-while-away": "Uzakta olduğunuzda {{ blocks }} kazandınız", "your-reward-is": "Ödülünüz" } \ No newline at end of file diff --git a/public/locales/tr/sidebar.json b/public/locales/tr/sidebar.json index 162ce4e62..cd39bb90c 100644 --- a/public/locales/tr/sidebar.json +++ b/public/locales/tr/sidebar.json @@ -13,15 +13,16 @@ "paper-wallet-tooltip-message": "Universe cüzdanınızı Tari Aurora ile senkronize ederek XTM\"inizi her yerde takip edin.", "paper-wallet-tooltip-title": "Telefonla Senkronize Et", "recent-wins": "Son Kazançlar", + "rewards": "Rewards", "setup-scheduler": "Kurulum Planlayıcısı", - "show-history": "Geçmişi göster", - "wallet-balance": "Cüzdan Bakiyesi", "share": { + "button-text": "GÖSTER VE DAVET ET", + "copied": "Bağlantı Kopyalandı!", "history-item-button": "Göster ve Davet Et", + "reward": "ödülüm", "title": "Az önce tari madenciliği yaptım", - "winner-pill": "Blok Kazananı", - "copied": "Bağlantı Kopyalandı!", - "button-text": "GÖSTER VE DAVET ET", - "reward": "ödülüm" - } + "winner-pill": "Blok Kazananı" + }, + "show-history": "Geçmişi göster", + "wallet-balance": "Cüzdan Bakiyesi" } \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 6bd519015..591e9df32 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -6586,7 +6586,7 @@ dependencies = [ [[package]] name = "tari-universe" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-trait", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index bc8a88056..5173e828c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -4,7 +4,7 @@ description = "Tari Universe" edition = "2021" name = "tari-universe" repository = "https://github.com/tari-project/universe" -version = "0.7.0" +version = "0.7.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src-tauri/binaries_versions_esmeralda.json b/src-tauri/binaries_versions_esmeralda.json index cba4833ca..39f6b7c58 100644 --- a/src-tauri/binaries_versions_esmeralda.json +++ b/src-tauri/binaries_versions_esmeralda.json @@ -4,7 +4,7 @@ "mmproxy": "=1.9.0-pre.0", "minotari_node": "=1.9.0-pre.0", "wallet": "=1.9.0-pre.0", - "sha-p2pool": "=0.9.0", + "sha-p2pool": "=0.9.2", "xtrgpuminer": "=0.1.22", "tor": "=13.5.7" } diff --git a/src-tauri/binaries_versions_nextnet.json b/src-tauri/binaries_versions_nextnet.json index fb548c263..e500dd7fc 100644 --- a/src-tauri/binaries_versions_nextnet.json +++ b/src-tauri/binaries_versions_nextnet.json @@ -4,7 +4,7 @@ "mmproxy": "=1.9.0-rc.0", "minotari_node": "=1.9.0-rc.0", "wallet": "=1.9.0-rc.0", - "sha-p2pool": "=0.9.0", + "sha-p2pool": "=0.9.2", "xtrgpuminer": "=0.1.22", "tor": "=13.5.7" } diff --git a/src-tauri/src/app_config.rs b/src-tauri/src/app_config.rs index a3ae871be..9564889ea 100644 --- a/src-tauri/src/app_config.rs +++ b/src-tauri/src/app_config.rs @@ -21,8 +21,6 @@ pub struct AppConfigFromFile { #[serde(default = "default_display_mode")] display_mode: String, #[serde(default = "default_true")] - auto_mining: bool, - #[serde(default = "default_true")] mine_on_app_start: bool, #[serde(default = "default_true")] p2pool_enabled: bool, @@ -47,10 +45,8 @@ pub struct AppConfigFromFile { #[serde(default = "default_application_language")] application_language: String, #[serde(default = "default_true")] - airdrop_ui_enabled: bool, - #[serde(default = "default_true")] use_tor: bool, - #[serde(default = "default_false")] + #[serde(default = "default_true")] paper_wallet_enabled: bool, #[serde(default = "default_false")] reset_earnings: bool, @@ -83,7 +79,6 @@ impl Default for AppConfigFromFile { version: default_version(), mode: default_mode(), display_mode: default_display_mode(), - auto_mining: true, mine_on_app_start: true, p2pool_enabled: true, last_binaries_update_timestamp: default_system_time(), @@ -98,8 +93,7 @@ impl Default for AppConfigFromFile { application_language: default_application_language(), custom_max_cpu_usage: None, custom_max_gpu_usage: None, - airdrop_ui_enabled: true, - paper_wallet_enabled: false, + paper_wallet_enabled: true, use_tor: true, eco_mode_cpu_options: Vec::new(), ludicrous_mode_cpu_options: Vec::new(), @@ -189,7 +183,6 @@ pub(crate) struct AppConfig { should_always_use_system_language: bool, should_auto_launch: bool, application_language: String, - airdrop_ui_enabled: bool, paper_wallet_enabled: bool, use_tor: bool, reset_earnings: bool, @@ -228,11 +221,10 @@ impl AppConfig { should_always_use_system_language: false, should_auto_launch: false, application_language: default_application_language(), - airdrop_ui_enabled: true, use_tor: true, custom_max_cpu_usage: None, custom_max_gpu_usage: None, - paper_wallet_enabled: false, + paper_wallet_enabled: true, reset_earnings: false, eco_mode_cpu_options: Vec::new(), ludicrous_mode_cpu_options: Vec::new(), @@ -275,7 +267,6 @@ impl AppConfig { } else { self.display_mode = DisplayMode::Light; } - self.auto_mining = config.auto_mining; self.mine_on_app_start = config.mine_on_app_start; self.p2pool_enabled = config.p2pool_enabled; self.last_binaries_update_timestamp = config.last_binaries_update_timestamp; @@ -288,7 +279,6 @@ impl AppConfig { self.should_always_use_system_language = config.should_always_use_system_language; self.should_auto_launch = config.should_auto_launch; self.application_language = config.application_language; - self.airdrop_ui_enabled = config.airdrop_ui_enabled; self.use_tor = config.use_tor; self.paper_wallet_enabled = config.paper_wallet_enabled; self.eco_mode_cpu_options = config.eco_mode_cpu_options; @@ -324,7 +314,6 @@ impl AppConfig { } if self.config_version <= 7 { self.config_version = 8; - self.airdrop_ui_enabled = true; } if self.config_version <= 8 { self.config_version = 9; @@ -346,6 +335,11 @@ impl AppConfig { self.visual_mode = true; self.config_version = 12; } + + if self.config_version <= 12 { + self.paper_wallet_enabled = true; + self.config_version = 13; + } } pub fn mmproxy_monero_nodes(&self) -> &Vec { @@ -484,12 +478,6 @@ impl AppConfig { self.auto_mining } - // pub async fn set_airdrop_ui_enabled(&mut self, airdrop_ui_enabled: bool) -> Result<(), anyhow::Error> { - // self.airdrop_ui_enabled = airdrop_ui_enabled; - // self.update_config_file().await?; - // Ok(()) - // } - pub fn should_auto_launch(&self) -> bool { self.should_auto_launch } @@ -622,7 +610,6 @@ impl AppConfig { version: self.config_version, mode: MiningMode::to_str(self.mode), display_mode: DisplayMode::to_str(self.display_mode), - auto_mining: self.auto_mining, mine_on_app_start: self.mine_on_app_start, p2pool_enabled: self.p2pool_enabled, last_binaries_update_timestamp: self.last_binaries_update_timestamp, @@ -635,7 +622,6 @@ impl AppConfig { should_always_use_system_language: self.should_always_use_system_language, should_auto_launch: self.should_auto_launch, application_language: self.application_language.clone(), - airdrop_ui_enabled: self.airdrop_ui_enabled, paper_wallet_enabled: self.paper_wallet_enabled, custom_max_cpu_usage: self.custom_max_cpu_usage, custom_max_gpu_usage: self.custom_max_gpu_usage, @@ -662,7 +648,7 @@ impl AppConfig { } fn default_version() -> u32 { - 11 + 13 } fn default_custom_max_cpu_usage() -> Option { diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 0317c515d..dec7bc007 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1610,12 +1610,11 @@ async fn check_if_is_orphan_chain(app_handle: tauri::AppHandle) { Ok(is_stuck) => { if is_stuck { error!(target: LOG_TARGET, "Miner is stuck on orphan chain"); - drop(app_handle.emit_all("is_stuck", is_stuck)); } + drop(app_handle.emit_all("is_stuck", is_stuck)); } Err(e) => { error!(target: LOG_TARGET, "{}", e); - drop(app_handle.emit_all("is_stuck", true)); } } } @@ -1898,7 +1897,6 @@ async fn close_splashscreen(window: Window) { .show() .expect("could not show"); } - #[derive(Debug, Serialize, Clone)] pub struct CpuMinerMetrics { // hardware: Vec, @@ -2208,53 +2206,52 @@ fn main() { }) .invoke_handler(tauri::generate_handler![ close_splashscreen, - setup_application, - start_mining, - stop_mining, - set_p2pool_enabled, - set_mode, - set_display_mode, - open_log_dir, - get_seed_words, - get_applications_versions, - send_feedback, - update_applications, - log_web_message, - set_allow_telemetry, - set_airdrop_access_token, + download_and_start_installer, + exit_application, + fetch_tor_bridges, + get_app_config, get_app_id, get_app_in_memory_config, - set_monero_address, - update_applications, - reset_settings, - set_gpu_mining_enabled, - set_cpu_mining_enabled, - restart_application, - resolve_application_language, - set_application_language, - set_mine_on_app_start, + get_applications_versions, + get_external_dependencies, + get_max_consumption_levels, get_miner_metrics, - get_app_config, get_p2pool_stats, - get_tari_wallet_details, get_paper_wallet_details, - exit_application, - set_excluded_gpu_devices, - set_should_always_use_system_language, - set_should_auto_launch, - download_and_start_installer, - get_external_dependencies, - set_use_tor, + get_seed_words, + get_tari_wallet_details, + get_tor_config, + get_tor_entry_guards, get_transaction_history, import_seed_words, + log_web_message, + open_log_dir, + reset_settings, + resolve_application_language, + restart_application, + send_feedback, + set_airdrop_access_token, + set_allow_telemetry, + set_application_language, set_auto_update, - get_tor_config, - get_max_consumption_levels, - set_tor_config, - fetch_tor_bridges, + set_cpu_mining_enabled, + set_display_mode, + set_excluded_gpu_devices, + set_gpu_mining_enabled, + set_mine_on_app_start, + set_mode, + set_monero_address, set_monerod_config, - get_tor_entry_guards, - set_visual_mode + set_p2pool_enabled, + set_should_always_use_system_language, + set_should_auto_launch, + set_tor_config, + set_use_tor, + set_visual_mode, + setup_application, + start_mining, + stop_mining, + update_applications, ]) .build(tauri::generate_context!()) .inspect_err( diff --git a/src-tauri/src/node_manager.rs b/src-tauri/src/node_manager.rs index f0e814643..c7831dcad 100644 --- a/src-tauri/src/node_manager.rs +++ b/src-tauri/src/node_manager.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use std::time::SystemTime; use chrono::{NaiveDateTime, TimeZone, Utc}; -use log::error; +use log::{error, info}; use minotari_node_grpc_client::grpc::Peer; use tari_common::configuration::Network; use tari_core::transactions::tari_amount::MicroMinotari; @@ -206,11 +206,26 @@ impl NodeManager { } pub async fn check_if_is_orphan_chain(&self) -> Result { - let status_monitor_lock = self.watcher.read().await; + let mut status_monitor_lock = self.watcher.write().await; let status_monitor = status_monitor_lock .status_monitor - .as_ref() + .as_mut() .ok_or_else(|| anyhow::anyhow!("Node not started"))?; + let (_, _, _, _, _, is_synced) = status_monitor + .get_network_hash_rate_and_block_reward() + .await + .map_err(|e| { + if matches!(e, MinotariNodeStatusMonitorError::NodeNotStarted) { + NodeManagerError::NodeNotStarted + } else { + NodeManagerError::UnknownError(e.into()) + } + })?; + if !is_synced { + info!(target: LOG_TARGET, "Node is not synced, skipping orphan chain check"); + return Ok(false); + } + let network = Network::get_current_or_user_setting_or_default(); let block_scan_tip = get_best_block_from_block_scan(network).await?; let heights: Vec = vec![ diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 82389b520..1afabe4b2 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Tari Universe (Alpha)", - "version": "0.7.0" + "version": "0.7.1" }, "tauri": { "systemTray": { diff --git a/src/App/App.tsx b/src/App/App.tsx index 72fff661c..8a0ad07a0 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -16,7 +16,6 @@ import AppContent from './AppContent'; export default function App() { const isShuttingDown = useShuttingDown(); const isSettingUp = useAppStateStore((s) => s.isSettingUp); - return ( diff --git a/src/assets/icons/replay.tsx b/src/assets/icons/replay.tsx new file mode 100644 index 000000000..8276b4798 --- /dev/null +++ b/src/assets/icons/replay.tsx @@ -0,0 +1,11 @@ +export function ReplaySVG() { + return ( + + + + + ); +} diff --git a/src/containers/floating/Settings/sections/general/AirdropPermissionSettings.tsx b/src/containers/floating/Settings/sections/general/AirdropPermissionSettings.tsx index 8c6e53e84..b57d3c541 100644 --- a/src/containers/floating/Settings/sections/general/AirdropPermissionSettings.tsx +++ b/src/containers/floating/Settings/sections/general/AirdropPermissionSettings.tsx @@ -12,7 +12,6 @@ import { } from '../../components/SettingsGroup.styles.ts'; export default function AirdropPermissionSettings() { - const airdropUIEnabled = useAppConfigStore((s) => s.airdrop_ui_enabled); const allowTelemetry = useAppConfigStore((s) => s.allow_telemetry); const setAllowTelemetry = useAppConfigStore((s) => s.setAllowTelemetry); const { t } = useTranslation(['airdrop'], { useSuspense: false }); @@ -26,11 +25,9 @@ export default function AirdropPermissionSettings() { - - {t(airdropUIEnabled ? 'permission.title' : 'permissionNoGems.title')} - + {t('permission.title')} - {t(airdropUIEnabled ? 'permission.text' : 'permissionNoGems.text')} + {t('permission.text')} diff --git a/src/containers/main/Airdrop/AirdropGiftTracker/AirdropGiftTracker.tsx b/src/containers/main/Airdrop/AirdropGiftTracker/AirdropGiftTracker.tsx index 4f69925b4..36eb9c001 100644 --- a/src/containers/main/Airdrop/AirdropGiftTracker/AirdropGiftTracker.tsx +++ b/src/containers/main/Airdrop/AirdropGiftTracker/AirdropGiftTracker.tsx @@ -3,7 +3,6 @@ import { Title, TitleWrapper, Wrapper } from './styles'; import LoggedOut from './sections/LoggedOut/LoggedOut'; import LoggedIn from './sections/LoggedIn/LoggedIn'; import { useAirdropSyncState } from '@app/hooks/airdrop/useAirdropSyncState'; -import { useAppConfigStore } from '@app/store/useAppConfigStore'; import { useTranslation } from 'react-i18next'; import InfoTooltip from './components/InfoTooltip/InfoTooltip'; import { useWebsocket } from '@app/hooks/airdrop/useWebsocket.ts'; @@ -13,10 +12,7 @@ export default function AirdropGiftTracker() { useWebsocket(); const { t } = useTranslation(['airdrop'], { useSuspense: false }); - const airdrop_ui_enabled = useAppConfigStore((s) => s.airdrop_ui_enabled); const { airdropTokens } = useAirdropStore(); - - if (!airdrop_ui_enabled) return null; const isLoggedIn = !!airdropTokens; return ( diff --git a/src/containers/main/Airdrop/Settings/Logout.tsx b/src/containers/main/Airdrop/Settings/Logout.tsx index e7e168d0f..855f668b7 100644 --- a/src/containers/main/Airdrop/Settings/Logout.tsx +++ b/src/containers/main/Airdrop/Settings/Logout.tsx @@ -9,16 +9,14 @@ import { } from '@app/containers/floating/Settings/components/SettingsGroup.styles'; import { useAirdropStore } from '@app/store/useAirdropStore'; -import { useAppConfigStore } from '@app/store/useAppConfigStore'; import { Trans, useTranslation } from 'react-i18next'; export default function AirdropLogout() { const { t } = useTranslation(['common', 'airdrop'], { useSuspense: false }); - const airdropUIEnabled = useAppConfigStore((s) => s.airdrop_ui_enabled); const logout = useAirdropStore((state) => state.logout); const { authUuid, userDetails } = useAirdropStore(); - if (!airdropUIEnabled || (!userDetails && !authUuid)) return null; + if (!userDetails && !authUuid) return null; return ( diff --git a/src/containers/main/Dashboard/MiningView/components/Earnings.tsx b/src/containers/main/Dashboard/MiningView/components/Earnings.tsx index 2e48f8d9b..f93eda151 100644 --- a/src/containers/main/Dashboard/MiningView/components/Earnings.tsx +++ b/src/containers/main/Dashboard/MiningView/components/Earnings.tsx @@ -30,30 +30,48 @@ const variants = { export default function Earnings() { const { t } = useTranslation('mining-view', { useSuspense: false }); + const replayItem = useBlockchainVisualisationStore((s) => s.replayItem); const earnings = useBlockchainVisualisationStore((s) => s.earnings); const recapData = useBlockchainVisualisationStore((s) => s.recapData); - const displayEarnings = recapData?.totalEarnings || earnings; + const displayEarnings = replayItem?.amount || recapData?.totalEarnings || earnings; const formatted = useFormatBalance(displayEarnings || 0, 1); + const recapText = recapData?.totalEarnings ? ( + + }} + /> + + ) : null; + + const replayText = + replayItem?.amount && replayItem.blockHeight ? ( + + }} + /> + + ) : null; + return ( {displayEarnings ? ( - {recapData?.totalEarnings ? ( - - }} - /> - - ) : null} + {replayText} + {recapText} {t('your-reward-is')} diff --git a/src/containers/main/SideBar/components/OrphanChainAlert.tsx b/src/containers/main/SideBar/components/OrphanChainAlert.tsx index 726b75925..d888789af 100644 --- a/src/containers/main/SideBar/components/OrphanChainAlert.tsx +++ b/src/containers/main/SideBar/components/OrphanChainAlert.tsx @@ -15,15 +15,13 @@ export const OrphanChainAlert = () => { const { t } = useTranslation('settings', { useSuspense: false }); useEffect(() => { - const unlistenPromise = listen('is_stuck', (event) => { - if (event.payload) { - setIsOrphanChain(true); - } + const unlistenPromise = listen('is_stuck', (event) => { + setIsOrphanChain(event.payload); }); return () => { unlistenPromise.then((unlisten) => unlisten()); }; - }); + }, [setIsOrphanChain]); return isOrphanChain ? ( diff --git a/src/containers/main/SideBar/components/Wallet/HistoryItem.styles.ts b/src/containers/main/SideBar/components/Wallet/HistoryItem.styles.ts index 257dce72e..6d1f37001 100644 --- a/src/containers/main/SideBar/components/Wallet/HistoryItem.styles.ts +++ b/src/containers/main/SideBar/components/Wallet/HistoryItem.styles.ts @@ -92,6 +92,40 @@ export const HoverWrapper = styled(m.div)` inset: 0; z-index: 4; background-color: rgba(255, 255, 255, 0.1); + align-items: center; + display: flex; + flex-direction: row; + justify-content: flex-end; + height: 100%; + gap: 6px; + padding: 0 10px; + transition: background-color 2s ease; +`; + +export const ReplayButton = styled(m.button)` + display: flex; + border-radius: 100%; + position: relative; + width: 31px; + height: 31px; + justify-content: center; + border: 1px solid rgba(255, 255, 255, 0.15); + background-color: ${({ theme }) => theme.colors.grey[600]}; + color: #fff; + box-sizing: border-box; + &:hover { + svg { + scale: 1.05; + } + } + + svg { + // flex centering wasn't working:( + position: relative; + top: 50%; + transform: translateY(-50%); + transition: scale 0.1s ease; + } `; export const FlexButton = styled(m.button)` @@ -101,21 +135,17 @@ export const FlexButton = styled(m.button)` justify-content: center; align-items: center; gap: 8px; - - border-radius: 158.799px; + border-radius: 159px; background: linear-gradient(0deg, #c9eb00 0%, #c9eb00 100%), linear-gradient(180deg, #755cff 0%, #2946d9 100%), linear-gradient(180deg, #ff84a4 0%, #d92958 100%); - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - + position: relative; color: #000; font-size: 12px; font-weight: 600; line-height: normal; cursor: pointer; + right: 0; &:hover { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4); diff --git a/src/containers/main/SideBar/components/Wallet/HistoryItem.tsx b/src/containers/main/SideBar/components/Wallet/HistoryItem.tsx index cbaab31c3..c9a1dd75d 100644 --- a/src/containers/main/SideBar/components/Wallet/HistoryItem.tsx +++ b/src/containers/main/SideBar/components/Wallet/HistoryItem.tsx @@ -1,3 +1,4 @@ +import { useBlockchainVisualisationStore } from '@app/store/useBlockchainVisualisationStore'; import { EarningsWrapper, FlexButton, @@ -6,6 +7,7 @@ import { HoverWrapper, InfoWrapper, LeftContent, + ReplayButton, SquadIconWrapper, Wrapper, } from './HistoryItem.styles.ts'; @@ -15,13 +17,16 @@ import { TariSvg } from '@app/assets/icons/tari.tsx'; import { useFormatBalance } from '@app/utils/formatBalance.ts'; import { useTranslation } from 'react-i18next'; -import { useMemo, useState } from 'react'; +import { useCallback, useMemo, useState } from 'react'; import { AnimatePresence } from 'framer-motion'; import gemImage from '../../../Airdrop/AirdropGiftTracker/images/gem.png'; import { useShareRewardStore } from '@app/store/useShareRewardStore.ts'; import { Transaction } from '@app/types/wallet.ts'; import { GIFT_GEMS, useAirdropStore } from '@app/store/useAirdropStore.ts'; import { useAppConfigStore } from '@app/store/useAppConfigStore.ts'; + +import { ReplaySVG } from '@app/assets/icons/replay'; + interface HistoryItemProps { item: Transaction; } @@ -48,6 +53,8 @@ export default function HistoryItem({ item }: HistoryItemProps) { const systemLang = useAppConfigStore((s) => s.should_always_use_system_language); const sharingEnabled = useAppConfigStore((s) => s.sharing_enabled); + const handleWinReplay = useBlockchainVisualisationStore((s) => s.handleWinReplay); + const { t } = useTranslation('sidebar', { useSuspense: false }); const earningsFormatted = useFormatBalance(item.amount).toLowerCase(); const referralQuestPoints = useAirdropStore((s) => s.referralQuestPoints); @@ -60,6 +67,10 @@ export default function HistoryItem({ item }: HistoryItemProps) { return randomGradientColours[getRandomInt(9)]; }, []); + const handleReplay = useCallback(() => { + handleWinReplay(item); + }, [handleWinReplay, item]); + if (!item.blockHeight || item.payment_id?.length > 0) { return null; } @@ -75,7 +86,6 @@ export default function HistoryItem({ item }: HistoryItemProps) { const isLoggedIn = !!airdropTokens; const showShareButton = sharingEnabled && isLoggedIn; - return ( setHovering(true)} onMouseLeave={() => setHovering(false)}> {showShareButton && ( @@ -83,9 +93,10 @@ export default function HistoryItem({ item }: HistoryItemProps) { {hovering && ( {t('share.history-item-button')} @@ -93,6 +104,9 @@ export default function HistoryItem({ item }: HistoryItemProps) { {gemsValue} + + + )} diff --git a/src/containers/main/SideBar/components/Wallet/Wallet.styles.ts b/src/containers/main/SideBar/components/Wallet/Wallet.styles.ts index 8005a5bab..67e51e340 100644 --- a/src/containers/main/SideBar/components/Wallet/Wallet.styles.ts +++ b/src/containers/main/SideBar/components/Wallet/Wallet.styles.ts @@ -100,7 +100,7 @@ export const WalletCornerButtons = styled('div')` gap: 3px; `; -export const CornerButton = styled('button')` +export const CornerButton = styled('button')<{ $hasReward?: boolean }>` color: #fff; font-size: 10px; font-style: normal; @@ -112,7 +112,7 @@ export const CornerButton = styled('button')` background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(7px); - padding: 0 8px; + padding: ${({ $hasReward = false }) => ($hasReward ? '0 8px 0 3px' : '0 8px')}; display: flex; align-items: center; @@ -121,6 +121,7 @@ export const CornerButton = styled('button')` cursor: pointer; transition: all 0.2s ease; pointer-events: all; + gap: 3px; &:hover { border: 1px solid rgba(156, 156, 156, 0.18); @@ -128,6 +129,26 @@ export const CornerButton = styled('button')` } `; +export const CornerButtonBadge = styled.div` + background-color: ${({ theme }) => theme.colors.brightRed[500]}; + border-radius: 13px; + height: 13px; + min-width: 13px; + width: auto; + display: flex; + justify-content: center; + align-items: flex-end; + transition: width 0.2s ease; + span { + display: flex; + font-weight: 600; + font-size: 10px; + text-align: center; + line-height: 10px; + height: 11px; + padding: 0 3px; + } +`; export const SidebarCover = styled(m.div)` position: absolute; inset: 0; @@ -135,5 +156,4 @@ export const SidebarCover = styled(m.div)` background: rgba(0, 0, 0, 0.3); cursor: pointer; - z-index: 1; `; diff --git a/src/containers/main/SideBar/components/Wallet/Wallet.tsx b/src/containers/main/SideBar/components/Wallet/Wallet.tsx index 293a7319d..e1b070f1c 100644 --- a/src/containers/main/SideBar/components/Wallet/Wallet.tsx +++ b/src/containers/main/SideBar/components/Wallet/Wallet.tsx @@ -1,9 +1,11 @@ import { useCallback, useState } from 'react'; +import { useBlockchainVisualisationStore } from '@app/store/useBlockchainVisualisationStore'; import { useFormatBalance } from '@app/utils/formatBalance.ts'; import CharSpinner from '@app/components/CharSpinner/CharSpinner.tsx'; import { BalanceVisibilityButton, CornerButton, + CornerButtonBadge, ScrollMask, SidebarCover, WalletBalance, @@ -32,6 +34,9 @@ export default function Wallet() { const setShowPaperWalletModal = usePaperWalletStore((s) => s.setShowModal); const paperWalletEnabled = useAppConfigStore((s) => s.paper_wallet_enabled); + const recapCount = useBlockchainVisualisationStore((s) => s.recapCount); + const setRecapCount = useBlockchainVisualisationStore((s) => s.setRecapCount); + const fetchTx = useFetchTx(); const formatted = useFormatBalance(balance || 0); const sizing = formatted.length <= 6 ? 50 : formatted.length <= 8 ? 44 : 32; @@ -48,8 +53,10 @@ export default function Wallet() { return; } + setRecapCount(undefined); + setShowHistory((c) => !c); - }, [balance, fetchTx, isTransactionLoading, transactions.length]); + }, [balance, fetchTx, isTransactionLoading, setRecapCount, transactions?.length]); const handleSyncButtonClick = () => { setShowPaperWalletModal(true); @@ -75,6 +82,8 @@ export default function Wallet() { ); + const showCount = Boolean(recapCount && recapCount > 0 && !showHistory); + return ( <> @@ -89,8 +98,13 @@ export default function Wallet() { /> )} {balance ? ( - - {!showHistory ? t('show-history') : t('hide-history')} + + {showCount && ( + + {recapCount} + + )} + {!showHistory ? t('rewards') : t('hide-history')} ) : null} diff --git a/src/hooks/mining/useEarningsRecap.ts b/src/hooks/mining/useEarningsRecap.ts index 430a033db..9ad796216 100644 --- a/src/hooks/mining/useEarningsRecap.ts +++ b/src/hooks/mining/useEarningsRecap.ts @@ -16,7 +16,6 @@ export default function useEarningsRecap() { const count = missedWins.length; if (count > 0) { const totalEarnings = missedWins.reduce((earnings, cur) => earnings + cur.amount, 0); - handleWinRecap({ count, totalEarnings }); } } diff --git a/src/hooks/mining/useMiningUiStateMachine.ts b/src/hooks/mining/useMiningUiStateMachine.ts index 9414b03c1..a63bc72fe 100644 --- a/src/hooks/mining/useMiningUiStateMachine.ts +++ b/src/hooks/mining/useMiningUiStateMachine.ts @@ -6,6 +6,7 @@ import { useEffect } from 'react'; export const useUiMiningStateMachine = () => { const isMiningInitiated = useMiningStore((s) => s.miningInitiated); const isChangingMode = useMiningStore((s) => s.isChangingMode); + const isReplaying = useMiningStore((s) => s.isReplaying); const cpuIsMining = useMiningStore((s) => s.cpu.mining.is_mining); const gpuIsMining = useMiningStore((s) => s.gpu.mining.is_mining); const isSettingUp = useAppStateStore((s) => s.isSettingUp); @@ -20,8 +21,8 @@ export const useUiMiningStateMachine = () => { }, [statusIndex, isMining]); useEffect(() => { - if (!isSettingUp && !isMiningInitiated && !isMining && !isChangingMode) { + if (!isSettingUp && !isMiningInitiated && !isMining && !isChangingMode && !isReplaying) { setAnimationState('stop'); } - }, [statusIndex, isSettingUp, isMiningInitiated, isMining, isChangingMode]); + }, [statusIndex, isSettingUp, isMiningInitiated, isMining, isChangingMode, isReplaying]); }; diff --git a/src/hooks/mining/useTransactions.ts b/src/hooks/mining/useTransactions.ts index 7beaf8195..a106e1050 100644 --- a/src/hooks/mining/useTransactions.ts +++ b/src/hooks/mining/useTransactions.ts @@ -10,7 +10,6 @@ export default function useFetchTx() { const isTransactionLoading = useWalletStore((s) => s.isTransactionLoading); const setTransactionsLoading = useWalletStore((s) => s.setTransactionsLoading); const setupProgress = useAppStateStore((s) => s.setupProgress); - const setTransactions = useWalletStore((s) => s.setTransactions); const setError = useAppStateStore((s) => s.setError); diff --git a/src/store/useAppConfigStore.ts b/src/store/useAppConfigStore.ts index 3acde227d..b25282841 100644 --- a/src/store/useAppConfigStore.ts +++ b/src/store/useAppConfigStore.ts @@ -41,7 +41,6 @@ const initialState: State = { config_version: 0, config_file: undefined, mode: 'Eco', - auto_mining: true, mine_on_app_start: false, p2pool_enabled: false, last_binaries_update_timestamp: '0', @@ -51,8 +50,7 @@ const initialState: State = { gpu_mining_enabled: true, cpu_mining_enabled: true, sharing_enabled: true, - airdrop_ui_enabled: false, - paper_wallet_enabled: false, + paper_wallet_enabled: true, custom_power_levels_enabled: true, use_tor: true, auto_update: false, @@ -68,7 +66,6 @@ export const useAppConfigStore = create()((set, getState) = const appConfig = await invoke('get_app_config'); set(appConfig); const configTheme = appConfig.display_mode?.toLowerCase(); - const canvasElement = document.getElementById('canvas'); if (canvasElement && !appConfig.visual_mode) { canvasElement.style.display = 'none'; diff --git a/src/store/useBlockchainVisualisationStore.ts b/src/store/useBlockchainVisualisationStore.ts index 9d97a179b..02c9816d2 100644 --- a/src/store/useBlockchainVisualisationStore.ts +++ b/src/store/useBlockchainVisualisationStore.ts @@ -1,3 +1,4 @@ +import { Transaction } from '@app/types/wallet'; import { create } from './create'; import { useMiningStore } from './useMiningStore.ts'; @@ -17,17 +18,26 @@ interface State { displayBlockHeight?: number; earnings?: number; recapData?: Recap; + recapCount?: number; recapIds: TransactionInfo['tx_id'][]; + replayItem?: Transaction; } +interface WinAnimation { + latestTx: TransactionInfo; + canAnimate?: boolean; + isRecap?: boolean; +} interface Actions { - handleWin: (latestTx: TransactionInfo, canAnimate?: boolean) => Promise; + handleWin: ({ latestTx, canAnimate, isRecap }: WinAnimation) => Promise; handleWinRecap: (recapData: Recap) => void; + handleWinReplay: (txItem: Transaction) => void; handleFail: (blockHeight: number, canAnimate?: boolean) => Promise; handleNewBlock: (newBlockHeight: number, isMining?: boolean) => Promise; setDisplayBlockHeight: (displayBlockHeight: number) => void; setDisplayBlockTime: (displayBlockTime: BlockTimeData) => void; setDebugBlockTime: (displayBlockTime: BlockTimeData) => void; + setRecapCount: (recapCount?: number) => void; } type BlockchainVisualisationStoreState = State & Actions; @@ -58,26 +68,46 @@ export const useBlockchainVisualisationStore = create { useMiningStore.getState().setMiningControlsEnabled(false); - const successTier = getSuccessTier(recapData.totalEarnings); - setAnimationState(successTier); - - set({ recapData }); - + set({ recapData, recapCount: recapData.count }); setTimeout(() => { useMiningStore.getState().setMiningControlsEnabled(true); set({ recapData: undefined, recapIds: [] }); }, 2000); }, - handleWin: async (latestTx: TransactionInfo, canAnimate) => { - const blockHeight = Number(latestTx.message?.split(': ')[1]); + handleWinReplay: (txItem) => { + useMiningStore.getState().setIsReplaying(true); + const isAnimating = window.glApp.stateManager.status == 'free'; + const earnings = txItem.amount; + const successTier = getSuccessTier(earnings); + const handleReplay = () => { + set({ replayItem: txItem }); + setAnimationState(successTier); + setTimeout(() => { + set({ replayItem: undefined }); + useMiningStore.getState().setIsReplaying(false); + }, 1500); + }; + if (!isAnimating) { + setAnimationState('start'); + setTimeout(() => { + handleReplay(); + }, 1500); + } else { + handleReplay(); + } + }, + handleWin: async ({ latestTx, canAnimate }) => { + const blockHeight = Number(latestTx?.message?.split(': ')[1]); const earnings = latestTx.amount; + console.info(`Block #${blockHeight} mined! Earnings: ${earnings}`); if (canAnimate) { useMiningStore.getState().setMiningControlsEnabled(false); const successTier = getSuccessTier(earnings); + setAnimationState(successTier); set({ earnings }); setTimeout(() => { @@ -107,7 +137,7 @@ export const useBlockchainVisualisationStore = create set({ displayBlockHeight }), setDisplayBlockTime: (displayBlockTime) => set({ displayBlockTime }), setDebugBlockTime: (debugBlockTime) => set({ debugBlockTime }), + setRecapCount: (recapCount) => set({ recapCount }), })); diff --git a/src/store/useMiningStore.ts b/src/store/useMiningStore.ts index 7303b4596..747e810f9 100644 --- a/src/store/useMiningStore.ts +++ b/src/store/useMiningStore.ts @@ -14,6 +14,7 @@ interface State extends MinerMetrics { miningInitiated: boolean; miningControlsEnabled: boolean; isChangingMode: boolean; + isReplaying: boolean; excludedGpuDevices: number[]; counter: number; customLevelsDialogOpen: boolean; @@ -30,6 +31,7 @@ interface Actions { setIsChangingMode: (isChangingMode: boolean) => void; setExcludedGpuDevice: (excludeGpuDevice: number[]) => Promise; setCustomLevelsDialogOpen: (customLevelsDialogOpen: boolean) => void; + setIsReplaying: (isReplaying: boolean) => void; } type MiningStoreState = State & Actions; @@ -42,6 +44,7 @@ const initialState: State = { miningInitiated: false, isChangingMode: false, miningControlsEnabled: true, + isReplaying: false, excludedGpuDevices: [], cpu: { hardware: [], @@ -162,6 +165,7 @@ export const useMiningStore = create()((set, getState) => ({ }, setMiningControlsEnabled: (miningControlsEnabled) => set({ miningControlsEnabled }), setIsChangingMode: (isChangingMode) => set({ isChangingMode }), + setIsReplaying: (isReplaying) => set({ isReplaying }), setExcludedGpuDevice: async (excludedGpuDevices) => { set({ excludedGpuDevices }); try { diff --git a/src/theme/palettes/colors.ts b/src/theme/palettes/colors.ts index 1f2d7054f..7f9678289 100644 --- a/src/theme/palettes/colors.ts +++ b/src/theme/palettes/colors.ts @@ -205,6 +205,20 @@ const red = { 950: '#450F0A', }; +const brightRed = { + 50: '#FEF3F2', + 100: '#ffd3d3', + 200: '#ffa8a8', + 300: '#fe7c7c', + 400: '#fe5050', + 500: '#fe2727', + 600: '#e70101', + 700: '#ae0101', + 800: '#740101', + 900: '#450F0A', + 950: '#3a0000', +}; + const ramp = { 1: '#1CCF31', 2: '#50CC27', @@ -223,6 +237,7 @@ export const colors = { orange, green, red, + brightRed, teal, gothic, tariPurple, diff --git a/src/types/app-status.ts b/src/types/app-status.ts index 15c28a8d6..37ac48bf2 100644 --- a/src/types/app-status.ts +++ b/src/types/app-status.ts @@ -8,34 +8,32 @@ export interface TorConfig { } export interface AppConfig { - config_version: number; - config_file?: string; - mode: modeType; - display_mode: displayMode; - auto_mining: boolean; - mine_on_app_start: boolean; - p2pool_enabled: boolean; - last_binaries_update_timestamp: string; - has_system_language_been_proposed: boolean; - should_always_use_system_language: boolean; - should_auto_launch: boolean; - application_language: Language; allow_telemetry: boolean; anon_id: string; - monero_address: string; - gpu_mining_enabled: boolean; - cpu_mining_enabled: boolean; - airdrop_ui_enabled: boolean; - paper_wallet_enabled: boolean; - use_tor: boolean; + application_language: Language; auto_update: boolean; + config_file?: string; + config_version: number; + cpu_mining_enabled: boolean; custom_max_cpu_usage: number; custom_max_gpu_usage: number; custom_power_levels_enabled: boolean; - reset_earnings: boolean; - mmproxy_use_monero_fail: boolean; + display_mode: displayMode; + gpu_mining_enabled: boolean; + has_system_language_been_proposed: boolean; + last_binaries_update_timestamp: string; + mine_on_app_start: boolean; mmproxy_monero_nodes: string[]; + mmproxy_use_monero_fail: boolean; + mode: modeType; + monero_address: string; + p2pool_enabled: boolean; + paper_wallet_enabled: boolean; + reset_earnings: boolean; sharing_enabled: boolean; + should_always_use_system_language: boolean; + should_auto_launch: boolean; + use_tor: boolean; visual_mode: boolean; } diff --git a/src/types/invoke.ts b/src/types/invoke.ts index cde7bcb53..ab3e75357 100644 --- a/src/types/invoke.ts +++ b/src/types/invoke.ts @@ -33,7 +33,6 @@ declare module '@tauri-apps/api/tauri' { function invoke(param: 'start_mining'): Promise; function invoke(param: 'stop_mining'): Promise; function invoke(param: 'set_allow_telemetry', payload: { allow_telemetry: boolean }): Promise; - function invoke(param: 'set_auto_mining', payload: { autoMining: boolean }): Promise; function invoke(param: 'set_user_inactivity_timeout', payload: { timeout: number }): Promise; function invoke(param: 'update_applications'): Promise; function invoke( @@ -74,7 +73,7 @@ declare module '@tauri-apps/api/tauri' { useMoneroFail: boolean; moneroNodes: string[]; } - ); + ): Promise; function invoke( param: 'log_web_message', payload: { level: 'log' | 'error' | 'warn' | 'info'; message: string }