@jupyterlab/apputils
Version:
JupyterLab - Application Utilities
29 lines • 1.5 kB
JavaScript
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import { Dialog, showDialog } from './dialog';
import * as React from 'react';
export function showCommandLinkerTrustDialog(options) {
const trans = Dialog.translator.load('jupyterlab');
return showDialog({
title: options.title,
body: (React.createElement("div", null,
React.createElement("p", null, trans.__('This document is not trusted. Running a command may execute arbitrary code.')),
React.createElement("p", null, options.hasTrustCommand
? trans.__('Select "Trust" to trust this document, or "Run Once" to allow this command without trusting it.')
: trans.__('Only proceed if you trust the author of this content.')),
React.createElement("p", null,
React.createElement("strong", null, trans.__('Command Label:')),
" ",
options.commandLabel),
React.createElement("p", null,
React.createElement("strong", null, trans.__('Command ID:')),
" ",
options.command),
React.createElement("div", null,
React.createElement("strong", null, trans.__('Arguments:')),
React.createElement("pre", null, options.args)))),
buttons: options.buttons,
defaultButton: options.defaultButton
});
}
//# sourceMappingURL=commandlinkertrustdialog.js.map