-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettings.tsx
More file actions
57 lines (53 loc) · 1.69 KB
/
Settings.tsx
File metadata and controls
57 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* The source code below is licensed under MIT */
import React from 'react';
import { RadioGroup } from '@components/settings';
export enum IncomingValues {
DEFAULT,
FORCE,
SUPPRESS,
}
export enum OutgoingValues {
DEFAULT,
REMEMBER,
SUPPRESS,
}
export default ({ settings }: { settings: Settings; }) => (
<React.Fragment>
<RadioGroup
title='Incoming Replies (messages sent by other users)'
value={settings.get('incoming', IncomingValues.DEFAULT)}
onChange={({ value }) => void settings.set('incoming', value)}
options={[{
name: 'Default Behavior',
desc: 'Do not change the behavior of incoming replies.',
value: IncomingValues.DEFAULT,
}, {
name: 'Force Mentions',
desc: 'Force all incoming replies to your messages to ping you.',
value: IncomingValues.FORCE,
}, {
name: 'Suppress Mentions',
desc: 'Force all incoming replies to your messages to not ping you.',
value: IncomingValues.SUPPRESS,
}]}
/>
<RadioGroup
title='Outgoing Replies (messages sent by you)'
value={settings.get('outgoing', OutgoingValues.DEFAULT)}
onChange={({ value }) => void settings.set('outgoing', value)}
options={[{
name: 'Always On',
desc: 'This is the default behavior for outgoing replies.',
value: OutgoingValues.DEFAULT,
}, {
name: 'Remember Choice',
desc: 'Save your last choice and use that as the outgoing behavior.',
value: OutgoingValues.REMEMBER,
}, {
name: 'Always Off',
desc: 'Always toggle off outgoing replies.',
value: OutgoingValues.SUPPRESS,
}]}
/>
</React.Fragment>
);