Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
div({class: 'modal-content'}, [
div({class: 'modal-header text-left'},
h4({class: 'modal-title'}, 'Confirm Delete')
),
div({class: 'modal-body'},
p('Are you sure you want to delete this image and tag' + (image.data.tags.length === 1 ? '' : 's') + '?')
),
div({class: 'modal-footer'}, [
button({
class: 'btn btn-danger',
type: 'button',
onclick: actions.deleteImageClicked,
'data-image_id': image_id,
'data-digest': digest
}, 'Yes I\'m sure'),
button({class: 'btn btn-default', type: 'button', 'data-dismiss': 'modal'}, 'Cancel')
])
])
),
// onclose function
function () {
actions.updateState({confirmDeleteImage: null});
}) : null
);
}
Nav(state.status.config.REGISTRY_STORAGE_DELETE_ENABLED),
div({class: 'my-3 my-md-5'},
div({class: 'container'}, view)
),
// Delete modal
append_delete_model ? Modal(
div({class: 'modal-dialog'},
div({class: 'modal-content'}, [
div({class: 'modal-header text-left'},
h4({class: 'modal-title'}, 'Confirm Delete')
),
div({class: 'modal-body'},
p('Are you sure you want to delete this image and tag' + (image.data.tags.length === 1 ? '' : 's') + '?')
),
div({class: 'modal-footer'}, [
button({
class: 'btn btn-danger',
type: 'button',
onclick: actions.deleteImageClicked,
'data-image_id': image_id,
'data-digest': digest
}, 'Yes I\'m sure'),
button({class: 'btn btn-default', type: 'button', 'data-dismiss': 'modal'}, 'Cancel')
])
])
),
// onclose function
function () {
actions.updateState({confirmDeleteImage: null});
}) : null
);
}
const view = (state, actions) =>
main([
h1(state.count),
div([
button({ onclick: e => actions.sum(-1) }, 'Sub'),
button({ onclick: e => actions.reset() }, 'Reset'),
button({ onclick: e => actions.sum(1) }, 'Add'),
]),
])
const view = (state, actions) =>
main([
h1(state.count),
div([
button({ onclick: e => actions.sum(-1) }, 'Sub'),
button({ onclick: e => actions.reset() }, 'Reset'),
button({ onclick: e => actions.sum(1) }, 'Add'),
]),
])
const view = (state, actions) =>
main([
h1(state.count),
div([
button({ onclick: e => actions.sum(-1) }, 'Sub'),
button({ onclick: e => actions.reset() }, 'Reset'),
button({ onclick: e => actions.sum(1) }, 'Add'),
]),
])