MCPcopy
hub / github.com/wellsjo/JSON-Splora / createThemeSubMenu

Method createThemeSubMenu

app/js/system/MainMenu.js:202–231  ·  view source on GitHub ↗

* Create the theme sub menu. (Later versions can create this programmatically)

()

Source from the content-addressed store, hash-verified

200 */
201
202 createThemeSubMenu() {
203 const themes = [{
204 label: 'Default',
205 theme: 'default'
206 }, {
207 label: 'Elegant',
208 theme: 'elegant'
209 }, {
210 label: 'Mdn-Like',
211 theme: 'mdn-like'
212 }, {
213 label: 'Neat',
214 theme: 'neat'
215 }, {
216 label: 'Neo',
217 theme: 'neo'
218 }]
219
220 // give properties
221 const selectedTheme = this.settings.get('theme')
222 themes.forEach((i) => {
223 const t = i
224 t.type = 'radio'
225 t.checked = (selectedTheme === t.theme)
226 t.click = (menuItem) => {
227 this.themeClicked(menuItem)
228 }
229 })
230 return themes
231 }
232}
233
234

Callers 1

createTemplateMethod · 0.95

Calls 2

themeClickedMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected