* Create the theme sub menu. (Later versions can create this programmatically)
()
| 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 |
no test coverage detected