more tiny QOL things

upscaler select no longer escapes floating control panel boundary, simple "reset to defaults" button to clear localstorage if desired, maybe get prettier action to stop complaining about where i put the ref :|
This commit is contained in:
tim h 2022-12-01 20:31:49 -06:00
parent 8c777fee04
commit 2e668b4a16
4 changed files with 18 additions and 4 deletions

View file

@ -13,8 +13,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Prettify
uses: creyD/prettier_action@v4.2
with:
ref: ${{ github.head_ref }}
prettier_options: --write **/*.{js,html,css,md}

View file

@ -136,7 +136,7 @@ body {
color: #fff;
}
#models {
.wideSelect {
width: 100%;
text-overflow: ellipsis;
}

View file

@ -59,7 +59,10 @@
</button>
<div class="content">
<label for="models">Model:</label>
<select id="models" onchange="changeModel()"></select>
<select
id="models"
class="wideSelect"
onchange="changeModel()"></select>
<br />
<label for="samplerSelect">Sampler:</label>
<select id="samplerSelect" onchange="changeSampler()"></select>
@ -104,7 +107,7 @@
<button onclick="downloadCanvas()">Save canvas</button>
<br />
<label for="upscalers">Choose upscaler</label>
<select id="upscalers"></select>
<select id="upscalers" class="wideSelect"></select>
<button onclick="upscaleAndDownload()">
Upscale (might take a sec)
</button>
@ -136,6 +139,10 @@
<label for="heldButton">Mouse button:</label>
<span id="heldButton"></span>
<br />
<button id="resetToDefaults" onclick="resetToDefaults()">
Reset to defaults
</button>
<br />
<span id="version">
<a href="https://github.com/zero01101/openOutpaint" target="_blank">
Alpha release v0.0.7.5

View file

@ -884,3 +884,9 @@ imageCollection.element.addEventListener(
},
{passive: false}
);
function resetToDefaults() {
if (confirm("Are you sure you want to clear your settings?")) {
localStorage.clear();
}
}