Fixed start page children, better password prompt

This commit is contained in:
Magnus Åhall 2023-07-14 16:34:52 +02:00
parent fc415265de
commit f25616328d

View File

@ -54,7 +54,11 @@ export class NodeUI extends Component {
let page = ''
switch(this.page.value) {
case 'node':
if(node.ID > 0) {
if(node.ID == 0) {
page = html`
${children.length > 0 ? html`<div class="child-nodes">${children}</div>` : html``}
`
} else {
let padlock = ''
if(node.CryptoKeyID > 0)
padlock = html`<img src="/images/${window._VERSION}/padlock-black.svg" style="height: 24px;" />`
@ -300,7 +304,7 @@ class NodeContent extends Component {
textarea.parentNode.dataset.replicatedValue = textarea.value
}//}}}
unlock() {//{{{
let pass = prompt("Password")
let pass = prompt(`Password for "${this.props.model.description}"`)
if(!pass)
return
@ -482,7 +486,7 @@ export class Node {
// Ask user to unlock key first
var pass = null
while(pass || obj_key.status() == 'locked') {
pass = prompt("Password")
pass = prompt(`Password for "${obj_key.description}"`)
if(!pass)
throw new Error(`Key "${obj_key.description}" is locked`)