diff --git a/src/common/BoundedNumericTextField.tsx b/src/common/BoundedNumericTextField.tsx index 803011e..b3c995e 100644 --- a/src/common/BoundedNumericTextField.tsx +++ b/src/common/BoundedNumericTextField.tsx @@ -135,6 +135,10 @@ export const BoundedNumericTextField = ({ changeValueWithIncDecButton(1)} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > changeValueWithIncDecButton(-1)} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > +) { + return ; +}); diff --git a/src/components/Apps/AppsDevModeNavBar.tsx b/src/components/Apps/AppsDevModeNavBar.tsx index 548f1d2..6a39c16 100644 --- a/src/components/Apps/AppsDevModeNavBar.tsx +++ b/src/components/Apps/AppsDevModeNavBar.tsx @@ -108,13 +108,10 @@ export const AppsDevModeNavBar = () => { { { } }; - const handleChange = (event: React.SyntheticEvent, newValue: number) => { + const handleChange = (event: SyntheticEvent, newValue: number) => { setValueTabPrivateApp(newValue); }; @@ -353,13 +354,10 @@ export const AppsPrivate = ({ myName, myAddress }) => { - - )} - + - + - + ); }; diff --git a/src/components/Chat/ChatList.tsx b/src/components/Chat/ChatList.tsx index f5cb3f6..dc018d9 100644 --- a/src/components/Chat/ChatList.tsx +++ b/src/components/Chat/ChatList.tsx @@ -206,7 +206,7 @@ export const ChatList = ({ width: '100%', }} > - - - - - + ); } return ( - - + ); })} - - - + + + {showScrollButton && ( scrollToBottom()} - style={{ + sx={{ backgroundColor: theme.palette.other.unread, border: 'none', borderRadius: '20px', @@ -428,15 +427,15 @@ export const ChatList = ({ {showScrollDownButton && !showScrollButton && ( scrollToBottom()} - style={{ + sx={{ backgroundColor: theme.palette.background.paper, - outline: `1px solid ${theme.palette.primary.light}`, border: 'none', borderRadius: '20px', bottom: 20, color: theme.palette.text.primary, cursor: 'pointer', fontSize: '16px', + outline: `1px solid ${theme.palette.primary.light}`, padding: '10px 20px', position: 'absolute', right: 20, @@ -449,7 +448,7 @@ export const ChatList = ({ })} )} - + {enableMentions && (hasSecretKey || isPrivate === false) && ( { - - + > ); diff --git a/src/components/ContextMenu.tsx b/src/components/ContextMenu.tsx index 3d1ede6..a05b8fe 100644 --- a/src/components/ContextMenu.tsx +++ b/src/components/ContextMenu.tsx @@ -185,4 +185,4 @@ export const ContextMenu = ({ children, groupId, getUserSettings }) => { ); -}; +}; // TODO translate diff --git a/src/components/Embeds/ImageEmbed.tsx b/src/components/Embeds/ImageEmbed.tsx index 9438166..f197f5b 100644 --- a/src/components/Embeds/ImageEmbed.tsx +++ b/src/components/Embeds/ImageEmbed.tsx @@ -269,11 +269,12 @@ export function ImageViewer({ src = null, alt = '' }) { diff --git a/src/components/Embeds/VideoPlayer.tsx b/src/components/Embeds/VideoPlayer.tsx index c5ea94d..b8caab4 100644 --- a/src/components/Embeds/VideoPlayer.tsx +++ b/src/components/Embeds/VideoPlayer.tsx @@ -57,27 +57,27 @@ const ControlsContainer = styled(Box)` `; interface VideoPlayerProps { - src?: string; - poster?: string; - name?: string; - identifier?: string; - service?: string; autoplay?: boolean; - from?: string | null; customStyle?: any; + from?: string | null; + identifier?: string; + name?: string; + poster?: string; + service?: string; + src?: string | null; user?: string; } // TODO translate and theme (optional) export const VideoPlayer: FC = ({ - poster, - name, - identifier, - service, autoplay = true, - from = null, customStyle = {}, + from = null, + identifier, + name, node, + poster, + service, }) => { const keyIdentifier = useMemo(() => { if (name && identifier && service) { @@ -549,22 +549,22 @@ export const VideoPlayer: FC = ({ )} {((!src && !isLoading) || !startPlay) && ( { togglePlay(); }} + position="absolute" + right={0} sx={{ cursor: 'pointer', }} + top={0} + zIndex={500} > = ({ -) { - return ; -}); - export const AddGroup = ({ address, open, setOpen }) => { const { show } = useContext(QORTAL_APP_CONTEXT); const setTxList = useSetAtom(txListAtom); @@ -229,13 +215,12 @@ export const AddGroup = ({ address, open, setOpen }) => { open={open} onClose={handleClose} slots={{ - transition: Transition, + transition: TransitionUp, }} > @@ -252,6 +237,10 @@ export const AddGroup = ({ address, open, setOpen }) => { color="inherit" edge="start" onClick={handleClose} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > @@ -274,14 +263,11 @@ export const AddGroup = ({ address, open, setOpen }) => { { setOpenAdvance((prev) => !prev)} > diff --git a/src/components/Group/BlockedUsersModal.tsx b/src/components/Group/BlockedUsersModal.tsx index df48de7..628b6ac 100644 --- a/src/components/Group/BlockedUsersModal.tsx +++ b/src/components/Group/BlockedUsersModal.tsx @@ -406,10 +406,11 @@ export const BlockedUsersModal = () => { })} onClick={onCancel} sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, position: 'absolute', right: 8, top: 8, - color: theme.palette.text.primary, }} > diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index 0fde3d1..d2cc6ef 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -1632,10 +1632,10 @@ export const Group = ({ const renderDirects = () => { return ( - - + {direct?.sender !== myAddress && direct?.timestamp && ((!timestampEnterData[direct?.address] && @@ -1844,10 +1847,10 @@ export const Group = ({ ))} - + - + {!isRunningPublicNode && ( { @@ -1888,8 +1892,8 @@ export const Group = ({ /> )} - - + + ); }; @@ -1936,7 +1940,7 @@ export const Group = ({ setInfo={setInfoSnack} /> - - + > ); }; diff --git a/src/components/Group/GroupInvites.tsx b/src/components/Group/GroupInvites.tsx index 8bad077..902bd73 100644 --- a/src/components/Group/GroupInvites.tsx +++ b/src/components/Group/GroupInvites.tsx @@ -173,6 +173,10 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => { aria-label={t('core:comment_other', { postProcess: 'capitalizeFirstChar', })} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > - ))} - + - {t('group:group.group', { postProcess: 'capitalizeFirstChar' })} @@ -213,14 +213,14 @@ export const GroupList = ({ > )} > - - + + ); }; @@ -294,20 +294,22 @@ const GroupItem = React.memo( ? 'no messages' : `last message: ${formatEmailDate(group?.timestamp)}` } - primaryTypographyProps={{ - style: { - color: - group?.groupId === selectedGroup?.groupId && - theme.palette.text.primary, - fontSize: '16px', + slotProps={{ + primary: { + style: { + color: + group?.groupId === selectedGroup?.groupId && + theme.palette.text.primary, + fontSize: '16px', + }, }, - }} - secondaryTypographyProps={{ - style: { - color: - group?.groupId === selectedGroup?.groupId && - theme.palette.text.primary, - fontSize: '12px', + secondary: { + style: { + color: + group?.groupId === selectedGroup?.groupId && + theme.palette.text.primary, + fontSize: '12px', + }, }, }} sx={{ diff --git a/src/components/Group/ListOfThreadPostsWatched.tsx b/src/components/Group/ListOfThreadPostsWatched.tsx index 8a3c3d2..ffb2fbd 100644 --- a/src/components/Group/ListOfThreadPostsWatched.tsx +++ b/src/components/Group/ListOfThreadPostsWatched.tsx @@ -5,7 +5,7 @@ import ListItemButton from '@mui/material/ListItemButton'; import ListItemText from '@mui/material/ListItemText'; import IconButton from '@mui/material/IconButton'; import { executeEvent } from '../../utils/events'; -import { Box, Typography } from '@mui/material'; +import { Box, Typography, useTheme } from '@mui/material'; import { Spacer } from '../../common/Spacer'; import { CustomLoader } from '../../common/CustomLoader'; import VisibilityIcon from '@mui/icons-material/Visibility'; @@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next'; export const ListOfThreadPostsWatched = () => { const [posts, setPosts] = useState([]); const [loading, setLoading] = useState(true); + const theme = useTheme(); const { t } = useTranslation([ 'auth', 'core', @@ -175,6 +176,10 @@ export const ListOfThreadPostsWatched = () => { aria-label={t('core:comment_other', { postProcess: 'capitalizeFirstChar', })} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > @@ -247,14 +251,11 @@ export const ManageMembers = ({ ({ padding: 8, @@ -74,15 +75,6 @@ const LocalNodeSwitch = styled(Switch)(({ theme }) => ({ }, })); -const Transition = forwardRef(function Transition( - props: TransitionProps & { - children: ReactElement; - }, - ref: Ref -) { - return ; -}); - export const Settings = ({ open, setOpen, rawWallet }) => { const [checked, setChecked] = useState(false); const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom); @@ -163,7 +155,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => { open={open} onClose={handleClose} slots={{ - transition: Transition, + transition: TransitionUp, }} > @@ -181,6 +173,10 @@ export const Settings = ({ open, setOpen, rawWallet }) => { aria-label={t('core:action.close', { postProcess: 'capitalizeFirstChar', })} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > diff --git a/src/components/Language/LanguageSelector.tsx b/src/components/Language/LanguageSelector.tsx index a51c715..e15727b 100644 --- a/src/components/Language/LanguageSelector.tsx +++ b/src/components/Language/LanguageSelector.tsx @@ -30,25 +30,18 @@ const LanguageSelector = () => { return ( {!showSelect && ( - setShowSelect(true)} + style={{ + fontSize: '1.3rem', + }} + aria-label={t('core:current_language', { + language: name, postProcess: 'capitalizeFirstChar', })} > - setShowSelect(true)} - style={{ - fontSize: '1.3rem', - }} - aria-label={t('core:current_language', { - language: name, - postProcess: 'capitalizeFirstChar', - })} - > - {flag} - - + {flag} + )} {showSelect && ( diff --git a/src/components/Minting/Minting.tsx b/src/components/Minting/Minting.tsx index 198b5e1..afaba36 100644 --- a/src/components/Minting/Minting.tsx +++ b/src/components/Minting/Minting.tsx @@ -4,18 +4,29 @@ import { Box, Button, Card, + Container, Dialog, DialogActions, DialogContent, DialogTitle, Divider, IconButton, + Paper, Snackbar, + Tab, + Tabs, Toolbar, Typography, useTheme, } from '@mui/material'; -import { useCallback, useEffect, useMemo, useState } from 'react'; +import Grid from '@mui/material/Grid'; +import { + SyntheticEvent, + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; import CloseIcon from '@mui/icons-material/Close'; import { getBaseApiReact } from '../../App'; import { @@ -30,6 +41,7 @@ import { useModal } from '../../hooks/useModal.tsx'; import { useAtom, useSetAtom } from 'jotai'; import { memberGroupsAtom, txListAtom } from '../../atoms/global'; import { useTranslation } from 'react-i18next'; +import { TransitionUp } from '../../common/Transitions.tsx'; export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const setTxList = useSetAtom(txListAtom); @@ -37,14 +49,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const [mintingAccounts, setMintingAccounts] = useState([]); const [accountInfo, setAccountInfo] = useState(null); - const [rewardSharePublicKey, setRewardSharePublicKey] = useState(''); const [mintingKey, setMintingKey] = useState(''); - const [rewardsharekey, setRewardsharekey] = useState(''); const [rewardShares, setRewardShares] = useState([]); const [nodeInfos, setNodeInfos] = useState({}); const [openSnack, setOpenSnack] = useState(false); const [isLoading, setIsLoading] = useState(false); - const { show: showKey, message } = useModal(); + const [adminInfo, setAdminInfo] = useState({}); + const [valueMintingTab, setValueMintingTab] = useState(0); const { isShow: isShowNext, onOk, show: showNext } = useModal(); const theme = useTheme(); const { t } = useTranslation([ @@ -86,9 +97,8 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const getName = async (address) => { try { - const response = await fetch( - `${getBaseApiReact()}/names/primary/${address}` - ); + const url = `${getBaseApiReact()}/names/primary/${address}`; + const response = await fetch(url); const nameData = await response.json(); if (nameData?.name) { setNames((prev) => { @@ -110,6 +120,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }; + function a11yProps(index: number) { + return { + id: `simple-tab-${index}`, + 'aria-controls': `simple-tabpanel-${index}`, + }; + } + const getAccountInfo = async (address: string, others?: boolean) => { try { if (!others) { @@ -161,20 +178,6 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { return address; }; - const handleAccountInfos = (address, field) => { - if (!address) return undefined; - if (accountInfos[address]) return accountInfos[address]?.[field]; - if (accountInfos[address] === null) return undefined; - getAccountInfo(address, true); - return undefined; - }; - - const calculateBlocksRemainingToLevel1 = (address) => { - if (!address) return undefined; - if (!accountInfos[address]) return undefined; - return 7200 - accountInfos[address]?.blocksMinted || 0; - }; - const getNodeInfos = async () => { try { const url = `${getBaseApiReact()}/admin/status`; @@ -206,6 +209,17 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }, []); + const getAdminInfo = async () => { + try { + const url = `${getBaseApiReact()}/admin/info`; + const response = await fetch(url); + const data = await response.json(); + setAdminInfo(data); + } catch (error) { + console.log(error); + } + }; + const addMintingAccount = useCallback(async (val) => { try { setIsLoading(true); @@ -308,6 +322,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const createRewardShare = useCallback(async (publicKey, recipient) => { const fee = await getFee('REWARD_SHARE'); + await show({ message: t('core:message.question.perform_transaction', { action: 'REWARD_SHARE', @@ -315,6 +330,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { }), publishFee: fee.fee + ' QORT', }); + return await new Promise((res, rej) => { window .sendMessage('createRewardShare', { @@ -382,7 +398,6 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const waitUntilRewardShareIsConfirmed = async (timeoutMs = 600000) => { const pollingInterval = 30000; const startTime = Date.now(); - const sleep = (ms) => new Promise((res) => setTimeout(res, ms)); while (Date.now() - startTime < timeoutMs) { @@ -424,9 +439,11 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { await showNext({ message: '', }); + const privateRewardShare = await getRewardSharePrivateKey( accountInfo?.publicKey ); + setShowWaitDialog(false); addMintingAccount(privateRewardShare); } @@ -446,62 +463,6 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }; - const getPublicKeyFromAddress = async (address) => { - const url = `${getBaseApiReact()}/addresses/publickey/${address}`; - const response = await fetch(url); - const data = await response.text(); - return data; - }; - - const checkIfMinterGroup = async (address) => { - const url = `${getBaseApiReact()}/groups/member/${address}`; - const response = await fetch(url); - const data = await response.json(); - return !!data?.find((grp) => grp?.groupId?.toString() === '694'); - }; - - const removeRewardShare = useCallback(async (rewardShare) => { - return await new Promise((res, rej) => { - window - .sendMessage('removeRewardShare', { - rewardShareKeyPairPublicKey: rewardShare.rewardSharePublicKey, - recipient: rewardShare.recipient, - percentageShare: -1, - }) - .then((response) => { - if (!response?.error) { - res(response); - setTxList((prev) => [ - { - ...rewardShare, - ...response, - type: 'remove-rewardShare', - label: t('group:message.success.rewardshare_remove', { - postProcess: 'capitalizeFirstChar', - }), - labelDone: t('group:message.success.rewardshare_remove_label', { - postProcess: 'capitalizeFirstChar', - }), - done: false, - }, - ...prev, - ]); - return; - } - rej({ message: response.error }); - }) - .catch((error) => { - rej({ - message: - error.message || - t('core:message.error.generic', { - postProcess: 'capitalizeFirstChar', - }), - }); - }); - }); - }, []); - useEffect(() => { getNodeInfos(); getMintingAccounts(); @@ -559,20 +520,29 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { return '' + countBlocksString; }; + const StatCard = ({ label, value }: { label: string; value: string }) => ( + + + + {label} + + {value} + + + ); + + const handleChange = (event: SyntheticEvent, newValue: number) => { + setValueMintingTab(newValue); + }; + return ( @@ -590,323 +560,475 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { aria-label={t('core:action.close', { postProcess: 'capitalizeFirstChar', })} + sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, + }} > - - {isLoading && ( - - - - )} - - - {t('auth:account.account_one', { - postProcess: 'capitalizeFirstChar', - })} - : {handleNames(accountInfo?.address)} - - - - {t('core:level', { - postProcess: 'capitalizeFirstChar', - })} - : {accountInfo?.level} - - - - {t('group:message.generic.next_level', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {_levelUpBlocks()} - - - - {t('group:message.generic.node_minting', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {nodeInfos?.isMintingPossible?.toString()} - - - - - - {isPartOfMintingGroup && !accountIsMinting && ( - - { - startMinting(); - }} - disabled={mintingAccounts?.length > 1} + - {t('core:action.start_minting', { - postProcess: 'capitalizeFirstChar', - })} - - - {mintingAccounts?.length > 1 && ( - - {t('group:message.generic.minting_keys_per_node', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - )} - - - - {mintingAccounts?.length > 0 && ( - - {t('group:message.generic.node_minting_account', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - {accountIsMinting && ( - + - - {t('group:message.generic.node_minting_key', { - postProcess: 'capitalizeFirstChar', - })} - - - )} - - - - {mintingAccounts?.map((acct) => ( - - - {t('group:message.generic.minting_account', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {handleNames(acct?.mintingAccount)} - - - { - removeMintingAccount(acct.publicKey, acct); - }} - variant="contained" - > - {t('group:action.remove_minting_account', { - postProcess: 'capitalizeFirstChar', - })} - + }, + fontSize: '1rem', + }} + {...a11yProps(1)} + /> + + - - - - - ))} - - {mintingAccounts?.length > 1 && ( - - {t('group:message.generic.minting_keys_per_node_different', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - - - - {!isPartOfMintingGroup && ( - - + - - {t('group:message.generic.minter_group', { - postProcess: 'capitalizeFirstChar', - })} - + + + + Blockchain Statistics + - - {t('group:message.generic.mintership_app', { - postProcess: 'capitalizeFirstChar', - })} - + + + + + + - + + + Minting Account Details + - + + + + - '&:hover': { - backgroundColor: theme.palette.other.positive, - color: 'black', - opacity: 1, - }, - }} - onClick={() => { - executeEvent('addTab', { - data: { service: 'APP', name: 'q-mintership' }, - }); - executeEvent('open-apps-mode', {}); - setIsOpenMinting(false); - }} - variant="contained" - > - {t('group:action.visit_q_mintership', { - postProcess: 'capitalizeFirstChar', - })} - - - + + + With a 24/7 Minting you will reach level 5 in{' '} + 117.58 days! + + + + + + + Minting Rewards Info + + + + + + + + + {/* */} + + + + + > )} - {showWaitDialog && ( - - + - {isShowNext ? 'Confirmed' : 'Please Wait'} - + {isLoading && ( + + + + )} - - {!isShowNext && ( + - {t('group:message.success.rewardshare_creation', { + {t('auth:account.account_one', { + postProcess: 'capitalizeFirstChar', + })} + : {handleNames(accountInfo?.address)} + + + + {t('core:level', { + postProcess: 'capitalizeFirstChar', + })} + : {accountInfo?.level} + + + + {t('group:message.generic.next_level', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {_levelUpBlocks()} + + + + {t('group:message.generic.node_minting', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {nodeInfos?.isMintingPossible?.toString()} + + + + + + {isPartOfMintingGroup && !accountIsMinting && ( + + { + startMinting(); + }} + disabled={mintingAccounts?.length > 1} + sx={{ + backgroundColor: theme.palette.other.positive, + color: 'black', + fontWeight: 'bold', + opacity: 0.7, + maxWidth: '90%', + width: '200px', + '&:hover': { + backgroundColor: theme.palette.other.positive, + color: 'black', + opacity: 1, + }, + }} + variant="contained" + > + {t('core:action.start_minting', { + postProcess: 'capitalizeFirstChar', + })} + + + {mintingAccounts?.length > 1 && ( + + {t('group:message.generic.minting_keys_per_node', { + postProcess: 'capitalizeFirstChar', + })} + + )} + + )} + + + + {mintingAccounts?.length > 0 && ( + + {t('group:message.generic.node_minting_account', { postProcess: 'capitalizeFirstChar', })} )} - {isShowNext && ( - - {t('group:message.success.rewardshare_confirmed', { - postProcess: 'capitalizeFirstChar', - })} - + + {accountIsMinting && ( + + + {t('group:message.generic.node_minting_key', { + postProcess: 'capitalizeFirstChar', + })} + + + )} + + + + {mintingAccounts?.map((acct) => ( + + + {t('group:message.generic.minting_account', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {handleNames(acct?.mintingAccount)} + + + { + removeMintingAccount(acct.publicKey, acct); + }} + variant="contained" + > + {t('group:action.remove_minting_account', { + postProcess: 'capitalizeFirstChar', + })} + + + + + + + ))} + + {mintingAccounts?.length > 1 && ( + + {t( + 'group:message.generic.minting_keys_per_node_different', + { + postProcess: 'capitalizeFirstChar', + } + )} + + )} + + + + + {!isPartOfMintingGroup && ( + + + + {t('group:message.generic.minter_group', { + postProcess: 'capitalizeFirstChar', + })} + + + + {t('group:message.generic.mintership_app', { + postProcess: 'capitalizeFirstChar', + })} + + + + + { + executeEvent('addTab', { + data: { service: 'APP', name: 'q-mintership' }, + }); + executeEvent('open-apps-mode', {}); + setIsOpenMinting(false); + }} + variant="contained" + > + {t('group:action.visit_q_mintership', { + postProcess: 'capitalizeFirstChar', + })} + + + + )} + + {showWaitDialog && ( + + + {isShowNext + ? t('core:message.generic.confirmed', { + postProcess: 'capitalizeFirstChar', + }) + : t('core:message.generic.wait', { + postProcess: 'capitalizeFirstChar', + })} + + + + {!isShowNext && ( + + {t('group:message.success.rewardshare_creation', { + postProcess: 'capitalizeFirstChar', + })} + + )} + + {isShowNext && ( + + {t('group:message.success.rewardshare_confirmed', { + postProcess: 'capitalizeFirstChar', + })} + + )} + + + + + {t('core:page.next', { + postProcess: 'capitalizeFirstChar', + })} + + + )} - - - - {t('core:page.next', { postProcess: 'capitalizeFirstChar' })} - - - + > )} - + <> @@ -795,11 +795,11 @@ export const NotAuthenticated = ({ {mode === 'list' && ( @@ -894,10 +894,10 @@ export const NotAuthenticated = ({ { const [memberGroups] = useAtom(memberGroupsAtom); - const [txList, setTxList] = useAtom(txListAtom); - const [open, setOpen] = React.useState(false); const intervals = useRef({}); const theme = useTheme(); + const { t } = useTranslation([ + 'auth', + 'core', + 'group', + 'question', + 'tutorial', + ]); const handleClick = () => { setOpen((prev) => !prev); @@ -199,7 +205,11 @@ export const TaskManager = ({ getUserInfo }) => { )} - + {open ? : } diff --git a/src/components/Theme/ThemeSelector.tsx b/src/components/Theme/ThemeSelector.tsx index 18fa5cc..d7b7c39 100644 --- a/src/components/Theme/ThemeSelector.tsx +++ b/src/components/Theme/ThemeSelector.tsx @@ -19,26 +19,15 @@ const ThemeSelector = () => { return ( - - - {themeMode === 'dark' ? : } - - + {themeMode === 'dark' ? : } + ); }; diff --git a/src/components/Tutorials/Tutorials.tsx b/src/components/Tutorials/Tutorials.tsx index 4075b67..6b41586 100644 --- a/src/components/Tutorials/Tutorials.tsx +++ b/src/components/Tutorials/Tutorials.tsx @@ -41,15 +41,12 @@ export const Tutorials = () => { > setMultiNumber(value)} - aria-label={t('core:basic_tabs_example', { - postProcess: 'capitalizeFirstChar', - })} > {openTutorialModal?.multi?.map((item, index) => { return ( @@ -75,10 +72,11 @@ export const Tutorials = () => { })} onClick={handleClose} sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, position: 'absolute', right: 8, top: 8, - color: theme.palette.text.primary, }} > @@ -123,10 +121,11 @@ export const Tutorials = () => { })} onClick={handleClose} sx={{ + bgcolor: theme.palette.background.default, + color: theme.palette.text.primary, position: 'absolute', right: 8, top: 8, - color: theme.palette.text.primary, }} > diff --git a/src/components/UserLookup.tsx/UserLookup.tsx b/src/components/UserLookup.tsx/UserLookup.tsx index b58d616..bab5370 100644 --- a/src/components/UserLookup.tsx/UserLookup.tsx +++ b/src/components/UserLookup.tsx/UserLookup.tsx @@ -18,6 +18,8 @@ import { CircularProgress, useTheme, Autocomplete, + IconButton, + ClickAwayListener, } from '@mui/material'; import { getAddressInfo, @@ -28,7 +30,7 @@ import { getNameInfo } from '../Group/Group'; import AccountCircleIcon from '@mui/icons-material/AccountCircle'; import { Spacer } from '../../common/Spacer'; import { formatTimestamp } from '../../utils/time'; -import CloseFullscreenIcon from '@mui/icons-material/CloseFullscreen'; +import CloseIcon from '@mui/icons-material/Close'; import { executeEvent, subscribeToEvent, @@ -160,489 +162,481 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => { return ( - - - { - if (!newValue) { - setNameOrAddress(''); - return; - } - setNameOrAddress(newValue); - lookupFunc(newValue); - }} - inputValue={inputValue} - onInputChange={(event, newInputValue) => { - setInputValue(newInputValue); - }} - id="controllable-states-demo" - loading={isLoading} - noOptionsText={t('core:option_no', { - postProcess: 'capitalizeFirstChar', - })} - options={options} - sx={{ width: 300 }} - renderInput={(params) => ( - { - if (e.key === 'Enter' && nameOrAddress) { - lookupFunc(inputValue); - } - }} - /> - )} - /> - - { - onClose(); - }} - > - - - - + - {!isLoadingUser && errorMessage && ( - + { + if (!newValue) { + setNameOrAddress(''); + return; + } + setNameOrAddress(newValue); + lookupFunc(newValue); }} - > - {errorMessage} - - )} - - {isLoadingUser && ( - { + setInputValue(newInputValue); }} - > - - - )} + id="controllable-states-demo" + loading={isLoading} + noOptionsText={t('core:option_no', { + postProcess: 'capitalizeFirstChar', + })} + options={options} + sx={{ flexGrow: 1 }} + renderInput={(params) => ( + { + if (e.key === 'Enter' && nameOrAddress) { + lookupFunc(inputValue); + } + }} + /> + )} + /> + - {!isLoadingUser && addressInfo && ( - <> - + + {!isLoadingUser && errorMessage && ( - {errorMessage} + + )} + + {isLoadingUser && ( + + + + )} + + {!isLoadingUser && addressInfo && ( + <> + + - - {addressInfo?.name ?? - t('auth:message.error.name_not_registered', { - postProcess: 'capitalizeFirstChar', - })} - + + {addressInfo?.name ?? + t('auth:message.error.name_not_registered', { + postProcess: 'capitalizeFirstChar', + })} + - + - - {addressInfo?.name ? ( - + + {addressInfo?.name ? ( + + + + ) : ( - - ) : ( - - )} - + )} + - + - - {t('core:level', { postProcess: 'capitalizeFirstChar' })}{' '} - {addressInfo?.level} - - - - - + {t('core:level', { postProcess: 'capitalizeFirstChar' })}{' '} + {addressInfo?.level} + + + + + + + {t('auth:address', { + postProcess: 'capitalizeFirstChar', + })} + + + + + {t('auth:action.copy_address', { + postProcess: 'capitalizeFirstChar', + })} + + } + placement="bottom" + arrow + sx={{ fontSize: '24' }} + slotProps={{ + tooltip: { + sx: { + color: theme.palette.text.primary, + backgroundColor: theme.palette.background.default, + }, + }, + arrow: { + sx: { + color: theme.palette.text.primary, + }, + }, + }} + > + { + navigator.clipboard.writeText(addressInfo?.address); + }} + > + + {addressInfo?.address} + + + + + + - {t('auth:address', { + {t('core:balance', { postProcess: 'capitalizeFirstChar', })} + + {addressInfo?.balance} - - {t('auth:action.copy_address', { - postProcess: 'capitalizeFirstChar', - })} - - } - placement="bottom" - arrow - sx={{ fontSize: '24' }} - slotProps={{ - tooltip: { - sx: { - color: theme.palette.text.primary, - backgroundColor: theme.palette.background.default, - }, - }, - arrow: { - sx: { - color: theme.palette.text.primary, - }, - }, + + + { + executeEvent('openPaymentInternal', { + address: addressInfo?.address, + name: addressInfo?.name, + }); }} > - { - navigator.clipboard.writeText(addressInfo?.address); - }} - > - - {addressInfo?.address} - - - - + {t('core:action.send_qort', { + postProcess: 'capitalizeFirstChar', + })} + + + + > + )} + + + {isLoadingPayments && ( + + + + )} + + {!isLoadingPayments && addressInfo && ( + + + {t('core:message.generic.most_recent_payment', { + count: 20, + postProcess: 'capitalizeFirstChar', + })} + + + + + {!isLoadingPayments && payments?.length === 0 && ( - {t('core:balance', { + {t('core:message.generic.no_payments', { postProcess: 'capitalizeFirstChar', })} - - {addressInfo?.balance} + )} - - - { - executeEvent('openPaymentInternal', { - address: addressInfo?.address, - name: addressInfo?.name, - }); - }} - > - {t('core:action.send_qort', { - postProcess: 'capitalizeFirstChar', - })} - - - - > - )} - - - - {isLoadingPayments && ( - - - - )} - - {!isLoadingPayments && addressInfo && ( - - - {t('core:message.generic.most_recent_payment', { - count: 20, - postProcess: 'capitalizeFirstChar', - })} - - - - - {!isLoadingPayments && payments?.length === 0 && ( - - - {t('core:message.generic.no_payments', { - postProcess: 'capitalizeFirstChar', - })} - - - )} - - - - - - {t('core:sender', { postProcess: 'capitalizeFirstChar' })} - - - {t('core:receiver', { - postProcess: 'capitalizeFirstChar', - })} - - - {t('core:amount', { postProcess: 'capitalizeFirstChar' })} - - - {t('core:time.time', { - postProcess: 'capitalizeFirstChar', - })} - - - - - - {payments.map((payment, index) => ( - + + + - - {t('auth:action.copy_address', { - postProcess: 'capitalizeFirstChar', - })} - - } - placement="bottom" - arrow - sx={{ fontSize: '24' }} - slotProps={{ - tooltip: { - sx: { - color: theme.palette.text.primary, - backgroundColor: - theme.palette.background.default, - }, - }, - arrow: { - sx: { - color: theme.palette.text.primary, - }, - }, - }} - > - { - navigator.clipboard.writeText( - payment?.creatorAddress - ); - }} - > - {formatAddress(payment?.creatorAddress)} - - + {t('core:sender', { + postProcess: 'capitalizeFirstChar', + })} - - - {t('auth:action.copy_address', { - postProcess: 'capitalizeFirstChar', - })} - - } - placement="bottom" - arrow - sx={{ fontSize: '24' }} - slotProps={{ - tooltip: { - sx: { - color: theme.palette.text.primary, - backgroundColor: - theme.palette.background.default, - }, - }, - arrow: { - sx: { - color: theme.palette.text.primary, - }, - }, - }} - > - { - navigator.clipboard.writeText(payment?.recipient); - }} - > - {formatAddress(payment?.recipient)} - - + {t('core:receiver', { + postProcess: 'capitalizeFirstChar', + })} - - {payment?.amount} - - {formatTimestamp(payment?.timestamp)} + {t('core:amount', { + postProcess: 'capitalizeFirstChar', + })} + + + {t('core:time.time', { + postProcess: 'capitalizeFirstChar', + })} - ))} - - - - )} + + + + {payments.map((payment, index) => ( + + + + {t('auth:action.copy_address', { + postProcess: 'capitalizeFirstChar', + })} + + } + placement="bottom" + arrow + sx={{ fontSize: '24' }} + slotProps={{ + tooltip: { + sx: { + color: theme.palette.text.primary, + backgroundColor: + theme.palette.background.default, + }, + }, + arrow: { + sx: { + color: theme.palette.text.primary, + }, + }, + }} + > + { + navigator.clipboard.writeText( + payment?.creatorAddress + ); + }} + > + {formatAddress(payment?.creatorAddress)} + + + + + + + {t('auth:action.copy_address', { + postProcess: 'capitalizeFirstChar', + })} + + } + placement="bottom" + arrow + sx={{ fontSize: '24' }} + slotProps={{ + tooltip: { + sx: { + color: theme.palette.text.primary, + backgroundColor: + theme.palette.background.default, + }, + }, + arrow: { + sx: { + color: theme.palette.text.primary, + }, + }, + }} + > + { + navigator.clipboard.writeText( + payment?.recipient + ); + }} + > + {formatAddress(payment?.recipient)} + + + + + {payment?.amount} + + + {formatTimestamp(payment?.timestamp)} + + + ))} + + + + )} + - + ); }; diff --git a/src/components/Wallets.tsx b/src/components/Wallets.tsx index aef22b3..c058677 100644 --- a/src/components/Wallets.tsx +++ b/src/components/Wallets.tsx @@ -207,7 +207,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { if (isLoading) return null; return ( - + {wallets?.length === 0 || !wallets ? ( <> @@ -469,7 +469,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { - + ); }; @@ -562,6 +562,8 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => { { e.stopPropagation(); diff --git a/src/i18n/locales/de/core.json b/src/i18n/locales/de/core.json index 8ae5243..a4f9ba1 100644 --- a/src/i18n/locales/de/core.json +++ b/src/i18n/locales/de/core.json @@ -116,7 +116,6 @@ "apps_official": "offizielle Apps", "attachment": "Anhang", "balance": "Gleichgewicht:", - "basic_tabs_example": "Basic Tabs Beispiel", "category": "Kategorie", "category_other": "Kategorien", "chat": "Chat", @@ -256,6 +255,7 @@ "no_pinned_changes": "Sie haben derzeit keine Änderungen an Ihren angestellten Apps", "no_results": "Keine Ergebnisse", "one_app_per_name": "Hinweis: Derzeit ist pro Namen nur eine App und Website zulässig.", + "ongoing_transactions": "laufende Transaktionen", "opened": "geöffnet", "overwrite_qdn": "überschreibt zu QDN", "password_confirm": "Bitte bestätigen Sie ein Passwort", @@ -280,8 +280,9 @@ "settings": "Sie verwenden den Export-/Import -Weg zum Speichern von Einstellungen.", "space_for_admins": "Entschuldigung, dieser Raum gilt nur für Administratoren.", "unread_messages": "ungelesene Nachrichten unten", - "unsaved_changes": "Sie haben nicht gespeicherte Änderungen an Ihren angestellten Apps. Speichern Sie sie bei QDN.", - "updating": "Aktualisierung" + "unsaved_changes": "sie haben nicht gespeicherte Änderungen an Ihren angestellten Apps. Speichern Sie sie bei QDN.", + "updating": "aktualisierung", + "wait": "bitte warten" }, "message": "Nachricht", "promotion_text": "Promotionstext", diff --git a/src/i18n/locales/en/core.json b/src/i18n/locales/en/core.json index a5ca275..e5667ae 100644 --- a/src/i18n/locales/en/core.json +++ b/src/i18n/locales/en/core.json @@ -116,7 +116,6 @@ "apps_official": "official Apps", "attachment": "attachment", "balance": "balance:", - "basic_tabs_example": "basic tabs example", "category": "category", "category_other": "categories", "chat": "chat", @@ -220,6 +219,7 @@ "benefits_qort": "benefits of having QORT", "building": "building", "building_app": "building app", + "confirmed": "confirmed", "created_by": "created by {{ owner }}", "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", @@ -256,6 +256,7 @@ "no_pinned_changes": "you currently do not have any changes to your pinned apps", "no_results": "no results", "one_app_per_name": "note: Currently, only one App and Website is allowed per Name.", + "ongoing_transactions": "ongoing transactions", "opened": "opened", "overwrite_qdn": "overwrite to QDN", "password_confirm": "please confirm a password", @@ -281,7 +282,8 @@ "space_for_admins": "sorry, this space is only for Admins.", "unread_messages": "unread messages below", "unsaved_changes": "you have unsaved changes to your pinned apps. Save them to QDN.", - "updating": "updating" + "updating": "updating", + "wait": "please wait" }, "message": "message", "promotion_text": "promotion text", diff --git a/src/i18n/locales/es/core.json b/src/i18n/locales/es/core.json index c87b5ab..fa73deb 100644 --- a/src/i18n/locales/es/core.json +++ b/src/i18n/locales/es/core.json @@ -116,7 +116,6 @@ "apps_official": "aplicaciones oficiales", "attachment": "adjunto", "balance": "balance:", - "basic_tabs_example": "Ejemplo de pestañas básicas", "category": "categoría", "category_other": "categorías", "chat": "charlar", @@ -219,7 +218,8 @@ "avatar_size": "{{ size }} KB max. for GIFS", "benefits_qort": "beneficios de tener Qort", "building": "edificio", - "building_app": "Aplicación de construcción", + "building_app": "aplicación de construcción", + "confirmed": "confirmado", "created_by": "created by {{ owner }}", "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", @@ -256,6 +256,7 @@ "no_pinned_changes": "Actualmente no tiene ningún cambio en sus aplicaciones fijadas", "no_results": "Sin resultados", "one_app_per_name": "Nota: Actualmente, solo se permite una aplicación y un sitio web por nombre.", + "ongoing_transactions": "transacciones en curso", "opened": "abierto", "overwrite_qdn": "sobrescribir a QDN", "password_confirm": "Confirme una contraseña", @@ -277,11 +278,12 @@ "select_image": "Seleccione una imagen para un logotipo", "select_zip": "Seleccione el archivo .zip que contenga contenido estático:", "sending": "envío...", - "settings": "Está utilizando la forma de exportación/importación de la configuración de ahorro.", - "space_for_admins": "Lo siento, este espacio es solo para administradores.", - "unread_messages": "Mensajes no leídos a continuación", - "unsaved_changes": "Tiene cambios no salvos en sus aplicaciones fijadas. Guárdelos a QDN.", - "updating": "actualización" + "settings": "está utilizando la forma de exportación/importación de la configuración de ahorro.", + "space_for_admins": "lo siento, este espacio es solo para administradores.", + "unread_messages": "mensajes no leídos a continuación", + "unsaved_changes": "tiene cambios no salvos en sus aplicaciones fijadas. Guárdelos a QDN.", + "updating": "actualización", + "wait": "espera por favor" }, "message": "mensaje", "promotion_text": "texto de promoción", @@ -393,4 +395,4 @@ }, "website": "sitio web", "welcome": "bienvenido" -} \ No newline at end of file +} diff --git a/src/i18n/locales/fr/core.json b/src/i18n/locales/fr/core.json index da8ad93..a89df31 100644 --- a/src/i18n/locales/fr/core.json +++ b/src/i18n/locales/fr/core.json @@ -116,7 +116,6 @@ "apps_official": "Applications officielles", "attachment": "pièce jointe", "balance": "équilibre:", - "basic_tabs_example": "Exemple de base des onglets", "category": "catégorie", "category_other": "catégories", "chat": "chat", @@ -220,6 +219,7 @@ "benefits_qort": "Avantages d'avoir QORT", "building": "bâtiment", "building_app": "application de construction", + "confirmed": "confirmé", "created_by": "created by {{ owner }}", "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", @@ -256,6 +256,7 @@ "no_pinned_changes": "Vous n'avez actuellement aucune modification à vos applications épinglées", "no_results": "Aucun résultat", "one_app_per_name": "Remarque: Actuellement, une seule application et site Web est autorisée par nom.", + "ongoing_transactions": "transactions en cours", "opened": "ouvert", "overwrite_qdn": "Écraser à QDN", "password_confirm": "Veuillez confirmer un mot de passe", @@ -277,11 +278,12 @@ "select_image": "Veuillez sélectionner une image pour un logo", "select_zip": "Sélectionnez un fichier .zip contenant du contenu statique:", "sending": "envoi...", - "settings": "Vous utilisez la manière d'exportation / l'importation d'enregistrer les paramètres.", - "space_for_admins": "Désolé, cet espace est uniquement pour les administrateurs.", - "unread_messages": "Messages non lus ci-dessous", - "unsaved_changes": "Vous avez des modifications non enregistrées à vos applications épinglées. Enregistrez-les sur QDN.", - "updating": "mise à jour" + "settings": "vous utilisez la manière d'exportation / importation d'enregistrement des paramètres.", + "space_for_admins": "désolé, cet espace est uniquement pour les administrateurs.", + "unread_messages": "messages non lus ci-dessous", + "unsaved_changes": "vous avez des modifications non enregistrées à vos applications épinglées. Enregistrez-les sur QDN.", + "updating": "mise à jour", + "wait": "attendez s'il vous plaît" }, "message": "message", "promotion_text": "texte de promotion", @@ -393,4 +395,4 @@ }, "website": "site web", "welcome": "accueillir" -} \ No newline at end of file +} diff --git a/src/i18n/locales/it/core.json b/src/i18n/locales/it/core.json index 10e1706..a620917 100644 --- a/src/i18n/locales/it/core.json +++ b/src/i18n/locales/it/core.json @@ -116,7 +116,6 @@ "apps_official": "app ufficiali", "attachment": "allegato", "balance": "bilancio:", - "basic_tabs_example": "esempio di schede base", "category": "categoria", "category_other": "categorie", "chat": "chat", @@ -220,6 +219,7 @@ "benefits_qort": "vantaggi di avere QORT", "building": "creazione", "building_app": "creazione app", + "confirmed": "confermato", "created_by": "creato da {{ owner }}", "buy_order_request": "l'applicazione {{hostname}} sta effettuando {{count}} ordine d'acquisto.", "buy_order_request_other": "l'applicazione {{hostname}} sta effettuando {{count}} ordini d'acquisto.", @@ -255,6 +255,7 @@ "no_pinned_changes": "per ora non ci sono modifiche alle app bloccate", "no_results": "nessun risultato", "one_app_per_name": "nota: per adesso sono consentiti solo un'app e un sito Web per nome.", + "ongoing_transactions": "transazioni in corso", "opened": "aperto", "overwrite_qdn": "sovrascrivi a QDN", "password_confirm": "si prega di confermare una password", @@ -280,7 +281,8 @@ "space_for_admins": "mi dispiace, questo spazio è solo per gli amministratori.", "unread_messages": "messaggi non letti qua sotto", "unsaved_changes": "hai cambiato modifiche alle app bloccate. Salvali su QDN.", - "updating": "aggiornamento" + "updating": "aggiornamento", + "wait": "attendere per favore" }, "message": "messaggio", "promotion_text": "testo di promozione", diff --git a/src/i18n/locales/it/group.json b/src/i18n/locales/it/group.json index 8047970..fa504c8 100644 --- a/src/i18n/locales/it/group.json +++ b/src/i18n/locales/it/group.json @@ -71,7 +71,7 @@ "block_delay_maximum": "ritardo massimo del blocco per le approvazioni delle transazioni di gruppo", "closed_group": "questo è un gruppo chiuso/privato, quindi occorre attendere fino a quando un amministratore accetta la richiesta", "descrypt_wallet": "decrittazione del wallet ...", - "encryption_key": "la prima chiave di crittografia comune del gruppo è in fase di creazione. Si prega di attendere qualche minuto per essere recuperato dalla rete. Controllo ogni 2 minuti ...", + "encryption_key": "la prima chiave di crittografia comune del gruppo è in fase di creazione. Si prega di attendere qualche minuto per il suo recupero dalla rete. Controllo ogni 2 minuti ...", "group_announcement": "annunci di gruppo", "group_approval_threshold": "soglia di approvazione del gruppo (numero / percentuale di amministratori che devono approvare una transazione)", "group_encrypted": "gruppo crittografato", diff --git a/src/i18n/locales/ja/core.json b/src/i18n/locales/ja/core.json index 7c478dd..0e2bdbe 100644 --- a/src/i18n/locales/ja/core.json +++ b/src/i18n/locales/ja/core.json @@ -116,7 +116,6 @@ "apps_official": "公式アプリ", "attachment": "添付ファイル", "balance": "バランス:", - "basic_tabs_example": "基本的なタブの例", "category": "カテゴリ", "category_other": "カテゴリ", "chat": "チャット", @@ -220,6 +219,7 @@ "benefits_qort": "QORTを持つことの利点", "building": "建物", "building_app": "ビルディングアプリ", + "confirmed": "確認済み", "created_by": "created by {{ owner }}", "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", @@ -256,6 +256,7 @@ "no_pinned_changes": "現在、ピン留めアプリに変更がありません", "no_results": "結果はありません", "one_app_per_name": "注:現在、名前ごとに1つのアプリとWebサイトのみが許可されています。", + "ongoing_transactions": "継続中の取引", "opened": "オープン", "overwrite_qdn": "QDNに上書きします", "password_confirm": "パスワードを確認してください", @@ -281,7 +282,8 @@ "space_for_admins": "申し訳ありませんが、このスペースは管理者専用です。", "unread_messages": "以下の未読メッセージ", "unsaved_changes": "ピン留めアプリに救われていない変更があります。それらをqdnに保存します。", - "updating": "更新" + "updating": "更新", + "wait": "お待ちください" }, "message": "メッセージ", "promotion_text": "プロモーションテキスト", @@ -393,4 +395,4 @@ }, "website": "Webサイト", "welcome": "いらっしゃいませ" -} \ No newline at end of file +} diff --git a/src/i18n/locales/ru/core.json b/src/i18n/locales/ru/core.json index 43f3943..33cf0db 100644 --- a/src/i18n/locales/ru/core.json +++ b/src/i18n/locales/ru/core.json @@ -116,7 +116,6 @@ "apps_official": "официальные приложения", "attachment": "вложение", "balance": "баланс:", - "basic_tabs_example": "Основные вкладки", "category": "категория", "category_other": "категории", "chat": "чат", @@ -220,6 +219,7 @@ "benefits_qort": "Преимущества наличия qort", "building": "здание", "building_app": "строительство приложения", + "confirmed": "подтвержденный", "created_by": "created by {{ owner }}", "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", @@ -256,6 +256,7 @@ "no_pinned_changes": "В настоящее время у вас нет никаких изменений в ваших приложениях", "no_results": "Нет результатов", "one_app_per_name": "ПРИМЕЧАНИЕ. В настоящее время только одно приложение и веб -сайт разрешены для имени.", + "ongoing_transactions": "текущие операции", "opened": "открыл", "overwrite_qdn": "перезаписать в QDN", "password_confirm": "Пожалуйста, подтвердите пароль", @@ -281,7 +282,8 @@ "space_for_admins": "Извините, это пространство только для администраторов.", "unread_messages": "Непрочитанные сообщения ниже", "unsaved_changes": "У вас есть неспасенные изменения в ваши приложения. Сохраните их в QDN.", - "updating": "обновление" + "updating": "обновление", + "wait": "пожалуйста, подождите" }, "message": "сообщение", "promotion_text": "Текст продвижения", diff --git a/src/i18n/locales/zh/core.json b/src/i18n/locales/zh/core.json index d5f8c8d..6ed13ee 100644 --- a/src/i18n/locales/zh/core.json +++ b/src/i18n/locales/zh/core.json @@ -116,7 +116,6 @@ "apps_official": "官方应用程序", "attachment": "依恋", "balance": "平衡:", - "basic_tabs_example": "基本标签示例", "category": "类别", "category_other": "类别", "chat": "聊天", @@ -220,9 +219,10 @@ "benefits_qort": "Qort的好处", "building": "建筑", "building_app": "建筑应用", - "created_by": "created by {{ owner }}", - "buy_order_request": "the Application {{hostname}} is requesting {{count}} buy order", - "buy_order_request_other": "the Application {{hostname}} is requesting {{count}} buy orders", + "confirmed": "已确认", + "created_by": "创建人 {{ owner }}", + "buy_order_request": "应用程序{{hostname}}正在请求{{count}}购买订单", + "buy_order_request_other": "应用程序{{hostname}}正在请求{{count}}购买订单", "devmode_local_node": "请使用您的本地节点进行开发模式!注销并使用本地节点。", "downloading": "下载", "downloading_decrypting_app": "下载和解密私人应用程序。", @@ -256,6 +256,7 @@ "no_pinned_changes": "您目前对固定应用程序没有任何更改", "no_results": "没有结果", "one_app_per_name": "注意:目前,每个名称只允许一个应用程序和网站。", + "ongoing_transactions": "正在进行的交易", "opened": "打开", "overwrite_qdn": "覆盖为QDN", "password_confirm": "请确认密码", @@ -281,7 +282,8 @@ "space_for_admins": "抱歉,这个空间仅适用于管理员。", "unread_messages": "下面未读消息", "unsaved_changes": "您对固定应用程序有未保存的更改。将它们保存到QDN。", - "updating": "更新" + "updating": "更新", + "wait": "请稍等" }, "message": "信息", "promotion_text": "促销文本", @@ -393,4 +395,4 @@ }, "website": "网站", "welcome": "欢迎" -} \ No newline at end of file +} diff --git a/src/qortal/get.ts b/src/qortal/get.ts index 93bcb63..80acbb2 100644 --- a/src/qortal/get.ts +++ b/src/qortal/get.ts @@ -2463,7 +2463,6 @@ export const saveFile = async (data, sender, isFromExtension, snackMethods) => { const filename = data.filename; const blob = data.blob; - const mimeType = blob.type || data.mimeType; const resPermission = await getUserPermission( { text1: i18n.t('question:download_file', { @@ -2474,17 +2473,6 @@ export const saveFile = async (data, sender, isFromExtension, snackMethods) => { isFromExtension ); const { accepted } = resPermission; - if (!accepted) throw new Error('User declined to save file'); // TODO translate - showSaveFilePicker( - { - filename, - mimeType, - blob, - }, - snackMethods - ); - - return true; if (accepted) { const mimeType = blob.type || data.mimeType; diff --git a/src/styles/theme-dark.ts b/src/styles/theme-dark.ts index a519cd6..e64654c 100644 --- a/src/styles/theme-dark.ts +++ b/src/styles/theme-dark.ts @@ -16,7 +16,7 @@ export const darkThemeOptions: ThemeOptions = { background: { default: 'rgb(49, 51, 56)', surface: 'rgb(58, 60, 65)', - paper: 'rgb(62, 64, 68)', + paper: 'rgb(77, 80, 85)', }, text: { primary: 'rgb(255, 255, 255)',