git ssb

16+

Dominic / patchbay



Tree: 8069cbb074f6985dedd767cc31ba0586638550ea

Files: 8069cbb074f6985dedd767cc31ba0586638550ea / app / html / settings / custom-styles.js

885 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4exports.gives = nest({
5 'app.html.settings': true
6})
7
8exports.needs = nest({
9 'app.html.settings': 'map',
10 'settings.obs.get': 'first',
11 'settings.sync.set': 'first'
12})
13
14exports.create = function (api) {
15 return nest({
16 'app.html.settings': customStyles
17 })
18
19 function customStyles () {
20 const customStyles = api.settings.obs.get('patchbay.customStyles', '')
21 const styles = h('textarea', { value: customStyles })
22
23 return {
24 title: 'Custom Styles',
25 body: h('CustomStyles', [
26 h('p', 'Comma-seperated list of tabs which will open on startup.'),
27 styles,
28 h('button', {'ev-click': peachify}, 'Apply Styles')
29 ])
30 }
31
32 function peachify () {
33 api.settings.sync.set({
34 patchbay: {
35 customStyles: styles.value
36 }
37 })
38 }
39 }
40}
41
42

Built with git-ssb-web