mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor: remove broken anon mode feature
- delete the anon mode hook/store and stop wiring publish flows through alternate signers - strip the settings UI, avatar warning, reply indicators, and FAQ text that referenced the toggle - drop the anon mode translation keys via scripts/update-translations.js
This commit is contained in:
@@ -54,15 +54,3 @@
|
||||
margin: 2px 0 10px 0;
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
.anonMode {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.anonMode label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.anonMode input[type="checkbox"] {
|
||||
margin-right: 3px;
|
||||
}
|
||||
@@ -3,27 +3,11 @@ import { useTranslation } from 'react-i18next';
|
||||
import { createAccount, deleteAccount, exportAccount, importAccount, setAccount, setActiveAccount, useAccount, useAccounts } from '@plebbit/plebbit-react-hooks';
|
||||
import stringify from 'json-stringify-pretty-compact';
|
||||
import styles from './account-settings.module.css';
|
||||
import useAnonModeStore from '../../../stores/use-anon-mode-store';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
const isAndroid = Capacitor.getPlatform() === 'android';
|
||||
|
||||
const AnonMode = () => {
|
||||
const { t } = useTranslation();
|
||||
const anonMode = useAnonModeStore((state) => state.anonMode);
|
||||
const setAnonMode = useAnonModeStore((state) => state.setAnonMode);
|
||||
|
||||
return (
|
||||
<div className={styles.anonMode}>
|
||||
<label>
|
||||
<input type='checkbox' checked={anonMode} onChange={(e) => setAnonMode(e.target.checked)} /> {t('anon_mode')}
|
||||
</label>
|
||||
<span className={styles.settingTip}>{t('anon_mode_description')}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const AccountSettings = () => {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
@@ -236,7 +220,7 @@ const AccountSettings = () => {
|
||||
<div></div>
|
||||
<textarea value={text} onChange={(e) => setText(e.target.value)} autoCorrect='off' autoComplete='off' spellCheck='false' />
|
||||
<div>
|
||||
<button onClick={saveAccount}>{t('save_changes')}</button> <button onClick={() => setText(accountJson)}>{t('reset_changes')}</button> <AnonMode />
|
||||
<button onClick={saveAccount}>{t('save_changes')}</button> <button onClick={() => setText(accountJson)}>{t('reset_changes')}</button>
|
||||
<button className={styles.deleteAccount} onClick={() => _deleteAccount(account?.name)}>
|
||||
{t('delete_account')}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user