mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
Add translations
This commit is contained in:
@@ -63,6 +63,7 @@ export const DownloadWallet = ({
|
||||
wallet,
|
||||
qortAddress: rawWallet.address0,
|
||||
});
|
||||
|
||||
return {
|
||||
wallet,
|
||||
qortAddress: rawWallet.address0,
|
||||
|
@@ -3,10 +3,8 @@ import Box from '@mui/material/Box';
|
||||
import { HubsIcon } from '../../assets/Icons/HubsIcon';
|
||||
import { MessagingIcon } from '../../assets/Icons/MessagingIcon';
|
||||
import AppIcon from '../../assets/svgs/AppIcon.svg';
|
||||
|
||||
import { HomeIcon } from '../../assets/Icons/HomeIcon';
|
||||
import { Save } from '../Save/Save';
|
||||
|
||||
import { enabledDevModeAtom } from '../../atoms/global';
|
||||
import { useAtom } from 'jotai';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import { useState } from 'react';
|
||||
import { ButtonBase, Typography, useTheme } from '@mui/material';
|
||||
import Box from '@mui/material/Box';
|
||||
import { NotificationIcon2 } from '../../assets/Icons/NotificationIcon2';
|
||||
@@ -81,18 +81,18 @@ export const DesktopHeader = ({
|
||||
setGroupSection,
|
||||
isPrivate,
|
||||
}) => {
|
||||
const [value, setValue] = React.useState(0);
|
||||
const [value, setValue] = useState(0);
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
display: 'flex',
|
||||
height: '70px', // Footer height
|
||||
zIndex: 1,
|
||||
justifyContent: 'space-between',
|
||||
padding: '10px',
|
||||
width: '100%',
|
||||
zIndex: 1,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
@@ -126,11 +126,12 @@ export const DesktopHeader = ({
|
||||
: selectedGroup?.groupName}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
alignItems: 'center',
|
||||
display: 'flex',
|
||||
gap: '20px',
|
||||
alignItems: 'center',
|
||||
visibility: selectedGroup?.groupId === '0' ? 'hidden' : 'visibile',
|
||||
}}
|
||||
>
|
||||
@@ -219,6 +220,7 @@ export const DesktopHeader = ({
|
||||
/>
|
||||
</IconWrapper>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
onClick={() => {
|
||||
setOpenManageMembers(true);
|
||||
@@ -226,17 +228,18 @@ export const DesktopHeader = ({
|
||||
>
|
||||
<IconWrapper
|
||||
color={theme.palette.text.secondary}
|
||||
customHeight="55px"
|
||||
label="Members"
|
||||
selected={false}
|
||||
customHeight="55px"
|
||||
>
|
||||
<MembersIcon
|
||||
color={theme.palette.text.secondary}
|
||||
height={25}
|
||||
width={20}
|
||||
color={theme.palette.text.secondary}
|
||||
/>
|
||||
</IconWrapper>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
onClick={() => {
|
||||
setGroupSection('adminSpace');
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import Box from '@mui/material/Box';
|
||||
import Drawer from '@mui/material/Drawer';
|
||||
|
||||
export const DrawerComponent = ({ open, setOpen, children }) => {
|
||||
const toggleDrawer = (newOpen: boolean) => () => {
|
||||
setOpen(newOpen);
|
||||
|
@@ -40,6 +40,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
}}
|
||||
src={qTradeLogo}
|
||||
/>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: '1rem',
|
||||
@@ -66,6 +67,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
color: theme.palette.text.primary,
|
||||
}}
|
||||
/>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: '1rem',
|
||||
@@ -94,6 +96,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
color: theme.palette.text.primary,
|
||||
}}
|
||||
/>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: '1rem',
|
||||
@@ -102,6 +105,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
{t('tutorial:initial.general_chat', { postProcess: 'capitalize' })}
|
||||
</Typography>
|
||||
</ButtonBase>
|
||||
|
||||
<ButtonBase
|
||||
sx={{
|
||||
'&:hover': { backgroundColor: theme.palette.background.paper },
|
||||
@@ -119,6 +123,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
||||
color: theme.palette.text.primary,
|
||||
}}
|
||||
/>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: '1rem',
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import { JoinGroup } from './JoinGroup';
|
||||
|
||||
export const GlobalActions = () => {
|
||||
|
@@ -68,6 +68,7 @@ export const JoinGroup = () => {
|
||||
try {
|
||||
const groupId = group.groupId;
|
||||
const fee = await getFee('JOIN_GROUP');
|
||||
|
||||
await show({
|
||||
message: t('group:question.perform_transaction', {
|
||||
action: 'JOIN_GROUP',
|
||||
@@ -75,7 +76,9 @@ export const JoinGroup = () => {
|
||||
}),
|
||||
publishFee: fee.fee + ' QORT',
|
||||
});
|
||||
|
||||
setIsLoadingJoinGroup(true);
|
||||
|
||||
await new Promise((res, rej) => {
|
||||
window
|
||||
.sendMessage('joinGroup', {
|
||||
@@ -85,8 +88,9 @@ export const JoinGroup = () => {
|
||||
if (!response?.error) {
|
||||
setInfoSnack({
|
||||
type: 'success',
|
||||
message:
|
||||
'Successfully requested to join group. It may take a couple of minutes for the changes to propagate',
|
||||
message: t('group:message.success.group_join', {
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
});
|
||||
|
||||
if (isOpen) {
|
||||
@@ -94,8 +98,14 @@ export const JoinGroup = () => {
|
||||
{
|
||||
...response,
|
||||
type: 'joined-group',
|
||||
label: `Joined Group ${group?.groupName}: awaiting confirmation`,
|
||||
labelDone: `Joined Group ${group?.groupName}: success!`,
|
||||
label: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_label', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
},
|
||||
@@ -106,15 +116,20 @@ export const JoinGroup = () => {
|
||||
{
|
||||
...response,
|
||||
type: 'joined-group-request',
|
||||
label: `Requested to join Group ${group?.groupName}: awaiting confirmation`,
|
||||
labelDone: `Requested to join Group ${group?.groupName}: success!`,
|
||||
label: t('group:message.success.group_join_request', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_outcome', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
},
|
||||
...prev,
|
||||
]);
|
||||
}
|
||||
|
||||
setOpenSnack(true);
|
||||
res(response);
|
||||
return;
|
||||
@@ -130,7 +145,9 @@ export const JoinGroup = () => {
|
||||
.catch((error) => {
|
||||
setInfoSnack({
|
||||
type: 'error',
|
||||
message: error.message || 'An error occurred',
|
||||
message:
|
||||
error.message ||
|
||||
t('core:message.error.generic', { postProcess: 'capitalize' }),
|
||||
});
|
||||
setOpenSnack(true);
|
||||
rej(error);
|
||||
@@ -138,10 +155,12 @@ export const JoinGroup = () => {
|
||||
});
|
||||
setIsLoadingJoinGroup(false);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
setIsLoadingJoinGroup(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Dialog
|
||||
@@ -153,32 +172,31 @@ export const JoinGroup = () => {
|
||||
{!groupInfo && (
|
||||
<Box
|
||||
sx={{
|
||||
width: '325px',
|
||||
height: '150px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
display: 'flex',
|
||||
height: '150px',
|
||||
justifyContent: 'center',
|
||||
width: '325px',
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
<CircularProgress
|
||||
size={25}
|
||||
sx={{
|
||||
color: theme.palette.text.primary,
|
||||
}}
|
||||
/>{' '}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
<Box
|
||||
sx={{
|
||||
width: '325px',
|
||||
height: 'auto',
|
||||
maxHeight: '400px',
|
||||
alignItems: 'center',
|
||||
display: !groupInfo ? 'none' : 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
gap: '10px',
|
||||
height: 'auto',
|
||||
maxHeight: '400px',
|
||||
padding: '10px',
|
||||
width: '325px',
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
@@ -187,16 +205,20 @@ export const JoinGroup = () => {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Group name: {` ${groupInfo?.groupName}`}
|
||||
{t('group:group.name', { postProcess: 'capitalize' })}:{' '}
|
||||
{` ${groupInfo?.groupName}`}
|
||||
</Typography>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: '15px',
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Number of members: {` ${groupInfo?.memberCount}`}
|
||||
{t('group:group.member_number', { postProcess: 'capitalize' })}:{' '}
|
||||
{` ${groupInfo?.memberCount}`}
|
||||
</Typography>
|
||||
|
||||
{groupInfo?.description && (
|
||||
<Typography
|
||||
sx={{
|
||||
@@ -214,7 +236,9 @@ export const JoinGroup = () => {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
*You are already in this group!
|
||||
{t('group:message.generic.already_in_group', {
|
||||
postProcess: 'capitalize',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
{!isInGroup && groupInfo?.isOpen === false && (
|
||||
@@ -224,12 +248,14 @@ export const JoinGroup = () => {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
*This is a closed/private group, so you will need to wait until
|
||||
an admin accepts your request
|
||||
{t('group:message.generic.closed_group', {
|
||||
postProcess: 'capitalize',
|
||||
})}
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<ButtonBase
|
||||
onClick={() => {
|
||||
@@ -249,7 +275,9 @@ export const JoinGroup = () => {
|
||||
opacity: isInGroup ? 0.1 : 1,
|
||||
}}
|
||||
>
|
||||
Join
|
||||
{t('core:action.join', {
|
||||
postProcess: 'capitalize',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
</ButtonBase>
|
||||
|
||||
@@ -262,7 +290,9 @@ export const JoinGroup = () => {
|
||||
}}
|
||||
onClick={() => setIsOpen(false)}
|
||||
>
|
||||
Close
|
||||
{t('core:action.close', {
|
||||
postProcess: 'capitalize',
|
||||
})}
|
||||
</CustomButtonAccept>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@@ -276,14 +306,14 @@ export const JoinGroup = () => {
|
||||
{isLoadingJoinGroup && (
|
||||
<Box
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
alignItems: 'center',
|
||||
bottom: 0,
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
left: 0,
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
top: 0,
|
||||
}}
|
||||
>
|
||||
<FidgetSpinner
|
||||
|
@@ -331,6 +331,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
postProcess: 'capitalize',
|
||||
})}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
placeholder={t('group:group.name', {
|
||||
postProcess: 'capitalize',
|
||||
@@ -339,6 +340,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
|
@@ -158,8 +158,14 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
||||
{
|
||||
...response,
|
||||
type: 'joined-group-request',
|
||||
label: `Requested to join Group ${group?.groupName}: awaiting confirmation`,
|
||||
labelDone: `Requested to join Group ${group?.groupName}: success!`,
|
||||
label: t('group:message.success.group_join_request', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
labelDone: t('group:message.success.group_join_outcome', {
|
||||
group_name: group?.groupName,
|
||||
postProcess: 'capitalize',
|
||||
}),
|
||||
done: false,
|
||||
groupId,
|
||||
},
|
||||
|
@@ -168,6 +168,7 @@ export const QortPrice = () => {
|
||||
)}
|
||||
</Box>
|
||||
</Tooltip>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
@@ -198,6 +199,7 @@ export const QortPrice = () => {
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
<Tooltip
|
||||
title={
|
||||
<span style={{ fontSize: '14px', fontWeight: 700 }}>
|
||||
|
Reference in New Issue
Block a user