Implemented phase 6 for the POC prototype in the Website service.
This commit is contained in:
1 parent
256d22df40
commit
f2f445827b
40 files changed
+1906
-37
No files matched your search
@@ -233,3 +233,36 @@
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
/* The viewer's collection on a series */
|
||||
.series__collection {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-1);
|
||||
max-width: 320px;
|
||||
padding: var(--space-4);
|
||||
}
|
||||
|
||||
.series__issue--owned {
|
||||
background: var(--tint);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.series__own {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.series__own:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.series__own[aria-pressed="true"] {
|
||||
color: var(--good);
|
||||
}
|
||||
@@ -1937,6 +1937,58 @@ textarea.input {
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.empty__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
/* A progress bar, in twentieths: inline widths are off the table under the site's Content-Security-Policy. */
|
||||
.progress {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 6px;
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
background: var(--tint);
|
||||
}
|
||||
|
||||
.progress::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0 auto 0 0;
|
||||
width: var(--progress, 0%);
|
||||
background: var(--header);
|
||||
}
|
||||
|
||||
.progress--5 { --progress: 5%; }
|
||||
.progress--10 { --progress: 10%; }
|
||||
.progress--15 { --progress: 15%; }
|
||||
.progress--20 { --progress: 20%; }
|
||||
.progress--25 { --progress: 25%; }
|
||||
.progress--30 { --progress: 30%; }
|
||||
.progress--35 { --progress: 35%; }
|
||||
.progress--40 { --progress: 40%; }
|
||||
.progress--45 { --progress: 45%; }
|
||||
.progress--50 { --progress: 50%; }
|
||||
.progress--55 { --progress: 55%; }
|
||||
.progress--60 { --progress: 60%; }
|
||||
.progress--65 { --progress: 65%; }
|
||||
.progress--70 { --progress: 70%; }
|
||||
.progress--75 { --progress: 75%; }
|
||||
.progress--80 { --progress: 80%; }
|
||||
.progress--85 { --progress: 85%; }
|
||||
.progress--90 { --progress: 90%; }
|
||||
.progress--95 { --progress: 95%; }
|
||||
|
||||
.progress--100 {
|
||||
--progress: 100%;
|
||||
}
|
||||
|
||||
.progress--100::after {
|
||||
background: var(--good);
|
||||
}
|
||||
|
||||
/* The gate note under gated actions */
|
||||
.gate-note {
|
||||
display: flex;
|
||||
|
||||
@@ -1066,3 +1066,79 @@ a.rows__row:hover {
|
||||
padding-top: var(--space-8);
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Collection and events
|
||||
========================================================================== */
|
||||
|
||||
.tiles--three {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.collection__series,
|
||||
.events__event {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3);
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.collection__series:hover,
|
||||
.events__event:hover {
|
||||
border-color: var(--ink);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.collection__text {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.collection__top {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-2);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.collection__complete {
|
||||
color: var(--good);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.events__intro {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.events__event {
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.events__name {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.events__chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.listing__sold {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
@@ -25,14 +25,23 @@ if (form && supported) {
|
||||
};
|
||||
|
||||
button.hidden = false;
|
||||
|
||||
// The word for a browser without passkeys is on the page by default; this one has them.
|
||||
for (const notice of document.querySelectorAll("[data-passkey-unsupported]")) {
|
||||
notice.hidden = true;
|
||||
}
|
||||
|
||||
button.addEventListener("click", async () => {
|
||||
button.disabled = true;
|
||||
status.textContent = "";
|
||||
|
||||
try {
|
||||
// On the account screen the button adds a passkey to the account signed in; on the sign-in screen it signs in or joins.
|
||||
const adding = button.dataset.passkey === "add";
|
||||
const start = adding ? { add: true } : { email: form.querySelector("[name=email]").value };
|
||||
// The button adds a passkey on the account screen, replaces them all from a recovery link, and otherwise signs in or joins.
|
||||
const start = button.dataset.passkey === "add"
|
||||
? { add: true }
|
||||
: button.dataset.passkey === "recover"
|
||||
? { recover: form.querySelector("[name=recover]").value }
|
||||
: { email: form.querySelector("[name=email]").value };
|
||||
const { mode, options } = await post("/sign-in/passkey/options", start);
|
||||
let credential;
|
||||
|
||||
@@ -55,8 +64,9 @@ if (form && supported) {
|
||||
|
||||
window.location.assign(location);
|
||||
} catch (error) {
|
||||
// Dismissing the browser's prompt is not an error worth a message.
|
||||
status.textContent = error.name === "NotAllowedError" ? "" : error.message;
|
||||
status.textContent = error.name === "NotAllowedError"
|
||||
? "That didn't go through: the passkey prompt was cancelled. Nothing was created or changed — try again."
|
||||
: error.message;
|
||||
button.disabled = false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user