Revert "Add storage and UI for anonymizing only the logged in user."
This reverts commit 9bd35ee17e
.
This commit is contained in:
parent
9bd35ee17e
commit
678b887185
|
@ -37,17 +37,6 @@ export class AnonymizeUsernamesSetting extends Component<SettingProps, State> {
|
||||||
this.setState({data});
|
this.setState({data});
|
||||||
};
|
};
|
||||||
|
|
||||||
selfOnlyClicked = async () => {
|
|
||||||
const {data} = this.state;
|
|
||||||
if (data === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.value.selfOnly = !data.value.selfOnly;
|
|
||||||
await data.save();
|
|
||||||
this.setState({data});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {data} = this.state;
|
const {data} = this.state;
|
||||||
if (data === undefined) {
|
if (data === undefined) {
|
||||||
|
@ -63,17 +52,6 @@ export class AnonymizeUsernamesSetting extends Component<SettingProps, State> {
|
||||||
</option>
|
</option>
|
||||||
));
|
));
|
||||||
|
|
||||||
const selfOnlyCheckbox = (
|
|
||||||
<label>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
checked={data.value.selfOnly}
|
|
||||||
onClick={this.selfOnlyClicked}
|
|
||||||
></input>
|
|
||||||
Only hide own username
|
|
||||||
</label>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Setting {...this.props}>
|
<Setting {...this.props}>
|
||||||
<p class="info">
|
<p class="info">
|
||||||
|
@ -89,7 +67,6 @@ export class AnonymizeUsernamesSetting extends Component<SettingProps, State> {
|
||||||
{replacementTypeOptions}
|
{replacementTypeOptions}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>{selfOnlyCheckbox}</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</Setting>
|
</Setting>
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,5 +20,4 @@ export function isReplacementType(input: string): input is ReplacementType {
|
||||||
*/
|
*/
|
||||||
export type AnonymizeUsernamesData = {
|
export type AnonymizeUsernamesData = {
|
||||||
replacementType: ReplacementType;
|
replacementType: ReplacementType;
|
||||||
selfOnly: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,7 +84,6 @@ export const storageValues = {
|
||||||
key: Feature.AnonymizeUsernames,
|
key: Feature.AnonymizeUsernames,
|
||||||
value: {
|
value: {
|
||||||
replacementType: ReplacementType.Numerical,
|
replacementType: ReplacementType.Numerical,
|
||||||
selfOnly: false,
|
|
||||||
},
|
},
|
||||||
storage: browser.storage.sync,
|
storage: browser.storage.sync,
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue