This repository was archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
80 lines (78 loc) · 1.94 KB
/
index.js
File metadata and controls
80 lines (78 loc) · 1.94 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
const { Plugin } = require('powercord/entities');
const Settings = require('../Settings.jsx');
module.exports = class TS extends Plugin {
async startPlugin () {
Settings.register({
entityID: this.entityID,
label: 'Test settings',
items: [
{
type: 'switch',
name: 'Switch',
note: 'Note It\'s switch #1',
key: 'switch1',
def: true
},
{
type: 'category',
name: 'category #1',
items: [
{
type: 'colorPicker',
name: 'Color Picker',
key: 'colorPicker1'
},
{
type: 'slider',
name: 'Slider',
key: 'slider1',
def: 8,
sequenceNumsUp: 10,
onMarkerRender: (e) => `${e}x`
}
]
},
{
type: 'category',
name: 'category #2',
items: [
{
type: 'switch',
name: 'Switch #2.1',
key: 'switch21',
def: false
},
{
type: 'select',
name: 'Select',
key: 'select1',
def: 2,
items: [
{ label: '1',
value: 1 },
{ label: '2',
value: 2 },
{ label: '2',
value: 2 },
{ label: '2',
value: 2 }
]
},
{
type: 'text',
name: ({ getSetting }) => 'Text',
note: 'It\'s text',
default: 'blblblblblblba',
onChange: ({ updateSetting }, value) => ({
error: 'It\'s not a valid text'
})
}
]
}
]
});
}
pluginWillUnload () {
powercord.api.settings.unregisterSettings('test-plugin-settings');
}
};