Files: 6791a012f6f25d8aeb64cae36c5f8ff3b21e9132 / app / html / settings / remove-exif.js
942 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 | group: 'attachments', |
27 | title: 'Image metadata', |
28 | body: h('DefaultTabs', [ |
29 | h('p', [ |
30 | 'Remove exif metadata from images such as GPS coordinates, phone/camera brand etc.', |
31 | h('input', { |
32 | type: 'checkbox', |
33 | checked: removeExif, |
34 | 'ev-change': toggleRemoveExif |
35 | }) |
36 | ]) |
37 | ]) |
38 | } |
39 | } |
40 | } |
41 |
Built with git-ssb-web