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:
Victor Seiji Hariki 2022-12-10 08:54:55 -03:00 committed by GitHub
commit 9af58c7ee6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Prettify
uses: creyD/prettier_action@v4.2
with:

View file

@ -222,7 +222,7 @@ const _generate = async (
at--;
if (at < 0) at = images.length - 1;
imageindextxt.textContent = `${at}/${images.length}`;
imageindextxt.textContent = `${at}/${images.length - 1}`;
redraw();
};
@ -230,7 +230,7 @@ const _generate = async (
at++;
if (at >= images.length) at = 0;
imageindextxt.textContent = `${at}/${images.length}`;
imageindextxt.textContent = `${at}/${images.length - 1}`;
redraw();
};
@ -256,7 +256,7 @@ const _generate = async (
interruptButton.disabled = false;
imageCollection.inputElement.appendChild(interruptButton);
images.push(...(await _dream(endpoint, requestCopy)));
imageindextxt.textContent = `${at}/${images.length}`;
imageindextxt.textContent = `${at}/${images.length - 1}`;
} catch (e) {
alert(
`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);
const imageindextxt = document.createElement("button");
imageindextxt.textContent = `${at}/${images.length}`;
imageindextxt.textContent = `${at}/${images.length - 1}`;
imageindextxt.addEventListener("click", () => {
at = 0;
imageindextxt.textContent = `${at}/${images.length}`;
imageindextxt.textContent = `${at}/${images.length - 1}`;
redraw();
});