Files: 3d894c28cab9f2d22d9dbb37830695931982059b / app / html / settings / remove-exif.js
911 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 | |
41 |
Built with git-ssb-web