blob: b13da9682f0b834180993fc48f7b27447e449a9f (
plain)
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
|
const { React } = require('powercord/webpack');
const {
Category,
SwitchItem,
TextInput,
RadioGroup,
SelectInput
} = require('powercord/components/settings');
const tz = require('./tz');
module.exports = class Settings extends React.Component {
constructor (props) {
super(props);
this.state = {
timezone: this.props.getSetting('timezone', 'GMT')
};
}
render () {
return <div>
<SelectInput
searchable={true}
onChange={(e) => {
this.props.updateSetting('timezone', e.value);
this.setState({ timezone: e.value });
}}
value={this.state.timezone}
options={[
...tz.timezones.map(it => ({
value: it.code,
label: `${it.name} (${it.offset})`
}))
]}
>
My timezone
</SelectInput>
</div>;
}
};
;
|