Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function location ({location, msg, isEditing, onUpdate}) {
const markdown = api.message.html.markdown
return h('div', {}, computed(location, markdown))
}
}
function Option ({ notifications = 0, imageEl, name, location, selected }) {
return h('Option', { className: selected ? '-selected' : '' }, [
h('div.circle', [
when(notifications, h('div.alert', notifications)),
imageEl
]),
api.app.html.link(location, name),
])
}
})
function renderSecret () {
return [
h('h1', 'Your secret'),
when(secretLabel, [ h('h3', 'Label'), h('pre', secretLabel) ]),
h('h3', 'Secret'),
h('pre', secret),
h('div.actions', [
CopyToClipboard({ toCopy: secret }),
when(modalOpen, h('button -subtle', { 'ev-click': () => modalOpen.set(false) }, 'close'), [])
])
]
}
function description ({description, isEditing, onUpdate}) {
const markdown = api.message.html.markdown
const input = h('textarea', {'ev-input': e => onUpdate(e.target.value), value: description})
return h('Description', [
when(isEditing,
input,
computed(description, markdown)
)
])
}
}
function menuItem (handleClick) {
return h('a', {
style: { order: 1 },
'ev-click': () => handleClick(route)
}, route)
}