adventure: let a player back out from the web, not only in Matrix
Three verbs to match gogobee's: call off an expedition, turn back out of somebody else's party, send the pet sitter home. Which one this page offers is derived here rather than pushed — leadership is already legible in the party seats and the sitter's standing is already in the babysit offer, so nothing new crosses the wire. Two things running it turned up that no test would have. An applied abandon left "Pull out of the run" sitting under a verdict saying the expedition was over, so an applied verb now also hides the other verbs it just made untrue. And a party member was being offered that same button in the first place, beside the one that actually works — Pete knows from the seat it just read that gogobee would refuse it, so it is withheld. Also: heal the Matrix handle onto push rows stored before the column existed, on its own endpoint rather than through the subscribe upsert, which resets both watermarks and would have silenced the digest for anybody who reads the site regularly. And stack the board row below sm — four flex columns that wrapped to six lines on a phone, pre-existing.
This commit is contained in:
@@ -239,7 +239,17 @@
|
||||
{{/* data-offer marks what stops being true once the extraction lands: there
|
||||
is no run left to pull out of. Hidden by the script on an applied
|
||||
verdict, restored on a refusal, which is the one case where the reader
|
||||
still needs the retry. */}}
|
||||
still needs the retry.
|
||||
|
||||
W9: withheld from a party MEMBER, and only from them. W5a's rule is that
|
||||
an idle-looking mark still gets this button, because the board is two
|
||||
minutes stale and refusing a live extraction is worse than a no-op — but
|
||||
a member is not a staleness question. Pete knows from the same seat it
|
||||
just read that gogobee will answer rejected_not_leader, and offering a
|
||||
certain refusal directly above "Turn back alone", which is the thing that
|
||||
does work, is the page contradicting itself. CanLeave is only ever true
|
||||
for a seat that says "member". */}}
|
||||
{{if not .CanLeave}}
|
||||
<div data-offer>
|
||||
<button type="button"
|
||||
class="adv-action-btn rounded-full border border-theme-adventure/40 text-theme-adventure hover:bg-theme-adventure/10 px-4 py-1.5 text-sm font-semibold transition-colors"
|
||||
@@ -248,6 +258,38 @@
|
||||
data-confirm-label="Yes, pull out"
|
||||
data-confirm="Pull out of the dungeon now? You keep the loot, XP and coins you're carrying, and the run waits where you left it: you have seven days to go back in. If you're leading a party, it ends the day for all of you.">Pull out of the run</button>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{/* W9. The two ways out that are not an extraction, each in its own
|
||||
data-offer wrapper rather than sharing the extract one above — an
|
||||
extracted run is still abandonable, so hiding "Call it off" when the
|
||||
extraction lands would take away the very button that case needs.
|
||||
|
||||
They are mutually exclusive by construction (offersToUndo reads the
|
||||
viewer's own party seat: a leader is offered one, a member the other),
|
||||
which is why neither mentions the other. */}}
|
||||
{{if .CanAbandon}}
|
||||
<div data-offer class="mt-3">
|
||||
<button type="button"
|
||||
class="adv-action-btn rounded-full border border-[color:var(--warn)]/40 text-[color:var(--warn)] hover:bg-[color:var(--warn)]/10 px-4 py-1.5 text-sm font-semibold transition-colors"
|
||||
data-action="expedition_abandon"
|
||||
data-label="Call the whole thing off"
|
||||
data-confirm-tone="warn"
|
||||
data-confirm-label="Yes, call it off"
|
||||
data-confirm="End this expedition for good? Whatever is left of the supplies is forfeit and there is no way back into the run afterwards. If you have a party with you, it ends for all of them too, and they will be told. This is not the same as pulling out: pulling out keeps the way back open for seven days.">Call the whole thing off</button>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .CanLeave}}
|
||||
<div data-offer class="mt-3">
|
||||
<button type="button"
|
||||
class="adv-action-btn rounded-full border border-[color:var(--ink)]/25 text-[color:var(--ink)]/70 hover:bg-[color:var(--ink)]/10 px-4 py-1.5 text-sm font-semibold transition-colors"
|
||||
data-action="expedition_leave"
|
||||
data-label="Turn back alone"
|
||||
data-confirm-label="Yes, turn back"
|
||||
data-confirm="Walk out of this party and head for town on your own? The rest of them carry on without you, and the supplies you bought stay in their pool: they were spent on the expedition, not lent to it. Your leader will be told.">Turn back alone</button>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{/* W5b. Everything below is server-rendered from the offer list gogobee
|
||||
pushed onto this owner's own private row, so the page can only ever
|
||||
@@ -329,13 +371,23 @@
|
||||
<div data-offer class="mt-5 pt-5 border-t border-[color:var(--ink)]/10">
|
||||
<h3 class="font-display text-base font-bold">The sitter</h3>
|
||||
{{if .Self.Babysit.Active}}
|
||||
{{/* Engaged: say so and offer nothing. Buying a second one is refused by
|
||||
the game anyway, and a buy button under "already engaged" reads as a
|
||||
page that has not noticed. */}}
|
||||
{{/* Engaged: say so, and offer only the way back out. Buying a second one
|
||||
is refused by the game anyway, and a buy button under "already engaged"
|
||||
reads as a page that has not noticed. */}}
|
||||
<p class="text-sm text-[color:var(--ink)]/60 mt-0.5">
|
||||
Somebody is looking after the camp{{with untilUnix .Self.Babysit.ExpiresAt}} — {{.}}{{end}}.
|
||||
Your pet is being tended daily and standard camps rest like fortified ones.
|
||||
</p>
|
||||
{{if .CanCancelSitter}}
|
||||
<div class="flex flex-wrap gap-1.5 mt-2.5">
|
||||
<button type="button"
|
||||
class="adv-action-btn rounded-full border border-[color:var(--ink)]/25 text-[color:var(--ink)]/70 hover:bg-[color:var(--ink)]/10 px-3.5 py-1.5 text-sm font-semibold transition-colors"
|
||||
data-action="babysit_cancel"
|
||||
data-label="Send them home"
|
||||
data-confirm-label="Yes, send them home"
|
||||
data-confirm="Send the sitter home now? There is no refund: you paid for the days you booked and the rest of them go with the sitter. Your pet stops being tended and standard camps go back to resting like standard camps.">Send them home</button>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<p class="text-sm text-[color:var(--ink)]/60 mt-0.5 mb-2.5">
|
||||
Pet tended daily, standard camps rest like fortified ones, rival duels declined for you.
|
||||
|
||||
Reference in New Issue
Block a user