diff --git a/cypress/e2e/claim-portal-success.cy.ts b/cypress/e2e/claim-portal-success.cy.ts index 7e76314e..7c70dd28 100644 --- a/cypress/e2e/claim-portal-success.cy.ts +++ b/cypress/e2e/claim-portal-success.cy.ts @@ -34,8 +34,8 @@ describe("Claims Portal Success", () => { cy.get("#view-claim").should("be.visible").and("include.text", "View Claim"); // anvil confirms it instantly so there is two notifications - cy.get("body").should("contain.text", "Transaction sent"); - cy.get("body").should("contain.text", "Claim Complete"); + cy.get("body", { timeout: 15000 }).should("contain.text", "Transaction sent"); + cy.get("body", { timeout: 15000 }).should("contain.text", "Claim Complete"); cy.window().then((win) => { win.open = cy.stub().as("open"); @@ -65,7 +65,7 @@ describe("Claims Portal Success", () => { cy.get("#view-claim").should("not.be.visible"); - cy.get("body").should("contain.text", "This reward is not for you"); + cy.get("body", { timeout: 15000 }).should("contain.text", "This reward is not for you"); }); }); @@ -87,7 +87,7 @@ describe("Claims Portal Success", () => { cy.get("#claim-loader").should("not.be.visible"); cy.get("#view-claim").should("not.be.visible"); - cy.get("body").should("contain.text", "Nonce invalidation transaction sent"); + cy.get("body", { timeout: 15000 }).should("contain.text", "Nonce invalidation transaction sent"); }); }); }); diff --git a/static/index.html b/static/index.html index c17698d7..fa1e0c3f 100644 --- a/static/index.html +++ b/static/index.html @@ -179,8 +179,19 @@
-
- + diff --git a/static/scripts/rewards/init.ts b/static/scripts/rewards/init.ts index 1b465d1a..4fca4b88 100644 --- a/static/scripts/rewards/init.ts +++ b/static/scripts/rewards/init.ts @@ -1,18 +1,14 @@ import { app } from "./app-state"; +import { displayCommitHash } from "./render-transaction/display-commit-hash"; import { readClaimDataFromUrl } from "./render-transaction/read-claim-data-from-url"; import { grid } from "./the-grid"; -displayCommitHash(); // @DEV: display commit hash in footer +displayCommitHash(); grid(document.getElementById("grid") as HTMLElement, gridLoadedCallback); // @DEV: display grid background readClaimDataFromUrl(app).catch(console.error); // @DEV: read claim data from URL -declare const commitHash: string; // @DEV: passed in at build time check build/esbuild-build.ts -function displayCommitHash() { - // display commit hash in footer - const buildElement = document.querySelector(`#build a`) as HTMLAnchorElement; - buildElement.innerHTML = commitHash; - buildElement.href = `https://github.com/ubiquity/pay.ubq.fi/commit/${commitHash}`; -} +const footer = document.querySelector(".footer") as Element; +footer.classList.add("animate"); // cSpell:ignore llback function gridLoadedCallback() { diff --git a/static/scripts/rewards/render-transaction/display-commit-hash.ts b/static/scripts/rewards/render-transaction/display-commit-hash.ts new file mode 100644 index 00000000..b145f3a0 --- /dev/null +++ b/static/scripts/rewards/render-transaction/display-commit-hash.ts @@ -0,0 +1,7 @@ +declare const commitHash: string; // @DEV: passed in at build time check build/esbuild-build.ts +export function displayCommitHash() { + // display commit hash in footer + const buildElement = document.querySelector(`#build a`) as HTMLAnchorElement; + buildElement.innerHTML = commitHash; + buildElement.href = `https://github.com/ubiquity/pay.ubq.fi/commit/${commitHash}`; +} diff --git a/static/styles/rewards/pay.css b/static/styles/rewards/pay.css index ec76f153..ab4925eb 100644 --- a/static/styles/rewards/pay.css +++ b/static/styles/rewards/pay.css @@ -193,3 +193,29 @@ footer { border-bottom-color: transparent; border-left-color: transparent; } + +.faq-icon { + position: fixed; + right: 20px; + cursor: pointer; +} + +a.faq-icon > div { + font-size: 12px; + color: #fff; +} + +a.faq-icon > div:hover { + opacity: 1; +} + +.footer { + display: flex; + align-items: center; + opacity: 0; + transition: opacity 1s; +} + +.footer.animate { + opacity: 1; +} diff --git a/yarn.lock b/yarn.lock index 441910fe..5f38f6f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8613,4 +8613,4 @@ __metadata: resolution: "zod@npm:3.23.8" checksum: 10c0/8f14c87d6b1b53c944c25ce7a28616896319d95bc46a9660fe441adc0ed0a81253b02b5abdaeffedbeb23bdd25a0bf1c29d2c12dd919aef6447652dd295e3e69 languageName: node - linkType: hard + linkType: hard \ No newline at end of file