mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-05-20 16:46:58 +00:00
Merge pull request #53 from nbenaglia/feature/i18n-embeds-other
i18n: Add translations for Embeds & others
This commit is contained in:
commit
a49e82277e
@ -22,6 +22,6 @@ Many additional details and a fully featured wiki will be created over time. Rea
|
|||||||
|
|
||||||
Qortal-Hub supports internationalization (i18n) using [i18next](https://www.i18next.com/), allowing seamless translation of UI text into multiple languages.
|
Qortal-Hub supports internationalization (i18n) using [i18next](https://www.i18next.com/), allowing seamless translation of UI text into multiple languages.
|
||||||
The setup includes modularized translation files, language detection, context and runtime language switching.
|
The setup includes modularized translation files, language detection, context and runtime language switching.
|
||||||
Files with translation are in `public/locales/<locale>` folder.
|
Files with translation are in `src/i18n/locales/<locale>` folder.
|
||||||
|
|
||||||
See [guidelines](./docs/i18n_languages.md).
|
See [guidelines](./docs/i18n_languages.md).
|
||||||
|
154
src/App.tsx
154
src/App.tsx
@ -91,8 +91,8 @@ import { DrawerComponent } from './components/Drawer/Drawer';
|
|||||||
import { AddressQRCode } from './components/AddressQRCode';
|
import { AddressQRCode } from './components/AddressQRCode';
|
||||||
import { Settings } from './components/Group/Settings';
|
import { Settings } from './components/Group/Settings';
|
||||||
import { MainAvatar } from './components/MainAvatar';
|
import { MainAvatar } from './components/MainAvatar';
|
||||||
import { useRetrieveDataLocalStorage } from './useRetrieveDataLocalStorage';
|
import { useRetrieveDataLocalStorage } from './hooks/useRetrieveDataLocalStorage.tsx';
|
||||||
import { useQortalGetSaveSettings } from './useQortalGetSaveSettings';
|
import { useQortalGetSaveSettings } from './hooks/useQortalGetSaveSettings.tsx';
|
||||||
import {
|
import {
|
||||||
canSaveSettingToQdnAtom,
|
canSaveSettingToQdnAtom,
|
||||||
enabledDevModeAtom,
|
enabledDevModeAtom,
|
||||||
@ -116,18 +116,18 @@ import {
|
|||||||
timestampEnterDataAtom,
|
timestampEnterDataAtom,
|
||||||
txListAtom,
|
txListAtom,
|
||||||
} from './atoms/global';
|
} from './atoms/global';
|
||||||
import { NotAuthenticated } from './ExtStates/NotAuthenticated';
|
import { NotAuthenticated } from './components/NotAuthenticated.tsx';
|
||||||
import { handleGetFileFromIndexedDB } from './utils/indexedDB';
|
import { handleGetFileFromIndexedDB } from './utils/indexedDB';
|
||||||
import { Wallets } from './Wallets';
|
import { Wallets } from './Wallets';
|
||||||
import { useFetchResources } from './common/useFetchResources';
|
import { useFetchResources } from './common/useFetchResources';
|
||||||
import { Tutorials } from './components/Tutorials/Tutorials';
|
import { Tutorials } from './components/Tutorials/Tutorials';
|
||||||
import { useHandleTutorials } from './components/Tutorials/useHandleTutorials';
|
import { useHandleTutorials } from './hooks/useHandleTutorials.tsx';
|
||||||
import { useHandleUserInfo } from './components/Group/useHandleUserInfo';
|
import { useHandleUserInfo } from './hooks/useHandleUserInfo.tsx';
|
||||||
import { Minting } from './components/Minting/Minting';
|
import { Minting } from './components/Minting/Minting';
|
||||||
import { isRunningGateway } from './qortalRequests';
|
import { isRunningGateway } from './qortalRequests';
|
||||||
import { QMailStatus } from './components/QMailStatus';
|
import { QMailStatus } from './components/QMailStatus';
|
||||||
import { GlobalActions } from './components/GlobalActions/GlobalActions';
|
import { GlobalActions } from './components/GlobalActions/GlobalActions';
|
||||||
import { useBlockedAddresses } from './components/Group/useBlockUsers';
|
import { useBlockedAddresses } from './hooks/useBlockUsers.tsx';
|
||||||
import { WalletIcon } from './assets/Icons/WalletIcon';
|
import { WalletIcon } from './assets/Icons/WalletIcon';
|
||||||
import { UserLookup } from './components/UserLookup.tsx/UserLookup';
|
import { UserLookup } from './components/UserLookup.tsx/UserLookup';
|
||||||
import { RegisterName } from './components/RegisterName';
|
import { RegisterName } from './components/RegisterName';
|
||||||
@ -678,7 +678,7 @@ function App() {
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
t('auth:message.error.field_not_found_json', {
|
t('auth:message.error.field_not_found_json', {
|
||||||
field: field,
|
field: field,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -977,7 +977,7 @@ function App() {
|
|||||||
if (!walletToBeDownloadedPassword) {
|
if (!walletToBeDownloadedPassword) {
|
||||||
setWalletToBeDownloadedError(
|
setWalletToBeDownloadedError(
|
||||||
t('core:message.generic.password_enter', {
|
t('core:message.generic.password_enter', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -985,7 +985,7 @@ function App() {
|
|||||||
if (!walletToBeDownloadedPasswordConfirm) {
|
if (!walletToBeDownloadedPasswordConfirm) {
|
||||||
setWalletToBeDownloadedError(
|
setWalletToBeDownloadedError(
|
||||||
t('core:message.generic.password_confirm', {
|
t('core:message.generic.password_confirm', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -995,7 +995,7 @@ function App() {
|
|||||||
) {
|
) {
|
||||||
setWalletToBeDownloadedError(
|
setWalletToBeDownloadedError(
|
||||||
t('core:message.error.password_not_matching', {
|
t('core:message.error.password_not_matching', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -1062,7 +1062,7 @@ function App() {
|
|||||||
if (extState === 'authenticated') {
|
if (extState === 'authenticated') {
|
||||||
await showUnsavedChanges({
|
await showUnsavedChanges({
|
||||||
message: t('core:message.question.logout', {
|
message: t('core:message.question.logout', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1199,7 +1199,7 @@ function App() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
setWalletToBeDecryptedError(
|
setWalletToBeDecryptedError(
|
||||||
t('core:message.error.password_wrong', {
|
t('core:message.error.password_wrong', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1536,7 +1536,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.transfer_qort', {
|
{t('core:action.transfer_qort', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<AddressQRCode targetAddress={rawWallet?.address0} />
|
<AddressQRCode targetAddress={rawWallet?.address0} />
|
||||||
@ -1560,7 +1560,7 @@ function App() {
|
|||||||
executeEvent('open-apps-mode', {});
|
executeEvent('open-apps-mode', {});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.get_qort', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.get_qort', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</TextP>
|
</TextP>
|
||||||
</AuthenticatedContainerInnerLeft>
|
</AuthenticatedContainerInnerLeft>
|
||||||
);
|
);
|
||||||
@ -1854,7 +1854,7 @@ function App() {
|
|||||||
if (res)
|
if (res)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.generic.no_minting_details', {
|
t('core:message.generic.no_minting_details', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
setIsOpenMinting(true);
|
setIsOpenMinting(true);
|
||||||
@ -2231,7 +2231,7 @@ function App() {
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.fee_qort', {
|
{t('core:message.generic.fee_qort', {
|
||||||
message: messageQortalRequest?.fee,
|
message: messageQortalRequest?.fee,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -2292,7 +2292,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => onOkQortalRequest('accepted')}
|
onClick={() => onOkQortalRequest('accepted')}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.accept', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<CustomButton
|
<CustomButton
|
||||||
sx={{
|
sx={{
|
||||||
@ -2300,7 +2302,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => onCancelQortalRequest()}
|
onClick={() => onCancelQortalRequest()}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.decline', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -2399,7 +2403,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => confirmBuyOrder(false)}
|
onClick={() => confirmBuyOrder(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.accept', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
<CustomButton
|
<CustomButton
|
||||||
@ -2408,7 +2414,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => confirmBuyOrder(true)}
|
onClick={() => confirmBuyOrder(true)}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.decline', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -2485,7 +2493,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => confirmPayment(false)}
|
onClick={() => confirmPayment(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.accept', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
<CustomButton
|
<CustomButton
|
||||||
@ -2494,7 +2504,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
onClick={() => confirmPayment(true)}
|
onClick={() => confirmPayment(true)}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.decline', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -2550,7 +2562,9 @@ function App() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.accept', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<CustomButton
|
<CustomButton
|
||||||
sx={{
|
sx={{
|
||||||
@ -2564,7 +2578,9 @@ function App() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.decline', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
@ -2612,7 +2628,7 @@ function App() {
|
|||||||
<CustomButton {...getRootProps()}>
|
<CustomButton {...getRootProps()}>
|
||||||
<input {...getInputProps()} />
|
<input {...getInputProps()} />
|
||||||
{t('auth:action.authenticate', {
|
{t('auth:action.authenticate', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
@ -2624,7 +2640,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.create_account', {
|
{t('auth:action.create_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</>
|
</>
|
||||||
@ -2729,7 +2745,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.authenticate', {
|
{t('auth:action.authenticate', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
</Box>
|
</Box>
|
||||||
@ -2738,7 +2754,9 @@ function App() {
|
|||||||
|
|
||||||
<>
|
<>
|
||||||
<CustomLabel htmlFor="standard-adornment-password">
|
<CustomLabel htmlFor="standard-adornment-password">
|
||||||
{t('auth:wallet.password', { postProcess: 'capitalizeFirst' })}
|
{t('auth:wallet.password', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
@ -2763,8 +2781,10 @@ function App() {
|
|||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:node.using', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('auth:node.using', {
|
||||||
{currentNode?.url}
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
: {currentNode?.url}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@ -2777,7 +2797,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:node.using_public', {
|
{t('auth:node.using_public', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
@ -2787,7 +2807,7 @@ function App() {
|
|||||||
|
|
||||||
<CustomButton onClick={authenticateWallet}>
|
<CustomButton onClick={authenticateWallet}>
|
||||||
{t('auth:action.authenticate', {
|
{t('auth:action.authenticate', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
@ -2864,7 +2884,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.setup_qortal_account', {
|
{t('auth:action.setup_qortal_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -2921,7 +2941,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.view_seedphrase', {
|
{t('auth:tips.view_seedphrase', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -2958,7 +2978,9 @@ function App() {
|
|||||||
setCreationStep(2);
|
setCreationStep(2);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.next', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -2994,7 +3016,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:seed_your', {
|
{t('auth:seed_your', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -3018,7 +3040,7 @@ function App() {
|
|||||||
onClick={exportSeedphrase}
|
onClick={exportSeedphrase}
|
||||||
>
|
>
|
||||||
{t('auth:action.export_seedphrase', {
|
{t('auth:action.export_seedphrase', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -3030,7 +3052,7 @@ function App() {
|
|||||||
onClick={() => setShowSeed(false)}
|
onClick={() => setShowSeed(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
@ -3048,7 +3070,7 @@ function App() {
|
|||||||
|
|
||||||
<CustomLabel htmlFor="standard-adornment-password">
|
<CustomLabel htmlFor="standard-adornment-password">
|
||||||
{t('auth:wallet.password', {
|
{t('auth:wallet.password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
@ -3066,7 +3088,7 @@ function App() {
|
|||||||
|
|
||||||
<CustomLabel htmlFor="standard-adornment-password">
|
<CustomLabel htmlFor="standard-adornment-password">
|
||||||
{t('auth:wallet.password_confirmation', {
|
{t('auth:wallet.password_confirmation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
@ -3083,7 +3105,7 @@ function App() {
|
|||||||
|
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
{t('auth:message.generic.no_minimum_length', {
|
{t('auth:message.generic.no_minimum_length', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -3091,7 +3113,7 @@ function App() {
|
|||||||
|
|
||||||
<CustomButton onClick={createAccountFunc}>
|
<CustomButton onClick={createAccountFunc}>
|
||||||
{t('auth:action.create_account', {
|
{t('auth:action.create_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -3115,7 +3137,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:message.generic.congrats_setup', {
|
{t('auth:message.generic.congrats_setup', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3133,7 +3155,7 @@ function App() {
|
|||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:tips.safe_place', {
|
{t('auth:tips.safe_place', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -3146,13 +3168,13 @@ function App() {
|
|||||||
returnToMain();
|
returnToMain();
|
||||||
await showInfo({
|
await showInfo({
|
||||||
message: t('auth:tips.wallet_secure', {
|
message: t('auth:tips.wallet_secure', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.backup_account', {
|
{t('core:action.backup_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</>
|
</>
|
||||||
@ -3186,7 +3208,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.success.transfer', {
|
{t('core:message.success.transfer', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3199,7 +3221,9 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CustomButton>
|
<CustomButton>
|
||||||
{t('core:action.continue', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.continue', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Box>
|
</Box>
|
||||||
@ -3220,7 +3244,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.success.transfer', {
|
{t('core:message.success.transfer', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3231,7 +3255,9 @@ function App() {
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.continue', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.continue', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -3251,7 +3277,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.success.order_submitted', {
|
{t('core:message.success.order_submitted', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3262,7 +3288,7 @@ function App() {
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -3312,7 +3338,7 @@ function App() {
|
|||||||
{message?.paymentFee && (
|
{message?.paymentFee && (
|
||||||
<DialogContentText id="alert-dialog-description2">
|
<DialogContentText id="alert-dialog-description2">
|
||||||
{t('core:fee.payment', {
|
{t('core:fee.payment', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {message.paymentFee}
|
: {message.paymentFee}
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
@ -3320,7 +3346,7 @@ function App() {
|
|||||||
{message?.publishFee && (
|
{message?.publishFee && (
|
||||||
<DialogContentText id="alert-dialog-description2">
|
<DialogContentText id="alert-dialog-description2">
|
||||||
{t('core:fee.publish', {
|
{t('core:fee.publish', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {message.publishFee}
|
: {message.publishFee}
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
@ -3345,7 +3371,7 @@ function App() {
|
|||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.accept', {
|
{t('core:action.accept', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -3365,7 +3391,7 @@ function App() {
|
|||||||
onClick={onCancel}
|
onClick={onCancel}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', {
|
{t('core:action.decline', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
@ -3391,7 +3417,7 @@ function App() {
|
|||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={onOkInfo} autoFocus>
|
<Button variant="contained" onClick={onOkInfo} autoFocus>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
@ -3417,7 +3443,7 @@ function App() {
|
|||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={onCancelUnsavedChanges}>
|
<Button variant="contained" onClick={onCancelUnsavedChanges}>
|
||||||
{t('core:action.cancel', {
|
{t('core:action.cancel', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -3427,7 +3453,7 @@ function App() {
|
|||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.continue_logout', {
|
{t('core:action.continue_logout', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
@ -3627,7 +3653,7 @@ function App() {
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.fee_qort', {
|
{t('core:message.generic.fee_qort', {
|
||||||
message: messageQortalRequestExtension?.appFee,
|
message: messageQortalRequestExtension?.appFee,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3650,7 +3676,7 @@ function App() {
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.foreign_fee', {
|
{t('core:message.generic.foreign_fee', {
|
||||||
message: messageQortalRequestExtension?.foreignFee,
|
message: messageQortalRequestExtension?.foreignFee,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
|
|
||||||
@ -3721,7 +3747,7 @@ function App() {
|
|||||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<Typography sx={{ fontSize: '14px' }}>
|
<Typography sx={{ fontSize: '14px' }}>
|
||||||
{t('core:message.success.request_read', {
|
{t('core:message.success.request_read', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<PriorityHighIcon color="warning" />
|
<PriorityHighIcon color="warning" />
|
||||||
@ -3772,7 +3798,7 @@ function App() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', {
|
{t('core:action.accept', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButtonAccept>
|
</CustomButtonAccept>
|
||||||
|
|
||||||
@ -3785,7 +3811,7 @@ function App() {
|
|||||||
onClick={() => onCancelQortalRequestExtension()}
|
onClick={() => onCancelQortalRequestExtension()}
|
||||||
>
|
>
|
||||||
{t('core:action.decline', {
|
{t('core:action.decline', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButtonAccept>
|
</CustomButtonAccept>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -30,7 +30,7 @@ import { decryptStoredWalletFromSeedPhrase } from './utils/decryptWallet';
|
|||||||
import { crypto } from './constants/decryptWallet';
|
import { crypto } from './constants/decryptWallet';
|
||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import { PasswordField } from './components';
|
import { PasswordField } from './components';
|
||||||
import { HtmlTooltip } from './ExtStates/NotAuthenticated';
|
import { HtmlTooltip } from './components/NotAuthenticated';
|
||||||
import { MyContext } from './App';
|
import { MyContext } from './App';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
const [isOpenSeedModal, setIsOpenSeedModal] = useState(false);
|
const [isOpenSeedModal, setIsOpenSeedModal] = useState(false);
|
||||||
const [isLoadingEncryptSeed, setIsLoadingEncryptSeed] = useState(false);
|
const [isLoadingEncryptSeed, setIsLoadingEncryptSeed] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const { isShow, onCancel, onOk, show } = useModal();
|
const { isShow, onCancel, onOk, show } = useModal();
|
||||||
|
|
||||||
const { getRootProps, getInputProps } = useDropzone({
|
const { getRootProps, getInputProps } = useDropzone({
|
||||||
@ -152,7 +152,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
} else {
|
} else {
|
||||||
setSeedError(
|
setSeedError(
|
||||||
t('auth:message.error.account_creation', {
|
t('auth:message.error.account_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
setSeedError(
|
setSeedError(
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('auth:message.error.account_creation', {
|
t('auth:message.error.account_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
@ -202,7 +202,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.no_account', {
|
{t('auth:message.generic.no_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.your_accounts', {
|
{t('auth:message.generic.your_accounts', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:account.selected', {
|
{t('auth:account.selected', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
:
|
:
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -283,7 +283,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.existing_account', {
|
{t('auth:tips.existing_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@ -297,7 +297,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.add.seed_phrase', {
|
{t('auth:action.add.seed_phrase', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
@ -313,7 +313,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.additional_wallet', {
|
{t('auth:tips.additional_wallet', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@ -327,7 +327,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
>
|
>
|
||||||
<input {...getInputProps()} />
|
<input {...getInputProps()} />
|
||||||
{t('auth:action.add.account', {
|
{t('auth:action.add.account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
@ -345,7 +345,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('auth:message.generic.type_seed', {
|
{t('auth:message.generic.type_seed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:name', {
|
{t('core:name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
@ -371,7 +371,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('auth:seed', {
|
{t('auth:seed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@ -389,7 +389,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('auth:action.choose_password', {
|
{t('auth:action.choose_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@ -417,7 +417,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
@ -431,7 +431,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.add', {
|
{t('core:action.add', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<Typography
|
<Typography
|
||||||
@ -453,7 +453,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
const [note, setNote] = useState('');
|
const [note, setNote] = useState('');
|
||||||
const [isEdit, setIsEdit] = useState(false);
|
const [isEdit, setIsEdit] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (wallet?.name) {
|
if (wallet?.name) {
|
||||||
@ -520,7 +520,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.login', {
|
{t('core:action.login', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -550,7 +550,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:name', {
|
{t('core:name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
@ -566,7 +566,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('auth:note', {
|
{t('auth:note', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
@ -597,7 +597,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
onClick={() => setIsEdit(false)}
|
onClick={() => setIsEdit(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@ -615,7 +615,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
onClick={() => updateWalletItem(idx, null)}
|
onClick={() => updateWalletItem(idx, null)}
|
||||||
>
|
>
|
||||||
{t('core:action.remove', {
|
{t('core:action.remove', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@ -640,7 +640,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.save', {
|
{t('core:action.save', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -63,7 +63,7 @@ import {
|
|||||||
publishGroupEncryptedResource,
|
publishGroupEncryptedResource,
|
||||||
publishOnQDN,
|
publishOnQDN,
|
||||||
} from './backgroundFunctions/encryption';
|
} from './backgroundFunctions/encryption';
|
||||||
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from './constants/codes';
|
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from './constants/constants';
|
||||||
import Base58 from './deps/Base58';
|
import Base58 from './deps/Base58';
|
||||||
import { encryptSingle } from './qdn/encryption/group-encryption';
|
import { encryptSingle } from './qdn/encryption/group-encryption';
|
||||||
import { _createPoll, _voteOnPoll } from './qortalRequests/get';
|
import { _createPoll, _voteOnPoll } from './qortalRequests/get';
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
publishOnQDN,
|
publishOnQDN,
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
} from './backgroundFunctions/encryption';
|
} from './backgroundFunctions/encryption';
|
||||||
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from './constants/codes';
|
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from './constants/constants';
|
||||||
import Base58 from './deps/Base58';
|
import Base58 from './deps/Base58';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import {
|
import {
|
||||||
@ -29,7 +29,7 @@ import { RequestQueueWithPromise } from './utils/queue/queue';
|
|||||||
import { validateAddress } from './utils/validateAddress';
|
import { validateAddress } from './utils/validateAddress';
|
||||||
import { Sha256 } from 'asmcrypto.js';
|
import { Sha256 } from 'asmcrypto.js';
|
||||||
import { TradeBotRespondMultipleRequest } from './transactions/TradeBotRespondMultipleRequest';
|
import { TradeBotRespondMultipleRequest } from './transactions/TradeBotRespondMultipleRequest';
|
||||||
import { RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS } from './constants/resourceTypes';
|
import { RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS } from './constants/constants';
|
||||||
import {
|
import {
|
||||||
addDataPublishesCase,
|
addDataPublishesCase,
|
||||||
addEnteredQmailTimestampCase,
|
addEnteredQmailTimestampCase,
|
||||||
|
@ -37,7 +37,7 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const isSelectedAppPinned = !!sortablePinnedApps?.find(
|
const isSelectedAppPinned = !!sortablePinnedApps?.find(
|
||||||
(item) => item?.name === app?.name && item?.service === app?.service
|
(item) => item?.name === app?.name && item?.service === app?.service
|
||||||
@ -174,10 +174,10 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
<AppDownloadButtonText>
|
<AppDownloadButtonText>
|
||||||
{isSelectedAppPinned
|
{isSelectedAppPinned
|
||||||
? t('core:action.unpin_from_dashboard', {
|
? t('core:action.unpin_from_dashboard', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.pin_from_dashboard', {
|
: t('core:action.pin_from_dashboard', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppDownloadButtonText>
|
</AppDownloadButtonText>
|
||||||
</AppDownloadButton>
|
</AppDownloadButton>
|
||||||
@ -200,10 +200,10 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
<AppDownloadButtonText>
|
<AppDownloadButtonText>
|
||||||
{isInstalled
|
{isInstalled
|
||||||
? t('core:action.open', {
|
? t('core:action.open', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.download', {
|
: t('core:action.download', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppDownloadButtonText>
|
</AppDownloadButtonText>
|
||||||
</AppDownloadButton>
|
</AppDownloadButton>
|
||||||
@ -229,7 +229,7 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
<AppsCategoryInfoSub>
|
<AppsCategoryInfoSub>
|
||||||
<AppsCategoryInfoLabel>
|
<AppsCategoryInfoLabel>
|
||||||
{t('core:category', {
|
{t('core:category', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
:
|
:
|
||||||
</AppsCategoryInfoLabel>
|
</AppsCategoryInfoLabel>
|
||||||
@ -239,7 +239,7 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
<AppsCategoryInfoValue>
|
<AppsCategoryInfoValue>
|
||||||
{app?.metadata?.categoryName ||
|
{app?.metadata?.categoryName ||
|
||||||
t('core:none', {
|
t('core:none', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppsCategoryInfoValue>
|
</AppsCategoryInfoValue>
|
||||||
</AppsCategoryInfoSub>
|
</AppsCategoryInfoSub>
|
||||||
@ -249,7 +249,7 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
|
|
||||||
<AppInfoAppName>
|
<AppInfoAppName>
|
||||||
{t('core:q_apps.about', {
|
{t('core:q_apps.about', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppInfoAppName>
|
</AppInfoAppName>
|
||||||
</AppsWidthLimiter>
|
</AppsWidthLimiter>
|
||||||
@ -259,7 +259,7 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
<AppsInfoDescription>
|
<AppsInfoDescription>
|
||||||
{app?.metadata?.description ||
|
{app?.metadata?.description ||
|
||||||
t('core:message.generic.no_description', {
|
t('core:message.generic.no_description', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppsInfoDescription>
|
</AppsInfoDescription>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -42,7 +42,7 @@ export const AppInfoSnippet = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppInfoSnippetContainer
|
<AppInfoSnippetContainer
|
||||||
@ -173,10 +173,10 @@ export const AppInfoSnippet = ({
|
|||||||
<AppDownloadButtonText>
|
<AppDownloadButtonText>
|
||||||
{isSelectedAppPinned
|
{isSelectedAppPinned
|
||||||
? t('core:action.unpin', {
|
? t('core:action.unpin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.pin', {
|
: t('core:action.pin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppDownloadButtonText>
|
</AppDownloadButtonText>
|
||||||
</AppDownloadButton>
|
</AppDownloadButton>
|
||||||
@ -196,10 +196,10 @@ export const AppInfoSnippet = ({
|
|||||||
<AppDownloadButtonText>
|
<AppDownloadButtonText>
|
||||||
{isInstalled
|
{isInstalled
|
||||||
? t('core:action.open', {
|
? t('core:action.open', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.download', {
|
: t('core:action.download', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppDownloadButtonText>
|
</AppDownloadButtonText>
|
||||||
</AppDownloadButton>
|
</AppDownloadButton>
|
||||||
|
@ -67,7 +67,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
const [file, setFile] = useState(null);
|
const [file, setFile] = useState(null);
|
||||||
const { show } = useContext(MyContext);
|
const { show } = useContext(MyContext);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [tag1, setTag1] = useState('');
|
const [tag1, setTag1] = useState('');
|
||||||
const [tag2, setTag2] = useState('');
|
const [tag2, setTag2] = useState('');
|
||||||
const [tag3, setTag3] = useState('');
|
const [tag3, setTag3] = useState('');
|
||||||
@ -96,7 +96,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
t('core:message.error.file_too_large', {
|
t('core:message.error.file_too_large', {
|
||||||
filename: file.name,
|
filename: file.name,
|
||||||
size: maxFileSize / (1024 * 1024),
|
size: maxFileSize / (1024 * 1024),
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
const missingFieldsString = missingFields.join(', ');
|
const missingFieldsString = missingFields.join(', ');
|
||||||
const errorMsg = t('core:message.error.missing_fields', {
|
const errorMsg = t('core:message.error.missing_fields', {
|
||||||
fields: missingFieldsString,
|
fields: missingFieldsString,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
@ -179,13 +179,13 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.publish_app', {
|
message: t('core:message.question.publish_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
setIsLoading(
|
setIsLoading(
|
||||||
t('core:message.generic.publishing', {
|
t('core:message.generic.publishing', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
const fileBase64 = await fileToBase64(file);
|
const fileBase64 = await fileToBase64(file);
|
||||||
@ -215,7 +215,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -223,7 +223,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('core:message.success.published', {
|
message: t('core:message.success.published', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -246,7 +246,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.publish_app', {
|
t('core:message.error.publish_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -270,7 +270,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
>
|
>
|
||||||
<AppLibrarySubTitle>
|
<AppLibrarySubTitle>
|
||||||
{t('core:action.create_apps', {
|
{t('core:action.create_apps', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
!
|
!
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
@ -279,7 +279,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<PublishQAppInfo>
|
<PublishQAppInfo>
|
||||||
{t('core:message.generic.one_app_per_name', {
|
{t('core:message.generic.one_app_per_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</PublishQAppInfo>
|
</PublishQAppInfo>
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:name_app', {
|
{t('core:name_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.select_name_app', {
|
{t('core:action.select_name_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</em>
|
</em>
|
||||||
{/* This is the placeholder item */}
|
{/* This is the placeholder item */}
|
||||||
@ -318,7 +318,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:app_service_type', {
|
{t('core:app_service_type', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -335,18 +335,18 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.select_app_type', {
|
{t('core:action.select_app_type', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</em>
|
</em>
|
||||||
</CustomMenuItem>
|
</CustomMenuItem>
|
||||||
<CustomMenuItem value={'APP'}>
|
<CustomMenuItem value={'APP'}>
|
||||||
{t('core:app', {
|
{t('core:app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomMenuItem>
|
</CustomMenuItem>
|
||||||
<CustomMenuItem value={'WEBSITE'}>
|
<CustomMenuItem value={'WEBSITE'}>
|
||||||
{t('core:website', {
|
{t('core:website', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomMenuItem>
|
</CustomMenuItem>
|
||||||
</CustomSelect>
|
</CustomSelect>
|
||||||
@ -355,7 +355,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:title', {
|
{t('core:title', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:description', {
|
{t('core:description', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:category', {
|
{t('core:category', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.select_category', {
|
{t('core:action.select_category', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</em>
|
</em>
|
||||||
</CustomMenuItem>
|
</CustomMenuItem>
|
||||||
@ -443,7 +443,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
<InputLabel sx={{ fontSize: '14px', marginBottom: '2px' }}>
|
||||||
{t('core:tags', {
|
{t('core:tags', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
|
|
||||||
<PublishQAppInfo>
|
<PublishQAppInfo>
|
||||||
{t('core:message.generic.select_zip', {
|
{t('core:message.generic.select_zip', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</PublishQAppInfo>
|
</PublishQAppInfo>
|
||||||
|
|
||||||
@ -560,7 +560,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
<PublishQAppChoseFile {...getRootProps()}>
|
<PublishQAppChoseFile {...getRootProps()}>
|
||||||
{' '}
|
{' '}
|
||||||
<input {...getInputProps()} />
|
<input {...getInputProps()} />
|
||||||
{t('core:action.choose_file', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.choose_file', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</PublishQAppChoseFile>
|
</PublishQAppChoseFile>
|
||||||
|
|
||||||
<Spacer height="35px" />
|
<Spacer height="35px" />
|
||||||
@ -571,7 +571,7 @@ export const AppPublish = ({ names, categories }) => {
|
|||||||
}}
|
}}
|
||||||
onClick={publishApp}
|
onClick={publishApp}
|
||||||
>
|
>
|
||||||
{t('core:action.publish', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.publish', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</PublishQAppCTAButton>
|
</PublishQAppCTAButton>
|
||||||
</AppsWidthLimiter>
|
</AppsWidthLimiter>
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
const [openSnack, setOpenSnack] = useState(false);
|
const [openSnack, setOpenSnack] = useState(false);
|
||||||
const [infoSnack, setInfoSnack] = useState(null);
|
const [infoSnack, setInfoSnack] = useState(null);
|
||||||
const hasCalledRef = useRef(false);
|
const hasCalledRef = useRef(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const getRating = useCallback(async (name, service) => {
|
const getRating = useCallback(async (name, service) => {
|
||||||
try {
|
try {
|
||||||
@ -106,7 +106,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
if (!myName)
|
if (!myName)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.generic.name_rate', {
|
t('core:message.generic.name_rate', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (!app?.name) return;
|
if (!app?.name) return;
|
||||||
@ -115,7 +115,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.rate_app', {
|
message: t('core:message.question.rate_app', {
|
||||||
rate: newValue,
|
rate: newValue,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -126,7 +126,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
const pollDescription = t('core:message.error.generic', {
|
const pollDescription = t('core:message.error.generic', {
|
||||||
name: app.name,
|
name: app.name,
|
||||||
service: app.service,
|
service: app.service,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
@ -150,7 +150,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('core:message.success.rated_app', {
|
message: t('core:message.success.rated_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -169,7 +169,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
if (isNaN(optionIndex) || optionIndex === -1)
|
if (isNaN(optionIndex) || optionIndex === -1)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.rating_option', {
|
t('core:message.error.rating_option', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
@ -191,7 +191,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('core:message.success.rated_app', {
|
message: t('core:message.success.rated_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -209,7 +209,7 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.unable_rate', {
|
t('core:message.error.unable_rate', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
|
@ -3,7 +3,7 @@ import { Box } from '@mui/material';
|
|||||||
import { getBaseApiReact } from '../../App';
|
import { getBaseApiReact } from '../../App';
|
||||||
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
|
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
|
||||||
import { useFrame } from 'react-frame-component';
|
import { useFrame } from 'react-frame-component';
|
||||||
import { useQortalMessageListener } from './useQortalMessageListener';
|
import { useQortalMessageListener } from '../../hooks/useQortalMessageListener';
|
||||||
import { useThemeContext } from '../Theme/ThemeContext';
|
import { useThemeContext } from '../Theme/ThemeContext';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ export const AppViewer = forwardRef(
|
|||||||
reject(
|
reject(
|
||||||
new Error(
|
new Error(
|
||||||
t('core:message.error.navigation_timeout', {
|
t('core:message.error.navigation_timeout', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -50,7 +50,7 @@ export const AppsDesktop = ({
|
|||||||
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
||||||
const { showTutorial } = useContext(MyContext);
|
const { showTutorial } = useContext(MyContext);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const myApp = useMemo(() => {
|
const myApp = useMemo(() => {
|
||||||
return availableQapps.find(
|
return availableQapps.find(
|
||||||
@ -381,7 +381,12 @@ export const AppsDesktop = ({
|
|||||||
setDesktopViewMode('apps');
|
setDesktopViewMode('apps');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconWrapper label="Apps" disableWidth>
|
<IconWrapper
|
||||||
|
label={t('core:app_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
disableWidth
|
||||||
|
>
|
||||||
<AppsIcon height={30} color={theme.palette.text.primary} />
|
<AppsIcon height={30} color={theme.palette.text.primary} />
|
||||||
</IconWrapper>
|
</IconWrapper>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -399,7 +404,9 @@ export const AppsDesktop = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Chat"
|
label={t('core:chat', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<MessagingIconFilled
|
<MessagingIconFilled
|
||||||
@ -428,7 +435,9 @@ export const AppsDesktop = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Dev"
|
label={t('core:dev', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<AppsIcon
|
<AppsIcon
|
||||||
|
@ -17,6 +17,7 @@ import { AppsIcon } from '../../assets/Icons/AppsIcon';
|
|||||||
import { IconWrapper } from '../Desktop/DesktopFooter';
|
import { IconWrapper } from '../Desktop/DesktopFooter';
|
||||||
import { CoreSyncStatus } from '../CoreSyncStatus';
|
import { CoreSyncStatus } from '../CoreSyncStatus';
|
||||||
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
|
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const uid = new ShortUniqueId({ length: 8 });
|
const uid = new ShortUniqueId({ length: 8 });
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ export const AppsDevMode = ({
|
|||||||
const [categories, setCategories] = useState([]);
|
const [categories, setCategories] = useState([]);
|
||||||
const iframeRefs = useRef({});
|
const iframeRefs = useRef({});
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -108,7 +110,6 @@ export const AppsDevMode = ({
|
|||||||
setTabs((prev) => [...prev, newTab]);
|
setTabs((prev) => [...prev, newTab]);
|
||||||
setSelectedTab(newTab);
|
setSelectedTab(newTab);
|
||||||
setMode('viewer');
|
setMode('viewer');
|
||||||
|
|
||||||
setIsNewTabWindow(false);
|
setIsNewTabWindow(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -215,25 +216,25 @@ export const AppsDevMode = ({
|
|||||||
<AppsParent
|
<AppsParent
|
||||||
sx={{
|
sx={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
position: !show && 'fixed',
|
|
||||||
left: !show && '-200vw',
|
left: !show && '-200vw',
|
||||||
|
position: !show && 'fixed',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: '60px',
|
|
||||||
flexDirection: 'column',
|
|
||||||
height: '100vh',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
gap: '25px',
|
gap: '25px',
|
||||||
|
height: '100vh',
|
||||||
|
width: '60px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
sx={{
|
sx={{
|
||||||
width: '70px',
|
|
||||||
height: '70px',
|
height: '70px',
|
||||||
paddingTop: '23px',
|
paddingTop: '23px',
|
||||||
|
width: '70px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CoreSyncStatus />
|
<CoreSyncStatus />
|
||||||
@ -241,8 +242,8 @@ export const AppsDevMode = ({
|
|||||||
|
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
sx={{
|
sx={{
|
||||||
width: '60px',
|
|
||||||
height: '60px',
|
height: '60px',
|
||||||
|
width: '60px',
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
goToHome();
|
goToHome();
|
||||||
@ -267,7 +268,9 @@ export const AppsDevMode = ({
|
|||||||
color={
|
color={
|
||||||
isApps ? theme.palette.text.primary : theme.palette.text.secondary
|
isApps ? theme.palette.text.primary : theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Apps"
|
label={t('core:app_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<AppsIcon
|
<AppsIcon
|
||||||
@ -294,7 +297,9 @@ export const AppsDevMode = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Chat"
|
label={t('core:chat', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<MessagingIconFilled
|
<MessagingIconFilled
|
||||||
@ -323,7 +328,9 @@ export const AppsDevMode = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Dev"
|
label={t('core:dev', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<AppsIcon
|
<AppsIcon
|
||||||
@ -336,6 +343,7 @@ export const AppsDevMode = ({
|
|||||||
/>
|
/>
|
||||||
</IconWrapper>
|
</IconWrapper>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
{mode !== 'home' && <AppsDevModeNavBar />}
|
{mode !== 'home' && <AppsDevModeNavBar />}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -382,10 +390,10 @@ export const AppsDevMode = ({
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
width: '100%',
|
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
height: '100vh',
|
height: '100vh',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Spacer height="30px" />
|
<Spacer height="30px" />
|
||||||
|
@ -41,7 +41,7 @@ export const AppsDevModeHome = ({
|
|||||||
const [domain, setDomain] = useState('127.0.0.1');
|
const [domain, setDomain] = useState('127.0.0.1');
|
||||||
const [port, setPort] = useState('');
|
const [port, setPort] = useState('');
|
||||||
const [selectedPreviewFile, setSelectedPreviewFile] = useState(null);
|
const [selectedPreviewFile, setSelectedPreviewFile] = useState(null);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const { isShow, onCancel, onOk, show, message } = useModal();
|
const { isShow, onCancel, onOk, show, message } = useModal();
|
||||||
const {
|
const {
|
||||||
openSnackGlobal,
|
openSnackGlobal,
|
||||||
@ -116,7 +116,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.devmode_local_node', {
|
message: t('core:message.generic.devmode_local_node', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -126,7 +126,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.name_preview', {
|
message: t('core:message.generic.name_preview', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -139,7 +139,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.select_file', {
|
message: t('core:message.generic.select_file', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -196,7 +196,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.devmode_local_node', {
|
message: t('core:message.generic.devmode_local_node', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -206,7 +206,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.name_preview', {
|
message: t('core:message.generic.name_preview', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -219,7 +219,7 @@ export const AppsDevModeHome = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.select_file', {
|
message: t('core:message.generic.select_file', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -240,7 +240,7 @@ export const AppsDevModeHome = ({
|
|||||||
if (!response?.ok)
|
if (!response?.ok)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.invalid_zip', {
|
t('core:message.error.invalid_zip', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
const previewPath = await response.text();
|
const previewPath = await response.text();
|
||||||
@ -286,7 +286,7 @@ export const AppsDevModeHome = ({
|
|||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:devmode_apps', { postProcess: 'capitalizeFirst' })}
|
{t('core:devmode_apps', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
</AppsContainer>
|
</AppsContainer>
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ export const AppsDevModeHome = ({
|
|||||||
<Add>+</Add>
|
<Add>+</Add>
|
||||||
</AppCircle>
|
</AppCircle>
|
||||||
<AppCircleLabel>
|
<AppCircleLabel>
|
||||||
{t('core:server', { postProcess: 'capitalizeFirst' })}
|
{t('core:server', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppCircleLabel>
|
</AppCircleLabel>
|
||||||
</AppCircleContainer>
|
</AppCircleContainer>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -332,7 +332,7 @@ export const AppsDevModeHome = ({
|
|||||||
</AppCircle>
|
</AppCircle>
|
||||||
|
|
||||||
<AppCircleLabel>
|
<AppCircleLabel>
|
||||||
{t('core:zip', { postProcess: 'capitalizeFirst' })}
|
{t('core:zip', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppCircleLabel>
|
</AppCircleLabel>
|
||||||
</AppCircleContainer>
|
</AppCircleContainer>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -351,7 +351,7 @@ export const AppsDevModeHome = ({
|
|||||||
<Add>+</Add>
|
<Add>+</Add>
|
||||||
</AppCircle>
|
</AppCircle>
|
||||||
<AppCircleLabel>
|
<AppCircleLabel>
|
||||||
{t('core:directory', { postProcess: 'capitalizeFirst' })}
|
{t('core:directory', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppCircleLabel>
|
</AppCircleLabel>
|
||||||
</AppCircleContainer>
|
</AppCircleContainer>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -382,7 +382,7 @@ export const AppsDevModeHome = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
alt={t('core:q_apps.q_sandbox', {
|
alt={t('core:q_apps.q_sandbox', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
src={`${getBaseApiReact()}/arbitrary/THUMBNAIL/Q-Sandbox/qortal_avatar?async=true`}
|
src={`${getBaseApiReact()}/arbitrary/THUMBNAIL/Q-Sandbox/qortal_avatar?async=true`}
|
||||||
>
|
>
|
||||||
@ -398,7 +398,7 @@ export const AppsDevModeHome = ({
|
|||||||
|
|
||||||
<AppCircleLabel>
|
<AppCircleLabel>
|
||||||
{t('core:q_apps.q_sandbox', {
|
{t('core:q_apps.q_sandbox', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppCircleLabel>
|
</AppCircleLabel>
|
||||||
</AppCircleContainer>
|
</AppCircleContainer>
|
||||||
@ -466,7 +466,7 @@ export const AppsDevModeHome = ({
|
|||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('core:action.add_custom_framework', {
|
{t('core:action.add_custom_framework', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
||||||
@ -480,12 +480,12 @@ export const AppsDevModeHome = ({
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:domain', {
|
{t('core:domain', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('core:domain', {
|
placeholder={t('core:domain', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={domain}
|
value={domain}
|
||||||
onChange={(e) => setDomain(e.target.value)}
|
onChange={(e) => setDomain(e.target.value)}
|
||||||
@ -502,12 +502,12 @@ export const AppsDevModeHome = ({
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:port', {
|
{t('core:port', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('core:port', {
|
placeholder={t('core:port', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={port}
|
value={port}
|
||||||
onChange={(e) => setPort(e.target.value)}
|
onChange={(e) => setPort(e.target.value)}
|
||||||
@ -518,7 +518,7 @@ export const AppsDevModeHome = ({
|
|||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={onCancel}>
|
<Button variant="contained" onClick={onCancel}>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ export const AppsDevModeHome = ({
|
|||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.add', {
|
{t('core:action.add', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
|
@ -27,7 +27,7 @@ export const AppsHomeDesktop = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [qortalUrl, setQortalUrl] = useState('');
|
const [qortalUrl, setQortalUrl] = useState('');
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const openQortalUrl = () => {
|
const openQortalUrl = () => {
|
||||||
try {
|
try {
|
||||||
@ -56,7 +56,7 @@ export const AppsHomeDesktop = ({
|
|||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:apps_dashboard', { postProcess: 'capitalizeFirst' })}
|
{t('core:apps_dashboard', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
</AppsContainer>
|
</AppsContainer>
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ export const AppsHomeDesktop = ({
|
|||||||
</AppCircle>
|
</AppCircle>
|
||||||
|
|
||||||
<AppCircleLabel>
|
<AppCircleLabel>
|
||||||
{t('core:library', { postProcess: 'capitalizeFirst' })}
|
{t('core:library', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</AppCircleLabel>
|
</AppCircleLabel>
|
||||||
</AppCircleContainer>
|
</AppCircleContainer>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
@ -105,7 +105,7 @@ export const AppsLibraryDesktop = ({
|
|||||||
const [searchValue, setSearchValue] = useState('');
|
const [searchValue, setSearchValue] = useState('');
|
||||||
const virtuosoRef = useRef(null);
|
const virtuosoRef = useRef(null);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const officialApps = useMemo(() => {
|
const officialApps = useMemo(() => {
|
||||||
return availableQapps.filter(
|
return availableQapps.filter(
|
||||||
@ -213,11 +213,11 @@ export const AppsLibraryDesktop = ({
|
|||||||
paddingLeft: '12px',
|
paddingLeft: '12px',
|
||||||
}}
|
}}
|
||||||
placeholder={t('core:action.search_apps', {
|
placeholder={t('core:action.search_apps', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
'aria-label': t('core:action.search_apps', {
|
'aria-label': t('core:action.search_apps', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
@ -284,7 +284,7 @@ export const AppsLibraryDesktop = ({
|
|||||||
<ReturnIcon />
|
<ReturnIcon />
|
||||||
<ComposeP>
|
<ComposeP>
|
||||||
{t('core:action.return_apps_dashboard', {
|
{t('core:action.return_apps_dashboard', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</ComposeP>
|
</ComposeP>
|
||||||
</ShowMessageReturnButton>
|
</ShowMessageReturnButton>
|
||||||
@ -314,7 +314,7 @@ export const AppsLibraryDesktop = ({
|
|||||||
<AppsWidthLimiter>
|
<AppsWidthLimiter>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.no_results', {
|
{t('core:message.generic.no_results', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</AppsWidthLimiter>
|
</AppsWidthLimiter>
|
||||||
@ -325,7 +325,9 @@ export const AppsLibraryDesktop = ({
|
|||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:apps_official', { postProcess: 'capitalizeFirst' })}
|
{t('core:apps_official', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
|
|
||||||
<Spacer height="45px" />
|
<Spacer height="45px" />
|
||||||
@ -412,10 +414,10 @@ export const AppsLibraryDesktop = ({
|
|||||||
>
|
>
|
||||||
{hasPublishApp
|
{hasPublishApp
|
||||||
? t('core:action.update_app', {
|
? t('core:action.update_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.publish_app', {
|
: t('core:action.publish_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
|
|
||||||
@ -444,10 +446,10 @@ export const AppsLibraryDesktop = ({
|
|||||||
<PublishQAppCTAButton>
|
<PublishQAppCTAButton>
|
||||||
{hasPublishApp
|
{hasPublishApp
|
||||||
? t('core:action.update', {
|
? t('core:action.update', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.publish', {
|
: t('core:action.publish', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</PublishQAppCTAButton>
|
</PublishQAppCTAButton>
|
||||||
|
|
||||||
@ -468,7 +470,7 @@ export const AppsLibraryDesktop = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:category_other', {
|
{t('core:category_other', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</AppLibrarySubTitle>
|
</AppLibrarySubTitle>
|
||||||
|
|
||||||
@ -508,7 +510,7 @@ export const AppsLibraryDesktop = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:all', { postProcess: 'capitalizeFirst' })}
|
{t('core:all', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Box>
|
</Box>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [isNewTabWindow, setIsNewTabWindow] = useState(false);
|
const [isNewTabWindow, setIsNewTabWindow] = useState(false);
|
||||||
const tabsRef = useRef(null);
|
const tabsRef = useRef(null);
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
@ -380,10 +380,10 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
|||||||
primary={`${
|
primary={`${
|
||||||
isSelectedAppPinned
|
isSelectedAppPinned
|
||||||
? t('core:action.unpin_app', {
|
? t('core:action.unpin_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.pin_app', {
|
: t('core:action.pin_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
}}`}
|
}}`}
|
||||||
/>
|
/>
|
||||||
@ -460,7 +460,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
primary={t('core:action.copy_link', {
|
primary={t('core:action.copy_link', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
@ -14,7 +14,7 @@ import {
|
|||||||
useTheme,
|
useTheme,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { useDropzone } from 'react-dropzone';
|
import { useDropzone } from 'react-dropzone';
|
||||||
import { useHandlePrivateApps } from './useHandlePrivateApps';
|
import { useHandlePrivateApps } from '../../hooks/useHandlePrivateApps';
|
||||||
import {
|
import {
|
||||||
groupsPropertiesAtom,
|
groupsPropertiesAtom,
|
||||||
memberGroupsAtom,
|
memberGroupsAtom,
|
||||||
@ -63,7 +63,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
const [memberGroups] = useAtom(memberGroupsAtom);
|
const [memberGroups] = useAtom(memberGroupsAtom);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const myGroupsPrivate = useMemo(() => {
|
const myGroupsPrivate = useMemo(() => {
|
||||||
return memberGroups?.filter(
|
return memberGroups?.filter(
|
||||||
@ -103,7 +103,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
t('core:message.error.file_too_large', {
|
t('core:message.error.file_too_large', {
|
||||||
filename: file.name,
|
filename: file.name,
|
||||||
size: maxFileSize / (1024 * 1024),
|
size: maxFileSize / (1024 * 1024),
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -146,21 +146,21 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
if (!logo)
|
if (!logo)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.generic.select_image', {
|
t('core:message.generic.select_image', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!myName)
|
if (!myName)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.generic.name_publish', {
|
t('core:message.generic.name_publish', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!newPrivateAppValues?.name)
|
if (!newPrivateAppValues?.name)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.app_need_name', {
|
t('core:message.error.app_need_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
decryptedData?.error ||
|
decryptedData?.error ||
|
||||||
t('core:message.error.unable_encrypt_app', {
|
t('core:message.error.unable_encrypt_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
|
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.publish_app', {
|
message: t('core:message.question.publish_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -216,7 +216,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -239,7 +239,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.unable_publish_app', {
|
t('core:message.error.unable_publish_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -321,7 +321,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tab
|
<Tab
|
||||||
label="Access app"
|
label={t('core:action.access_app', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
{...a11yProps(0)}
|
{...a11yProps(0)}
|
||||||
sx={{
|
sx={{
|
||||||
'&.Mui-selected': {
|
'&.Mui-selected': {
|
||||||
@ -331,7 +333,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Tab
|
<Tab
|
||||||
label="Publish app"
|
label={t('core:action.publish_app', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
{...a11yProps(1)}
|
{...a11yProps(1)}
|
||||||
sx={{
|
sx={{
|
||||||
'&.Mui-selected': {
|
'&.Mui-selected': {
|
||||||
@ -354,12 +358,12 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:action.select_group', {
|
{t('group:action.select_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:message.generic.only_private_groups', {
|
{t('group:message.generic.only_private_groups', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -367,7 +371,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
id="demo-simple-select"
|
id="demo-simple-select"
|
||||||
value={privateAppValues?.groupId}
|
value={privateAppValues?.groupId}
|
||||||
label="Groups"
|
label={t('group:group.group_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setPrivateAppValues((prev) => {
|
setPrivateAppValues((prev) => {
|
||||||
return {
|
return {
|
||||||
@ -379,7 +385,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
>
|
>
|
||||||
<MenuItem value={0}>
|
<MenuItem value={0}>
|
||||||
{t('group:message.generic.no_selection', {
|
{t('group:message.generic.no_selection', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
||||||
@ -406,7 +412,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:name', { postProcess: 'capitalizeFirst' })}
|
{t('core:name', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
placeholder="name"
|
placeholder="name"
|
||||||
@ -431,12 +437,14 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:identifier', { postProcess: 'capitalizeFirst' })}
|
{t('core:identifier', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('core:identifier', {
|
placeholder={t('core:identifier', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={privateAppValues?.identifier}
|
value={privateAppValues?.identifier}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
@ -458,7 +466,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
setIsOpenPrivateModal(false);
|
setIsOpenPrivateModal(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
disabled={
|
||||||
@ -471,7 +481,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
onClick={() => addPrivateApp()}
|
onClick={() => addPrivateApp()}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.access', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.access', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</>
|
</>
|
||||||
@ -486,7 +498,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.select_zip', {
|
{t('core:message.generic.select_zip', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</PublishQAppInfo>
|
</PublishQAppInfo>
|
||||||
|
|
||||||
@ -520,10 +532,10 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
<input {...getInputProps()} />
|
<input {...getInputProps()} />
|
||||||
{file
|
{file
|
||||||
? t('core:action.change_file', {
|
? t('core:action.change_file', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.choose_file', {
|
: t('core:action.choose_file', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</PublishQAppChoseFile>
|
</PublishQAppChoseFile>
|
||||||
|
|
||||||
@ -538,13 +550,13 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:action.select_group', {
|
{t('group:action.select_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:amessage.generic.admin_only', {
|
{t('group:amessage.generic.admin_only', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -552,14 +564,17 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
id="demo-simple-select"
|
id="demo-simple-select"
|
||||||
value={selectedGroup}
|
value={selectedGroup}
|
||||||
label="Groups where you are an admin"
|
label={t('group:group.groups_admin', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
onChange={(e) => setSelectedGroup(e.target.value)}
|
onChange={(e) => setSelectedGroup(e.target.value)}
|
||||||
>
|
>
|
||||||
<MenuItem value={0}>
|
<MenuItem value={0}>
|
||||||
{t('group:message.generic.no_selection', {
|
{t('group:message.generic.no_selection', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
||||||
{myGroupsWhereIAmAdmin
|
{myGroupsWhereIAmAdmin
|
||||||
?.filter((item) => !item?.isOpen)
|
?.filter((item) => !item?.isOpen)
|
||||||
.map((group) => {
|
.map((group) => {
|
||||||
@ -583,11 +598,13 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:identifier', { postProcess: 'capitalizeFirst' })}
|
{t('core:identifier', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('core:identifier', {
|
placeholder={t('core:identifier', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={newPrivateAppValues?.identifier}
|
value={newPrivateAppValues?.identifier}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
@ -612,12 +629,12 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:app_name', { postProcess: 'capitalizeFirst' })}
|
{t('core:app_name', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('core:app_name', {
|
placeholder={t('core:app_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={newPrivateAppValues?.name}
|
value={newPrivateAppValues?.name}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
@ -636,7 +653,7 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
<ImageUploader onPick={(file) => setLogo(file)}>
|
<ImageUploader onPick={(file) => setLogo(file)}>
|
||||||
<Button variant="contained">
|
<Button variant="contained">
|
||||||
{t('core:action.choose_logo', {
|
{t('core:action.choose_logo', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</ImageUploader>
|
</ImageUploader>
|
||||||
@ -654,7 +671,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
clearFields();
|
clearFields();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -668,7 +687,9 @@ export const AppsPrivate = ({ myName }) => {
|
|||||||
onClick={() => publishPrivateApp()}
|
onClick={() => publishPrivateApp()}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.publish', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.publish', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</>
|
</>
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
||||||
import { ContextMenuPinnedApps } from '../ContextMenuPinnedApps';
|
import { ContextMenuPinnedApps } from '../ContextMenuPinnedApps';
|
||||||
import LockIcon from '@mui/icons-material/Lock';
|
import LockIcon from '@mui/icons-material/Lock';
|
||||||
import { useHandlePrivateApps } from './useHandlePrivateApps';
|
import { useHandlePrivateApps } from '../../hooks/useHandlePrivateApps';
|
||||||
import { useAtom, useSetAtom } from 'jotai';
|
import { useAtom, useSetAtom } from 'jotai';
|
||||||
|
|
||||||
const SortableItem = ({ id, name, app, isDesktop }) => {
|
const SortableItem = ({ id, name, app, isDesktop }) => {
|
||||||
|
@ -76,7 +76,7 @@ export const DownloadWallet = ({
|
|||||||
if (!keepCurrentPassword && !newPassword) {
|
if (!keepCurrentPassword && !newPassword) {
|
||||||
setWalletToBeDownloadedError(
|
setWalletToBeDownloadedError(
|
||||||
t('auth:wallet.error.missing_new_password', {
|
t('auth:wallet.error.missing_new_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -84,7 +84,7 @@ export const DownloadWallet = ({
|
|||||||
if (!walletToBeDownloadedPassword) {
|
if (!walletToBeDownloadedPassword) {
|
||||||
setWalletToBeDownloadedError(
|
setWalletToBeDownloadedError(
|
||||||
t('auth:wallet.error.missing_password', {
|
t('auth:wallet.error.missing_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -160,7 +160,7 @@ export const DownloadWallet = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.download_account', {
|
{t('auth:action.download_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</TextP>
|
</TextP>
|
||||||
</Box>
|
</Box>
|
||||||
@ -171,7 +171,7 @@ export const DownloadWallet = ({
|
|||||||
<>
|
<>
|
||||||
<CustomLabel htmlFor="standard-adornment-password">
|
<CustomLabel htmlFor="standard-adornment-password">
|
||||||
{t('auth:wallet.password_confirmation', {
|
{t('auth:wallet.password_confirmation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ export const DownloadWallet = ({
|
|||||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<Typography sx={{ fontSize: '14px' }}>
|
<Typography sx={{ fontSize: '14px' }}>
|
||||||
{t('auth:wallet.keep_password', {
|
{t('auth:wallet.keep_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -223,7 +223,7 @@ export const DownloadWallet = ({
|
|||||||
<>
|
<>
|
||||||
<CustomLabel htmlFor="standard-adornment-password">
|
<CustomLabel htmlFor="standard-adornment-password">
|
||||||
{t('auth:wallet.new_password', {
|
{t('auth:wallet.new_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ export const DownloadWallet = ({
|
|||||||
|
|
||||||
<CustomButton onClick={confirmPasswordToDownload}>
|
<CustomButton onClick={confirmPasswordToDownload}>
|
||||||
{t('auth:password_confirmation', {
|
{t('auth:password_confirmation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
@ -256,13 +256,13 @@ export const DownloadWallet = ({
|
|||||||
await saveFileToDiskFunc();
|
await saveFileToDiskFunc();
|
||||||
await showInfo({
|
await showInfo({
|
||||||
message: t('auth:message.generic.keep_secure', {
|
message: t('auth:message.generic.keep_secure', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.download_account', {
|
{t('auth:action.download_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</>
|
</>
|
||||||
|
@ -19,7 +19,7 @@ export const AdminSpace = ({
|
|||||||
isOwner,
|
isOwner,
|
||||||
}) => {
|
}) => {
|
||||||
const [isMoved, setIsMoved] = useState(false);
|
const [isMoved, setIsMoved] = useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (hide) {
|
if (hide) {
|
||||||
@ -54,7 +54,7 @@ export const AdminSpace = ({
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.space_for_admins', {
|
{t('core:message.generic.space_for_admins', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -99,7 +99,7 @@ export const AdminSpaceInner = ({
|
|||||||
if (!validateSecretKey(decryptedKeyToObject))
|
if (!validateSecretKey(decryptedKeyToObject))
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('auth:message.error.invalid_secret_key', {
|
t('auth:message.error.invalid_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
setAdminGroupSecretKey(decryptedKeyToObject);
|
setAdminGroupSecretKey(decryptedKeyToObject);
|
||||||
@ -134,7 +134,7 @@ export const AdminSpaceInner = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ARBITRARY',
|
action: 'ARBITRARY',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -152,7 +152,7 @@ export const AdminSpaceInner = ({
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('auth:message.success.reencrypted_secret_key', {
|
message: t('auth:message.success.reencrypted_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnackGlobal(true);
|
setOpenSnackGlobal(true);
|
||||||
@ -163,7 +163,7 @@ export const AdminSpaceInner = ({
|
|||||||
message:
|
message:
|
||||||
response?.error ||
|
response?.error ||
|
||||||
t('auth:message.error.unable_reencrypt_secret_key', {
|
t('auth:message.error.unable_reencrypt_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnackGlobal(true);
|
setOpenSnackGlobal(true);
|
||||||
@ -174,7 +174,7 @@ export const AdminSpaceInner = ({
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('auth:message.error.unable_reencrypt_secret_key', {
|
t('auth:message.error.unable_reencrypt_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnackGlobal(true);
|
setOpenSnackGlobal(true);
|
||||||
@ -204,7 +204,7 @@ export const AdminSpaceInner = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:message.error.publishing_key', {
|
{t('auth:message.error.publishing_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ export const AdminSpaceInner = ({
|
|||||||
{isFetchingGroupSecretKey && (
|
{isFetchingGroupSecretKey && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.fetching_group_secret_key', {
|
{t('auth:message.generic.fetching_group_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -234,7 +234,7 @@ export const AdminSpaceInner = ({
|
|||||||
groupSecretKeyPublishDetails === false && (
|
groupSecretKeyPublishDetails === false && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.no_secret_key_published', {
|
{t('auth:message.generic.no_secret_key_published', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -247,7 +247,7 @@ export const AdminSpaceInner = ({
|
|||||||
groupSecretKeyPublishDetails?.created
|
groupSecretKeyPublishDetails?.created
|
||||||
),
|
),
|
||||||
name: groupSecretKeyPublishDetails?.name,
|
name: groupSecretKeyPublishDetails?.name,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -258,7 +258,7 @@ export const AdminSpaceInner = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('auth:action.publish_group_secret_key', {
|
{t('auth:action.publish_group_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ export const AdminSpaceInner = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.key_encrypt_group', {
|
{t('auth:tips.key_encrypt_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -292,7 +292,7 @@ export const AdminSpaceInner = ({
|
|||||||
{isFetchingAdminGroupSecretKey && (
|
{isFetchingAdminGroupSecretKey && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.fetching_admin_secret_key', {
|
{t('auth:message.generic.fetching_admin_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -300,7 +300,7 @@ export const AdminSpaceInner = ({
|
|||||||
{!isFetchingAdminGroupSecretKey && !adminGroupSecretKey && (
|
{!isFetchingAdminGroupSecretKey && !adminGroupSecretKey && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:message.generic.no_secret_key_published', {
|
{t('auth:message.generic.no_secret_key_published', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -312,7 +312,7 @@ export const AdminSpaceInner = ({
|
|||||||
adminGroupSecretKeyPublishDetails?.updated ||
|
adminGroupSecretKeyPublishDetails?.updated ||
|
||||||
adminGroupSecretKeyPublishDetails?.created
|
adminGroupSecretKeyPublishDetails?.created
|
||||||
),
|
),
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -323,7 +323,7 @@ export const AdminSpaceInner = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('auth:action.publish_admin_secret_key', {
|
{t('auth:action.publish_admin_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -335,7 +335,7 @@ export const AdminSpaceInner = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.key_encrypt_admin', {
|
{t('auth:tips.key_encrypt_admin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -358,7 +358,7 @@ export const AdminSpaceInner = ({
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:group.avatar', {
|
{t('group:group.avatar', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -139,7 +139,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ARBITRARY',
|
action: 'ARBITRARY',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -185,7 +185,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
|
|
||||||
clearEditorContent();
|
clearEditorContent();
|
||||||
}
|
}
|
||||||
// TODO send chat message
|
// send chat message
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
@ -382,7 +382,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
padding: '5px',
|
padding: '5px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
)}
|
)}
|
||||||
<CustomButton
|
<CustomButton
|
||||||
@ -414,7 +414,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{t('core:action.publish_comment', {
|
{t('core:action.publish_comment', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -424,7 +424,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('core:loading.comments', {
|
message: t('core:loading.comments', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -194,7 +194,7 @@ export const AnnouncementItem = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.leave_comment', {
|
{t('core:action.leave_comment', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
@ -82,7 +82,7 @@ export const AnnouncementList = ({
|
|||||||
{showLoadMore && (
|
{showLoadMore && (
|
||||||
<CustomButton onClick={loadMore}>
|
<CustomButton onClick={loadMore}>
|
||||||
{t('core:action.load_announcements', {
|
{t('core:action.load_announcements', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
)}
|
)}
|
||||||
|
@ -219,7 +219,7 @@ export const ChatDirect = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -392,7 +392,7 @@ export const ChatDirect = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -438,7 +438,7 @@ export const ChatDirect = ({
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.qortals_required', {
|
t('group:message.error.qortals_required', {
|
||||||
quantity: 4,
|
quantity: 4,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (isSending) return;
|
if (isSending) return;
|
||||||
@ -509,7 +509,7 @@ export const ChatDirect = ({
|
|||||||
errorMsg === 'invalid signature'
|
errorMsg === 'invalid signature'
|
||||||
? t('group:message.error.qortals_required', {
|
? t('group:message.error.qortals_required', {
|
||||||
quantity: 4,
|
quantity: 4,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: errorMsg,
|
: errorMsg,
|
||||||
});
|
});
|
||||||
@ -576,7 +576,7 @@ export const ChatDirect = ({
|
|||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close_chat', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close_chat', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ export const ChatDirect = ({
|
|||||||
{t('core:message.error.message_size', {
|
{t('core:message.error.message_size', {
|
||||||
maximum: 4000,
|
maximum: 4000,
|
||||||
size: messageSize,
|
size: messageSize,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -763,7 +763,9 @@ export const ChatDirect = ({
|
|||||||
<LoadingSnackbar
|
<LoadingSnackbar
|
||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('core:loading.chat', { postProcess: 'capitalizeFirst' }),
|
message: t('core:loading.chat', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
resumeAllQueues,
|
resumeAllQueues,
|
||||||
} from '../../App';
|
} from '../../App';
|
||||||
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
||||||
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from '../../constants/codes';
|
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from '../../constants/constants';
|
||||||
import { useMessageQueue } from '../../MessageQueueContext';
|
import { useMessageQueue } from '../../MessageQueueContext';
|
||||||
import {
|
import {
|
||||||
executeEvent,
|
executeEvent,
|
||||||
@ -43,7 +43,7 @@ import {
|
|||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import { ReplyPreview } from './MessageItem';
|
import { ReplyPreview } from './MessageItem';
|
||||||
import { ExitIcon } from '../../assets/Icons/ExitIcon';
|
import { ExitIcon } from '../../assets/Icons/ExitIcon';
|
||||||
import { RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS } from '../../constants/resourceTypes';
|
import { RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS } from '../../constants/constants';
|
||||||
import { getFee, isExtMsg } from '../../background';
|
import { getFee, isExtMsg } from '../../background';
|
||||||
import AppViewerContainer from '../Apps/AppViewerContainer';
|
import AppViewerContainer from '../Apps/AppViewerContainer';
|
||||||
import CloseIcon from '@mui/icons-material/Close';
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
@ -134,7 +134,7 @@ export const ChatGroup = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -297,7 +297,7 @@ export const ChatGroup = ({
|
|||||||
const message = (
|
const message = (
|
||||||
<p>
|
<p>
|
||||||
{t('group:message.generic.group_key_created', {
|
{t('group:message.generic.group_key_created', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
@ -371,7 +371,7 @@ export const ChatGroup = ({
|
|||||||
) {
|
) {
|
||||||
console.warn(
|
console.warn(
|
||||||
t('group:message.generic.invalid_content', {
|
t('group:message.generic.invalid_content', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
item
|
item
|
||||||
);
|
);
|
||||||
@ -448,7 +448,7 @@ export const ChatGroup = ({
|
|||||||
const message = (
|
const message = (
|
||||||
<p>
|
<p>
|
||||||
{t('group:message.generic.group_key_created', {
|
{t('group:message.generic.group_key_created', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
@ -528,7 +528,7 @@ export const ChatGroup = ({
|
|||||||
) {
|
) {
|
||||||
console.warn(
|
console.warn(
|
||||||
t('group:message.generic.invalid_content', {
|
t('group:message.generic.invalid_content', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
item
|
item
|
||||||
);
|
);
|
||||||
@ -605,7 +605,7 @@ export const ChatGroup = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -737,7 +737,7 @@ export const ChatGroup = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -777,7 +777,7 @@ export const ChatGroup = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -799,7 +799,7 @@ export const ChatGroup = ({
|
|||||||
if (isPrivate === null)
|
if (isPrivate === null)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.unable_determine_group_private', {
|
t('group:message.error.unable_determine_group_private', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (isSending) return;
|
if (isSending) return;
|
||||||
@ -808,7 +808,7 @@ export const ChatGroup = ({
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.qortals_required', {
|
t('group:message.error.qortals_required', {
|
||||||
quantity: 4,
|
quantity: 4,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
pauseAllQueues();
|
pauseAllQueues();
|
||||||
@ -852,7 +852,7 @@ export const ChatGroup = ({
|
|||||||
await show({
|
await show({
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
message: t('core:message.question.delete_chat_image', {
|
message: t('core:message.question.delete_chat_image', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -891,7 +891,7 @@ export const ChatGroup = ({
|
|||||||
if (res !== true)
|
if (res !== true)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.unable_publish_image', {
|
t('core:message.error.unable_publish_image', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1052,7 +1052,7 @@ export const ChatGroup = ({
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.qortals_required', {
|
t('group:message.error.qortals_required', {
|
||||||
quantity: 4,
|
quantity: 4,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ export const ChatGroup = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('core:message.generic.message_with_image', {
|
message: t('core:message.generic.message_with_image', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -1401,7 +1401,7 @@ export const ChatGroup = ({
|
|||||||
{t('core:message.error.message_size', {
|
{t('core:message.error.message_size', {
|
||||||
maximum: 4000,
|
maximum: 4000,
|
||||||
size: messageSize,
|
size: messageSize,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -1527,7 +1527,9 @@ export const ChatGroup = ({
|
|||||||
<LoadingSnackbar
|
<LoadingSnackbar
|
||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('core:loading.chat', { postProcess: 'capitalizeFirst' }),
|
message: t('core:loading.chat', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ export const ChatList = ({
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.error.message_loading', {
|
{t('core:message.error.message_loading', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@ -370,7 +370,7 @@ export const ChatList = ({
|
|||||||
fallback={
|
fallback={
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.invalid_data', {
|
{t('group:message.generic.invalid_data', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
@ -418,7 +418,7 @@ export const ChatList = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.scroll_unread_messages', {
|
{t('group:action.scroll_unread_messages', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
@ -444,7 +444,7 @@ export const ChatList = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.scroll_unread_messages', {
|
{t('group:action.scroll_unread_messages', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
@ -107,7 +107,7 @@ export const ChatOptions = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -280,7 +280,7 @@ export const ChatOptions = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.no_results', {
|
{t('core:message.generic.no_results', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -454,7 +454,9 @@ export const ChatOptions = ({
|
|||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
id="demo-simple-select"
|
id="demo-simple-select"
|
||||||
label="By member"
|
label={t('core:sort.by_member', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
onChange={(e) => setSelectedMember(e.target.value)}
|
onChange={(e) => setSelectedMember(e.target.value)}
|
||||||
size="small"
|
size="small"
|
||||||
@ -462,7 +464,9 @@ export const ChatOptions = ({
|
|||||||
>
|
>
|
||||||
<MenuItem value={0}>
|
<MenuItem value={0}>
|
||||||
<em>
|
<em>
|
||||||
{t('core:sort.by_member', { postProcess: 'capitalizeFirst' })}
|
{t('core:sort.by_member', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</em>
|
</em>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
||||||
@ -497,7 +501,7 @@ export const ChatOptions = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.no_results', {
|
{t('core:message.generic.no_results', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -569,7 +573,7 @@ export const ChatOptions = ({
|
|||||||
fallback={
|
fallback={
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.invalid_data', {
|
{t('group:message.generic.invalid_data', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export const CreateCommonSecret = ({
|
|||||||
if (!names.length) {
|
if (!names.length) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.network_generic', {
|
t('core:message.error.network_generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ export const CreateCommonSecret = ({
|
|||||||
if (!validateSecretKey(decryptedKeyToObject))
|
if (!validateSecretKey(decryptedKeyToObject))
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('auth:message.error.invalid_secret_key', {
|
t('auth:message.error.invalid_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ export const CreateCommonSecret = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ARBITRARY',
|
action: 'ARBITRARY',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -139,14 +139,14 @@ export const CreateCommonSecret = ({
|
|||||||
if (!secretKey2 && secretKey2 !== false)
|
if (!secretKey2 && secretKey2 !== false)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('auth:message.error.invalid_secret_key', {
|
t('auth:message.error.invalid_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (secretKey2 && !validateSecretKey(secretKey2))
|
if (secretKey2 && !validateSecretKey(secretKey2))
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('auth:message.error.invalid_secret_key', {
|
t('auth:message.error.invalid_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ export const CreateCommonSecret = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('auth:message.success.reencrypted_secret_key', {
|
message: t('auth:message.success.reencrypted_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -172,13 +172,13 @@ export const CreateCommonSecret = ({
|
|||||||
type: 'created-common-secret',
|
type: 'created-common-secret',
|
||||||
label: t('group:message.success.published_secret_key', {
|
label: t('group:message.success.published_secret_key', {
|
||||||
group_id: groupId,
|
group_id: groupId,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t(
|
labelDone: t(
|
||||||
'group:message.success.published_secret_key_label',
|
'group:message.success.published_secret_key_label',
|
||||||
{
|
{
|
||||||
group_id: groupId,
|
group_id: groupId,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
done: false,
|
done: false,
|
||||||
@ -222,14 +222,14 @@ export const CreateCommonSecret = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={createCommonSecret}
|
onClick={createCommonSecret}
|
||||||
>
|
>
|
||||||
{t('auth:action.reencrypt_key', { postProcess: 'capitalizeFirst' })}
|
{t('auth:action.reencrypt_key', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
{noSecretKey ? (
|
{noSecretKey ? (
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.group_no_secret_key', {
|
{t('group:message.generic.group_no_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -240,7 +240,7 @@ export const CreateCommonSecret = ({
|
|||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.group_secret_key_no_owner', {
|
{t('group:message.generic.group_secret_key_no_owner', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -248,7 +248,7 @@ export const CreateCommonSecret = ({
|
|||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.group_member_list_changed', {
|
{t('group:message.generic.group_member_list_changed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -268,7 +268,7 @@ export const CreateCommonSecret = ({
|
|||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{t('core:action.hide', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.hide', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ export const GroupAnnouncements = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -265,7 +265,7 @@ export const GroupAnnouncements = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -304,7 +304,7 @@ export const GroupAnnouncements = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ARBITRARY',
|
action: 'ARBITRARY',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -597,7 +597,7 @@ export const GroupAnnouncements = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{t('group:message.generic.group_announcement', {
|
{t('group:message.generic.group_announcement', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -618,7 +618,7 @@ export const GroupAnnouncements = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_announcement', {
|
{t('group:message.generic.no_announcement', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -704,7 +704,7 @@ export const GroupAnnouncements = ({
|
|||||||
padding: '5px',
|
padding: '5px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ export const GroupAnnouncements = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{t('group:action.publish_announcement', {
|
{t('group:action.publish_announcement', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -757,7 +757,7 @@ export const GroupAnnouncements = ({
|
|||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('core:loading.announcements', {
|
message: t('core:loading.announcements', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -84,13 +84,13 @@ export const GroupAvatar = ({
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.generic.avatar_publish_fee', {
|
t('core:message.generic.avatar_publish_fee', {
|
||||||
fee: fee.fee,
|
fee: fee.fee,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.publish_avatar', {
|
message: t('core:message.question.publish_avatar', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -115,7 +115,7 @@ export const GroupAvatar = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -157,7 +157,9 @@ export const GroupAvatar = ({
|
|||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.change_avatar', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.change_avatar', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -197,7 +199,9 @@ export const GroupAvatar = ({
|
|||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.change_avatar', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.change_avatar', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -226,7 +230,7 @@ export const GroupAvatar = ({
|
|||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.set_avatar', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.set_avatar', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -282,13 +286,15 @@ const PopoverComp = ({
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.avatar_size', {
|
{t('core:message.generic.avatar_size', {
|
||||||
size: 500, // TODO magic number
|
size: 500, // TODO magic number
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<ImageUploader onPick={(file) => setAvatarFile(file)}>
|
<ImageUploader onPick={(file) => setAvatarFile(file)}>
|
||||||
<Button variant="contained">
|
<Button variant="contained">
|
||||||
{t('core:action.choose_image', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.choose_image', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</ImageUploader>
|
</ImageUploader>
|
||||||
|
|
||||||
@ -311,7 +317,7 @@ const PopoverComp = ({
|
|||||||
/>
|
/>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.avatar_registered_name', {
|
{t('core:message.generic.avatar_registered_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -325,7 +331,9 @@ const PopoverComp = ({
|
|||||||
onClick={publishAvatar}
|
onClick={publishAvatar}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('group:action.publish_avatar', { postProcess: 'capitalizeFirst' })}
|
{t('group:action.publish_avatar', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
@ -66,7 +66,7 @@ export default forwardRef((props, ref) => {
|
|||||||
) : (
|
) : (
|
||||||
<div className="item">
|
<div className="item">
|
||||||
{t('core:message.generic.no_results', {
|
{t('core:message.generic.no_results', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -177,7 +177,7 @@ export const MessageItem = memo(
|
|||||||
{message?.divide && (
|
{message?.divide && (
|
||||||
<div className="unread-divider" id="unread-divider-id">
|
<div className="unread-divider" id="unread-divider-id">
|
||||||
{t('core:message.generic.unread_messages', {
|
{t('core:message.generic.unread_messages', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -355,7 +355,7 @@ export const MessageItem = memo(
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.replied_to', {
|
{t('core:message.generic.replied_to', {
|
||||||
person: reply?.senderName || reply?.senderAddress,
|
person: reply?.senderName || reply?.senderAddress,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ export const MessageItem = memo(
|
|||||||
<Typography variant="subtitle1" sx={{ marginBottom: 1 }}>
|
<Typography variant="subtitle1" sx={{ marginBottom: 1 }}>
|
||||||
{t('core:message.generic.people_reaction', {
|
{t('core:message.generic.people_reaction', {
|
||||||
reaction: selectedReaction,
|
reaction: selectedReaction,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -515,10 +515,10 @@ export const MessageItem = memo(
|
|||||||
(item) => item?.sender === myAddress
|
(item) => item?.sender === myAddress
|
||||||
)
|
)
|
||||||
? t('core:action.remove_reaction', {
|
? t('core:action.remove_reaction', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.add_reaction', {
|
: t('core:action.add_reaction', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -551,10 +551,10 @@ export const MessageItem = memo(
|
|||||||
>
|
>
|
||||||
{message?.status === 'failed-permanent'
|
{message?.status === 'failed-permanent'
|
||||||
? t('core:message.error.update_failed', {
|
? t('core:message.error.update_failed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:message.generic.updating', {
|
: t('core:message.generic.updating', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : isTemp ? (
|
) : isTemp ? (
|
||||||
@ -567,10 +567,10 @@ export const MessageItem = memo(
|
|||||||
>
|
>
|
||||||
{message?.status === 'failed-permanent'
|
{message?.status === 'failed-permanent'
|
||||||
? t('core:message.error.send_failed', {
|
? t('core:message.error.send_failed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:message.generic.sending', {
|
: t('core:message.generic.sending', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : (
|
) : (
|
||||||
@ -585,7 +585,7 @@ export const MessageItem = memo(
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.edited', {
|
{t('core:message.generic.edited', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -649,7 +649,7 @@ export const ReplyPreview = ({ message, isEdit = false }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.editing_message', {
|
{t('core:message.generic.editing_message', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : (
|
) : (
|
||||||
@ -661,7 +661,7 @@ export const ReplyPreview = ({ message, isEdit = false }) => {
|
|||||||
>
|
>
|
||||||
{t('core:message.generic.replied_to', {
|
{t('core:message.generic.replied_to', {
|
||||||
person: message?.senderName || message?.senderAddress,
|
person: message?.senderName || message?.senderAddress,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
@ -321,7 +321,7 @@ const MenuBar = memo(
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.disable_enter', {
|
{t('core:action.disable_enter', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -6,14 +6,14 @@ import { getBaseApiReact } from '../App';
|
|||||||
import '../styles/CoreSyncStatus.css';
|
import '../styles/CoreSyncStatus.css';
|
||||||
import { useTheme } from '@mui/material';
|
import { useTheme } from '@mui/material';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { manifestData } from '../ExtStates/NotAuthenticated';
|
import { manifestData } from './NotAuthenticated';
|
||||||
|
|
||||||
export const CoreSyncStatus = () => {
|
export const CoreSyncStatus = () => {
|
||||||
const [nodeInfos, setNodeInfos] = useState({});
|
const [nodeInfos, setNodeInfos] = useState({});
|
||||||
const [coreInfos, setCoreInfos] = useState({});
|
const [coreInfos, setCoreInfos] = useState({});
|
||||||
const [isUsingGateway, setIsUsingGateway] = useState(false);
|
const [isUsingGateway, setIsUsingGateway] = useState(false);
|
||||||
|
|
||||||
const { t } = useTranslation(['auth', 'core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -77,26 +77,26 @@ export const CoreSyncStatus = () => {
|
|||||||
|
|
||||||
let imagePath = syncingImg;
|
let imagePath = syncingImg;
|
||||||
let message = t('core:message.status.synchronizing', {
|
let message = t('core:message.status.synchronizing', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isMintingPossible && !isUsingGateway) {
|
if (isMintingPossible && !isUsingGateway) {
|
||||||
imagePath = syncedMintingImg;
|
imagePath = syncedMintingImg;
|
||||||
message = `${t(`core:message.status.${isSynchronizing ? 'synchronizing' : 'synchronized'}`, { postProcess: 'capitalizeFirst' })} ${t('core:message.status.minting')}`;
|
message = `${t(`core:message.status.${isSynchronizing ? 'synchronizing' : 'synchronized'}`, { postProcess: 'capitalizeFirstChar' })} ${t('core:message.status.minting')}`;
|
||||||
} else if (isSynchronizing === true && syncPercent === 99) {
|
} else if (isSynchronizing === true && syncPercent === 99) {
|
||||||
imagePath = syncingImg;
|
imagePath = syncingImg;
|
||||||
} else if (isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
} else if (isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
||||||
imagePath = syncingImg;
|
imagePath = syncingImg;
|
||||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirstChar' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||||
} else if (!isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
} else if (!isSynchronizing && !isMintingPossible && syncPercent === 100) {
|
||||||
imagePath = syncedImg;
|
imagePath = syncedImg;
|
||||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirstChar' })} ${!isUsingGateway ? t('core:message.status.not_minting') : ''}`;
|
||||||
} else if (isSynchronizing && isMintingPossible && syncPercent === 100) {
|
} else if (isSynchronizing && isMintingPossible && syncPercent === 100) {
|
||||||
imagePath = syncingImg;
|
imagePath = syncingImg;
|
||||||
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
message = `${t('core:message.status.synchronizing', { postProcess: 'capitalizeFirstChar' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||||
} else if (!isSynchronizing && isMintingPossible && syncPercent === 100) {
|
} else if (!isSynchronizing && isMintingPossible && syncPercent === 100) {
|
||||||
imagePath = syncedMintingImg;
|
imagePath = syncedMintingImg;
|
||||||
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirst' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
message = `${t('core:message.status.synchronized', { postProcess: 'capitalizeFirstChar' })} ${!isUsingGateway ? t('core:message.status.minting') : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -122,37 +122,42 @@ export const CoreSyncStatus = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h3>
|
<h3>
|
||||||
{t('core:core.information', { postProcess: 'capitalizeFirst' })}
|
{t('core:core.information', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<h4 className="lineHeight">
|
<h4 className="lineHeight">
|
||||||
{t('core:core.version', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('core:core.version', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
<span style={{ color: '#03a9f4' }}>{buildVersion}</span>
|
<span style={{ color: '#03a9f4' }}>{buildVersion}</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<h4 className="lineHeight">{message}</h4>
|
<h4 className="lineHeight">{message}</h4>
|
||||||
|
|
||||||
<h4 className="lineHeight">
|
<h4 className="lineHeight">
|
||||||
{t('core:core.block_height', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('core:core.block_height', {
|
||||||
<span style={{ color: '#03a9f4' }}>{height || ''}</span>
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
: <span style={{ color: '#03a9f4' }}>{height || ''}</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<h4 className="lineHeight">
|
<h4 className="lineHeight">
|
||||||
{t('core:core.peers', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('core:core.peers', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
<span style={{ color: '#03a9f4' }}>
|
<span style={{ color: '#03a9f4' }}>
|
||||||
{numberOfConnections || ''}
|
{numberOfConnections || ''}
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<h4 className="lineHeight">
|
<h4 className="lineHeight">
|
||||||
{t('auth:node.using_public', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('auth:node.using_public', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
:{' '}
|
||||||
<span style={{ color: '#03a9f4' }}>
|
<span style={{ color: '#03a9f4' }}>
|
||||||
{isUsingGateway?.toString()}
|
{isUsingGateway?.toString()}
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<h4 className="lineHeight">
|
<h4 className="lineHeight">
|
||||||
{t('core:ui.version', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('core:ui.version', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
<span style={{ color: '#03a9f4' }}>{manifestData.version}</span>
|
<span style={{ color: '#03a9f4' }}>{manifestData.version}</span>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,6 +8,7 @@ import { MembersIcon } from '../../assets/Icons/MembersIcon';
|
|||||||
import { AdminsIcon } from '../../assets/Icons/AdminsIcon';
|
import { AdminsIcon } from '../../assets/Icons/AdminsIcon';
|
||||||
import LockIcon from '@mui/icons-material/Lock';
|
import LockIcon from '@mui/icons-material/Lock';
|
||||||
import NoEncryptionGmailerrorredIcon from '@mui/icons-material/NoEncryptionGmailerrorred';
|
import NoEncryptionGmailerrorredIcon from '@mui/icons-material/NoEncryptionGmailerrorred';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const IconWrapper = ({
|
const IconWrapper = ({
|
||||||
children,
|
children,
|
||||||
@ -83,6 +84,8 @@ export const DesktopHeader = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [value, setValue] = useState(0);
|
const [value, setValue] = useState(0);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -108,6 +111,7 @@ export const DesktopHeader = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isPrivate === false && (
|
{isPrivate === false && (
|
||||||
<NoEncryptionGmailerrorredIcon
|
<NoEncryptionGmailerrorredIcon
|
||||||
sx={{
|
sx={{
|
||||||
@ -115,6 +119,7 @@ export const DesktopHeader = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
@ -122,7 +127,7 @@ export const DesktopHeader = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{selectedGroup?.groupId === '0'
|
{selectedGroup?.groupId === '0'
|
||||||
? 'General'
|
? t('core:general', { postProcess: 'capitalizeFirstChar' })
|
||||||
: selectedGroup?.groupName}
|
: selectedGroup?.groupName}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -146,7 +151,9 @@ export const DesktopHeader = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="ANN"
|
label={t('core:announcement', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
selected={isAnnouncement}
|
selected={isAnnouncement}
|
||||||
selectColor={theme.palette.action.selected}
|
selectColor={theme.palette.action.selected}
|
||||||
customHeight="55px"
|
customHeight="55px"
|
||||||
@ -174,7 +181,7 @@ export const DesktopHeader = ({
|
|||||||
color={
|
color={
|
||||||
isChat ? theme.palette.text.primary : theme.palette.text.secondary
|
isChat ? theme.palette.text.primary : theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Chat"
|
label={t('core:chat', { postProcess: 'capitalizeFirstChar' })}
|
||||||
selected={isChat}
|
selected={isChat}
|
||||||
selectColor={theme.palette.action.selected}
|
selectColor={theme.palette.action.selected}
|
||||||
customHeight="55px"
|
customHeight="55px"
|
||||||
@ -204,7 +211,9 @@ export const DesktopHeader = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Threads"
|
label={t('core:thread_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
selected={isForum}
|
selected={isForum}
|
||||||
selectColor={theme.palette.action.selected}
|
selectColor={theme.palette.action.selected}
|
||||||
customHeight="55px"
|
customHeight="55px"
|
||||||
@ -229,7 +238,9 @@ export const DesktopHeader = ({
|
|||||||
<IconWrapper
|
<IconWrapper
|
||||||
color={theme.palette.text.secondary}
|
color={theme.palette.text.secondary}
|
||||||
customHeight="55px"
|
customHeight="55px"
|
||||||
label="Members"
|
label={t('core:member_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
selected={false}
|
selected={false}
|
||||||
>
|
>
|
||||||
<MembersIcon
|
<MembersIcon
|
||||||
@ -251,7 +262,9 @@ export const DesktopHeader = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Admins"
|
label={t('core:admin_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
selected={groupSection === 'adminSpace'}
|
selected={groupSection === 'adminSpace'}
|
||||||
customHeight="55px"
|
customHeight="55px"
|
||||||
selectColor={theme.palette.action.selected}
|
selectColor={theme.palette.action.selected}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import { Box, ButtonBase, useTheme } from '@mui/material';
|
import { Box, ButtonBase, useTheme } from '@mui/material';
|
||||||
import { HomeIcon } from '../assets/Icons/HomeIcon';
|
import { HomeIcon } from '../../assets/Icons/HomeIcon';
|
||||||
import { Save } from './Save/Save';
|
import { Save } from '../Save/Save';
|
||||||
import { IconWrapper } from './Desktop/DesktopFooter';
|
import { IconWrapper } from '../Desktop/DesktopFooter';
|
||||||
import { enabledDevModeAtom } from '../atoms/global';
|
import { enabledDevModeAtom } from '../../atoms/global';
|
||||||
import { AppsIcon } from '../assets/Icons/AppsIcon';
|
import { AppsIcon } from '../../assets/Icons/AppsIcon';
|
||||||
import ThemeSelector from './Theme/ThemeSelector';
|
import ThemeSelector from '../Theme/ThemeSelector';
|
||||||
import { CoreSyncStatus } from './CoreSyncStatus';
|
import { CoreSyncStatus } from '../CoreSyncStatus';
|
||||||
import LanguageSelector from './Language/LanguageSelector';
|
import LanguageSelector from '../Language/LanguageSelector';
|
||||||
import { MessagingIconFilled } from '../assets/Icons/MessagingIconFilled';
|
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const DesktopSideBar = ({
|
export const DesktopSideBar = ({
|
||||||
goToHome,
|
goToHome,
|
||||||
@ -27,6 +28,7 @@ export const DesktopSideBar = ({
|
|||||||
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
@ -79,7 +81,7 @@ export const DesktopSideBar = ({
|
|||||||
color={
|
color={
|
||||||
isApps ? theme.palette.text.primary : theme.palette.text.secondary
|
isApps ? theme.palette.text.primary : theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Apps"
|
label={t('core:app_other', { postProcess: 'capitalizeFirstChar' })}
|
||||||
selected={isApps}
|
selected={isApps}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
@ -105,7 +107,7 @@ export const DesktopSideBar = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Chat"
|
label={t('core:chat', { postProcess: 'capitalizeFirstChar' })}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<MessagingIconFilled
|
<MessagingIconFilled
|
||||||
@ -135,7 +137,7 @@ export const DesktopSideBar = ({
|
|||||||
? theme.palette.text.primary
|
? theme.palette.text.primary
|
||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label="Dev"
|
label={t('core:dev', { postProcess: 'capitalizeFirstChar' })}
|
||||||
disableWidth
|
disableWidth
|
||||||
>
|
>
|
||||||
<AppsIcon height={30} color={theme.palette.text.secondary} />
|
<AppsIcon height={30} color={theme.palette.text.secondary} />
|
@ -1,19 +1,12 @@
|
|||||||
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
import { useContext, useState } from 'react';
|
||||||
import { MyContext, getBaseApiReact } from '../../App';
|
import { MyContext, getBaseApiReact } from '../../App';
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
CardHeader,
|
|
||||||
Typography,
|
Typography,
|
||||||
RadioGroup,
|
|
||||||
Radio,
|
|
||||||
FormControlLabel,
|
|
||||||
Button,
|
|
||||||
Box,
|
Box,
|
||||||
ButtonBase,
|
ButtonBase,
|
||||||
Divider,
|
Divider,
|
||||||
Dialog,
|
|
||||||
IconButton,
|
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
@ -27,8 +20,8 @@ import { Spacer } from '../../common/Spacer';
|
|||||||
import { FileAttachmentContainer, FileAttachmentFont } from './Embed-styles';
|
import { FileAttachmentContainer, FileAttachmentFont } from './Embed-styles';
|
||||||
import DownloadIcon from '@mui/icons-material/Download';
|
import DownloadIcon from '@mui/icons-material/Download';
|
||||||
import SaveIcon from '@mui/icons-material/Save';
|
import SaveIcon from '@mui/icons-material/Save';
|
||||||
|
|
||||||
import { decodeIfEncoded } from '../../utils/decode';
|
import { decodeIfEncoded } from '../../utils/decode';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const AttachmentCard = ({
|
export const AttachmentCard = ({
|
||||||
resourceData,
|
resourceData,
|
||||||
@ -45,6 +38,7 @@ export const AttachmentCard = ({
|
|||||||
const [isOpen, setIsOpen] = useState(true);
|
const [isOpen, setIsOpen] = useState(true);
|
||||||
const { downloadResource } = useContext(MyContext);
|
const { downloadResource } = useContext(MyContext);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const saveToDisk = async () => {
|
const saveToDisk = async () => {
|
||||||
const { name, service, identifier } = resourceData;
|
const { name, service, identifier } = resourceData;
|
||||||
@ -64,16 +58,15 @@ export const AttachmentCard = ({
|
|||||||
let blobUrl;
|
let blobUrl;
|
||||||
try {
|
try {
|
||||||
const { name, service, identifier, key } = resourceData;
|
const { name, service, identifier, key } = resourceData;
|
||||||
|
|
||||||
const url = `${getBaseApiReact()}/arbitrary/${service}/${name}/${identifier}?encoding=base64`;
|
const url = `${getBaseApiReact()}/arbitrary/${service}/${name}/${identifier}?encoding=base64`;
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const data = await res.text();
|
const data = await res.text();
|
||||||
let decryptedData;
|
let decryptedData;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (key && encryptionType === 'private') {
|
if (key && encryptionType === 'private') {
|
||||||
decryptedData = await window.sendMessage(
|
decryptedData = await window.sendMessage(
|
||||||
'DECRYPT_DATA_WITH_SHARING_KEY',
|
'DECRYPT_DATA_WITH_SHARING_KEY',
|
||||||
|
|
||||||
{
|
{
|
||||||
encryptedData: data,
|
encryptedData: data,
|
||||||
key: decodeURIComponent(key),
|
key: decodeURIComponent(key),
|
||||||
@ -91,11 +84,19 @@ export const AttachmentCard = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error('Unable to decrypt');
|
throw new Error(
|
||||||
|
t('auth:message.error.unable_decrypt', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!decryptedData || decryptedData?.error)
|
if (!decryptedData || decryptedData?.error)
|
||||||
throw new Error('Could not decrypt data');
|
throw new Error(
|
||||||
|
t('auth:message.error.decrypt_data', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
blobUrl = base64ToBlobUrl(decryptedData, resourceData?.mimeType);
|
blobUrl = base64ToBlobUrl(decryptedData, resourceData?.mimeType);
|
||||||
const response = await fetch(blobUrl);
|
const response = await fetch(blobUrl);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
@ -108,18 +109,18 @@ export const AttachmentCard = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.background.default,
|
backgroundColor: theme.palette.background.default,
|
||||||
height: '250px',
|
height: '250px',
|
||||||
// height: isOpen ? "auto" : "150px",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
padding: '16px 16px 0px 16px',
|
padding: '16px 16px 0px 16px',
|
||||||
}}
|
}}
|
||||||
@ -136,12 +137,15 @@ export const AttachmentCard = ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography>ATTACHMENT embed</Typography>
|
<Typography>
|
||||||
|
{t('core:attachment', { postProcess: 'capitalizeAll' })}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
gap: '10px',
|
gap: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -154,6 +158,7 @@ export const AttachmentCard = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
{external && (
|
{external && (
|
||||||
<ButtonBase>
|
<ButtonBase>
|
||||||
<OpenInNewIcon
|
<OpenInNewIcon
|
||||||
@ -167,6 +172,7 @@ export const AttachmentCard = ({
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
padding: '8px 16px 8px 16px',
|
padding: '8px 16px 8px 16px',
|
||||||
@ -177,35 +183,47 @@ export const AttachmentCard = ({
|
|||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Created by {decodeIfEncoded(owner)}
|
{t('core:message.generic.created_by', {
|
||||||
|
owner: decodeIfEncoded(owner),
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{encryptionType === 'private'
|
{encryptionType === 'private'
|
||||||
? 'ENCRYPTED'
|
? t('core:message.generic.encrypted', {
|
||||||
|
postProcess: 'capitalizeAll',
|
||||||
|
})
|
||||||
: encryptionType === 'group'
|
: encryptionType === 'group'
|
||||||
? 'GROUP ENCRYPTED'
|
? t('group:message.generic.group_encrypted', {
|
||||||
: 'Not encrypted'}
|
postProcess: 'capitalizeAll',
|
||||||
|
})
|
||||||
|
: t('core:message.generic.encrypted_not', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
alignItems: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isLoadingParent && isOpen && (
|
{isLoadingParent && isOpen && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
@ -215,9 +233,9 @@ export const AttachmentCard = ({
|
|||||||
{errorMsg && (
|
{errorMsg && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
@ -249,8 +267,8 @@ export const AttachmentCard = ({
|
|||||||
)}
|
)}
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
sx={{
|
sx={{
|
||||||
width: '90%',
|
|
||||||
maxWidth: '400px',
|
maxWidth: '400px',
|
||||||
|
width: '90%',
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (resourceDetails?.status?.status === 'READY') {
|
if (resourceDetails?.status?.status === 'READY') {
|
||||||
@ -267,15 +285,23 @@ export const AttachmentCard = ({
|
|||||||
<FileAttachmentContainer>
|
<FileAttachmentContainer>
|
||||||
<Typography>
|
<Typography>
|
||||||
{resourceDetails?.status?.status === 'DOWNLOADED'
|
{resourceDetails?.status?.status === 'DOWNLOADED'
|
||||||
? 'BUILDING'
|
? t('core:message.error.generic.building', {
|
||||||
|
postProcess: 'capitalizeAll',
|
||||||
|
})
|
||||||
: resourceDetails?.status?.status}
|
: resourceDetails?.status?.status}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
{!resourceDetails && (
|
{!resourceDetails && (
|
||||||
<>
|
<>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
<FileAttachmentFont>Download File</FileAttachmentFont>
|
<FileAttachmentFont>
|
||||||
|
{t('core:action.download_file', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
</FileAttachmentFont>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{resourceDetails &&
|
{resourceDetails &&
|
||||||
resourceDetails?.status?.status !== 'READY' &&
|
resourceDetails?.status?.status !== 'READY' &&
|
||||||
resourceDetails?.status?.status !== 'FAILED_TO_DOWNLOAD' && (
|
resourceDetails?.status?.status !== 'FAILED_TO_DOWNLOAD' && (
|
||||||
@ -287,16 +313,23 @@ export const AttachmentCard = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<FileAttachmentFont>
|
<FileAttachmentFont>
|
||||||
Downloading:{' '}
|
{t('core:message.generic.downloading', {
|
||||||
{resourceDetails?.status?.percentLoaded || '0'}%
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
: {resourceDetails?.status?.percentLoaded || '0'}%
|
||||||
</FileAttachmentFont>
|
</FileAttachmentFont>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{resourceDetails &&
|
{resourceDetails &&
|
||||||
resourceDetails?.status?.status === 'READY' && (
|
resourceDetails?.status?.status === 'READY' && (
|
||||||
<>
|
<>
|
||||||
<SaveIcon />
|
<SaveIcon />
|
||||||
<FileAttachmentFont>Save to Disk</FileAttachmentFont>
|
<FileAttachmentFont>
|
||||||
|
{t('core:action.save_disk', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
|
</FileAttachmentFont>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</FileAttachmentContainer>
|
</FileAttachmentContainer>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { Box, Typography, styled } from "@mui/material";
|
import { Box, Typography, styled } from '@mui/material';
|
||||||
|
|
||||||
export const FileAttachmentContainer = styled(Box)(({ theme }) => ({
|
export const FileAttachmentContainer = styled(Box)(({ theme }) => ({
|
||||||
display: "flex",
|
alignItems: 'center',
|
||||||
alignItems: "center",
|
border: `1px solid ${theme.palette.text.primary}`,
|
||||||
padding: "5px 10px",
|
display: 'flex',
|
||||||
border: `1px solid ${theme.palette.text.primary}`,
|
gap: '20px',
|
||||||
width: "100%",
|
padding: '5px 10px',
|
||||||
gap: '20px'
|
width: '100%',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const FileAttachmentFont = styled(Typography)(({ theme }) => ({
|
export const FileAttachmentFont = styled(Typography)(({ theme }) => ({
|
||||||
fontSize: "20px",
|
fontSize: '20px',
|
||||||
letterSpacing: 0,
|
fontWeight: 400,
|
||||||
fontWeight: 400,
|
letterSpacing: 0,
|
||||||
userSelect: "none",
|
userSelect: 'none',
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: 'nowrap',
|
||||||
}));
|
}));
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { getBaseApiReact } from '../../App';
|
import { getBaseApiReact } from '../../App';
|
||||||
|
|
||||||
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
|
||||||
|
|
||||||
import { extractComponents } from '../Chat/MessageDisplay';
|
import { extractComponents } from '../Chat/MessageDisplay';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../../utils/events';
|
||||||
|
|
||||||
import { base64ToBlobUrl } from '../../utils/fileReading';
|
import { base64ToBlobUrl } from '../../utils/fileReading';
|
||||||
import {
|
import {
|
||||||
blobControllerAtom,
|
blobControllerAtom,
|
||||||
@ -17,8 +14,8 @@ import { parseQortalLink } from './embed-utils';
|
|||||||
import { PollCard } from './PollEmbed';
|
import { PollCard } from './PollEmbed';
|
||||||
import { ImageCard } from './ImageEmbed';
|
import { ImageCard } from './ImageEmbed';
|
||||||
import { AttachmentCard } from './AttachmentEmbed';
|
import { AttachmentCard } from './AttachmentEmbed';
|
||||||
import { decodeIfEncoded } from '../../utils/decode';
|
|
||||||
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
|
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const getPoll = async (name) => {
|
const getPoll = async (name) => {
|
||||||
const pollName = name;
|
const pollName = name;
|
||||||
@ -32,6 +29,7 @@ const getPoll = async (name) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const responseData = await response.json();
|
const responseData = await response.json();
|
||||||
|
|
||||||
if (responseData?.message?.includes('POLL_NO_EXISTS')) {
|
if (responseData?.message?.includes('POLL_NO_EXISTS')) {
|
||||||
throw new Error('POLL_NO_EXISTS');
|
throw new Error('POLL_NO_EXISTS');
|
||||||
} else if (responseData?.pollName) {
|
} else if (responseData?.pollName) {
|
||||||
@ -65,7 +63,7 @@ export const Embed = ({ embedLink }) => {
|
|||||||
const [parsedData, setParsedData] = useState(null);
|
const [parsedData, setParsedData] = useState(null);
|
||||||
const setBlobs = useSetAtom(blobControllerAtom);
|
const setBlobs = useSetAtom(blobControllerAtom);
|
||||||
const [selectedGroupId] = useAtom(selectedGroupIdAtom);
|
const [selectedGroupId] = useAtom(selectedGroupIdAtom);
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const resourceData = useMemo(() => {
|
const resourceData = useMemo(() => {
|
||||||
const parsedDataOnTheFly = parseQortalLink(embedLink);
|
const parsedDataOnTheFly = parseQortalLink(embedLink);
|
||||||
if (
|
if (
|
||||||
@ -108,11 +106,20 @@ export const Embed = ({ embedLink }) => {
|
|||||||
setErrorMsg('');
|
setErrorMsg('');
|
||||||
setType('POLL');
|
setType('POLL');
|
||||||
if (!parsedData?.name)
|
if (!parsedData?.name)
|
||||||
throw new Error('Invalid poll embed link. Missing name.');
|
throw new Error(
|
||||||
|
t('core:message.error.invalid_poll_embed_link_name', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
const pollRes = await getPoll(parsedData.name);
|
const pollRes = await getPoll(parsedData.name);
|
||||||
setPoll(pollRes);
|
setPoll(pollRes);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setErrorMsg(error?.message || 'Invalid embed link');
|
setErrorMsg(
|
||||||
|
error?.message ||
|
||||||
|
t('core:message.error.invalid_embed_link', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
@ -147,14 +154,15 @@ export const Embed = ({ embedLink }) => {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await responseData.text();
|
const data = await responseData.text();
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
let decryptedData;
|
let decryptedData;
|
||||||
try {
|
try {
|
||||||
if (key && encryptionType === 'private') {
|
if (key && encryptionType === 'private') {
|
||||||
decryptedData = await window.sendMessage(
|
decryptedData = await window.sendMessage(
|
||||||
'DECRYPT_DATA_WITH_SHARING_KEY',
|
'DECRYPT_DATA_WITH_SHARING_KEY',
|
||||||
|
|
||||||
{
|
{
|
||||||
encryptedData: data,
|
encryptedData: data,
|
||||||
key: decodeURIComponent(key),
|
key: decodeURIComponent(key),
|
||||||
@ -164,7 +172,6 @@ export const Embed = ({ embedLink }) => {
|
|||||||
if (encryptionType === 'group') {
|
if (encryptionType === 'group') {
|
||||||
decryptedData = await window.sendMessage(
|
decryptedData = await window.sendMessage(
|
||||||
'DECRYPT_QORTAL_GROUP_DATA',
|
'DECRYPT_QORTAL_GROUP_DATA',
|
||||||
|
|
||||||
{
|
{
|
||||||
data64: data,
|
data64: data,
|
||||||
groupId: selectedGroupId,
|
groupId: selectedGroupId,
|
||||||
@ -172,11 +179,19 @@ export const Embed = ({ embedLink }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error('Unable to decrypt');
|
throw new Error(
|
||||||
|
t('auth:message.error.unable_decrypt', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!decryptedData || decryptedData?.error)
|
if (!decryptedData || decryptedData?.error)
|
||||||
throw new Error('Could not decrypt data');
|
throw new Error(
|
||||||
|
t('auth:message.error.decrypt_data', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
imageFinalUrl = base64ToBlobUrl(
|
imageFinalUrl = base64ToBlobUrl(
|
||||||
decryptedData,
|
decryptedData,
|
||||||
parsedData?.mimeType
|
parsedData?.mimeType
|
||||||
@ -193,11 +208,14 @@ export const Embed = ({ embedLink }) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
throw new Error('No data for image');
|
throw new Error(
|
||||||
|
t('core:message.generic.no_data_image', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
imageFinalUrl = `${getBaseApiReact()}/arbitrary/${service}/${name}/${identifier}?async=true`;
|
imageFinalUrl = `${getBaseApiReact()}/arbitrary/${service}/${name}/${identifier}?async=true`;
|
||||||
|
|
||||||
// If parsedData is used here, it must be defined somewhere
|
// If parsedData is used here, it must be defined somewhere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +238,9 @@ export const Embed = ({ embedLink }) => {
|
|||||||
return imageFinalUrl;
|
return imageFinalUrl;
|
||||||
} else {
|
} else {
|
||||||
setErrorMsg(
|
setErrorMsg(
|
||||||
'Unable to download IMAGE. Please try again later by clicking the refresh button'
|
t('core:message.error.unable_download_image', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -229,7 +249,9 @@ export const Embed = ({ embedLink }) => {
|
|||||||
setErrorMsg(
|
setErrorMsg(
|
||||||
error?.error ||
|
error?.error ||
|
||||||
error?.message ||
|
error?.message ||
|
||||||
'An unexpected error occurred while trying to download the image'
|
t('core:message.error.generic', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -240,7 +262,11 @@ export const Embed = ({ embedLink }) => {
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
setErrorMsg('');
|
setErrorMsg('');
|
||||||
if (!parsedData?.name || !parsedData?.service || !parsedData?.identifier)
|
if (!parsedData?.name || !parsedData?.service || !parsedData?.identifier)
|
||||||
throw new Error('Invalid image embed link. Missing param.');
|
throw new Error(
|
||||||
|
t('core:message.error.invalid_image_embed_link_name', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
let image = await getImage(
|
let image = await getImage(
|
||||||
{
|
{
|
||||||
name: parsedData.name,
|
name: parsedData.name,
|
||||||
@ -253,7 +279,12 @@ export const Embed = ({ embedLink }) => {
|
|||||||
|
|
||||||
setImageUrl(image);
|
setImageUrl(image);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setErrorMsg(error?.message || 'Invalid embed link');
|
setErrorMsg(
|
||||||
|
error?.message ||
|
||||||
|
t('core:message.error.invalid_embed_link', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
@ -290,7 +321,12 @@ export const Embed = ({ embedLink }) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setErrorMsg(error?.message || 'Invalid embed link');
|
setErrorMsg(
|
||||||
|
error?.message ||
|
||||||
|
t('core:message.error.invalid_embed_link', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -299,7 +335,12 @@ export const Embed = ({ embedLink }) => {
|
|||||||
const parsedData = parseQortalLink(embedLink);
|
const parsedData = parseQortalLink(embedLink);
|
||||||
handleImage(parsedData);
|
handleImage(parsedData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setErrorMsg(error?.message || 'Invalid embed link');
|
setErrorMsg(
|
||||||
|
error?.message ||
|
||||||
|
t('core:message.error.invalid_embed_link', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
@ -10,13 +10,13 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
|
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||||
import { CustomLoader } from '../../common/CustomLoader';
|
import { CustomLoader } from '../../common/CustomLoader';
|
||||||
import ImageIcon from '@mui/icons-material/Image';
|
import ImageIcon from '@mui/icons-material/Image';
|
||||||
import CloseIcon from '@mui/icons-material/Close';
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
import { decodeIfEncoded } from '../../utils/decode';
|
import { decodeIfEncoded } from '../../utils/decode';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const ImageCard = ({
|
export const ImageCard = ({
|
||||||
image,
|
image,
|
||||||
@ -30,20 +30,16 @@ export const ImageCard = ({
|
|||||||
encryptionType,
|
encryptionType,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [isOpen, setIsOpen] = useState(true);
|
const [isOpen, setIsOpen] = useState(true);
|
||||||
const [height, setHeight] = useState('400px');
|
const [height, setHeight] = useState('400px');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
fetchImage();
|
fetchImage();
|
||||||
}
|
}
|
||||||
}, [isOpen]);
|
}, [isOpen]);
|
||||||
|
|
||||||
// useEffect(()=> {
|
|
||||||
// if(errorMsg){
|
|
||||||
// setHeight('300px')
|
|
||||||
// }
|
|
||||||
// }, [errorMsg])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
@ -72,12 +68,15 @@ export const ImageCard = ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography>IMAGE embed</Typography>
|
<Typography>
|
||||||
|
{t('core:image_embed', { postProcess: 'capitalizeFirstWord' })}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
gap: '10px',
|
gap: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -90,6 +89,7 @@ export const ImageCard = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
{external && (
|
{external && (
|
||||||
<ButtonBase>
|
<ButtonBase>
|
||||||
<OpenInNewIcon
|
<OpenInNewIcon
|
||||||
@ -103,6 +103,7 @@ export const ImageCard = ({
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
padding: '8px 16px 8px 16px',
|
padding: '8px 16px 8px 16px',
|
||||||
@ -113,27 +114,39 @@ export const ImageCard = ({
|
|||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Created by {decodeIfEncoded(owner)}
|
{t('core:message.error.created_by', {
|
||||||
|
owner: decodeIfEncoded(owner),
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{encryptionType === 'private'
|
{encryptionType === 'private'
|
||||||
? 'ENCRYPTED'
|
? t('core:message.generic.encrypted', {
|
||||||
|
postProcess: 'capitalizeAll',
|
||||||
|
})
|
||||||
: encryptionType === 'group'
|
: encryptionType === 'group'
|
||||||
? 'GROUP ENCRYPTED'
|
? t('group:message.generic.group_encrypted', {
|
||||||
: 'Not encrypted'}
|
postProcess: 'capitalizeAll',
|
||||||
|
})
|
||||||
|
: t('core:message.generic.encrypted_not', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
alignItems: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isLoadingParent && isOpen && (
|
{isLoadingParent && isOpen && (
|
||||||
@ -144,10 +157,10 @@ export const ImageCard = ({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
<CustomLoader />
|
||||||
<CustomLoader />{' '}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{errorMsg && (
|
{errorMsg && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -164,7 +177,7 @@ export const ImageCard = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{errorMsg}
|
{errorMsg}
|
||||||
</Typography>{' '}
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
@ -189,10 +202,10 @@ export function ImageViewer({ src, alt = '' }) {
|
|||||||
{/* Image in container */}
|
{/* Image in container */}
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
maxWidth: '100%', // Prevent horizontal overflow
|
cursor: 'pointer',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
cursor: 'pointer',
|
maxWidth: '100%', // Prevent horizontal overflow
|
||||||
}}
|
}}
|
||||||
onClick={handleOpenFullscreen}
|
onClick={handleOpenFullscreen}
|
||||||
>
|
>
|
||||||
@ -226,13 +239,13 @@ export function ImageViewer({ src, alt = '' }) {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: theme.palette.background.paper, // Optional: dark background for fullscreen mode
|
backgroundColor: theme.palette.background.paper, // Optional: dark background for fullscreen mode
|
||||||
|
display: 'flex',
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
position: 'relative',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Close Button */}
|
{/* Close Button */}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext, useEffect, useState } from 'react';
|
import { useContext, useEffect, useState } from 'react';
|
||||||
import { MyContext } from '../../App';
|
import { MyContext } from '../../App';
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
@ -21,6 +21,7 @@ import RefreshIcon from '@mui/icons-material/Refresh';
|
|||||||
import { Spacer } from '../../common/Spacer';
|
import { Spacer } from '../../common/Spacer';
|
||||||
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||||
import { CustomLoader } from '../../common/CustomLoader';
|
import { CustomLoader } from '../../common/CustomLoader';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const PollCard = ({
|
export const PollCard = ({
|
||||||
poll,
|
poll,
|
||||||
@ -39,11 +40,15 @@ export const PollCard = ({
|
|||||||
const { show, userInfo } = useContext(MyContext);
|
const { show, userInfo } = useContext(MyContext);
|
||||||
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
|
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const handleVote = async () => {
|
const handleVote = async () => {
|
||||||
const fee = await getFee('VOTE_ON_POLL');
|
const fee = await getFee('VOTE_ON_POLL');
|
||||||
|
|
||||||
await show({
|
await show({
|
||||||
message: `Do you accept this VOTE_ON_POLL transaction? POLLS are public!`,
|
message: t('core:question.accept_vote_on_poll', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
setIsLoadingSubmit(true);
|
setIsLoadingSubmit(true);
|
||||||
@ -62,15 +67,20 @@ export const PollCard = ({
|
|||||||
if (response.error) {
|
if (response.error) {
|
||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: response?.error || 'Unable to vote.',
|
message:
|
||||||
|
response?.error ||
|
||||||
|
t('core:message.error.unable_vote', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message:
|
message: t('core:message.success.voted', {
|
||||||
'Successfully voted. Please wait a couple minutes for the network to propogate the changes.',
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
}
|
}
|
||||||
@ -79,7 +89,11 @@ export const PollCard = ({
|
|||||||
setIsLoadingSubmit(false);
|
setIsLoadingSubmit(false);
|
||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: error?.message || 'Unable to vote.',
|
message:
|
||||||
|
error?.message ||
|
||||||
|
t('core:message.error.unable_vote', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
});
|
});
|
||||||
@ -111,16 +125,16 @@ export const PollCard = ({
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
padding: '16px 16px 0px 16px',
|
padding: '16px 16px 0px 16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
gap: '10px',
|
gap: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -129,8 +143,11 @@ export const PollCard = ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography>POLL embed</Typography>
|
<Typography>
|
||||||
|
{t('core:poll_embed', { postProcess: 'capitalizeFirstWord' })}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -147,6 +164,7 @@ export const PollCard = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
{external && (
|
{external && (
|
||||||
<ButtonBase>
|
<ButtonBase>
|
||||||
<OpenInNewIcon
|
<OpenInNewIcon
|
||||||
@ -170,16 +188,21 @@ export const PollCard = ({
|
|||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Created by {ownerName || poll?.info?.owner}
|
{t('core:message.error.created_by', {
|
||||||
|
owner: poll?.info?.owner,
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
<Divider sx={{ borderColor: 'rgb(255 255 255 / 10%)' }} />
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
alignItems: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!isOpen && !errorMsg && (
|
{!isOpen && !errorMsg && (
|
||||||
@ -192,31 +215,31 @@ export const PollCard = ({
|
|||||||
setIsOpen(true);
|
setIsOpen(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Show poll
|
{t('core:action.show_poll', { postProcess: 'capitalizeFirst' })}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isLoadingParent && isOpen && (
|
{isLoadingParent && isOpen && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
<CustomLoader />
|
||||||
<CustomLoader />{' '}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{errorMsg && (
|
{errorMsg && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
@ -224,7 +247,7 @@ export const PollCard = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{errorMsg}
|
{errorMsg}
|
||||||
</Typography>{' '}
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
@ -243,14 +266,16 @@ export const PollCard = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Options
|
{t('core:option_other', { postProcess: 'capitalizeFirst' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
value={selectedOption}
|
value={selectedOption}
|
||||||
onChange={(e) => setSelectedOption(e.target.value)}
|
onChange={(e) => setSelectedOption(e.target.value)}
|
||||||
@ -269,6 +294,7 @@ export const PollCard = ({
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -282,8 +308,9 @@ export const PollCard = ({
|
|||||||
disabled={!selectedOption || isLoadingSubmit}
|
disabled={!selectedOption || isLoadingSubmit}
|
||||||
onClick={handleVote}
|
onClick={handleVote}
|
||||||
>
|
>
|
||||||
Vote
|
{t('core:action.vote', { postProcess: 'capitalizeFirst' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
@ -298,6 +325,7 @@ export const PollCard = ({
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
@ -308,26 +336,36 @@ export const PollCard = ({
|
|||||||
: 'hidden',
|
: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
You've already voted.
|
{t('core:message.generic.already_voted', {
|
||||||
|
postProcess: 'capitalizeFirst',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
|
|
||||||
{isLoadingSubmit && (
|
{isLoadingSubmit && (
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Is processing transaction, please wait...
|
{t('core:message.generic.processing_transaction', {
|
||||||
|
postProcess: 'capitalizeFirst',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowResults((prev) => !prev);
|
setShowResults((prev) => !prev);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{showResults ? 'hide ' : 'show '} results
|
{showResults
|
||||||
|
? t('core:action.hide', { postProcess: 'capitalizeFirst' })
|
||||||
|
: t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|
||||||
{showResults && <PollResults votes={poll?.votes} />}
|
{showResults && <PollResults votes={poll?.votes} />}
|
||||||
</Box>
|
</Box>
|
||||||
</Card>
|
</Card>
|
||||||
@ -339,6 +377,8 @@ const PollResults = ({ votes }) => {
|
|||||||
...votes?.voteCounts?.map((option) => option.voteCount)
|
...votes?.voteCounts?.map((option) => option.voteCount)
|
||||||
);
|
);
|
||||||
const options = votes?.voteCounts;
|
const options = votes?.voteCounts;
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ width: '100%', p: 2 }}>
|
<Box sx={{ width: '100%', p: 2 }}>
|
||||||
{options
|
{options
|
||||||
@ -355,6 +395,7 @@ const PollResults = ({ votes }) => {
|
|||||||
>
|
>
|
||||||
{`${index + 1}. ${option.optionName}`}
|
{`${index + 1}. ${option.optionName}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="body1"
|
variant="body1"
|
||||||
sx={{
|
sx={{
|
||||||
@ -362,24 +403,25 @@ const PollResults = ({ votes }) => {
|
|||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{option.voteCount} votes
|
{t('core:vote', { count: option.voteCount })}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
mt: 1,
|
|
||||||
height: 10,
|
|
||||||
backgroundColor: '#e0e0e0',
|
backgroundColor: '#e0e0e0',
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
|
height: 10,
|
||||||
|
mt: 1,
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: `${(option.voteCount / maxVotes) * 100}%`,
|
|
||||||
height: '100%',
|
|
||||||
backgroundColor: index === 0 ? '#3f51b5' : '#f50057',
|
backgroundColor: index === 0 ? '#3f51b5' : '#f50057',
|
||||||
|
height: '100%',
|
||||||
transition: 'width 0.3s ease-in-out',
|
transition: 'width 0.3s ease-in-out',
|
||||||
|
width: `${(option.voteCount / maxVotes) * 100}%`,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
import {
|
||||||
|
FC,
|
||||||
|
KeyboardEvent,
|
||||||
|
useContext,
|
||||||
|
useEffect,
|
||||||
|
useMemo,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import { Box, IconButton, Slider } from '@mui/material';
|
import { Box, IconButton, Slider } from '@mui/material';
|
||||||
import { CircularProgress, Typography } from '@mui/material';
|
import { CircularProgress, Typography } from '@mui/material';
|
||||||
@ -8,48 +16,43 @@ import {
|
|||||||
Pause,
|
Pause,
|
||||||
VolumeUp,
|
VolumeUp,
|
||||||
Fullscreen,
|
Fullscreen,
|
||||||
PictureInPicture,
|
|
||||||
VolumeOff,
|
VolumeOff,
|
||||||
Calculate,
|
|
||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
import { styled } from '@mui/system';
|
import { styled } from '@mui/system';
|
||||||
import { Refresh } from '@mui/icons-material';
|
import { Refresh } from '@mui/icons-material';
|
||||||
|
|
||||||
import { Menu, MenuItem } from '@mui/material';
|
|
||||||
import { MoreVert as MoreIcon } from '@mui/icons-material';
|
|
||||||
import { MyContext, getBaseApiReact } from '../../App';
|
import { MyContext, getBaseApiReact } from '../../App';
|
||||||
import { resourceKeySelector } from '../../atoms/global';
|
import { resourceKeySelector } from '../../atoms/global';
|
||||||
|
|
||||||
import { useAtomValue } from 'jotai';
|
import { useAtomValue } from 'jotai';
|
||||||
const VideoContainer = styled(Box)`
|
const VideoContainer = styled(Box)`
|
||||||
position: relative;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
justify-content: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const VideoElement = styled('video')`
|
const VideoElement = styled('video')`
|
||||||
width: 100%;
|
background: rgb(33, 33, 33);
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: calc(100vh - 150px);
|
max-height: calc(100vh - 150px);
|
||||||
background: rgb(33, 33, 33);
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ControlsContainer = styled(Box)`
|
const ControlsContainer = styled(Box)`
|
||||||
position: absolute;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 8px;
|
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
left: 0;
|
||||||
|
padding: 8px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
interface VideoPlayerProps {
|
interface VideoPlayerProps {
|
||||||
@ -64,7 +67,8 @@ interface VideoPlayerProps {
|
|||||||
user?: string;
|
user?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
// TODO translate and theme? Is it worth?
|
||||||
|
export const VideoPlayer: FC<VideoPlayerProps> = ({
|
||||||
poster,
|
poster,
|
||||||
name,
|
name,
|
||||||
identifier,
|
identifier,
|
||||||
@ -83,9 +87,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
}, [service, name, identifier]);
|
}, [service, name, identifier]);
|
||||||
|
|
||||||
const download = useAtomValue(resourceKeySelector(keyIdentifier));
|
const download = useAtomValue(resourceKeySelector(keyIdentifier));
|
||||||
|
|
||||||
const { downloadResource } = useContext(MyContext);
|
const { downloadResource } = useContext(MyContext);
|
||||||
|
|
||||||
const videoRef = useRef<HTMLVideoElement | null>(null);
|
const videoRef = useRef<HTMLVideoElement | null>(null);
|
||||||
const [playing, setPlaying] = useState(false);
|
const [playing, setPlaying] = useState(false);
|
||||||
const [volume, setVolume] = useState(1);
|
const [volume, setVolume] = useState(1);
|
||||||
@ -242,7 +244,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
setCanPlay(true);
|
setCanPlay(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSrc = React.useCallback(async () => {
|
const getSrc = useCallback(async () => {
|
||||||
if (!name || !identifier || !service) return;
|
if (!name || !identifier || !service) return;
|
||||||
try {
|
try {
|
||||||
downloadResource({
|
downloadResource({
|
||||||
@ -317,12 +319,14 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
const progress = (current / total) * 100;
|
const progress = (current / total) * 100;
|
||||||
return Number.isNaN(progress) ? '' : progress.toFixed(0) + '%';
|
return Number.isNaN(progress) ? '' : progress.toFixed(0) + '%';
|
||||||
};
|
};
|
||||||
|
|
||||||
const mute = () => {
|
const mute = () => {
|
||||||
setIsMuted(true);
|
setIsMuted(true);
|
||||||
setMutedVolume(volume);
|
setMutedVolume(volume);
|
||||||
setVolume(0);
|
setVolume(0);
|
||||||
if (videoRef.current) videoRef.current.volume = 0;
|
if (videoRef.current) videoRef.current.volume = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
const unMute = () => {
|
const unMute = () => {
|
||||||
setIsMuted(false);
|
setIsMuted(false);
|
||||||
setVolume(mutedVolume);
|
setVolume(mutedVolume);
|
||||||
@ -349,6 +353,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
setVolume(newVolume);
|
setVolume(newVolume);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const setProgressRelative = (secondsChange: number) => {
|
const setProgressRelative = (secondsChange: number) => {
|
||||||
if (videoRef.current) {
|
if (videoRef.current) {
|
||||||
const currentTime = videoRef.current?.currentTime;
|
const currentTime = videoRef.current?.currentTime;
|
||||||
@ -373,7 +378,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const keyboardShortcutsDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
|
const keyboardShortcutsDown = (e: KeyboardEvent<HTMLDivElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
@ -424,7 +429,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const keyboardShortcutsUp = (e: React.KeyboardEvent<HTMLDivElement>) => {
|
const keyboardShortcutsUp = (e: KeyboardEvent<HTMLDivElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
@ -569,6 +574,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -586,7 +592,6 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
autoPlay={autoplay}
|
autoPlay={autoplay}
|
||||||
onClick={togglePlay}
|
onClick={togglePlay}
|
||||||
onEnded={handleEnded}
|
onEnded={handleEnded}
|
||||||
// onLoadedMetadata={handleLoadedMetadata}
|
|
||||||
onCanPlay={handleCanPlay}
|
onCanPlay={handleCanPlay}
|
||||||
preload="metadata"
|
preload="metadata"
|
||||||
style={{
|
style={{
|
||||||
@ -596,6 +601,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<ControlsContainer
|
<ControlsContainer
|
||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@ -623,6 +629,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
>
|
>
|
||||||
<Refresh />
|
<Refresh />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
||||||
<Slider
|
<Slider
|
||||||
value={progress}
|
value={progress}
|
||||||
onChange={onProgressChange}
|
onChange={onProgressChange}
|
||||||
@ -630,6 +637,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
max={videoRef.current?.duration || 100}
|
max={videoRef.current?.duration || 100}
|
||||||
sx={{ flexGrow: 1, mx: 2, color: 'var(--Mail-Background)' }}
|
sx={{ flexGrow: 1, mx: 2, color: 'var(--Mail-Background)' }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
@ -647,6 +655,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
videoRef.current?.duration &&
|
videoRef.current?.duration &&
|
||||||
formatTime(videoRef.current?.duration)}
|
formatTime(videoRef.current?.duration)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
sx={{
|
sx={{
|
||||||
color: 'rgba(255, 255, 255, 0.7)',
|
color: 'rgba(255, 255, 255, 0.7)',
|
||||||
@ -656,6 +665,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
>
|
>
|
||||||
{isMuted ? <VolumeOff /> : <VolumeUp />}
|
{isMuted ? <VolumeOff /> : <VolumeUp />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
||||||
<Slider
|
<Slider
|
||||||
value={volume}
|
value={volume}
|
||||||
onChange={onVolumeChange}
|
onChange={onVolumeChange}
|
||||||
@ -677,6 +687,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||||||
>
|
>
|
||||||
Speed: {playbackRate}x
|
Speed: {playbackRate}x
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
sx={{
|
sx={{
|
||||||
color: 'rgba(255, 255, 255, 0.7)',
|
color: 'rgba(255, 255, 255, 0.7)',
|
||||||
|
@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
export const Explore = ({ setDesktopViewMode }) => {
|
export const Explore = ({ setDesktopViewMode }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'tutorial']);
|
const { t } = useTranslation(['auth', 'core', 'group', 'tutorial']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
@ -46,7 +46,9 @@ export const Explore = ({ setDesktopViewMode }) => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('tutorial:initial.trade_qort', { postProcess: 'capitalizeFirst' })}
|
{t('tutorial:initial.trade_qort', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -73,7 +75,9 @@ export const Explore = ({ setDesktopViewMode }) => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('tutorial:initial.see_apps', { postProcess: 'capitalizeFirst' })}
|
{t('tutorial:initial.see_apps', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -103,7 +107,7 @@ export const Explore = ({ setDesktopViewMode }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('tutorial:initial.general_chat', {
|
{t('tutorial:initial.general_chat', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -131,7 +135,9 @@ export const Explore = ({ setDesktopViewMode }) => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:wallet.wallet_other', { postProcess: 'capitalizeFirst' })}
|
{t('core:wallet.wallet_other', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -32,7 +32,7 @@ export const GeneralNotifications = ({ address }) => {
|
|||||||
setAnchorEl(event.currentTarget);
|
setAnchorEl(event.currentTarget);
|
||||||
};
|
};
|
||||||
|
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -29,7 +29,7 @@ export const JoinGroup = () => {
|
|||||||
const [isLoadingInfo, setIsLoadingInfo] = useState(false);
|
const [isLoadingInfo, setIsLoadingInfo] = useState(false);
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [isLoadingJoinGroup, setIsLoadingJoinGroup] = useState(false);
|
const [isLoadingJoinGroup, setIsLoadingJoinGroup] = useState(false);
|
||||||
|
|
||||||
const handleJoinGroup = async (e) => {
|
const handleJoinGroup = async (e) => {
|
||||||
@ -72,7 +72,7 @@ export const JoinGroup = () => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'JOIN_GROUP',
|
action: 'JOIN_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -89,7 +89,7 @@ export const JoinGroup = () => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_join', {
|
message: t('group:message.success.group_join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -100,11 +100,11 @@ export const JoinGroup = () => {
|
|||||||
type: 'joined-group',
|
type: 'joined-group',
|
||||||
label: t('group:message.success.group_join_label', {
|
label: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_label', {
|
labelDone: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -118,11 +118,11 @@ export const JoinGroup = () => {
|
|||||||
type: 'joined-group-request',
|
type: 'joined-group-request',
|
||||||
label: t('group:message.success.group_join_request', {
|
label: t('group:message.success.group_join_request', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_outcome', {
|
labelDone: t('group:message.success.group_join_outcome', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -148,7 +148,7 @@ export const JoinGroup = () => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -207,7 +207,7 @@ export const JoinGroup = () => {
|
|||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.name', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('group:group.name', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
{` ${groupInfo?.groupName}`}
|
{` ${groupInfo?.groupName}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ export const JoinGroup = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.member_number', {
|
{t('group:group.member_number', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {` ${groupInfo?.memberCount}`}
|
: {` ${groupInfo?.memberCount}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -241,7 +241,7 @@ export const JoinGroup = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.already_in_group', {
|
{t('group:message.generic.already_in_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -253,7 +253,7 @@ export const JoinGroup = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.closed_group', {
|
{t('group:message.generic.closed_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -280,7 +280,7 @@ export const JoinGroup = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.join', {
|
{t('core:action.join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButtonAccept>
|
</CustomButtonAccept>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@ -295,7 +295,7 @@ export const JoinGroup = () => {
|
|||||||
onClick={() => setIsOpen(false)}
|
onClick={() => setIsOpen(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButtonAccept>
|
</CustomButtonAccept>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
|
@ -97,7 +97,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
setMaxBlock(event.target.value as string);
|
setMaxBlock(event.target.value as string);
|
||||||
};
|
};
|
||||||
|
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const handleCreateGroup = async () => {
|
const handleCreateGroup = async () => {
|
||||||
@ -105,13 +105,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
if (!name)
|
if (!name)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.name_required', {
|
t('group:message.error.name_required', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (!description)
|
if (!description)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.description_required', {
|
t('group:message.error.description_required', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'CREATE_GROUP',
|
action: 'CREATE_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -140,7 +140,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_creation', {
|
message: t('group:message.success.group_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -150,11 +150,11 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
type: 'created-group',
|
type: 'created-group',
|
||||||
label: t('group:message.success.group_creation_name', {
|
label: t('group:message.success.group_creation_name', {
|
||||||
group_name: name,
|
group_name: name,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_creation_label', {
|
labelDone: t('group:message.success.group_creation_label', {
|
||||||
group_name: name,
|
group_name: name,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
},
|
},
|
||||||
@ -173,7 +173,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -227,7 +227,9 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||||
{t('group:group.management', { postProcess: 'capitalizeFirst' })}
|
{t('group:group.management', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
@ -269,7 +271,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Tab
|
<Tab
|
||||||
label={t('group:action.create_group', {
|
label={t('group:action.create_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
{...a11yProps(0)}
|
{...a11yProps(0)}
|
||||||
sx={{
|
sx={{
|
||||||
@ -281,7 +283,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
/>
|
/>
|
||||||
<Tab
|
<Tab
|
||||||
label={t('group:action.find_group', {
|
label={t('group:action.find_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
{...a11yProps(1)}
|
{...a11yProps(1)}
|
||||||
sx={{
|
sx={{
|
||||||
@ -293,7 +295,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
/>
|
/>
|
||||||
<Tab
|
<Tab
|
||||||
label={t('group:group.invites', {
|
label={t('group:group.invites', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
{...a11yProps(2)}
|
{...a11yProps(2)}
|
||||||
sx={{
|
sx={{
|
||||||
@ -330,13 +332,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:group.name', {
|
{t('group:group.name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('group:group.name', {
|
placeholder={t('group:group.name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={name}
|
value={name}
|
||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
@ -352,13 +354,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:group.description', {
|
{t('group:group.description', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('group:group.description', {
|
placeholder={t('group:group.description', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
value={description}
|
value={description}
|
||||||
onChange={(e) => setDescription(e.target.value)}
|
onChange={(e) => setDescription(e.target.value)}
|
||||||
@ -374,7 +376,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:group.type', {
|
{t('group:group.type', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -387,12 +389,12 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<MenuItem value={1}>
|
<MenuItem value={1}>
|
||||||
{t('group:group.open', {
|
{t('group:group.open', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem value={0}>
|
<MenuItem value={0}>
|
||||||
{t('group:group.closed', {
|
{t('group:group.closed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
@ -409,7 +411,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:advanced_options', {
|
{t('group:advanced_options', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -426,7 +428,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:approval_threshold', {
|
{t('group:approval_threshold', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -439,12 +441,12 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<MenuItem value={0}>
|
<MenuItem value={0}>
|
||||||
{t('core:count.none', {
|
{t('core:count.none', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem value={1}>
|
<MenuItem value={1}>
|
||||||
{t('core:count.one', {
|
{t('core:count.one', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem value={20}>20%</MenuItem>
|
<MenuItem value={20}>20%</MenuItem>
|
||||||
@ -464,7 +466,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:block_delay.minimum', {
|
{t('group:block_delay.minimum', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -523,7 +525,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:block_delay.maximum', {
|
{t('group:block_delay.maximum', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -584,7 +586,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
onClick={handleCreateGroup}
|
onClick={handleCreateGroup}
|
||||||
>
|
>
|
||||||
{t('group:action.create_group', {
|
{t('group:action.create_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -44,7 +44,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
|
|
||||||
const setTxList = useSetAtom(txListAtom);
|
const setTxList = useSetAtom(txListAtom);
|
||||||
|
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [groups, setGroups] = useState([]);
|
const [groups, setGroups] = useState([]);
|
||||||
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
||||||
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
||||||
@ -115,7 +115,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'JOIN_GROUP',
|
action: 'JOIN_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -131,7 +131,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.join_group', {
|
message: t('group:message.success.join_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -142,11 +142,11 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
type: 'joined-group',
|
type: 'joined-group',
|
||||||
label: t('group:message.success.group_join_label', {
|
label: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_label', {
|
labelDone: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -160,11 +160,11 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
type: 'joined-group-request',
|
type: 'joined-group-request',
|
||||||
label: t('group:message.success.group_join_request', {
|
label: t('group:message.success.group_join_request', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_outcome', {
|
labelDone: t('group:message.success.group_join_outcome', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -243,7 +243,9 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:action.join', { postProcess: 'capitalizeFirst' })}{' '}
|
{t('core:action.join', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}{' '}
|
||||||
{group?.groupName}
|
{group?.groupName}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -257,7 +259,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
onClick={() => handleJoinGroup(group, group?.isOpen)}
|
onClick={() => handleJoinGroup(group, group?.isOpen)}
|
||||||
>
|
>
|
||||||
{t('group:action.join_group', {
|
{t('group:action.join_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -73,7 +73,7 @@ export const GroupMail = ({
|
|||||||
const anchorElInstanceFilter = useRef<any>(null);
|
const anchorElInstanceFilter = useRef<any>(null);
|
||||||
const [tempPublishedList, setTempPublishedList] = useState([]);
|
const [tempPublishedList, setTempPublishedList] = useState([]);
|
||||||
const dataPublishes = useRef({});
|
const dataPublishes = useRef({});
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const groupIdRef = useRef<any>(null);
|
const groupIdRef = useRef<any>(null);
|
||||||
@ -171,7 +171,7 @@ export const GroupMail = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -756,7 +756,7 @@ export const GroupMail = ({
|
|||||||
<ThreadSingleLastMessageP>
|
<ThreadSingleLastMessageP>
|
||||||
<ThreadSingleLastMessageSpanP>
|
<ThreadSingleLastMessageSpanP>
|
||||||
{t('group:last_message', {
|
{t('group:last_message', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
:{' '}
|
:{' '}
|
||||||
</ThreadSingleLastMessageSpanP>
|
</ThreadSingleLastMessageSpanP>
|
||||||
@ -793,7 +793,7 @@ export const GroupMail = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:page.last', {
|
{t('core:page.last', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<ArrowForwardIosIcon
|
<ArrowForwardIosIcon
|
||||||
@ -827,7 +827,7 @@ export const GroupMail = ({
|
|||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('group:message.success.loading_threads', {
|
message: t('group:message.success.loading_threads', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -141,7 +141,7 @@ export const NewThread = ({
|
|||||||
setPostReply,
|
setPostReply,
|
||||||
isPrivate,
|
isPrivate,
|
||||||
}: NewMessageProps) => {
|
}: NewMessageProps) => {
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const { show } = useContext(MyContext);
|
const { show } = useContext(MyContext);
|
||||||
const [isOpen, setIsOpen] = useState<boolean>(false);
|
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||||
const [value, setValue] = useState('');
|
const [value, setValue] = useState('');
|
||||||
@ -183,19 +183,19 @@ export const NewThread = ({
|
|||||||
|
|
||||||
if (!isMessage && !threadTitle) {
|
if (!isMessage && !threadTitle) {
|
||||||
errorMsg = t('core:message.question.provide_thread', {
|
errorMsg = t('core:message.question.provide_thread', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
errorMsg = t('group:message.error.access_name', {
|
errorMsg = t('group:message.error.access_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!groupInfo) {
|
if (!groupInfo) {
|
||||||
errorMsg = t('group:message.error.group_info', {
|
errorMsg = t('group:message.error.group_info', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ export const NewThread = ({
|
|||||||
const missingFieldsString = missingFields.join(', ');
|
const missingFieldsString = missingFields.join(', ');
|
||||||
const errMsg = t('core:message.error.missing_fields', {
|
const errMsg = t('core:message.error.missing_fields', {
|
||||||
field: missingFieldsString,
|
field: missingFieldsString,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
errorMsg = errMsg;
|
errorMsg = errMsg;
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ export const NewThread = ({
|
|||||||
|
|
||||||
if (!htmlContent?.trim() || htmlContent?.trim() === '<p></p>') {
|
if (!htmlContent?.trim() || htmlContent?.trim() === '<p></p>') {
|
||||||
const errMsg = t('group:message.generic.provide_message', {
|
const errMsg = t('group:message.generic.provide_message', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ export const NewThread = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ARBITRARY',
|
action: 'ARBITRARY',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: feeToShow + ' QORT',
|
publishFee: feeToShow + ' QORT',
|
||||||
});
|
});
|
||||||
@ -257,7 +257,7 @@ export const NewThread = ({
|
|||||||
isPrivate === false ? null : await getSecretKey(false, true);
|
isPrivate === false ? null : await getSecretKey(false, true);
|
||||||
if (!secretKey && isPrivate) {
|
if (!secretKey && isPrivate) {
|
||||||
const errMsg = t('group:message.error.group_secret_key', {
|
const errMsg = t('group:message.error.group_secret_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
@ -320,7 +320,7 @@ export const NewThread = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.thread_creation', {
|
message: t('group:message.success.thread_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -332,7 +332,7 @@ export const NewThread = ({
|
|||||||
} else {
|
} else {
|
||||||
if (!currentThread) {
|
if (!currentThread) {
|
||||||
const errMsg = t('group:message.error.thread_id', {
|
const errMsg = t('group:message.error.thread_id', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
});
|
});
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
@ -360,7 +360,7 @@ export const NewThread = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.post_creation', {
|
message: t('group:message.success.post_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -404,10 +404,10 @@ export const NewThread = ({
|
|||||||
<ComposeP>
|
<ComposeP>
|
||||||
{currentThread
|
{currentThread
|
||||||
? t('core:action.new.post', {
|
? t('core:action.new.post', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.new.thread', {
|
: t('core:action.new.thread', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</ComposeP>
|
</ComposeP>
|
||||||
</ComposeContainer>
|
</ComposeContainer>
|
||||||
@ -437,10 +437,10 @@ export const NewThread = ({
|
|||||||
<NewMessageHeaderP>
|
<NewMessageHeaderP>
|
||||||
{isMessage
|
{isMessage
|
||||||
? t('core:action.post_message', {
|
? t('core:action.post_message', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.new.thread', {
|
: t('core:action.new.thread', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</NewMessageHeaderP>
|
</NewMessageHeaderP>
|
||||||
|
|
||||||
@ -562,10 +562,10 @@ export const NewThread = ({
|
|||||||
<NewMessageSendP>
|
<NewMessageSendP>
|
||||||
{isMessage
|
{isMessage
|
||||||
? t('core:action.post', {
|
? t('core:action.post', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:action.create_thread', {
|
: t('core:action.create_thread', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</NewMessageSendP>
|
</NewMessageSendP>
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ export const Thread = ({
|
|||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [postReply, setPostReply] = useState(null);
|
const [postReply, setPostReply] = useState(null);
|
||||||
const [hasLastPage, setHasLastPage] = useState(false);
|
const [hasLastPage, setHasLastPage] = useState(false);
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
// Update: Use a new ref for the scrollable container
|
// Update: Use a new ref for the scrollable container
|
||||||
const threadContainerRef = useRef(null);
|
const threadContainerRef = useRef(null);
|
||||||
@ -609,7 +609,7 @@ export const Thread = ({
|
|||||||
<ReturnIcon />
|
<ReturnIcon />
|
||||||
<ComposeP>
|
<ComposeP>
|
||||||
{t('group:action.return_to_thread', {
|
{t('group:action.return_to_thread', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</ComposeP>
|
</ComposeP>
|
||||||
</ShowMessageReturnButton>
|
</ShowMessageReturnButton>
|
||||||
@ -688,7 +688,7 @@ export const Thread = ({
|
|||||||
disabled={!hasFirstPage}
|
disabled={!hasFirstPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.first', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.first', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -707,7 +707,7 @@ export const Thread = ({
|
|||||||
disabled={!hasPreviousPage}
|
disabled={!hasPreviousPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.previous', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.previous', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -726,7 +726,7 @@ export const Thread = ({
|
|||||||
disabled={!hasNextPage}
|
disabled={!hasNextPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.next', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -745,7 +745,7 @@ export const Thread = ({
|
|||||||
disabled={!hasLastPage}
|
disabled={!hasLastPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.last', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.last', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -930,7 +930,7 @@ export const Thread = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:downloading_qdn', {
|
{t('core:downloading_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -963,7 +963,7 @@ export const Thread = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.refetch_page', {
|
{t('group:action.refetch_page', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -1002,7 +1002,7 @@ export const Thread = ({
|
|||||||
disabled={!hasFirstPage}
|
disabled={!hasFirstPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.first', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.first', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -1021,7 +1021,9 @@ export const Thread = ({
|
|||||||
disabled={!hasPreviousPage}
|
disabled={!hasPreviousPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.previous', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.previous', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -1040,7 +1042,7 @@ export const Thread = ({
|
|||||||
disabled={!hasNextPage}
|
disabled={!hasNextPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.next', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -1059,7 +1061,7 @@ export const Thread = ({
|
|||||||
disabled={!hasLastPage}
|
disabled={!hasLastPage}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:page.last', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.last', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@ -1073,7 +1075,9 @@ export const Thread = ({
|
|||||||
<LoadingSnackbar
|
<LoadingSnackbar
|
||||||
open={isLoading}
|
open={isLoading}
|
||||||
info={{
|
info={{
|
||||||
message: t('core:loading.posts', { postProcess: 'capitalizeFirst' }),
|
message: t('core:loading.posts', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</GroupContainer>
|
</GroupContainer>
|
||||||
|
@ -49,7 +49,7 @@ import { IconWrapper } from '../Desktop/DesktopFooter';
|
|||||||
import { DesktopHeader } from '../Desktop/DesktopHeader';
|
import { DesktopHeader } from '../Desktop/DesktopHeader';
|
||||||
import { AppsDesktop } from '../Apps/AppsDesktop';
|
import { AppsDesktop } from '../Apps/AppsDesktop';
|
||||||
import { AppsDevMode } from '../Apps/AppsDevMode';
|
import { AppsDevMode } from '../Apps/AppsDevMode';
|
||||||
import { DesktopSideBar } from '../DesktopSideBar';
|
import { DesktopSideBar } from '../Desktop/DesktopSideBar';
|
||||||
import { HubsIcon } from '../../assets/Icons/HubsIcon';
|
import { HubsIcon } from '../../assets/Icons/HubsIcon';
|
||||||
import { MessagingIcon } from '../../assets/Icons/MessagingIcon';
|
import { MessagingIcon } from '../../assets/Icons/MessagingIcon';
|
||||||
import { formatEmailDate } from './QMailMessages';
|
import { formatEmailDate } from './QMailMessages';
|
||||||
@ -444,7 +444,7 @@ export const Group = ({
|
|||||||
const [isForceShowCreationKeyPopup, setIsForceShowCreationKeyPopup] =
|
const [isForceShowCreationKeyPopup, setIsForceShowCreationKeyPopup] =
|
||||||
useState(false);
|
useState(false);
|
||||||
const groupsOwnerNamesRef = useRef({});
|
const groupsOwnerNamesRef = useRef({});
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const [groupsProperties, setGroupsProperties] = useAtom(groupsPropertiesAtom);
|
const [groupsProperties, setGroupsProperties] = useAtom(groupsPropertiesAtom);
|
||||||
const setGroupsOwnerNames = useSetAtom(groupsOwnerNamesAtom);
|
const setGroupsOwnerNames = useSetAtom(groupsOwnerNamesAtom);
|
||||||
@ -511,7 +511,7 @@ export const Group = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -542,7 +542,7 @@ export const Group = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -576,7 +576,7 @@ export const Group = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -1101,7 +1101,7 @@ export const Group = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -1750,9 +1750,9 @@ export const Group = ({
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
alignItems: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListItemAvatar>
|
<ListItemAvatar>
|
||||||
@ -1766,12 +1766,18 @@ export const Group = ({
|
|||||||
{(direct?.name || direct?.address)?.charAt(0)}
|
{(direct?.name || direct?.address)?.charAt(0)}
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</ListItemAvatar>
|
</ListItemAvatar>
|
||||||
|
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={direct?.name || direct?.address}
|
primary={direct?.name || direct?.address}
|
||||||
secondary={
|
secondary={
|
||||||
!direct?.timestamp
|
!direct?.timestamp
|
||||||
? 'no messages'
|
? t('core:message.generic.no_messages', {
|
||||||
: `last message: ${formatEmailDate(direct?.timestamp)}`
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
|
: t('group:last_message_date', {
|
||||||
|
date: formatEmailDate(direct?.timestamp),
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
primaryTypographyProps={{
|
primaryTypographyProps={{
|
||||||
style: {
|
style: {
|
||||||
@ -1815,6 +1821,7 @@ export const Group = ({
|
|||||||
</List>
|
</List>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -1835,7 +1842,9 @@ export const Group = ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
New Chat
|
{t('core:action.new.chat', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1999,7 +2008,7 @@ export const Group = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_selection', {
|
{t('group:message.generic.no_selection', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -2098,7 +2107,7 @@ export const Group = ({
|
|||||||
{' '}
|
{' '}
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.encryption_key', {
|
{t('group:message.generic.encryption_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@ -2124,21 +2133,21 @@ export const Group = ({
|
|||||||
{' '}
|
{' '}
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.not_part_group', {
|
{t('group:message.generic.not_part_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="25px" />
|
<Spacer height="25px" />
|
||||||
<Typography>
|
<Typography>
|
||||||
<strong>
|
<strong>
|
||||||
{t('group:message.generic.only_encrypted', {
|
{t('group:message.generic.only_encrypted', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</strong>
|
</strong>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="25px" />
|
<Spacer height="25px" />
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.notify_admins', {
|
{t('group:message.generic.notify_admins', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="25px" />
|
<Spacer height="25px" />
|
||||||
@ -2160,7 +2169,7 @@ export const Group = ({
|
|||||||
onClick={() => notifyAdmin(admin)}
|
onClick={() => notifyAdmin(admin)}
|
||||||
>
|
>
|
||||||
{t('core:action.notify', {
|
{t('core:action.notify', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -2385,7 +2394,7 @@ export const Group = ({
|
|||||||
message:
|
message:
|
||||||
isLoadingGroupMessage ||
|
isLoadingGroupMessage ||
|
||||||
t('group:message.generic.setting_group', {
|
t('group:message.generic.setting_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -2394,7 +2403,7 @@ export const Group = ({
|
|||||||
open={isLoadingGroups}
|
open={isLoadingGroups}
|
||||||
info={{
|
info={{
|
||||||
message: t('group:message.generic.setting_group', {
|
message: t('group:message.generic.setting_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -37,7 +37,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -71,7 +71,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.invites', { postProcess: 'capitalizeFirst' })}{' '}
|
{t('group:group.invites', { postProcess: 'capitalizeFirstChar' })}{' '}
|
||||||
{groupsWithJoinRequests?.length > 0 &&
|
{groupsWithJoinRequests?.length > 0 &&
|
||||||
` (${groupsWithJoinRequests?.length})`}
|
` (${groupsWithJoinRequests?.length})`}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -131,7 +131,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_display', {
|
{t('group:message.generic.no_display', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -181,7 +181,7 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
|
|||||||
}}
|
}}
|
||||||
primary={t('group:message.generic.group_invited_you', {
|
primary={t('group:message.generic.group_invited_you', {
|
||||||
group: group?.groupName,
|
group: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
|
@ -28,7 +28,7 @@ export const GroupJoinRequests = ({
|
|||||||
setDesktopViewMode,
|
setDesktopViewMode,
|
||||||
}) => {
|
}) => {
|
||||||
const [isExpanded, setIsExpanded] = React.useState(false);
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [groupsWithJoinRequests, setGroupsWithJoinRequests] = React.useState(
|
const [groupsWithJoinRequests, setGroupsWithJoinRequests] = React.useState(
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
@ -144,7 +144,7 @@ export const GroupJoinRequests = ({
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:join_requests', { postProcess: 'capitalizeFirst' })}{' '}
|
{t('group:join_requests', { postProcess: 'capitalizeFirstChar' })}{' '}
|
||||||
{filteredJoinRequests?.filter((group) => group?.data?.length > 0)
|
{filteredJoinRequests?.filter((group) => group?.data?.length > 0)
|
||||||
?.length > 0 &&
|
?.length > 0 &&
|
||||||
` (${filteredJoinRequests?.filter((group) => group?.data?.length > 0)?.length})`}
|
` (${filteredJoinRequests?.filter((group) => group?.data?.length > 0)?.length})`}
|
||||||
@ -207,7 +207,7 @@ export const GroupJoinRequests = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_display', {
|
{t('group:message.generic.no_display', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -89,7 +89,7 @@ export const GroupList = ({
|
|||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label={t('group:group.group_other', {
|
label={t('group:group.group_other', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
selected={desktopSideView === 'groups'}
|
selected={desktopSideView === 'groups'}
|
||||||
customWidth="75px"
|
customWidth="75px"
|
||||||
@ -122,7 +122,7 @@ export const GroupList = ({
|
|||||||
: theme.palette.text.secondary
|
: theme.palette.text.secondary
|
||||||
}
|
}
|
||||||
label={t('group:group.messaging', {
|
label={t('group:group.messaging', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
selected={desktopSideView === 'directs'}
|
selected={desktopSideView === 'directs'}
|
||||||
>
|
>
|
||||||
@ -193,7 +193,7 @@ export const GroupList = ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{t('group:group.group', { postProcess: 'capitalizeFirst' })}
|
{t('group:group.group', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
|
||||||
{!isRunningPublicNode && (
|
{!isRunningPublicNode && (
|
||||||
|
@ -5,10 +5,10 @@ import { ThingsToDoInitial } from './ThingsToDoInitial';
|
|||||||
import { GroupJoinRequests } from './GroupJoinRequests';
|
import { GroupJoinRequests } from './GroupJoinRequests';
|
||||||
import { GroupInvites } from './GroupInvites';
|
import { GroupInvites } from './GroupInvites';
|
||||||
import { ListOfGroupPromotions } from './ListOfGroupPromotions';
|
import { ListOfGroupPromotions } from './ListOfGroupPromotions';
|
||||||
import { QortPrice } from '../Home/QortPrice';
|
import { QortPrice } from '../QortPrice';
|
||||||
import ExploreIcon from '@mui/icons-material/Explore';
|
import ExploreIcon from '@mui/icons-material/Explore';
|
||||||
import { Explore } from '../Explore/Explore';
|
import { Explore } from '../Explore/Explore';
|
||||||
import { NewUsersCTA } from '../Home/NewUsersCTA';
|
import { NewUsersCTA } from '../NewUsersCTA';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const HomeDesktop = ({
|
export const HomeDesktop = ({
|
||||||
@ -31,7 +31,7 @@ export const HomeDesktop = ({
|
|||||||
const [checked1, setChecked1] = React.useState(false);
|
const [checked1, setChecked1] = React.useState(false);
|
||||||
const [checked2, setChecked2] = React.useState(false);
|
const [checked2, setChecked2] = React.useState(false);
|
||||||
|
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@ -85,7 +85,7 @@ export const HomeDesktop = ({
|
|||||||
padding: '10px',
|
padding: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:welcome', { postProcess: 'capitalizeFirst' })}
|
{t('core:welcome', { postProcess: 'capitalizeFirstChar' })}
|
||||||
{userInfo?.name ? (
|
{userInfo?.name ? (
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
@ -218,7 +218,7 @@ export const HomeDesktop = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('tutorial:initial.explore', {
|
{t('tutorial:initial.explore', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>{' '}
|
</Typography>{' '}
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -10,7 +10,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
const [value, setValue] = useState('');
|
const [value, setValue] = useState('');
|
||||||
const [expiryTime, setExpiryTime] = useState<string>('259200');
|
const [expiryTime, setExpiryTime] = useState<string>('259200');
|
||||||
const [isLoadingInvite, setIsLoadingInvite] = useState(false);
|
const [isLoadingInvite, setIsLoadingInvite] = useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const inviteMember = async () => {
|
const inviteMember = async () => {
|
||||||
try {
|
try {
|
||||||
@ -19,7 +19,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'GROUP_INVITE',
|
action: 'GROUP_INVITE',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -40,7 +40,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_invite', {
|
message: t('group:message.success.group_invite', {
|
||||||
value: value,
|
value: value,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -61,7 +61,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -86,7 +86,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.invite_member', { postProcess: 'capitalizeFirst' })}
|
{t('group:action.invite_member', { postProcess: 'capitalizeFirstChar' })}
|
||||||
|
|
||||||
<Spacer height="20px" />
|
<Spacer height="20px" />
|
||||||
|
|
||||||
@ -99,14 +99,16 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
<Spacer height="20px" />
|
<Spacer height="20px" />
|
||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:invitation_expiry', { postProcess: 'capitalizeFirst' })}
|
{t('group:invitation_expiry', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
id="demo-simple-select"
|
id="demo-simple-select"
|
||||||
value={expiryTime}
|
value={expiryTime}
|
||||||
label={t('group:invitation_expiry', { postProcess: 'capitalizeFirst' })}
|
label={t('group:invitation_expiry', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
>
|
>
|
||||||
<MenuItem value={10800}>{t('core:time.hour', { count: 3 })}</MenuItem>
|
<MenuItem value={10800}>{t('core:time.hour', { count: 3 })}</MenuItem>
|
||||||
@ -129,7 +131,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
loading={isLoadingInvite}
|
loading={isLoadingInvite}
|
||||||
onClick={inviteMember}
|
onClick={inviteMember}
|
||||||
>
|
>
|
||||||
{t('core:action.invite', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.invite', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -56,7 +56,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
const [isLoadingUnban, setIsLoadingUnban] = useState(false);
|
const [isLoadingUnban, setIsLoadingUnban] = useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const getInvites = async (groupId) => {
|
const getInvites = async (groupId) => {
|
||||||
try {
|
try {
|
||||||
@ -90,7 +90,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'CANCEL_GROUP_BAN',
|
action: 'CANCEL_GROUP_BAN',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -108,7 +108,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.unbanned_user', {
|
message: t('group:message.success.unbanned_user', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
handlePopoverClose();
|
handlePopoverClose();
|
||||||
@ -184,7 +184,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
onClick={() => handleCancelBan(member?.offender)}
|
onClick={() => handleCancelBan(member?.offender)}
|
||||||
>
|
>
|
||||||
{t('group:action.cancel_ban', {
|
{t('group:action.cancel_ban', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -214,7 +214,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>{t('group:ban_list', { postProcess: 'capitalizeFirst' })}</p>
|
<p>{t('group:ban_list', { postProcess: 'capitalizeFirstChar' })}</p>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
@ -97,7 +97,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
const { show } = useContext(MyContext);
|
const { show } = useContext(MyContext);
|
||||||
const setTxList = useSetAtom(txListAtom);
|
const setTxList = useSetAtom(txListAtom);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
const rowVirtualizer = useVirtualizer({
|
const rowVirtualizer = useVirtualizer({
|
||||||
count: promotions.length,
|
count: promotions.length,
|
||||||
@ -241,7 +241,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -249,7 +249,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_promotion', {
|
message: t('group:message.success.group_promotion', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -262,7 +262,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('group:message.error.group_promotion', {
|
t('group:message.error.group_promotion', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -278,7 +278,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'JOIN_GROUP',
|
action: 'JOIN_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -293,7 +293,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_join', {
|
message: t('group:message.success.group_join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -304,11 +304,11 @@ export const ListOfGroupPromotions = () => {
|
|||||||
type: 'joined-group',
|
type: 'joined-group',
|
||||||
label: t('group:message.success.group_join_label', {
|
label: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_label', {
|
labelDone: t('group:message.success.group_join_label', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -322,11 +322,11 @@ export const ListOfGroupPromotions = () => {
|
|||||||
type: 'joined-group-request',
|
type: 'joined-group-request',
|
||||||
label: t('group:message.success.group_join_request', {
|
label: t('group:message.success.group_join_request', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_join_outcome', {
|
labelDone: t('group:message.success.group_join_outcome', {
|
||||||
group_name: group?.groupName,
|
group_name: group?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -353,7 +353,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -403,7 +403,9 @@ export const ListOfGroupPromotions = () => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.promotions', { postProcess: 'capitalizeFirst' })}{' '}
|
{t('group:group.promotions', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}{' '}
|
||||||
{promotions.length > 0 && ` (${promotions.length})`}
|
{promotions.length > 0 && ` (${promotions.length})`}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -463,7 +465,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group.action.add_promotion', {
|
{t('group.action.add_promotion', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -511,7 +513,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group.message.generic.no_display', {
|
{t('group.message.generic.no_display', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -576,7 +578,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
fallback={
|
fallback={
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.invalid_data', {
|
{t('group:message.generic.invalid_data', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
@ -628,7 +630,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.name', {
|
{t('group:group.name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {` ${promotion?.groupName}`}
|
: {` ${promotion?.groupName}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -640,7 +642,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:group.member_number', {
|
{t('group:group.member_number', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {` ${promotion?.memberCount}`}
|
: {` ${promotion?.memberCount}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -664,7 +666,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.closed_group', {
|
{t('group:message.generic.closed_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -687,7 +689,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
onClick={handlePopoverClose}
|
onClick={handlePopoverClose}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
@ -703,7 +705,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t('core:action.join', {
|
{t('core:action.join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -789,10 +791,10 @@ export const ListOfGroupPromotions = () => {
|
|||||||
>
|
>
|
||||||
{promotion?.isOpen
|
{promotion?.isOpen
|
||||||
? t('group:group.public', {
|
? t('group:group.public', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('group:group.private', {
|
: t('group:group.private', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -828,7 +830,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.join_group', {
|
{t('group:action.join_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {` ${promotion?.groupName}`}
|
: {` ${promotion?.groupName}`}
|
||||||
</Button>
|
</Button>
|
||||||
@ -856,19 +858,21 @@ export const ListOfGroupPromotions = () => {
|
|||||||
aria-describedby="alert-dialog-description"
|
aria-describedby="alert-dialog-description"
|
||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('group:action.promote_group', { postProcess: 'capitalizeFirst' })}
|
{t('group:action.promote_group', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogContentText id="alert-dialog-description">
|
<DialogContentText id="alert-dialog-description">
|
||||||
{t('group:message.generic.latest_promotion', {
|
{t('group:message.generic.latest_promotion', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
||||||
<DialogContentText id="alert-dialog-description2">
|
<DialogContentText id="alert-dialog-description2">
|
||||||
{t('group:message.generic.max_chars', {
|
{t('group:message.generic.max_chars', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {fee && fee} {' QORT'}
|
: {fee && fee} {' QORT'}
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
@ -884,13 +888,13 @@ export const ListOfGroupPromotions = () => {
|
|||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:action.select_group', {
|
{t('group:action.select_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Label>
|
<Label>
|
||||||
{t('group:message.generic.admin_only', {
|
{t('group:message.generic.admin_only', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
@ -898,7 +902,9 @@ export const ListOfGroupPromotions = () => {
|
|||||||
labelId="demo-simple-select-label"
|
labelId="demo-simple-select-label"
|
||||||
id="demo-simple-select"
|
id="demo-simple-select"
|
||||||
value={selectedGroup}
|
value={selectedGroup}
|
||||||
label="Groups where you are an admin"
|
label={t('group:group.groups_admin', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
onChange={(e) => setSelectedGroup(e.target.value)}
|
onChange={(e) => setSelectedGroup(e.target.value)}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
>
|
>
|
||||||
@ -942,7 +948,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
onClick={() => setIsShowModal(false)}
|
onClick={() => setIsShowModal(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.close', {
|
{t('core:action.close', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@ -952,7 +958,7 @@ export const ListOfGroupPromotions = () => {
|
|||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.publish', {
|
{t('core:action.publish', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
|
@ -60,7 +60,7 @@ export const ListOfInvites = ({
|
|||||||
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
||||||
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
||||||
const [isLoadingCancelInvite, setIsLoadingCancelInvite] = useState(false);
|
const [isLoadingCancelInvite, setIsLoadingCancelInvite] = useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
|
|
||||||
const getInvites = async (groupId) => {
|
const getInvites = async (groupId) => {
|
||||||
@ -96,7 +96,7 @@ export const ListOfInvites = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'CANCEL_GROUP_INVITE',
|
action: 'CANCEL_GROUP_INVITE',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -114,7 +114,7 @@ export const ListOfInvites = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.invitation_cancellation', {
|
message: t('group:message.success.invitation_cancellation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -136,7 +136,7 @@ export const ListOfInvites = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -196,7 +196,7 @@ export const ListOfInvites = ({
|
|||||||
onClick={() => handleCancelInvitation(member?.invitee)}
|
onClick={() => handleCancelInvitation(member?.invitee)}
|
||||||
>
|
>
|
||||||
{t('core:action.cancel_invitation', {
|
{t('core:action.cancel_invitation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -229,7 +229,7 @@ export const ListOfInvites = ({
|
|||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
{t('group:invitees_list', {
|
{t('group:invitees_list', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
|
@ -64,7 +64,7 @@ export const ListOfJoinRequests = ({
|
|||||||
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
const [isLoadingAccept, setIsLoadingAccept] = useState(false);
|
const [isLoadingAccept, setIsLoadingAccept] = useState(false);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const getInvites = async (groupId) => {
|
const getInvites = async (groupId) => {
|
||||||
try {
|
try {
|
||||||
@ -99,7 +99,7 @@ export const ListOfJoinRequests = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'GROUP_INVITE',
|
action: 'GROUP_INVITE',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -119,7 +119,7 @@ export const ListOfJoinRequests = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success,group_join', {
|
message: t('group:message.success,group_join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -130,10 +130,10 @@ export const ListOfJoinRequests = ({
|
|||||||
...response,
|
...response,
|
||||||
type: 'join-request-accept',
|
type: 'join-request-accept',
|
||||||
label: t('group:message.success,invitation_request', {
|
label: t('group:message.success,invitation_request', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success,user_joined', {
|
labelDone: t('group:message.success,user_joined', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId,
|
groupId,
|
||||||
@ -158,7 +158,7 @@ export const ListOfJoinRequests = ({
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -226,7 +226,7 @@ export const ListOfJoinRequests = ({
|
|||||||
onClick={() => handleAcceptJoinRequest(member?.joiner)}
|
onClick={() => handleAcceptJoinRequest(member?.joiner)}
|
||||||
>
|
>
|
||||||
{t('core:action.accept', {
|
{t('core:action.accept', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -256,7 +256,9 @@ export const ListOfJoinRequests = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>{t('core:list.join_request', { postProcess: 'capitalizeFirst' })}</p>
|
<p>
|
||||||
|
{t('core:list.join_request', { postProcess: 'capitalizeFirstChar' })}
|
||||||
|
</p>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
@ -42,7 +42,7 @@ const ListOfMembers = ({
|
|||||||
const [isLoadingMakeAdmin, setIsLoadingMakeAdmin] = useState(false);
|
const [isLoadingMakeAdmin, setIsLoadingMakeAdmin] = useState(false);
|
||||||
const [isLoadingRemoveAdmin, setIsLoadingRemoveAdmin] = useState(false);
|
const [isLoadingRemoveAdmin, setIsLoadingRemoveAdmin] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
|
|
||||||
const handlePopoverOpen = (event, index) => {
|
const handlePopoverOpen = (event, index) => {
|
||||||
@ -61,7 +61,7 @@ const ListOfMembers = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'GROUP_KICK',
|
action: 'GROUP_KICK',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -78,7 +78,7 @@ const ListOfMembers = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_kick', {
|
message: t('group:message.success.group_kick', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -99,7 +99,7 @@ const ListOfMembers = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -119,7 +119,7 @@ const ListOfMembers = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'GROUP_BAN',
|
action: 'GROUP_BAN',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -138,7 +138,7 @@ const ListOfMembers = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_ban', {
|
message: t('group:message.success.group_ban', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -159,7 +159,7 @@ const ListOfMembers = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -179,7 +179,7 @@ const ListOfMembers = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'ADD_GROUP_ADMIN',
|
action: 'ADD_GROUP_ADMIN',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -195,7 +195,7 @@ const ListOfMembers = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_member_admin', {
|
message: t('group:message.success.group_member_admin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -216,7 +216,7 @@ const ListOfMembers = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -236,7 +236,7 @@ const ListOfMembers = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'REMOVE_GROUP_ADMIN',
|
action: 'REMOVE_GROUP_ADMIN',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -252,7 +252,7 @@ const ListOfMembers = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_remove_member', {
|
message: t('group:message.success.group_remove_member', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -273,7 +273,7 @@ const ListOfMembers = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -334,7 +334,7 @@ const ListOfMembers = ({
|
|||||||
onClick={() => handleKick(member?.member)}
|
onClick={() => handleKick(member?.member)}
|
||||||
>
|
>
|
||||||
{t('group:action.kick_member', {
|
{t('group:action.kick_member', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ const ListOfMembers = ({
|
|||||||
onClick={() => handleBan(member?.member)}
|
onClick={() => handleBan(member?.member)}
|
||||||
>
|
>
|
||||||
{t('group:action.ban', {
|
{t('group:action.ban', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ const ListOfMembers = ({
|
|||||||
onClick={() => makeAdmin(member?.member)}
|
onClick={() => makeAdmin(member?.member)}
|
||||||
>
|
>
|
||||||
{t('group:action.make_admin', {
|
{t('group:action.make_admin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ const ListOfMembers = ({
|
|||||||
onClick={() => removeAdmin(member?.member)}
|
onClick={() => removeAdmin(member?.member)}
|
||||||
>
|
>
|
||||||
{t('group:action.remove_admin', {
|
{t('group:action.remove_admin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</>
|
</>
|
||||||
@ -402,7 +402,7 @@ const ListOfMembers = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:admin', {
|
{t('core:admin', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -418,7 +418,7 @@ const ListOfMembers = ({
|
|||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
{t('core:list.member', {
|
{t('core:list.member', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
|
@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
export const ListOfThreadPostsWatched = () => {
|
export const ListOfThreadPostsWatched = () => {
|
||||||
const [posts, setPosts] = useState([]);
|
const [posts, setPosts] = useState([]);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const getPosts = async () => {
|
const getPosts = async () => {
|
||||||
try {
|
try {
|
||||||
@ -47,7 +47,7 @@ export const ListOfThreadPostsWatched = () => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -87,7 +87,7 @@ export const ListOfThreadPostsWatched = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:thread_posts', {
|
{t('group:thread_posts', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
:
|
:
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -135,7 +135,7 @@ export const ListOfThreadPostsWatched = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_display', {
|
{t('group:message.generic.no_display', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -71,7 +71,7 @@ export const ManageMembers = ({
|
|||||||
setValue(newValue);
|
setValue(newValue);
|
||||||
};
|
};
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const { show } = useContext(MyContext);
|
const { show } = useContext(MyContext);
|
||||||
const setTxList = useSetAtom(txListAtom);
|
const setTxList = useSetAtom(txListAtom);
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export const ManageMembers = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'LEAVE_GROUP',
|
action: 'LEAVE_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -104,11 +104,11 @@ export const ManageMembers = ({
|
|||||||
type: 'leave-group',
|
type: 'leave-group',
|
||||||
label: t('group:message.success.group_leave_name', {
|
label: t('group:message.success.group_leave_name', {
|
||||||
group_name: selectedGroup?.groupName,
|
group_name: selectedGroup?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.group_leave_label', {
|
labelDone: t('group:message.success.group_leave_label', {
|
||||||
group_name: selectedGroup?.groupName,
|
group_name: selectedGroup?.groupName,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
groupId: selectedGroup?.groupId,
|
groupId: selectedGroup?.groupId,
|
||||||
@ -119,7 +119,7 @@ export const ManageMembers = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_leave', {
|
message: t('group:message.success.group_leave', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -131,7 +131,7 @@ export const ManageMembers = ({
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -210,7 +210,7 @@ export const ManageMembers = ({
|
|||||||
<Toolbar>
|
<Toolbar>
|
||||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||||
{t('group:action.manage_members', {
|
{t('group:action.manage_members', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -314,18 +314,18 @@ export const ManageMembers = ({
|
|||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:group.id', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('group:group.id', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
{groupInfo?.groupId}
|
{groupInfo?.groupId}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:group.name', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('group:group.name', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
{groupInfo?.groupName}
|
{groupInfo?.groupName}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:group.member_number', {
|
{t('group:group.member_number', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {groupInfo?.memberCount}
|
: {groupInfo?.memberCount}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -342,7 +342,7 @@ export const ManageMembers = ({
|
|||||||
<InsertLinkIcon />
|
<InsertLinkIcon />
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:join_link', { postProcess: 'capitalizeFirst' })}
|
{t('group:join_link', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Box>
|
</Box>
|
||||||
@ -358,7 +358,7 @@ export const ManageMembers = ({
|
|||||||
onClick={handleLeaveGroup}
|
onClick={handleLeaveGroup}
|
||||||
>
|
>
|
||||||
{t('group:action.leave_group', {
|
{t('group:action.leave_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
)}
|
)}
|
||||||
@ -377,7 +377,7 @@ export const ManageMembers = ({
|
|||||||
onClick={() => getMembersWithNames(selectedGroup?.groupId)}
|
onClick={() => getMembersWithNames(selectedGroup?.groupId)}
|
||||||
>
|
>
|
||||||
{t('group:action.load_members', {
|
{t('group:action.load_members', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -475,7 +475,7 @@ export const ManageMembers = ({
|
|||||||
open={isLoadingMembers}
|
open={isLoadingMembers}
|
||||||
info={{
|
info={{
|
||||||
message: t('group:message.generic.loading_members', {
|
message: t('group:message.generic.loading_members', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -54,7 +54,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
|||||||
|
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const getMails = useCallback(async () => {
|
const getMails = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
@ -93,7 +93,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -157,7 +157,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
|||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:latest_mails', { postProcess: 'capitalizeFirst' })}
|
{t('group:latest_mails', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<MarkEmailUnreadIcon
|
<MarkEmailUnreadIcon
|
||||||
@ -228,7 +228,7 @@ export const QMailMessages = ({ userName, userAddress }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:message.generic.no_display', {
|
{t('group:message.generic.no_display', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -87,7 +87,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
|||||||
const [checked, setChecked] = useState(false);
|
const [checked, setChecked] = useState(false);
|
||||||
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
||||||
setChecked(event.target.checked);
|
setChecked(event.target.checked);
|
||||||
@ -136,7 +136,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -162,7 +162,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
|||||||
<Toolbar>
|
<Toolbar>
|
||||||
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
<Typography sx={{ ml: 2, flex: 1 }} variant="h4" component="div">
|
||||||
{t('core:general_settings', {
|
{t('core:general_settings', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
|||||||
<LocalNodeSwitch checked={checked} onChange={handleChange} />
|
<LocalNodeSwitch checked={checked} onChange={handleChange} />
|
||||||
}
|
}
|
||||||
label={t('group:action.disable_push_notifications', {
|
label={t('group:action.disable_push_notifications', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
{window?.electronAPI && (
|
{window?.electronAPI && (
|
||||||
@ -214,7 +214,7 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={t('group:action.enable_dev_mode', {
|
label={t('group:action.enable_dev_mode', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -231,14 +231,14 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
const [privateKey, setPrivateKey] = useState('');
|
const [privateKey, setPrivateKey] = useState('');
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const { setOpenSnackGlobal, setInfoSnackCustom } = useContext(MyContext);
|
const { setOpenSnackGlobal, setInfoSnackCustom } = useContext(MyContext);
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const exportPrivateKeyFunc = async () => {
|
const exportPrivateKeyFunc = async () => {
|
||||||
try {
|
try {
|
||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: t('group:message.generic.descrypt_wallet', {
|
message: t('group:message.generic.descrypt_wallet', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -262,10 +262,10 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
message: error?.message
|
message: error?.message
|
||||||
? t('group:message.error.decrypt_wallet', {
|
? t('group:message.error.decrypt_wallet', {
|
||||||
errorMessage: error?.message,
|
errorMessage: error?.message,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('group:message.error.descrypt_wallet', {
|
: t('group:message.error.descrypt_wallet', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
>
|
>
|
||||||
{t('group:action.export_private_key', {
|
{t('group:action.export_private_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('group:action.export_password', {
|
{t('group:action.export_password', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
>
|
>
|
||||||
<DialogContentText id="alert-dialog-description">
|
<DialogContentText id="alert-dialog-description">
|
||||||
{t('group:message.generic.secure_place', {
|
{t('group:message.generic.secure_place', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
setInfoSnackCustom({
|
setInfoSnackCustom({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.generic.private_key_copied', {
|
message: t('group:message.generic.private_key_copied', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.copy_private_key', {
|
{t('group:action.copy_private_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}{' '}
|
})}{' '}
|
||||||
<ContentCopyIcon color="primary" />
|
<ContentCopyIcon color="primary" />
|
||||||
</Button>
|
</Button>
|
||||||
@ -353,13 +353,13 @@ const ExportPrivateKey = ({ rawWallet }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('group:action.cancel', {
|
{t('group:action.cancel', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button variant="contained" onClick={exportPrivateKeyFunc}>
|
<Button variant="contained" onClick={exportPrivateKeyFunc}>
|
||||||
{t('group:action.decrypt', {
|
{t('group:action.decrypt', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
|
@ -76,9 +76,9 @@ export const ThingsToDoInitial = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!isLoaded
|
{!isLoaded
|
||||||
? t('core:loading.generic', { postProcess: 'capitalizeFirst' })
|
? t('core:loading.generic', { postProcess: 'capitalizeFirstChar' })
|
||||||
: t('tutorial:initial.getting_started', {
|
: t('tutorial:initial.getting_started', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ export const ThingsToDoInitial = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
primary={t('tutorial:initial.6_qort', {
|
primary={t('tutorial:initial.6_qort', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ export const ThingsToDoInitial = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
primary={t('tutorial:initial.register_name', {
|
primary={t('tutorial:initial.register_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<ListItemIcon
|
<ListItemIcon
|
||||||
|
@ -61,7 +61,7 @@ export const UserListOfInvites = ({
|
|||||||
const [invites, setInvites] = useState<any[]>([]);
|
const [invites, setInvites] = useState<any[]>([]);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
|
||||||
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
|
||||||
const listRef = useRef(null);
|
const listRef = useRef(null);
|
||||||
@ -101,7 +101,7 @@ export const UserListOfInvites = ({
|
|||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
action: 'JOIN_GROUP',
|
action: 'JOIN_GROUP',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -130,7 +130,7 @@ export const UserListOfInvites = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.group_join', {
|
message: t('group:message.success.group_join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -150,7 +150,7 @@ export const UserListOfInvites = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -205,7 +205,7 @@ export const UserListOfInvites = ({
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:action.join', {
|
{t('core:action.join', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}{' '}
|
})}{' '}
|
||||||
{invite?.groupName}
|
{invite?.groupName}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -219,7 +219,7 @@ export const UserListOfInvites = ({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t('group:action.join_group', {
|
{t('group:action.join_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -267,7 +267,7 @@ export const UserListOfInvites = ({
|
|||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
{t('core:list.invite', {
|
{t('core:list.invite', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ const LanguageSelector = () => {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
key={currentLang}
|
key={currentLang}
|
||||||
title={t('core:action.change_language', {
|
title={t('core:action.change_language', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
@ -45,7 +45,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
const { show: showKey, message } = useModal();
|
const { show: showKey, message } = useModal();
|
||||||
const { isShow: isShowNext, onOk, show: showNext } = useModal();
|
const { isShow: isShowNext, onOk, show: showNext } = useModal();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [info, setInfo] = useState(null);
|
const [info, setInfo] = useState(null);
|
||||||
const [names, setNames] = useState({});
|
const [names, setNames] = useState({});
|
||||||
const [accountInfos, setAccountInfos] = useState({});
|
const [accountInfos, setAccountInfos] = useState({});
|
||||||
@ -228,7 +228,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -239,7 +239,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.minting_account_add', {
|
t('core:message.error.minting_account_add', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -278,7 +278,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -289,7 +289,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.minting_account_remove', {
|
t('core:message.error.minting_account_remove', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -302,9 +302,8 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
const fee = await getFee('REWARD_SHARE');
|
const fee = await getFee('REWARD_SHARE');
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.perform_transaction', {
|
message: t('core:message.question.perform_transaction', {
|
||||||
// TODO move from group into core namespace
|
|
||||||
action: 'REWARD_SHARE',
|
action: 'REWARD_SHARE',
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -321,10 +320,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
...response,
|
...response,
|
||||||
type: 'add-rewardShare',
|
type: 'add-rewardShare',
|
||||||
label: t('group:message.success.rewardshare_add', {
|
label: t('group:message.success.rewardshare_add', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.rewardshare_add_label', {
|
labelDone: t('group:message.success.rewardshare_add_label', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
},
|
},
|
||||||
@ -340,7 +339,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -365,7 +364,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -393,7 +392,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
|
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('group:message.error.timeout_reward', {
|
t('group:message.error.timeout_reward', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -430,7 +429,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('group:message.error.unable_minting', {
|
t('group:message.error.unable_minting', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -470,10 +469,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
...response,
|
...response,
|
||||||
type: 'remove-rewardShare',
|
type: 'remove-rewardShare',
|
||||||
label: t('group:message.success.rewardshare_remove', {
|
label: t('group:message.success.rewardshare_remove', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t('group:message.success.rewardshare_remove_label', {
|
labelDone: t('group:message.success.rewardshare_remove_label', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
done: false,
|
done: false,
|
||||||
},
|
},
|
||||||
@ -488,64 +487,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// TODO unused functions. Remove??
|
|
||||||
|
|
||||||
// const handleRemoveRewardShare = async (rewardShare) => {
|
|
||||||
// try {
|
|
||||||
// setIsLoading(true);
|
|
||||||
|
|
||||||
// const privateRewardShare = await removeRewardShare(rewardShare);
|
|
||||||
// } catch (error) {
|
|
||||||
// setInfo({
|
|
||||||
// type: 'error',
|
|
||||||
// message: error?.message || 'Unable to remove reward share',
|
|
||||||
// });
|
|
||||||
// setOpenSnack(true);
|
|
||||||
// } finally {
|
|
||||||
// setIsLoading(false);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// const createRewardShareForPotentialMinter = async (receiver) => {
|
|
||||||
// try {
|
|
||||||
// setIsLoading(true);
|
|
||||||
// const confirmReceiver = await getNameOrAddress(receiver);
|
|
||||||
// if (confirmReceiver.error)
|
|
||||||
// throw new Error('Invalid receiver address or name');
|
|
||||||
// const isInMinterGroup = await checkIfMinterGroup(confirmReceiver);
|
|
||||||
// if (!isInMinterGroup) throw new Error('Account not in Minter Group');
|
|
||||||
// const publicKey = await getPublicKeyFromAddress(confirmReceiver);
|
|
||||||
// const findRewardShare = rewardShares?.find(
|
|
||||||
// (item) =>
|
|
||||||
// item?.recipient === confirmReceiver &&
|
|
||||||
// item?.mintingAccount === myAddress
|
|
||||||
// );
|
|
||||||
// if (findRewardShare) {
|
|
||||||
// const privateRewardShare = await getRewardSharePrivateKey(publicKey);
|
|
||||||
// setRewardsharekey(privateRewardShare);
|
|
||||||
// } else {
|
|
||||||
// await createRewardShare(publicKey, confirmReceiver);
|
|
||||||
// const privateRewardShare = await getRewardSharePrivateKey(publicKey);
|
|
||||||
// setRewardsharekey(privateRewardShare);
|
|
||||||
// }
|
|
||||||
// } catch (error) {
|
|
||||||
// setInfo({
|
|
||||||
// type: 'error',
|
|
||||||
// message: error?.message || 'Unable to create reward share',
|
|
||||||
// });
|
|
||||||
// setOpenSnack(true);
|
|
||||||
// } finally {
|
|
||||||
// setIsLoading(false);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getNodeInfos();
|
getNodeInfos();
|
||||||
getMintingAccounts();
|
getMintingAccounts();
|
||||||
@ -621,7 +569,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('group:message.generic.manage_minting', {
|
{t('group:message.generic.manage_minting', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
||||||
@ -674,28 +622,28 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('auth:account.account_one', {
|
{t('auth:account.account_one', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {handleNames(accountInfo?.address)}
|
: {handleNames(accountInfo?.address)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:level', {
|
{t('core:level', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
: {accountInfo?.level}
|
: {accountInfo?.level}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.next_level', {
|
{t('group:message.generic.next_level', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}{' '}
|
})}{' '}
|
||||||
{_levelUpBlocks()}
|
{_levelUpBlocks()}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.node_minting', {
|
{t('group:message.generic.node_minting', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}{' '}
|
})}{' '}
|
||||||
{nodeInfos?.isMintingPossible?.toString()}
|
{nodeInfos?.isMintingPossible?.toString()}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -735,14 +683,14 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:action.start_minting', {
|
{t('core:action.start_minting', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{mintingAccounts?.length > 1 && (
|
{mintingAccounts?.length > 1 && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.minting_keys_per_node', {
|
{t('group:message.generic.minting_keys_per_node', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -754,7 +702,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
{mintingAccounts?.length > 0 && (
|
{mintingAccounts?.length > 0 && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.node_minting_account', {
|
{t('group:message.generic.node_minting_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -774,7 +722,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.node_minting_key', {
|
{t('group:message.generic.node_minting_key', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -793,7 +741,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.minting_account', {
|
{t('group:message.generic.minting_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}{' '}
|
})}{' '}
|
||||||
{handleNames(acct?.mintingAccount)}
|
{handleNames(acct?.mintingAccount)}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -819,7 +767,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('group:action.remove_minting_account', {
|
{t('group:action.remove_minting_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -832,7 +780,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
{mintingAccounts?.length > 1 && (
|
{mintingAccounts?.length > 1 && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.minting_keys_per_node_different', {
|
{t('group:message.generic.minting_keys_per_node_different', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -858,13 +806,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.minter_group', {
|
{t('group:message.generic.minter_group', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.generic.mintership_app', {
|
{t('group:message.generic.mintership_app', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -894,7 +842,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('group:action.visit_q_mintership', {
|
{t('group:action.visit_q_mintership', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -915,14 +863,14 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
{!isShowNext && (
|
{!isShowNext && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.success.rewardshare_creation', {
|
{t('group:message.success.rewardshare_creation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{isShowNext && (
|
{isShowNext && (
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('group:message.success.rewardshare_confirmed', {
|
{t('group:message.success.rewardshare_confirmed', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@ -935,7 +883,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
onClick={onOk}
|
onClick={onOk}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:page.next', { postProcess: 'capitalizeFirst' })}
|
{t('core:page.next', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@ -948,7 +896,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={() => setIsOpenMinting(false)}
|
onClick={() => setIsOpenMinting(false)}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Box, ButtonBase, Typography } from '@mui/material';
|
import { Box, ButtonBase, Typography } from '@mui/material';
|
||||||
import { Spacer } from '../../common/Spacer';
|
import { Spacer } from '../common/Spacer';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const NewUsersCTA = ({ balance }) => {
|
export const NewUsersCTA = ({ balance }) => {
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
if (balance === undefined || +balance > 0) return null;
|
if (balance === undefined || +balance > 0) return null;
|
||||||
|
|
||||||
@ -37,14 +37,14 @@ export const NewUsersCTA = ({ balance }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.question.new_user', {
|
{t('core:message.question.new_user', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Spacer height="20px" />
|
<Spacer height="20px" />
|
||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message_us', { postProcess: 'capitalizeFirst' })}
|
{t('core:message_us', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Spacer height="20px" />
|
<Spacer height="20px" />
|
@ -1,4 +1,5 @@
|
|||||||
import React, {
|
import {
|
||||||
|
Fragment,
|
||||||
useCallback,
|
useCallback,
|
||||||
useContext,
|
useContext,
|
||||||
useEffect,
|
useEffect,
|
||||||
@ -25,12 +26,12 @@ import {
|
|||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import Logo1Dark from '../assets/svgs/Logo1Dark.svg';
|
import Logo1Dark from '../assets/svgs/Logo1Dark.svg';
|
||||||
import HelpIcon from '@mui/icons-material/Help';
|
import HelpIcon from '@mui/icons-material/Help';
|
||||||
import { CustomizedSnackbars } from '../components/Snackbar/Snackbar';
|
import { CustomizedSnackbars } from './Snackbar/Snackbar';
|
||||||
import { cleanUrl, gateways } from '../background';
|
import { cleanUrl, gateways } from '../background';
|
||||||
import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
|
import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
|
||||||
import ThemeSelector from '../components/Theme/ThemeSelector';
|
import ThemeSelector from './Theme/ThemeSelector';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import LanguageSelector from '../components/Language/LanguageSelector';
|
import LanguageSelector from './Language/LanguageSelector';
|
||||||
import { MyContext } from '../App';
|
import { MyContext } from '../App';
|
||||||
|
|
||||||
export const manifestData = {
|
export const manifestData = {
|
||||||
@ -68,23 +69,18 @@ export const NotAuthenticated = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [isValidApiKey, setIsValidApiKey] = useState<boolean | null>(null);
|
const [isValidApiKey, setIsValidApiKey] = useState<boolean | null>(null);
|
||||||
const [hasLocalNode, setHasLocalNode] = useState<boolean | null>(null);
|
const [hasLocalNode, setHasLocalNode] = useState<boolean | null>(null);
|
||||||
// const [useLocalNode, setUseLocalNode] = useState(false);
|
const [openSnack, setOpenSnack] = useState(false);
|
||||||
const [openSnack, setOpenSnack] = React.useState(false);
|
const [infoSnack, setInfoSnack] = useState(null);
|
||||||
const [infoSnack, setInfoSnack] = React.useState(null);
|
const [show, setShow] = useState(false);
|
||||||
const [show, setShow] = React.useState(false);
|
const [mode, setMode] = useState('list');
|
||||||
const [mode, setMode] = React.useState('list');
|
const [customNodes, setCustomNodes] = useState(null);
|
||||||
const [customNodes, setCustomNodes] = React.useState(null);
|
const [importedApiKey, setImportedApiKey] = useState(null);
|
||||||
// const [currentNode, setCurrentNode] = React.useState({
|
|
||||||
// url: "http://127.0.0.1:12391",
|
|
||||||
// });
|
|
||||||
const [importedApiKey, setImportedApiKey] = React.useState(null);
|
|
||||||
//add and edit states
|
//add and edit states
|
||||||
const [url, setUrl] = React.useState('https://');
|
const [url, setUrl] = useState('https://');
|
||||||
const [customApikey, setCustomApiKey] = React.useState('');
|
const [customApikey, setCustomApiKey] = useState('');
|
||||||
const [showSelectApiKey, setShowSelectApiKey] = useState(false);
|
const [showSelectApiKey, setShowSelectApiKey] = useState(false);
|
||||||
const [enteredApiKey, setEnteredApiKey] = useState('');
|
const [enteredApiKey, setEnteredApiKey] = useState('');
|
||||||
const [customNodeToSaveIndex, setCustomNodeToSaveIndex] =
|
const [customNodeToSaveIndex, setCustomNodeToSaveIndex] = useState(null);
|
||||||
React.useState(null);
|
|
||||||
const { showTutorial, hasSeenGettingStarted } = useContext(MyContext);
|
const { showTutorial, hasSeenGettingStarted } = useContext(MyContext);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['auth', 'core']);
|
const { t } = useTranslation(['auth', 'core']);
|
||||||
@ -352,7 +348,7 @@ export const NotAuthenticated = ({
|
|||||||
console.error(
|
console.error(
|
||||||
'Failed to set API key:',
|
'Failed to set API key:',
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:error', { postProcess: 'capitalizeFirst' })
|
t('core:error', { postProcess: 'capitalizeFirstChar' })
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -362,7 +358,7 @@ export const NotAuthenticated = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('auth:apikey.select_valid', {
|
message: t('auth:apikey.select_valid', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -388,7 +384,7 @@ export const NotAuthenticated = ({
|
|||||||
'Failed to set API key:',
|
'Failed to set API key:',
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:error', {
|
t('core:error', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -400,7 +396,7 @@ export const NotAuthenticated = ({
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('auth:apikey.select_valid', {
|
t('auth:apikey.select_valid', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -482,7 +478,7 @@ export const NotAuthenticated = ({
|
|||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:welcome', { postProcess: 'capitalizeFirst' })}
|
{t('auth:welcome', { postProcess: 'capitalizeFirstChar' })}
|
||||||
<TextSpan
|
<TextSpan
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
@ -505,20 +501,24 @@ export const NotAuthenticated = ({
|
|||||||
disableHoverListener={hasSeenGettingStarted === true}
|
disableHoverListener={hasSeenGettingStarted === true}
|
||||||
placement="left"
|
placement="left"
|
||||||
title={
|
title={
|
||||||
<React.Fragment>
|
<Fragment>
|
||||||
<Typography
|
<Typography
|
||||||
color="inherit"
|
color="inherit"
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.digital_id', { postProcess: 'capitalizeFirst' })}
|
{t('auth:tips.digital_id', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</React.Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CustomButton onClick={() => setExtstate('wallets')}>
|
<CustomButton onClick={() => setExtstate('wallets')}>
|
||||||
{t('auth:account.account_many', { postProcess: 'capitalizeFirst' })}
|
{t('auth:account.account_many', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
</Box>
|
</Box>
|
||||||
@ -535,7 +535,7 @@ export const NotAuthenticated = ({
|
|||||||
disableHoverListener={hasSeenGettingStarted === true}
|
disableHoverListener={hasSeenGettingStarted === true}
|
||||||
placement="right"
|
placement="right"
|
||||||
title={
|
title={
|
||||||
<React.Fragment>
|
<Fragment>
|
||||||
<Typography
|
<Typography
|
||||||
color="inherit"
|
color="inherit"
|
||||||
sx={{
|
sx={{
|
||||||
@ -543,7 +543,9 @@ export const NotAuthenticated = ({
|
|||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.new_users', { postProcess: 'capitalizeFirst' })}
|
{t('auth:tips.new_users', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
<Typography
|
<Typography
|
||||||
@ -552,9 +554,11 @@ export const NotAuthenticated = ({
|
|||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:tips.new_account', { postProcess: 'capitalizeFirst' })}
|
{t('auth:tips.new_account', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</React.Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CustomButton
|
<CustomButton
|
||||||
@ -574,7 +578,7 @@ export const NotAuthenticated = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.create_account', {
|
{t('auth:action.create_account', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
@ -588,7 +592,7 @@ export const NotAuthenticated = ({
|
|||||||
visibility: !useLocalNode && 'hidden',
|
visibility: !useLocalNode && 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:node.using', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('auth:node.using', { postProcess: 'capitalizeFirstChar' })}:{' '}
|
||||||
{currentNode?.url}
|
{currentNode?.url}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -616,7 +620,7 @@ export const NotAuthenticated = ({
|
|||||||
textDecoration: 'underline',
|
textDecoration: 'underline',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:advanced_users', { postProcess: 'capitalizeFirst' })}
|
{t('auth:advanced_users', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -666,10 +670,10 @@ export const NotAuthenticated = ({
|
|||||||
label={
|
label={
|
||||||
isLocal
|
isLocal
|
||||||
? t('auth:node.use_local', {
|
? t('auth:node.use_local', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('auth:node.use_custom', {
|
: t('auth:node.use_custom', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -684,10 +688,10 @@ export const NotAuthenticated = ({
|
|||||||
>
|
>
|
||||||
{apiKey
|
{apiKey
|
||||||
? t('auth:node.use_local', {
|
? t('auth:node.use_local', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('auth:apikey.import', {
|
: t('auth:apikey.import', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
<Typography
|
<Typography
|
||||||
@ -696,8 +700,8 @@ export const NotAuthenticated = ({
|
|||||||
visibility: importedApiKey ? 'visible' : 'hidden',
|
visibility: importedApiKey ? 'visible' : 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:apikey.key', { postProcess: 'capitalizeFirst' })}:{' '}
|
{t('auth:apikey.key', { postProcess: 'capitalizeFirstChar' })}
|
||||||
{importedApiKey}
|
: {importedApiKey}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -709,7 +713,7 @@ export const NotAuthenticated = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
component="label"
|
component="label"
|
||||||
>
|
>
|
||||||
{t('auth:node.choose', { postProcess: 'capitalizeFirst' })}
|
{t('auth:node.choose', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
<Typography
|
<Typography
|
||||||
@ -718,7 +722,7 @@ export const NotAuthenticated = ({
|
|||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:build_version', { postProcess: 'capitalizeFirst' })}:
|
{t('auth:build_version', { postProcess: 'capitalizeFirstChar' })}:
|
||||||
{manifestData?.version}
|
{manifestData?.version}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -739,7 +743,8 @@ export const NotAuthenticated = ({
|
|||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{' '}
|
{' '}
|
||||||
{t('auth:node.custom_many', { postProcess: 'capitalizeFirst' })}:
|
{t('auth:node.custom_many', { postProcess: 'capitalizeFirstChar' })}
|
||||||
|
:
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box
|
<Box
|
||||||
@ -810,7 +815,7 @@ export const NotAuthenticated = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:action.choose', {
|
{t('core:action.choose', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -871,7 +876,7 @@ export const NotAuthenticated = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:action.choose', {
|
{t('core:action.choose', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -886,7 +891,7 @@ export const NotAuthenticated = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:action.edit', {
|
{t('core:action.edit', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -901,7 +906,7 @@ export const NotAuthenticated = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:remove', {
|
{t('core:remove', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -941,7 +946,7 @@ export const NotAuthenticated = ({
|
|||||||
<DialogActions>
|
<DialogActions>
|
||||||
{mode === 'list' && (
|
{mode === 'list' && (
|
||||||
<Button variant="contained" onClick={addCustomNode}>
|
<Button variant="contained" onClick={addCustomNode}>
|
||||||
{t('core:action.add', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.add', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -954,7 +959,9 @@ export const NotAuthenticated = ({
|
|||||||
}}
|
}}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -969,7 +976,7 @@ export const NotAuthenticated = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('auth:action.return_to_list', {
|
{t('auth:action.return_to_list', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@ -979,7 +986,7 @@ export const NotAuthenticated = ({
|
|||||||
onClick={() => saveCustomNodes(customNodes)}
|
onClick={() => saveCustomNodes(customNodes)}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:save', { postProcess: 'capitalizeFirst' })}
|
{t('core:save', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -994,7 +1001,7 @@ export const NotAuthenticated = ({
|
|||||||
aria-describedby="alert-dialog-description"
|
aria-describedby="alert-dialog-description"
|
||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{t('auth:apikey.enter', { postProcess: 'capitalizeFirst' })}
|
{t('auth:apikey.enter', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box
|
<Box
|
||||||
@ -1014,7 +1021,7 @@ export const NotAuthenticated = ({
|
|||||||
component="label"
|
component="label"
|
||||||
>
|
>
|
||||||
{t('auth:apikey.alternative', {
|
{t('auth:apikey.alternative', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@ -1070,7 +1077,7 @@ export const NotAuthenticated = ({
|
|||||||
}}
|
}}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:save', { postProcess: 'capitalizeFirst' })}
|
{t('core:save', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -1080,7 +1087,7 @@ export const NotAuthenticated = ({
|
|||||||
setShowSelectApiKey(false);
|
setShowSelectApiKey(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
|
|
||||||
export const QMailStatus = () => {
|
export const QMailStatus = () => {
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const [lastEnteredTimestamp, setLastEnteredTimestamp] = useAtom(
|
const [lastEnteredTimestamp, setLastEnteredTimestamp] = useAtom(
|
||||||
@ -66,7 +66,7 @@ export const QMailStatus = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:q_apps.q_mail', {
|
{t('core:q_apps.q_mail', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { getBaseApiReact } from '../../App';
|
import { getBaseApiReact } from '../App';
|
||||||
import { Box, Tooltip, Typography, useTheme } from '@mui/material';
|
import { Box, Tooltip, Typography, useTheme } from '@mui/material';
|
||||||
import { BarSpinner } from '../../common/Spinners/BarSpinner/BarSpinner';
|
import { BarSpinner } from '../common/Spinners/BarSpinner/BarSpinner';
|
||||||
import { formatDate } from '../../utils/time';
|
import { formatDate } from '../utils/time';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
function getAverageLtcPerQort(trades) {
|
function getAverageLtcPerQort(trades) {
|
||||||
@ -152,7 +152,7 @@ export const QortPrice = () => {
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:price', { postProcess: 'capitalizeFirst' })}
|
{t('core:price', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
{!ltcPerQort ? (
|
{!ltcPerQort ? (
|
||||||
@ -184,7 +184,7 @@ export const QortPrice = () => {
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:supply', { postProcess: 'capitalizeFirst' })}
|
{t('core:supply', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
{!supply ? (
|
{!supply ? (
|
||||||
@ -238,7 +238,7 @@ export const QortPrice = () => {
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:last_height', { postProcess: 'capitalizeFirst' })}
|
{t('core:last_height', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
{!lastBlock?.height ? (
|
{!lastBlock?.height ? (
|
@ -1,7 +1,7 @@
|
|||||||
import { useState, useRef, useEffect } from 'react';
|
import { useState, useRef, useEffect } from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import Picker, { EmojiStyle, Theme } from 'emoji-picker-react';
|
import Picker, { EmojiStyle, Theme } from 'emoji-picker-react';
|
||||||
import './ReactionPicker.css';
|
import '../styles/ReactionPicker.css';
|
||||||
import { ButtonBase } from '@mui/material';
|
import { ButtonBase } from '@mui/material';
|
||||||
|
|
||||||
export const ReactionPicker = ({ onReaction }) => {
|
export const ReactionPicker = ({ onReaction }) => {
|
||||||
|
@ -51,7 +51,7 @@ export const RegisterName = ({
|
|||||||
);
|
);
|
||||||
const [nameFee, setNameFee] = useState(null);
|
const [nameFee, setNameFee] = useState(null);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core', 'auth', 'group']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const checkIfNameExisits = async (name) => {
|
const checkIfNameExisits = async (name) => {
|
||||||
if (!name?.trim()) {
|
if (!name?.trim()) {
|
||||||
setIsNameAvailable(Availability.NULL);
|
setIsNameAvailable(Availability.NULL);
|
||||||
@ -115,20 +115,20 @@ export const RegisterName = ({
|
|||||||
if (!userInfo?.address)
|
if (!userInfo?.address)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:message.error.address_not_found', {
|
t('core:message.error.address_not_found', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (!registerNameValue)
|
if (!registerNameValue)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t('core:action.enter_name', {
|
t('core:action.enter_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const fee = await getFee('REGISTER_NAME');
|
const fee = await getFee('REGISTER_NAME');
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.question.register_name', {
|
message: t('core:message.question.register_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -145,7 +145,7 @@ export const RegisterName = ({
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('group:message.success.registered_name', {
|
message: t('group:message.success.registered_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
@ -156,12 +156,12 @@ export const RegisterName = ({
|
|||||||
...response,
|
...response,
|
||||||
type: 'register-name',
|
type: 'register-name',
|
||||||
label: t('group:message.success.registered_name_label', {
|
label: t('group:message.success.registered_name_label', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
labelDone: t(
|
labelDone: t(
|
||||||
'group:message.success.registered_name_success',
|
'group:message.success.registered_name_success',
|
||||||
{
|
{
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
done: false,
|
done: false,
|
||||||
@ -183,7 +183,7 @@ export const RegisterName = ({
|
|||||||
message:
|
message:
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -226,7 +226,9 @@ export const RegisterName = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Label>
|
||||||
{t('core:action.choose_name', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.choose_name', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Label>
|
</Label>
|
||||||
<TextField
|
<TextField
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
@ -255,7 +257,7 @@ export const RegisterName = ({
|
|||||||
{t('core:message.generic.name_registration', {
|
{t('core:message.generic.name_registration', {
|
||||||
balance: balance ?? 0,
|
balance: balance ?? 0,
|
||||||
fee: { nameFee },
|
fee: { nameFee },
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -282,7 +284,7 @@ export const RegisterName = ({
|
|||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.name_available', {
|
{t('core:message.generic.name_available', {
|
||||||
name: registerNameValue,
|
name: registerNameValue,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -304,7 +306,7 @@ export const RegisterName = ({
|
|||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.name_unavailable', {
|
{t('core:message.generic.name_unavailable', {
|
||||||
name: registerNameValue,
|
name: registerNameValue,
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -322,7 +324,7 @@ export const RegisterName = ({
|
|||||||
|
|
||||||
<Typography>
|
<Typography>
|
||||||
{t('core:message.generic.name_checking', {
|
{t('core:message.generic.name_checking', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -336,7 +338,7 @@ export const RegisterName = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.name_benefits', {
|
{t('core:message.generic.name_benefits', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -354,7 +356,7 @@ export const RegisterName = ({
|
|||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={t('core:message.generic.publish_data', {
|
primary={t('core:message.generic.publish_data', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
@ -369,7 +371,7 @@ export const RegisterName = ({
|
|||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={t('core:message.generic.secure_ownership', {
|
primary={t('core:message.generic.secure_ownership', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
@ -386,7 +388,7 @@ export const RegisterName = ({
|
|||||||
setRegisterNameValue('');
|
setRegisterNameValue('');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -401,7 +403,9 @@ export const RegisterName = ({
|
|||||||
onClick={registerName}
|
onClick={registerName}
|
||||||
autoFocus
|
autoFocus
|
||||||
>
|
>
|
||||||
{t('core:action.register_name', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.register_name', {
|
||||||
|
postProcess: 'capitalizeFirstChar',
|
||||||
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -84,7 +84,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
const { show } = useContext(MyContext);
|
const { show } = useContext(MyContext);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const hasChanged = useMemo(() => {
|
const hasChanged = useMemo(() => {
|
||||||
const newChanges = {
|
const newChanges = {
|
||||||
@ -156,7 +156,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
|
|
||||||
await show({
|
await show({
|
||||||
message: t('core:message.generic.publish_qnd', {
|
message: t('core:message.generic.publish_qnd', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
publishFee: fee.fee + ' QORT',
|
publishFee: fee.fee + ' QORT',
|
||||||
});
|
});
|
||||||
@ -178,7 +178,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
rej(
|
rej(
|
||||||
error.message ||
|
error.message ||
|
||||||
t('core:message.error.generic', {
|
t('core:message.error.generic', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -189,7 +189,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
setInfoSnack({
|
setInfoSnack({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('core:message.success.published_qdn', {
|
message: t('core:message.success.published_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -202,7 +202,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
message:
|
message:
|
||||||
error?.message ||
|
error?.message ||
|
||||||
t('core:message.error.save_qdn', {
|
t('core:message.error.save_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
setOpenSnack(true);
|
setOpenSnack(true);
|
||||||
@ -236,7 +236,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
<IconWrapper
|
<IconWrapper
|
||||||
disableWidth={disableWidth}
|
disableWidth={disableWidth}
|
||||||
label={t('core:action.save', {
|
label={t('core:action.save', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
selected={false}
|
selected={false}
|
||||||
color={
|
color={
|
||||||
@ -307,7 +307,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.settings', {
|
{t('core:message.generic.settings', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>{' '}
|
</Typography>{' '}
|
||||||
<Spacer height="40px" />
|
<Spacer height="40px" />
|
||||||
@ -336,7 +336,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.qdn', {
|
{t('core:message.generic.qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -367,7 +367,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.register_name', {
|
{t('core:message.generic.register_name', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -388,7 +388,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.unsaved_changes', {
|
{t('core:message.generic.unsaved_changes', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:action.save_qdn', {
|
{t('core:action.save_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<Spacer height="20px" />
|
<Spacer height="20px" />
|
||||||
@ -425,7 +425,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.question.reset_qdn', {
|
{t('core:message.question.reset_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
@ -447,7 +447,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.revert_qdn', {
|
{t('core:message.generic.revert_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</>
|
</>
|
||||||
@ -462,7 +462,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
{t('core:message.question.reset_pinned', {
|
{t('core:message.question.reset_pinned', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
@ -472,7 +472,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
{t('core:message.generic.revert_default', {
|
{t('core:message.generic.revert_default', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</>
|
</>
|
||||||
@ -496,7 +496,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.question.overwrite_changes', {
|
{t('core:message.question.overwrite_changes', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
@ -518,7 +518,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.overwrite_qdn', {
|
{t('core:message.generic.overwrite_qdn', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Box>
|
</Box>
|
||||||
@ -538,7 +538,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:message.generic.no_pinned_changes', {
|
{t('core:message.generic.no_pinned_changes', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@ -595,7 +595,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.import', {
|
{t('core:action.import', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|
||||||
@ -620,7 +620,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('core:action.export', {
|
{t('core:action.export', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})}
|
})}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -5,7 +5,7 @@ import DarkModeIcon from '@mui/icons-material/DarkMode';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const ThemeSelector = () => {
|
const ThemeSelector = () => {
|
||||||
const { t } = useTranslation(['core']);
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const { themeMode, toggleTheme } = useThemeContext();
|
const { themeMode, toggleTheme } = useThemeContext();
|
||||||
|
|
||||||
@ -23,10 +23,10 @@ const ThemeSelector = () => {
|
|||||||
title={
|
title={
|
||||||
themeMode === 'dark'
|
themeMode === 'dark'
|
||||||
? t('core:theme.light', {
|
? t('core:theme.light', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
: t('core:theme.light', {
|
: t('core:theme.light', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
@ -91,7 +91,7 @@ export const Tutorials = () => {
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={handleClose}>
|
<Button variant="contained" onClick={handleClose}>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@ -138,7 +138,7 @@ export const Tutorials = () => {
|
|||||||
|
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={handleClose}>
|
<Button variant="contained" onClick={handleClose}>
|
||||||
{t('core:action.close', { postProcess: 'capitalizeFirst' })}
|
{t('core:action.close', { postProcess: 'capitalizeFirstChar' })}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
export const PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY = "4001"
|
|
@ -184,3 +184,7 @@ export {
|
|||||||
CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP,
|
CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP,
|
||||||
DYNAMIC_FEE_TIMESTAMP,
|
DYNAMIC_FEE_TIMESTAMP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS = 102;
|
||||||
|
|
||||||
|
export const PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY = '4001'; // Q for Qortal
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
// Qortal 8 decimals
|
|
||||||
export const QORT_DECIMALS = 1e8
|
|
||||||
|
|
||||||
// Q for Qortal
|
|
||||||
export const ADDRESS_VERSION = 58
|
|
@ -1 +0,0 @@
|
|||||||
export const RESOURCE_TYPE_NUMBER_GROUP_CHAT_REACTIONS = 102
|
|
@ -1,14 +1,14 @@
|
|||||||
import { useContext, useState } from 'react';
|
import { useContext, useState } from 'react';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../utils/events';
|
||||||
import { getBaseApiReact, MyContext } from '../../App';
|
import { getBaseApiReact, MyContext } from '../App';
|
||||||
import { createEndpoint } from '../../background';
|
import { createEndpoint } from '../background';
|
||||||
import {
|
import {
|
||||||
settingsLocalLastUpdatedAtom,
|
settingsLocalLastUpdatedAtom,
|
||||||
sortablePinnedAppsAtom,
|
sortablePinnedAppsAtom,
|
||||||
} from '../../atoms/global';
|
} from '../atoms/global';
|
||||||
import { saveToLocalStorage } from './AppsNavBarDesktop';
|
import { saveToLocalStorage } from '../components/Apps/AppsNavBarDesktop';
|
||||||
import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
|
import { base64ToUint8Array } from '../qdn/encryption/group-encryption';
|
||||||
import { uint8ArrayToObject } from '../../backgroundFunctions/encryption';
|
import { uint8ArrayToObject } from '../backgroundFunctions/encryption';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
|
|
||||||
export const useHandlePrivateApps = () => {
|
export const useHandlePrivateApps = () => {
|
@ -1,13 +1,13 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { saveToLocalStorage } from '../Apps/AppsNavBarDesktop';
|
import { saveToLocalStorage } from '../components/Apps/AppsNavBarDesktop';
|
||||||
import creationImg from './img/creation.webp';
|
import creationImg from '../components/Tutorials/img/creation.webp';
|
||||||
import dashboardImg from './img/dashboard.webp';
|
import dashboardImg from '../components/Tutorials/img/dashboard.webp';
|
||||||
import groupsImg from './img/groups.webp';
|
import groupsImg from '../components/Tutorials/img/groups.webp';
|
||||||
import importantImg from './img/important.webp';
|
import importantImg from '../components/Tutorials/img/important.webp';
|
||||||
import navigationImg from './img/navigation.webp';
|
import navigationImg from '../components/Tutorials/img/navigation.webp';
|
||||||
import overviewImg from './img/overview.webp';
|
import overviewImg from '../components/Tutorials/img/overview.webp';
|
||||||
import startedImg from './img/started.webp';
|
import startedImg from '../components/Tutorials/img/started.webp';
|
||||||
import obtainingImg from './img/obtaining-qort.jpg';
|
import obtainingImg from '../components/Tutorials/img/obtaining-qort.jpg';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const checkIfGatewayIsOnline = async () => {
|
const checkIfGatewayIsOnline = async () => {
|
||||||
@ -108,7 +108,7 @@ export const useHandleTutorials = () => {
|
|||||||
multi: [
|
multi: [
|
||||||
{
|
{
|
||||||
title: t('tutorial:1_getting_started', {
|
title: t('tutorial:1_getting_started', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
||||||
@ -119,7 +119,7 @@ export const useHandleTutorials = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('tutorial:2_overview', {
|
title: t('tutorial:2_overview', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
||||||
@ -130,7 +130,7 @@ export const useHandleTutorials = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('tutorial:3_groups', {
|
title: t('tutorial:3_groups', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
||||||
@ -141,7 +141,7 @@ export const useHandleTutorials = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('tutorial:4_obtain_qort', {
|
title: t('tutorial:4_obtain_qort', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
||||||
@ -163,7 +163,7 @@ export const useHandleTutorials = () => {
|
|||||||
multi: [
|
multi: [
|
||||||
{
|
{
|
||||||
title: t('tutorial:apps.dashboard', {
|
title: t('tutorial:apps.dashboard', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
||||||
@ -174,7 +174,7 @@ export const useHandleTutorials = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('tutorial:apps.navigation', {
|
title: t('tutorial:apps.navigation', {
|
||||||
postProcess: 'capitalizeFirst',
|
postProcess: 'capitalizeFirstChar',
|
||||||
}),
|
}),
|
||||||
resource: {
|
resource: {
|
||||||
name: 'a-test',
|
name: 'a-test',
|
@ -1,5 +1,5 @@
|
|||||||
import { useCallback, useRef } from 'react';
|
import { useCallback, useRef } from 'react';
|
||||||
import { getBaseApiReact } from '../../App';
|
import { getBaseApiReact } from '../App';
|
||||||
|
|
||||||
export const useHandleUserInfo = () => {
|
export const useHandleUserInfo = () => {
|
||||||
const userInfoRef = useRef({});
|
const userInfoRef = useRef({});
|
@ -6,13 +6,13 @@ import {
|
|||||||
settingsLocalLastUpdatedAtom,
|
settingsLocalLastUpdatedAtom,
|
||||||
settingsQDNLastUpdatedAtom,
|
settingsQDNLastUpdatedAtom,
|
||||||
sortablePinnedAppsAtom,
|
sortablePinnedAppsAtom,
|
||||||
} from './atoms/global';
|
} from '../atoms/global';
|
||||||
import { getArbitraryEndpointReact, getBaseApiReact } from './App';
|
import { getArbitraryEndpointReact, getBaseApiReact } from '../App';
|
||||||
import { decryptResource } from './components/Group/Group';
|
import { decryptResource } from '../components/Group/Group';
|
||||||
import {
|
import {
|
||||||
base64ToUint8Array,
|
base64ToUint8Array,
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
} from './backgroundFunctions/encryption';
|
} from '../backgroundFunctions/encryption';
|
||||||
import { useAtom, useSetAtom } from 'jotai';
|
import { useAtom, useSetAtom } from 'jotai';
|
||||||
|
|
||||||
function fetchFromLocalStorage(key) {
|
function fetchFromLocalStorage(key) {
|
@ -1,10 +1,10 @@
|
|||||||
import { useCallback, useContext, useEffect, useState } from 'react';
|
import { useCallback, useContext, useEffect, useState } from 'react';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../utils/events';
|
||||||
import { navigationControllerAtom } from '../../atoms/global';
|
import { navigationControllerAtom } from '../atoms/global';
|
||||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||||
import { saveFile } from '../../qortalRequests/get';
|
import { saveFile } from '../qortalRequests/get';
|
||||||
import { mimeToExtensionMap } from '../../utils/memeTypes';
|
import { mimeToExtensionMap } from '../utils/memeTypes';
|
||||||
import { MyContext } from '../../App';
|
import { MyContext } from '../App';
|
||||||
import FileSaver from 'file-saver';
|
import FileSaver from 'file-saver';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
|||||||
settingsLocalLastUpdatedAtom,
|
settingsLocalLastUpdatedAtom,
|
||||||
settingsQDNLastUpdatedAtom,
|
settingsQDNLastUpdatedAtom,
|
||||||
sortablePinnedAppsAtom,
|
sortablePinnedAppsAtom,
|
||||||
} from './atoms/global';
|
} from '../atoms/global';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
|
|
||||||
function fetchFromLocalStorage(key) {
|
function fetchFromLocalStorage(key) {
|
@ -1,18 +1,11 @@
|
|||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
import { initReactI18next } from 'react-i18next';
|
import { initReactI18next } from 'react-i18next';
|
||||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||||
|
import {
|
||||||
const capitalizeAll = {
|
capitalizeAll,
|
||||||
type: 'postProcessor',
|
capitalizeFirstChar,
|
||||||
name: 'capitalizeAll',
|
capitalizeFirstWord,
|
||||||
process: (value: string) => value.toUpperCase(),
|
} from './processors';
|
||||||
};
|
|
||||||
|
|
||||||
const capitalizeFirst = {
|
|
||||||
type: 'postProcessor',
|
|
||||||
name: 'capitalizeFirst',
|
|
||||||
process: (value: string) => value.charAt(0).toUpperCase() + value.slice(1),
|
|
||||||
};
|
|
||||||
|
|
||||||
export const supportedLanguages = {
|
export const supportedLanguages = {
|
||||||
de: { name: 'Deutsch', flag: '🇩🇪' },
|
de: { name: 'Deutsch', flag: '🇩🇪' },
|
||||||
@ -45,7 +38,8 @@ i18n
|
|||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.use(capitalizeAll as any)
|
.use(capitalizeAll as any)
|
||||||
.use(capitalizeFirst as any)
|
.use(capitalizeFirstChar as any)
|
||||||
|
.use(capitalizeFirstWord as any)
|
||||||
.init({
|
.init({
|
||||||
resources,
|
resources,
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
|
@ -35,9 +35,11 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"error": {
|
"error": {
|
||||||
"account_creation": "could not create account.",
|
"account_creation": "could not create account.",
|
||||||
|
"decrypt_data": "could not decrypt data",
|
||||||
"field_not_found_json": "{{ field }} not found in JSON",
|
"field_not_found_json": "{{ field }} not found in JSON",
|
||||||
"incorrect_password": "incorrect password",
|
"incorrect_password": "incorrect password",
|
||||||
"invalid_secret_key": "secretKey is not valid",
|
"invalid_secret_key": "secretKey is not valid",
|
||||||
|
"unable_decrypt": "unable to decrypt",
|
||||||
"unable_reencrypt_secret_key": "unable to re-encrypt secret key"
|
"unable_reencrypt_secret_key": "unable to re-encrypt secret key"
|
||||||
},
|
},
|
||||||
"generic": {
|
"generic": {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
"add_reaction": "add reaction",
|
"add_reaction": "add reaction",
|
||||||
"accept": "accept",
|
"accept": "accept",
|
||||||
"access": "access",
|
"access": "access",
|
||||||
|
"access_app": "access app",
|
||||||
"backup_account": "backup account",
|
"backup_account": "backup account",
|
||||||
"backup_wallet": "backup wallet",
|
"backup_wallet": "backup wallet",
|
||||||
"cancel": "cancel",
|
"cancel": "cancel",
|
||||||
@ -30,6 +31,7 @@
|
|||||||
"decrypt": "decrypt",
|
"decrypt": "decrypt",
|
||||||
"disable_enter": "disable enter",
|
"disable_enter": "disable enter",
|
||||||
"download": "download",
|
"download": "download",
|
||||||
|
"download_file": "download file",
|
||||||
"edit": "edit",
|
"edit": "edit",
|
||||||
"enter_name": "enter a name",
|
"enter_name": "enter a name",
|
||||||
"export": "export",
|
"export": "export",
|
||||||
@ -43,6 +45,7 @@
|
|||||||
"login": "login",
|
"login": "login",
|
||||||
"logout": "logout",
|
"logout": "logout",
|
||||||
"new": {
|
"new": {
|
||||||
|
"chat": "new chat",
|
||||||
"post": "new post",
|
"post": "new post",
|
||||||
"thread": "new thread"
|
"thread": "new thread"
|
||||||
},
|
},
|
||||||
@ -61,12 +64,15 @@
|
|||||||
"remove_reaction": "remove reaction",
|
"remove_reaction": "remove reaction",
|
||||||
"return_apps_dashboard": "return to Apps Dashboard",
|
"return_apps_dashboard": "return to Apps Dashboard",
|
||||||
"save": "save",
|
"save": "save",
|
||||||
|
"save_disk": "save to disk",
|
||||||
"search": "search",
|
"search": "search",
|
||||||
"search_apps": "search for apps",
|
"search_apps": "search for apps",
|
||||||
"select_app_type": "select App Type",
|
"select_app_type": "select App Type",
|
||||||
"select_category": "select Category",
|
"select_category": "select Category",
|
||||||
"select_name_app": "select Name/App",
|
"select_name_app": "select Name/App",
|
||||||
"set_avatar": "set avatar",
|
"set_avatar": "set avatar",
|
||||||
|
"show": "show",
|
||||||
|
"show_poll": "show poll",
|
||||||
"start_minting": "start minting",
|
"start_minting": "start minting",
|
||||||
"start_typing": "start typing here...",
|
"start_typing": "start typing here...",
|
||||||
"transfer_qort": "Transfer QORT",
|
"transfer_qort": "Transfer QORT",
|
||||||
@ -74,24 +80,32 @@
|
|||||||
"unpin_app": "unpin app",
|
"unpin_app": "unpin app",
|
||||||
"unpin_from_dashboard": "unpin from dashboard",
|
"unpin_from_dashboard": "unpin from dashboard",
|
||||||
"update": "update",
|
"update": "update",
|
||||||
"update_app": "update your app"
|
"update_app": "update your app",
|
||||||
|
"vote": "vote"
|
||||||
},
|
},
|
||||||
"admin": "admin",
|
"admin": "admin",
|
||||||
|
"admin_other": "admins",
|
||||||
"all": "all",
|
"all": "all",
|
||||||
|
"announcement": "announcement",
|
||||||
|
"announcement_other": "announcements",
|
||||||
"api": "API",
|
"api": "API",
|
||||||
"app": "app",
|
"app": "app",
|
||||||
|
"app_other": "apps",
|
||||||
"app_name": "app name",
|
"app_name": "app name",
|
||||||
"app_service_type": "app service type",
|
"app_service_type": "app service type",
|
||||||
"apps_dashboard": "apps Dashboard",
|
"apps_dashboard": "apps Dashboard",
|
||||||
"apps_official": "official Apps",
|
"apps_official": "official Apps",
|
||||||
|
"attachment": "attachment",
|
||||||
"category": "category",
|
"category": "category",
|
||||||
"category_other": "categories",
|
"category_other": "categories",
|
||||||
|
"chat": "chat",
|
||||||
"core": {
|
"core": {
|
||||||
"block_height": "block height",
|
"block_height": "block height",
|
||||||
"information": "core information",
|
"information": "core information",
|
||||||
"peers": "connected peers",
|
"peers": "connected peers",
|
||||||
"version": "core version"
|
"version": "core version"
|
||||||
},
|
},
|
||||||
|
"dev": "dev",
|
||||||
"domain": "domain",
|
"domain": "domain",
|
||||||
"ui": {
|
"ui": {
|
||||||
"version": "UI version"
|
"version": "UI version"
|
||||||
@ -109,8 +123,10 @@
|
|||||||
"publish": "publish fee"
|
"publish": "publish fee"
|
||||||
},
|
},
|
||||||
"for": "for",
|
"for": "for",
|
||||||
|
"general": "general",
|
||||||
"general_settings": "general settings",
|
"general_settings": "general settings",
|
||||||
"identifier": "identifier",
|
"identifier": "identifier",
|
||||||
|
"image_embed": "image embed",
|
||||||
"last_height": "last height",
|
"last_height": "last height",
|
||||||
"level": "level",
|
"level": "level",
|
||||||
"library": "library",
|
"library": "library",
|
||||||
@ -120,12 +136,14 @@
|
|||||||
"member": "member list"
|
"member": "member list"
|
||||||
},
|
},
|
||||||
"loading": {
|
"loading": {
|
||||||
"announcements": "announcements",
|
"announcements": "loading announcements",
|
||||||
"generic": "loading...",
|
"generic": "loading...",
|
||||||
"chat": "loading chat... please wait.",
|
"chat": "loading chat... please wait.",
|
||||||
"comments": "loading comments... please wait.",
|
"comments": "loading comments... please wait.",
|
||||||
"posts": "loading posts... please wait."
|
"posts": "loading posts... please wait."
|
||||||
},
|
},
|
||||||
|
"member": "member",
|
||||||
|
"member_other": "members",
|
||||||
"message_us": "please message us on Telegram or Discord if you need 4 QORT to start chatting without any limitations",
|
"message_us": "please message us on Telegram or Discord if you need 4 QORT to start chatting without any limitations",
|
||||||
"message": {
|
"message": {
|
||||||
"error": {
|
"error": {
|
||||||
@ -133,6 +151,9 @@
|
|||||||
"app_need_name": "your app needs a name",
|
"app_need_name": "your app needs a name",
|
||||||
"file_too_large": "file {{ filename }} is too large. Max size allowed is {{ size }} MB.",
|
"file_too_large": "file {{ filename }} is too large. Max size allowed is {{ size }} MB.",
|
||||||
"generic": "an error occurred",
|
"generic": "an error occurred",
|
||||||
|
"invalid_embed_link": "invalid embed link",
|
||||||
|
"invalid_poll_embed_link_name": "invalid poll embed link. Missing name.",
|
||||||
|
"invalid_image_embed_link_name": "invalid image embed link. Missing param.",
|
||||||
"invalid_signature": "invalid signature",
|
"invalid_signature": "invalid signature",
|
||||||
"invalid_zip": "invalid zip",
|
"invalid_zip": "invalid zip",
|
||||||
"message_loading": "error loading message.",
|
"message_loading": "error loading message.",
|
||||||
@ -148,19 +169,27 @@
|
|||||||
"rating_option": "cannot find rating option",
|
"rating_option": "cannot find rating option",
|
||||||
"save_qdn": "unable to save to QDN",
|
"save_qdn": "unable to save to QDN",
|
||||||
"send_failed": "failed to send",
|
"send_failed": "failed to send",
|
||||||
|
"unable_download_image": "unable to download IMAGE. Please try again later by clicking the refresh button",
|
||||||
"unable_encrypt_app": "unable to encrypt app. App not published'",
|
"unable_encrypt_app": "unable to encrypt app. App not published'",
|
||||||
"unable_publish_app": "unable to publish app",
|
"unable_publish_app": "unable to publish app",
|
||||||
"unable_publish_image": "unable to publish image",
|
"unable_publish_image": "unable to publish image",
|
||||||
"unable_rate": "unable to rate",
|
"unable_rate": "unable to rate",
|
||||||
|
"unable_vote": "unable to vote",
|
||||||
"update_failed": "failed to update"
|
"update_failed": "failed to update"
|
||||||
},
|
},
|
||||||
"generic": {
|
"generic": {
|
||||||
|
"already_voted": "you've already voted.",
|
||||||
"avatar_size": "{{ size }} KB max. for GIFS",
|
"avatar_size": "{{ size }} KB max. for GIFS",
|
||||||
|
"building": "building",
|
||||||
|
"created_by": "created by {{ owner }}",
|
||||||
"buy_order_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy order</span>",
|
"buy_order_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy order</span>",
|
||||||
"buy_order_request_other": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy orders</span>",
|
"buy_order_request_other": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy orders</span>",
|
||||||
"devmode_local_node": "please use your local node for dev mode! Logout and use Local node.",
|
"devmode_local_node": "please use your local node for dev mode! Logout and use Local node.",
|
||||||
|
"downloading": "downloading",
|
||||||
"edited": "edited",
|
"edited": "edited",
|
||||||
"editing_message": "editing message",
|
"editing_message": "editing message",
|
||||||
|
"encrypted": "encrypted",
|
||||||
|
"encrypted_not": "not encrypted",
|
||||||
"fee_qort": "fee: {{ message }} QORT",
|
"fee_qort": "fee: {{ message }} QORT",
|
||||||
"foreign_fee": "foreign fee: {{ message }}",
|
"foreign_fee": "foreign fee: {{ message }}",
|
||||||
"mentioned": "mentioned",
|
"mentioned": "mentioned",
|
||||||
@ -173,7 +202,9 @@
|
|||||||
"name_rate": "you need a name to rate.",
|
"name_rate": "you need a name to rate.",
|
||||||
"name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee",
|
"name_registration": "your balance is {{ balance }} QORT. A name registration requires a {{ fee }} QORT fee",
|
||||||
"name_unavailable": "{{ name }} is unavailable",
|
"name_unavailable": "{{ name }} is unavailable",
|
||||||
|
"no_data_image": "no data for image",
|
||||||
"no_description": "no description",
|
"no_description": "no description",
|
||||||
|
"no_messages": "no messages",
|
||||||
"no_minting_details": "cannot view minting details on the gateway",
|
"no_minting_details": "cannot view minting details on the gateway",
|
||||||
"no_notifications": "no new notifications",
|
"no_notifications": "no new notifications",
|
||||||
"no_pinned_changes": "you currently do not have any changes to your pinned apps",
|
"no_pinned_changes": "you currently do not have any changes to your pinned apps",
|
||||||
@ -184,6 +215,7 @@
|
|||||||
"password_enter": "please enter a password",
|
"password_enter": "please enter a password",
|
||||||
"payment_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting a payment</span>",
|
"payment_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting a payment</span>",
|
||||||
"people_reaction": "people who reacted with {{ reaction }}",
|
"people_reaction": "people who reacted with {{ reaction }}",
|
||||||
|
"processing_transaction": "is processing transaction, please wait...",
|
||||||
"publish_data": "publish data to Qortal: anything from apps to videos. Fully decentralized!",
|
"publish_data": "publish data to Qortal: anything from apps to videos. Fully decentralized!",
|
||||||
"publishing": "publishing... Please wait.",
|
"publishing": "publishing... Please wait.",
|
||||||
"qdn": "use QDN saving",
|
"qdn": "use QDN saving",
|
||||||
@ -205,6 +237,7 @@
|
|||||||
"updating": "updating"
|
"updating": "updating"
|
||||||
},
|
},
|
||||||
"question": {
|
"question": {
|
||||||
|
"accept_vote_on_poll": "do you accept this VOTE_ON_POLL transaction? POLLS are public!",
|
||||||
"logout": "are you sure you would like to logout?",
|
"logout": "are you sure you would like to logout?",
|
||||||
"new_user": "are you a new user?",
|
"new_user": "are you a new user?",
|
||||||
"delete_chat_image": "would you like to delete your previous chat image?",
|
"delete_chat_image": "would you like to delete your previous chat image?",
|
||||||
@ -231,13 +264,16 @@
|
|||||||
"published_qdn": "successfully published to QDN",
|
"published_qdn": "successfully published to QDN",
|
||||||
"rated_app": "successfully rated. Please wait a couple minutes for the network to propogate the changes.",
|
"rated_app": "successfully rated. Please wait a couple minutes for the network to propogate the changes.",
|
||||||
"request_read": "I have read this request",
|
"request_read": "I have read this request",
|
||||||
"transfer": "the transfer was succesful!"
|
"transfer": "the transfer was succesful!",
|
||||||
|
"voted": "successfully voted. Please wait a couple minutes for the network to propogate the changes."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minting_status": "minting status",
|
"minting_status": "minting status",
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"name_app": "name/App",
|
"name_app": "name/App",
|
||||||
"none": "none",
|
"none": "none",
|
||||||
|
"option": "option",
|
||||||
|
"option_other": "options",
|
||||||
"page": {
|
"page": {
|
||||||
"last": "last",
|
"last": "last",
|
||||||
"first": "first",
|
"first": "first",
|
||||||
@ -245,6 +281,7 @@
|
|||||||
"previous": "previous"
|
"previous": "previous"
|
||||||
},
|
},
|
||||||
"payment_notification": "payment notification",
|
"payment_notification": "payment notification",
|
||||||
|
"poll_embed": "poll embed",
|
||||||
"port": "port",
|
"port": "port",
|
||||||
"price": "price",
|
"price": "price",
|
||||||
"q_apps": {
|
"q_apps": {
|
||||||
@ -264,6 +301,8 @@
|
|||||||
"dark": "dark mode",
|
"dark": "dark mode",
|
||||||
"light": "light mode"
|
"light": "light mode"
|
||||||
},
|
},
|
||||||
|
"thread": "thread",
|
||||||
|
"thread_other": "threads",
|
||||||
"time": {
|
"time": {
|
||||||
"day_one": "{{count}} day",
|
"day_one": "{{count}} day",
|
||||||
"day_other": "{{count}} days",
|
"day_other": "{{count}} days",
|
||||||
@ -275,6 +314,8 @@
|
|||||||
"title": "title",
|
"title": "title",
|
||||||
"tutorial": "tutorial",
|
"tutorial": "tutorial",
|
||||||
"user_lookup": "user lookup",
|
"user_lookup": "user lookup",
|
||||||
|
"vote": "vote",
|
||||||
|
"vote_other": "{{ count }} votes",
|
||||||
"zip": "zip",
|
"zip": "zip",
|
||||||
"wallet": {
|
"wallet": {
|
||||||
"litecoin": "litecoin wallet",
|
"litecoin": "litecoin wallet",
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
"invites": "group invites",
|
"invites": "group invites",
|
||||||
"group": "group",
|
"group": "group",
|
||||||
"group_other": "groups",
|
"group_other": "groups",
|
||||||
|
"groups_admin": "groups where you are an admin",
|
||||||
"management": "group management",
|
"management": "group management",
|
||||||
"member_number": "number of members",
|
"member_number": "number of members",
|
||||||
"messaging": "messaging",
|
"messaging": "messaging",
|
||||||
@ -59,6 +60,7 @@
|
|||||||
"join_link": "join group link",
|
"join_link": "join group link",
|
||||||
"join_requests": "join requests",
|
"join_requests": "join requests",
|
||||||
"last_message": "last message",
|
"last_message": "last message",
|
||||||
|
"last_message_date": "last message: {{date }}",
|
||||||
"latest_mails": "latest Q-Mails",
|
"latest_mails": "latest Q-Mails",
|
||||||
"message": {
|
"message": {
|
||||||
"generic": {
|
"generic": {
|
||||||
@ -70,6 +72,7 @@
|
|||||||
"descrypt_wallet": "decrypting wallet...",
|
"descrypt_wallet": "decrypting wallet...",
|
||||||
"encryption_key": "the group's first common encryption key is in the process of creation. Please wait a few minutes for it to be retrieved by the network. Checking every 2 minutes...",
|
"encryption_key": "the group's first common encryption key is in the process of creation. Please wait a few minutes for it to be retrieved by the network. Checking every 2 minutes...",
|
||||||
"group_announcement": "group Announcements",
|
"group_announcement": "group Announcements",
|
||||||
|
"group_encrypted": "group encrypted",
|
||||||
"group_invited_you": "{{group}} has invited you",
|
"group_invited_you": "{{group}} has invited you",
|
||||||
"group_key_created": "first group key created.",
|
"group_key_created": "first group key created.",
|
||||||
"group_member_list_changed": "the group member list has changed. Please re-encrypt the secret key.",
|
"group_member_list_changed": "the group member list has changed. Please re-encrypt the secret key.",
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
"remove": "remove",
|
"remove": "remove",
|
||||||
"remove_reaction": "remove reaction",
|
"remove_reaction": "remove reaction",
|
||||||
"return_apps_dashboard": "return to Apps Dashboard",
|
"return_apps_dashboard": "return to Apps Dashboard",
|
||||||
"save": "save",
|
"save": "salva",
|
||||||
"search": "search",
|
"search": "search",
|
||||||
"search_apps": "search for apps",
|
"search_apps": "search for apps",
|
||||||
"select_app_type": "select App Type",
|
"select_app_type": "select App Type",
|
||||||
@ -80,18 +80,21 @@
|
|||||||
"all": "all",
|
"all": "all",
|
||||||
"api": "API",
|
"api": "API",
|
||||||
"app": "app",
|
"app": "app",
|
||||||
|
"app_other": "apps",
|
||||||
"app_name": "app name",
|
"app_name": "app name",
|
||||||
"app_service_type": "app service type",
|
"app_service_type": "app service type",
|
||||||
"apps_dashboard": "apps Dashboard",
|
"apps_dashboard": "apps Dashboard",
|
||||||
"apps_official": "official Apps",
|
"apps_official": "official Apps",
|
||||||
"category": "category",
|
"category": "category",
|
||||||
"category_other": "categories",
|
"category_other": "categories",
|
||||||
|
"chat": "chat",
|
||||||
"core": {
|
"core": {
|
||||||
"block_height": "altezza blocco",
|
"block_height": "altezza blocco",
|
||||||
"information": "informazioni core",
|
"information": "informazioni core",
|
||||||
"peers": "peer connessi",
|
"peers": "peer connessi",
|
||||||
"version": "versione core"
|
"version": "versione core"
|
||||||
},
|
},
|
||||||
|
"dev": "dev",
|
||||||
"domain": "domain",
|
"domain": "domain",
|
||||||
"ui": {
|
"ui": {
|
||||||
"version": "versione UI"
|
"version": "versione UI"
|
||||||
|
32
src/i18n/processors.ts
Normal file
32
src/i18n/processors.ts
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
export const capitalizeAll = {
|
||||||
|
type: 'postProcessor',
|
||||||
|
name: 'capitalizeAll',
|
||||||
|
process: (value: string) => value.toUpperCase(),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const capitalizeFirstChar = {
|
||||||
|
type: 'postProcessor',
|
||||||
|
name: 'capitalizeFirstChar',
|
||||||
|
process: (value: string) => value.charAt(0).toUpperCase() + value.slice(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const capitalizeFirstWord = {
|
||||||
|
type: 'postProcessor',
|
||||||
|
name: 'capitalizeFirstWord',
|
||||||
|
process: (value: string) => {
|
||||||
|
if (!value?.trim()) return value;
|
||||||
|
|
||||||
|
const trimmed = value.trimStart();
|
||||||
|
const firstSpaceIndex = trimmed.indexOf(' ');
|
||||||
|
|
||||||
|
if (firstSpaceIndex === -1) {
|
||||||
|
return trimmed.charAt(0).toUpperCase() + trimmed.slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const firstWord = trimmed.slice(0, firstSpaceIndex);
|
||||||
|
const restOfString = trimmed.slice(firstSpaceIndex);
|
||||||
|
const trailingSpaces = value.slice(trimmed.length);
|
||||||
|
|
||||||
|
return firstWord.toUpperCase() + restOfString + trailingSpaces;
|
||||||
|
},
|
||||||
|
};
|
@ -1,5 +1,5 @@
|
|||||||
import { gateways, getApiKeyFromStorage } from './background';
|
import { gateways, getApiKeyFromStorage } from './background';
|
||||||
import { listOfAllQortalRequests } from './components/Apps/useQortalMessageListener';
|
import { listOfAllQortalRequests } from './hooks/useQortalMessageListener';
|
||||||
import {
|
import {
|
||||||
addForeignServer,
|
addForeignServer,
|
||||||
addGroupAdminRequest,
|
addGroupAdminRequest,
|
||||||
|
@ -42,7 +42,7 @@ import {
|
|||||||
getNameInfo,
|
getNameInfo,
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
} from '../backgroundFunctions/encryption';
|
} from '../backgroundFunctions/encryption';
|
||||||
import { showSaveFilePicker } from '../components/Apps/useQortalMessageListener';
|
import { showSaveFilePicker } from '../hooks/useQortalMessageListener';
|
||||||
import { getPublishesFromAdminsAdminSpace } from '../components/Chat/AdminSpaceInner';
|
import { getPublishesFromAdminsAdminSpace } from '../components/Chat/AdminSpaceInner';
|
||||||
import { extractComponents } from '../components/Chat/MessageDisplay';
|
import { extractComponents } from '../components/Chat/MessageDisplay';
|
||||||
import {
|
import {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user