Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/routes/(app)/server/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
let teamFilter = $state('');
let now = $state(Date.now());
let showPicker = $state(false);
/** the time of day & weather to set on the match in progress; '' until one is picked */
let weather = $state('');
let broadcast = $state('');
/** who the message goes to: '' is everyone (a broadcast), else a faction (a whisper to each on it) */
let to = $state('');
Expand Down Expand Up @@ -424,6 +426,25 @@
? 'Both travel when the match-end screen finishes, not when the button is pressed.'
: 'You have view-only access to this server.'}
</p>
<form
class="mt-4"
onsubmit={(e) => {
e.preventDefault();
void act('setWeather', { lighting: weather }, { after: refreshStatus });
}}
>
<label class="field-label" for="weather">Time of day &amp; weather</label>
<div class="join w-full">
<select id="weather" class="input" bind:value={weather} disabled={!match}>
<option value="" disabled>Pick one…</option>
{#each data.catalog.lightings as l (l.id)}<option value={l.id}
>{lightingLabel(data.catalog, l.id)}</option
>{/each}
</select>
<button class="btn" type="submit" disabled={!match || !weather}>Set now</button>
</div>
<p class="note">Changes the match in progress at once; the map does not reload.</p>
</form>
<form
class="mt-4"
onsubmit={(e) => {
Expand Down
Loading