Files: 2b05be8ee023fdd9580d6a845ba074a425756685 / app / html / settings / dyslexia-fonts.js
736 bytesRaw
1 | const nest = require('depnest') |
2 | const { h, when } = require('mutant') |
3 | |
4 | exports.gives = nest({ |
5 | 'app.html.settings': true |
6 | }) |
7 | |
8 | exports.needs = nest({ |
9 | 'settings.obs.get': 'first' |
10 | }) |
11 | |
12 | exports.create = function (api) { |
13 | return nest({ |
14 | 'app.html.settings': accessibility |
15 | }) |
16 | |
17 | function accessibility () { |
18 | const font = api.settings.obs.get('patchbay.accessibility.openDyslexicEnabled', false) |
19 | |
20 | return { |
21 | group: 'accessibility', |
22 | title: 'Dyslexia Fonts', |
23 | body: h('AccessibilityStyles', [ |
24 | h('div', { 'ev-click': () => font.set(!font()) }, [ |
25 | h('label', 'Enable OpenDyslexic font'), |
26 | h('i.fa', { className: when(font, 'fa-check-square', 'fa-square-o') }) |
27 | ]) |
28 | ]) |
29 | } |
30 | } |
31 | } |
32 |
Built with git-ssb-web