Add a "Just a moment..." title to the metadata loading state
The title sits above the rotating status messages and disappears with the loading state; the status messages no longer carry their own ellipses.
This commit is contained in:
2 files changed
+7
-6
No files matched your search
@@ -5,11 +5,11 @@ const REFRESH_ATTEMPTS = 5
|
||||
const REFRESH_DELAY = 2000
|
||||
const STEP_FOR_KIND = { 10002: "relays", 0: "profile", 10063: "blossom" }
|
||||
const MESSAGES = {
|
||||
relays: "Looking up your relay list…",
|
||||
profile: "Fetching your profile…",
|
||||
blossom: "Fetching your media server list…"
|
||||
relays: "Looking up your relay list",
|
||||
profile: "Fetching your profile",
|
||||
blossom: "Fetching your media server list"
|
||||
}
|
||||
const WAITING_MESSAGE = "Waiting for your changes to appear…"
|
||||
const WAITING_MESSAGE = "Waiting for your changes to appear"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = [ "status", "loading", "content", "retry" ]
|
||||
@@ -26,7 +26,7 @@ export default class extends Controller {
|
||||
this.contentTarget.innerHTML = ""
|
||||
this.loadingTarget.classList.remove("hidden")
|
||||
this.runStep("relays", {
|
||||
message: "Saved. Updating…",
|
||||
message: "Saved. Updating",
|
||||
expectedKind: detail.kind,
|
||||
expectedId: detail.eventId,
|
||||
attempts: 0
|
||||
|
||||
@@ -94,8 +94,9 @@
|
||||
<div data-nostr-metadata-target="loading"
|
||||
class="flex flex-col items-center justify-center py-16">
|
||||
<div class="mb-4 h-12 w-12"></div>
|
||||
<h3>Just a moment...</h3>
|
||||
<p data-nostr-metadata-target="status"
|
||||
class="text-gray-500 animate-pulse">Loading…</p>
|
||||
class="text-gray-500 animate-pulse">Loading</p>
|
||||
<button type="button"
|
||||
data-nostr-metadata-target="retry"
|
||||
data-action="click->nostr-metadata#retry"
|
||||
|
||||
Reference in new issue
Block a user