right align all disk config buttons

This commit is contained in:
Arthur Lu 2023-01-12 15:26:45 -08:00
parent 24351ded1e
commit b0b3698258
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="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">Size(GiB)</label><input id="size" type="number" step="1" min="0" max="0" value="0">
<label for="size">Path</label><input id="path"> <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> </div>
</fieldset> </fieldset>
<fieldset class="fieldset-no-border"> <fieldset class="fieldset-no-border">

View File

@ -73,4 +73,11 @@ hr {
width: 100%; width: 100%;
border: none; border: none;
border-top: solid white 1px; 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; value.innerText = valueText;
field.append(value); field.append(value);
let configDiv = document.createElement("div");
configDiv.classList.add("last-item");
let config = document.createElement("img"); let config = document.createElement("img");
config.src = "images/actions/config-active.svg"; config.src = "images/actions/config-active.svg";
config.alt = `Config disk ${labelText}`; config.alt = `Config disk ${labelText}`;
config.classList.add("clickable"); config.classList.add("clickable");
field.append(config); configDiv.append(config);
field.append(configDiv);
} }
async function populateAddDisk () { async function populateAddDisk () {