Auto naming of containers
This commit is contained in:
parent
66b5f216ac
commit
1dabdcafaf
1 changed files with 1 additions and 3 deletions
|
@ -409,13 +409,11 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelector("#edit-container-ok-link").addEventListener("click", () => {
|
document.querySelector("#edit-container-ok-link").addEventListener("click", () => {
|
||||||
// FIXME: if the name is empty?
|
|
||||||
|
|
||||||
let identity = Logic.currentIdentity();
|
let identity = Logic.currentIdentity();
|
||||||
browser.runtime.sendMessage({
|
browser.runtime.sendMessage({
|
||||||
method: identity.userContextId ? "updateIdentity" : "createIdentity",
|
method: identity.userContextId ? "updateIdentity" : "createIdentity",
|
||||||
userContextId: identity.userContextId || 0,
|
userContextId: identity.userContextId || 0,
|
||||||
name: document.getElementById("edit-container-panel-name-input").value,
|
name: document.getElementById("edit-container-panel-name-input").value || Logic.generateIdentityName(),
|
||||||
icon: identity.image || "fingerprint",
|
icon: identity.image || "fingerprint",
|
||||||
color: identity.color || "green",
|
color: identity.color || "green",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue