Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const onCreatePosePreset = event => {
event.preventDefault()
// show a prompt to get the desired preset name
let win = remote.getCurrentWindow()
prompt({
title: 'Preset Name',
label: 'Select a Preset Name',
value: `Pose ${shortId(THREE.Math.generateUUID())}`
}, win).then(name => {
if (name != null && name != '' && name != ' ') {
withState((dispatch, state) => {
// get the latest skeleton data
let sceneObject = getSceneObjects(state)[id]
let skeleton = sceneObject.skeleton
let model = sceneObject.model
// create a preset out of it
let newPreset = {
id: THREE.Math.generateUUID(),
name,
keywords: name, // TODO keyword editing
private async onNodeAddRemote() {
this.showShade();
const res = await prompt({
width: this.getBrowserWindow().getBounds().width * 0.5,
height: 200,
resizable: true,
title: i18n.__("dialog.npmInstall"),
label: i18n.__("dialog.npmInstallDesc"),
value: "",
inputAttrs: {
type: "text",
required: true
},
useHtmlLabel: true,
minimizable: false,
maximizable: false
}, this.getBrowserWindow());
if (res) {
this.loadingShade();