()
| 77 | } |
| 78 | |
| 79 | promptForName() { |
| 80 | const l = store.getters.locale; |
| 81 | electronPrompt( |
| 82 | { |
| 83 | title: l["snapshotPrompt"], |
| 84 | label: l["snapshotValidate"], |
| 85 | value: "", |
| 86 | inputAttrs: { |
| 87 | type: "text", |
| 88 | }, |
| 89 | type: "input", |
| 90 | icon: icon, |
| 91 | }, |
| 92 | this.win.mainWindow |
| 93 | ) |
| 94 | .then((r: any) => { |
| 95 | if (r === null) { |
| 96 | console.log("user cancelled"); |
| 97 | } else { |
| 98 | if (isValidSnapshotName(r as string)) { |
| 99 | this.handle("newConfigSnapshot", r); |
| 100 | } else { |
| 101 | this.promptForName(); |
| 102 | } |
| 103 | } |
| 104 | }) |
| 105 | .catch(console.error); |
| 106 | } |
| 107 | |
| 108 | handle(identifier: Identifier, param: any = null): boolean { |
| 109 | switch (identifier) { |
no test coverage detected