-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
GlobalSettings.vue
213 lines (194 loc) · 4.98 KB
/
GlobalSettings.vue
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<script lang="ts" setup>
import { ref } from 'vue'
import { useLocalStorage } from '@vueuse/core'
import { supportsScreenshot } from '../timeline/composable/screenshot'
type Tab = 'global' | 'components' | 'timeline'
const tab = ref<Tab>('global')
const hideAppSelector = useLocalStorage('split-pane-collapsed-left-app-select-pane', false)
const hideTimelineCanvas = useLocalStorage('split-pane-collapsed-left-timeline-right', false)
const hideEvents = useLocalStorage('split-pane-collapsed-right-timeline-right', false)
</script>
<template>
<div class="global-preferences p-6">
<nav class="flex items-center gap-2 pb-4">
<VueGroup
v-model="tab"
indicator
>
<VueGroupButton
value="global"
label="Global"
class="flat"
/>
<VueGroupButton
value="components"
label="Components"
class="flat"
/>
<VueGroupButton
value="timeline"
label="Timeline"
class="flat"
/>
</VueGroup>
<VueButton
:to="{
name: 'plugins'
}"
icon-left="extension"
icon-right="arrow_forward"
class="flat"
>
Plugin settings
</VueButton>
</nav>
<div v-if="tab === 'global'" class="preferences flex flex-wrap gap-8">
<VueFormField title="Theme">
<VueGroup
v-model="$shared.theme"
class="extend w-96"
>
<VueGroupButton
value="auto"
label="Auto"
/>
<VueGroupButton
value="light"
label="Light"
/>
<VueGroupButton
value="dark"
label="Dark"
/>
<VueGroupButton
value="high-contrast"
label="High contrast"
/>
</VueGroup>
</VueFormField>
<VueFormField
title="Main layout"
>
<VueSwitch v-model="hideAppSelector">
Collapse app selector
</VueSwitch>
</VueFormField>
<VueFormField
title="Menu Step Scrolling"
>
<VueSwitch v-model="$shared.menuStepScrolling">
Enable
</VueSwitch>
<template #subtitle>
Useful for trackpads
</template>
</VueFormField>
<VueFormField
title="Debugging info"
>
<VueSwitch v-model="$shared.debugInfo">
Enable
</VueSwitch>
</VueFormField>
</div>
<div v-if="tab === 'components'" class="preferences flex flex-wrap gap-8">
<VueFormField
title="Component names"
>
<VueGroup
v-model="$shared.componentNameStyle"
>
<VueGroupButton
value="original"
label="Original"
/>
<VueGroupButton
value="class"
label="PascalCase"
/>
<VueGroupButton
value="kebab"
label="kebab-case"
/>
</VueGroup>
</VueFormField>
<VueFormField
title="Performance monitoring"
>
<VueSwitch v-model="$shared.performanceMonitoringEnabled">
Enable
</VueSwitch>
<template #subtitle>
Turn off if your app is slowed down
</template>
</VueFormField>
<VueFormField
title="Update tracking"
>
<VueSwitch v-model="$shared.trackUpdates">
Enable
</VueSwitch>
<template #subtitle>
Turn off if your app is slowed down
</template>
</VueFormField>
<VueFormField
title="Editable props"
>
<VueSwitch v-model="$shared.editableProps">
Enable
</VueSwitch>
<template #subtitle>
May print warnings in the console
</template>
</VueFormField>
<VueFormField
title="Highlight updates"
>
<VueSwitch v-model="$shared.flashUpdates">
Enable
</VueSwitch>
<template #subtitle>
Don't enable if you are sensitive to flashing
</template>
</VueFormField>
</div>
<div v-if="tab === 'timeline'" class="preferences flex flex-wrap gap-8">
<VueFormField
title="Layout"
>
<VueSwitch v-model="hideTimelineCanvas">
Hide timeline canvas
</VueSwitch>
<VueSwitch v-model="hideEvents">
Hide events explorer
</VueSwitch>
</VueFormField>
<VueFormField
title="Time grid"
>
<VueSwitch v-model="$shared.timelineTimeGrid">
Enable
</VueSwitch>
</VueFormField>
<VueFormField
v-if="supportsScreenshot"
title="Screenshots"
>
<VueSwitch v-model="$shared.timelineScreenshots">
Enable
</VueSwitch>
</VueFormField>
</div>
</div>
</template>
<style lang="postcss" scoped>
.preferences {
.vue-ui-form-field {
> .wrapper > .content {
min-height: 32px;
justify-content: center;
}
}
}
</style>