forked from abner/for-legacy-web
Add deafen button
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
Flask,
|
||||
User,
|
||||
Megaphone,
|
||||
Shield,
|
||||
} from "@styled-icons/boxicons-solid";
|
||||
import { Route, Switch, useHistory } from "react-router-dom";
|
||||
import { LIBRARY_VERSION } from "revolt.js";
|
||||
@@ -76,6 +77,11 @@ export default function Settings() {
|
||||
icon: <IdCard size={20} />,
|
||||
title: <Text id="app.settings.pages.profile.title" />,
|
||||
},
|
||||
{
|
||||
id: "privacy",
|
||||
icon: <Shield size={20} />,
|
||||
title: <Text id="app.settings.pages.profile.title" />,
|
||||
},
|
||||
{
|
||||
id: "sessions",
|
||||
icon: <CheckShield size={20} />,
|
||||
|
||||
36
src/pages/settings/panes/Privacy.tsx
Normal file
36
src/pages/settings/panes/Privacy.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import styles from "./Panes.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
import { dispatch } from "../../../redux";
|
||||
import { connectState } from "../../../redux/connector";
|
||||
import { SyncKeys, SyncOptions } from "../../../redux/reducers/sync";
|
||||
|
||||
import Checkbox from "../../../components/ui/Checkbox";
|
||||
|
||||
interface Props {
|
||||
options?: SyncOptions;
|
||||
}
|
||||
|
||||
export function Component(props: Props) {
|
||||
return (
|
||||
<div className={styles.notifications}>
|
||||
<Checkbox
|
||||
key={"everyone_dm"}
|
||||
checked={false}
|
||||
description={
|
||||
<Text
|
||||
id={`app.settings.pages.privacy.allow_dms.d`}
|
||||
/>
|
||||
}
|
||||
onChange={(enabled) => {console.log(enabled)}}>
|
||||
<Text id="app.settings.pages.privacy.allow_dms.t" />
|
||||
</Checkbox>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const Sync = connectState(Component, (state) => {
|
||||
return {
|
||||
options: state.sync,
|
||||
};
|
||||
});
|
||||
@@ -152,7 +152,7 @@ export const Overview = observer(({ server }: Props) => {
|
||||
<Text id="general.disabled" />
|
||||
</option>
|
||||
{server.channels
|
||||
.filter((x) => typeof x !== "undefined")
|
||||
.filter((x) => (typeof x !== "undefined" && x.channel_type === "TextChannel"))
|
||||
.map((channel) => (
|
||||
<option key={channel!._id} value={channel!._id}>
|
||||
{getChannelName(channel!, true)}
|
||||
|
||||
Reference in New Issue
Block a user