Files: fcb080569f3b1f39543344c961d2df683b8b0052 / app / html / settings / remove-exif.js
909 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest({ |
5 | 'app.html.settings': true |
6 | }) |
7 | |
8 | exports.needs = nest({ |
9 | 'app.html.settings': 'map', |
10 | 'settings.obs.get': 'first', |
11 | 'settings.sync.set': 'first' |
12 | }) |
13 | |
14 | exports.create = function (api) { |
15 | return nest({ |
16 | 'app.html.settings': removeExif |
17 | }) |
18 | |
19 | function removeExif () { |
20 | const removeExif = api.settings.obs.get('patchbay.removeExif', true) |
21 | const toggleRemoveExif = (ev) => { |
22 | api.settings.sync.set({patchbay: {removeExif: ev.target.checked}}) |
23 | } |
24 | |
25 | return { |
26 | title: 'Exif metadata', |
27 | body: h('DefaultTabs', [ |
28 | h('p', [ |
29 | 'Remove exif metadata from images such as GPS coordinates, phone/camera brand etc.', |
30 | h('input', { |
31 | type: 'checkbox', |
32 | checked: removeExif, |
33 | 'ev-change': toggleRemoveExif |
34 | }) |
35 | ]) |
36 | ]) |
37 | } |
38 | } |
39 | } |
40 |
Built with git-ssb-web