Merge pull request #81 from zero01101/testing
Simple Index 0 image count fix and test if internal pulls still work
This commit is contained in:
commit
9af58c7ee6
2 changed files with 7 additions and 7 deletions
4
.github/workflows/autoformat.yml
vendored
4
.github/workflows/autoformat.yml
vendored
|
@ -13,9 +13,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Prettify
|
- name: Prettify
|
||||||
uses: creyD/prettier_action@v4.2
|
uses: creyD/prettier_action@v4.2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -222,7 +222,7 @@ const _generate = async (
|
||||||
at--;
|
at--;
|
||||||
if (at < 0) at = images.length - 1;
|
if (at < 0) at = images.length - 1;
|
||||||
|
|
||||||
imageindextxt.textContent = `${at}/${images.length}`;
|
imageindextxt.textContent = `${at}/${images.length - 1}`;
|
||||||
redraw();
|
redraw();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ const _generate = async (
|
||||||
at++;
|
at++;
|
||||||
if (at >= images.length) at = 0;
|
if (at >= images.length) at = 0;
|
||||||
|
|
||||||
imageindextxt.textContent = `${at}/${images.length}`;
|
imageindextxt.textContent = `${at}/${images.length - 1}`;
|
||||||
redraw();
|
redraw();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ const _generate = async (
|
||||||
interruptButton.disabled = false;
|
interruptButton.disabled = false;
|
||||||
imageCollection.inputElement.appendChild(interruptButton);
|
imageCollection.inputElement.appendChild(interruptButton);
|
||||||
images.push(...(await _dream(endpoint, requestCopy)));
|
images.push(...(await _dream(endpoint, requestCopy)));
|
||||||
imageindextxt.textContent = `${at}/${images.length}`;
|
imageindextxt.textContent = `${at}/${images.length - 1}`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
alert(
|
alert(
|
||||||
`Error generating images. Please try again or see consolde for more details`
|
`Error generating images. Please try again or see consolde for more details`
|
||||||
|
@ -330,11 +330,11 @@ const _generate = async (
|
||||||
imageSelectMenu = makeElement("div", bb.x, bb.y + bb.h);
|
imageSelectMenu = makeElement("div", bb.x, bb.y + bb.h);
|
||||||
|
|
||||||
const imageindextxt = document.createElement("button");
|
const imageindextxt = document.createElement("button");
|
||||||
imageindextxt.textContent = `${at}/${images.length}`;
|
imageindextxt.textContent = `${at}/${images.length - 1}`;
|
||||||
imageindextxt.addEventListener("click", () => {
|
imageindextxt.addEventListener("click", () => {
|
||||||
at = 0;
|
at = 0;
|
||||||
|
|
||||||
imageindextxt.textContent = `${at}/${images.length}`;
|
imageindextxt.textContent = `${at}/${images.length - 1}`;
|
||||||
redraw();
|
redraw();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue