mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
improve settings UI, translations, offline status
This commit is contained in:
@@ -339,12 +339,12 @@ const PostForm = () => {
|
||||
const [showForm, setShowForm] = useState(false);
|
||||
|
||||
const subplebbit = useSubplebbit({ subplebbitAddress: params?.subplebbitAddress });
|
||||
const { isOffline, offlineTitle } = useIsSubplebbitOffline(subplebbit);
|
||||
const { isOffline, isOnlineStatusLoading, offlineTitle } = useIsSubplebbitOffline(subplebbit);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.postFormDesktop}>
|
||||
{!(isInAllView || isInSubscriptionsView) && showForm && (isOffline || isOffline) && <div className={styles.offlineBoard}>{offlineTitle}</div>}
|
||||
{!(isInAllView || isInSubscriptionsView) && showForm && (isOffline || isOnlineStatusLoading) && <div className={styles.offlineBoard}>{offlineTitle}</div>}
|
||||
{isThreadClosed ? (
|
||||
<div className={styles.closed}>
|
||||
{t('thread_closed')}
|
||||
@@ -364,7 +364,7 @@ const PostForm = () => {
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.postFormMobile}>
|
||||
{!(isInAllView || isInSubscriptionsView) && showForm && (isOffline || isOffline) && <div className={styles.offlineBoard}>{offlineTitle}</div>}
|
||||
{!(isInAllView || isInSubscriptionsView) && showForm && (isOffline || isOnlineStatusLoading) && <div className={styles.offlineBoard}>{offlineTitle}</div>}
|
||||
{isThreadClosed ? (
|
||||
<div className={styles.closed}>
|
||||
{t('thread_closed')}
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.removeWallet {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.save {
|
||||
margin-top: 10px;
|
||||
margin-right: 5px;
|
||||
|
||||
@@ -89,7 +89,7 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
|
||||
|
||||
const _removeWallet = (index: number) => {
|
||||
const wallet = walletsArray[index];
|
||||
if (window.confirm(t('delete_confirm', { value: wallet.chainTicker, interpolation: { escapeValue: false } }))) {
|
||||
if (window.confirm(t('delete_confirm', { value: wallet.address, interpolation: { escapeValue: false } }))) {
|
||||
const newArray = [...walletsArray.slice(0, index), ...walletsArray.slice(index + 1)];
|
||||
setWalletsArray(newArray);
|
||||
setSelectedWallet(0);
|
||||
@@ -142,10 +142,10 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
|
||||
/>
|
||||
<div className={styles.buttons}>
|
||||
<button className={styles.save} onClick={save}>
|
||||
{t('save')}
|
||||
{t('save_changes')}
|
||||
</button>
|
||||
<button className={styles.removeWallet} onClick={() => _removeWallet(selectedWallet)}>
|
||||
{t('remove')}
|
||||
{t('delete_wallet')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,7 +170,7 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => {
|
||||
setSelectedWallet(newIndex);
|
||||
}}
|
||||
>
|
||||
+
|
||||
{t('create')}
|
||||
</button>
|
||||
</div>
|
||||
{walletsInputs}
|
||||
|
||||
Reference in New Issue
Block a user