Merge c47f493a33
into f512473986
This commit is contained in:
commit
8c18e98102
3 changed files with 36 additions and 0 deletions
|
@ -467,6 +467,24 @@ manage things like container crud */
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#edit-containers-panel #delete-numbered-link {
|
||||||
|
align-items: center;
|
||||||
|
block-size: var(--block-url-label-size);
|
||||||
|
border: 1px solid #d8d8d8;
|
||||||
|
border-radius: var(--small-radius);
|
||||||
|
color: var(--title-text-color);
|
||||||
|
display: flex;
|
||||||
|
font-size: var(--small-text-size);
|
||||||
|
inline-size: var(--inline-button-size);
|
||||||
|
justify-content: center;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#edit-containers-panel #delete-numbered-link:hover,
|
||||||
|
#edit-containers-panel #delete-numbered-link:focus {
|
||||||
|
background: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
span ~ .panel-header-text {
|
span ~ .panel-header-text {
|
||||||
padding-block-end: 0;
|
padding-block-end: 0;
|
||||||
padding-block-start: 0;
|
padding-block-start: 0;
|
||||||
|
|
|
@ -840,6 +840,21 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
Logic.showPreviousPanel();
|
Logic.showPreviousPanel();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Logic.addEnterHandler(document.querySelector("#delete-numbered-link"), async function () {
|
||||||
|
try {
|
||||||
|
const promises = Logic.identities().map(identity => {
|
||||||
|
if (identity.name.match(/^Container #\d+$/)) {
|
||||||
|
return Logic.removeIdentity(Logic.userContextId(identity.cookieStoreId));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await Promise.all(promises);
|
||||||
|
await Logic.refreshIdentities();
|
||||||
|
Logic.showPreviousPanel();
|
||||||
|
} catch (e) {
|
||||||
|
Logic.showPanel(P_CONTAINERS_LIST);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this._editForm = document.getElementById("edit-container-panel-form");
|
this._editForm = document.getElementById("edit-container-panel-form");
|
||||||
const editLink = document.querySelector("#edit-container-ok-link");
|
const editLink = document.querySelector("#edit-container-ok-link");
|
||||||
Logic.addEnterHandler(editLink, () => {
|
Logic.addEnterHandler(editLink, () => {
|
||||||
|
|
|
@ -126,6 +126,9 @@
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<h3 class="panel-header-text">Edit Containers</h3>
|
<h3 class="panel-header-text">Edit Containers</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="container-panel-controls">
|
||||||
|
<a href="#" class="action-link" id="delete-numbered-link" title="Delete numbered containers">Delete #</a>
|
||||||
|
</div>
|
||||||
<div class="scrollable panel-content">
|
<div class="scrollable panel-content">
|
||||||
<table class="unstriped">
|
<table class="unstriped">
|
||||||
<tbody id="edit-identities-list"></tbody>
|
<tbody id="edit-identities-list"></tbody>
|
||||||
|
|
Loading…
Add table
Reference in a new issue