right align all disk config buttons

This commit is contained in:
Arthur Lu 2023-01-12 15:26:45 -08:00
parent 68146260ed
commit 39cce60fc0
3 changed files with 12 additions and 2 deletions

View File

@ -29,7 +29,7 @@
<label for="storage">Storage</label><select id="storage"></select>
<label for="size">Size(GiB)</label><input id="size" type="number" step="1" min="0" max="0" value="0">
<label for="size">Path</label><input id="path">
<div style="width: 100%; display: flex; justify-content: flex-end; align-items: center;"><img id="disk-add" src="images/actions/create.svg"></div>
<div class="last-item"><img id="disk-add" src="images/actions/create.svg"></div>
</div>
</fieldset>
<fieldset class="fieldset-no-border">

View File

@ -73,4 +73,11 @@ hr {
width: 100%;
border: none;
border-top: solid white 1px;
}
.last-item {
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
}

View File

@ -131,11 +131,14 @@ function addDiskLine (fieldset, id, iconHref, labelText, valueText) {
value.innerText = valueText;
field.append(value);
let configDiv = document.createElement("div");
configDiv.classList.add("last-item");
let config = document.createElement("img");
config.src = "images/actions/config-active.svg";
config.alt = `Config disk ${labelText}`;
config.classList.add("clickable");
field.append(config);
configDiv.append(config);
field.append(configDiv);
}
async function populateAddDisk () {