-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsettings.js
More file actions
106 lines (104 loc) · 2.56 KB
/
settings.js
File metadata and controls
106 lines (104 loc) · 2.56 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import * as settings from 'src/utils/settings/index.js';
import onPage from 'src/utils/onPage.js';
import Translation from 'src/structures/constants/translation.ts';
[
{
name: Translation.Vanilla('settings-language'),
key: 'language',
options() {
return ['en', 'fr', 'ru', 'es', 'pt', 'cn', 'it', 'pl', 'de']
.map((locale) => [
Translation.Vanilla(`chat-${locale}`),
locale,
]);
},
refresh: true,
remove: false,
},
{
name: Translation.Setting('vanilla.chat.rainbow'),
key: 'chatRainbowDisabled',
category: 'Chat',
},
{
name: Translation.Setting('vanilla.chat.sound'),
key: 'chatSoundsDisabled',
category: 'Chat',
},
{
name: Translation.Setting('vanilla.chat.avatar'),
key: 'chatAvatarsDisabled',
category: 'Chat',
},
{
name: Translation.Setting('vanilla.card.shiny'),
key: 'gameShinyDisabled',
category: 'Game',
},
{
name: Translation.Setting('vanilla.game.music'),
key: 'gameMusicDisabled',
category: 'Game',
},
{
name: Translation.Setting('vanilla.game.sound'),
key: 'gameSoundsDisabled',
category: 'Game',
},
{
name: Translation.Setting('vanilla.game.profile'),
key: 'profileSkinsDisabled',
category: 'Game',
},
{
name: Translation.Setting('vanilla.game.emote'),
key: 'gameEmotesDisabled',
category: 'Game',
},
{
name: Translation.Setting('vanilla.card.skin'),
key: 'breakingDisabled',
category: 'Game',
},
// show hand to friends.......
{
name: Translation.Setting('vanilla.game.shake'),
key: 'shakeDisabled',
category: 'Animation',
},
{
name: Translation.Setting('vanilla.game.stats'),
key: 'statsDisabled',
category: 'Animation',
},
{
name: Translation.Setting('vanilla.game.vfx'),
key: 'vfxDisabled',
category: 'Animation',
},
{ key: 'deckBeginnerInfo' },
{ key: 'firstVisit' },
{ key: 'playDeck' },
// { key: 'cardsVersion' }, // no-export?
// { key: 'allCards' }, // no-export?
// { key: 'scrollY' },
// { key: 'browser' },
// { key: 'leaderboardPage' },
// { key: 'chat' },
// { key: 'language' },
// { key: '' },
// TODO: Add missing keys
].forEach((setting) => {
const { name, category } = setting;
const refresh = category === 'Game' || category === 'Animation' ?
() => onPage('Game') || onPage('gameSpectating') :
undefined;
settings.register({
refresh,
remove: true,
...setting,
page: 'game',
hidden: name === undefined,
});
});
settings.setDisplayName('Undercards', 'game');