Keep chat accessible during civilization selection
This commit is contained in:
parent
c8a2db0d49
commit
e8591e163b
5 changed files with 31 additions and 8 deletions
|
|
@ -355,3 +355,5 @@ Viewer 0.1.117 makes hover more audible, sustains action sounds longer, and adds
|
|||
Viewer 0.1.118 shows floating resource icons for bartering, research rewards and other gains without a map origin. City and collection gains retain their map locations; other rewards identify the civilization without inventing a city. Storage waste is excluded. Engine remains 0.4.85.
|
||||
|
||||
Viewer 0.1.119 queues brief public-action notices while watching other players live, naming their civilization and research, buildings, moves or rewards. Spectators see all players. Initial snapshots, own actions, repeated states and undo do not produce notices. Replay uses its existing captions. Engine remains 0.4.85.
|
||||
|
||||
Viewer 0.1.120 keeps chat accessible during civilization selection: a non-modal picker includes a Chat shortcut and hides while table activity is open, preserving selection when returning. Verified opening chat and returning in a fresh draft. Engine remains 0.4.85.
|
||||
|
|
|
|||
4
web-client/package-lock.json
generated
4
web-client/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.119",
|
||||
"version": "0.1.120",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.119",
|
||||
"version": "0.1.120",
|
||||
"dependencies": {
|
||||
"@boardgamers/protocol": "0.9.0",
|
||||
"lucide-svelte": "^0.577.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.119",
|
||||
"version": "0.1.120",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { ArrowRight, Crown, GraduationCap, Check, Pencil, X } from 'lucide-svelte';
|
||||
import { ArrowRight, Crown, GraduationCap, Check, Pencil, X, MessageCircle } from 'lucide-svelte';
|
||||
import CivilizationEmblem from './CivilizationEmblem.svelte';
|
||||
import ResourceText from './ResourceText.svelte';
|
||||
import type { Controller } from './controller';
|
||||
|
|
@ -11,17 +11,23 @@
|
|||
let editing = $state(false);
|
||||
let tab = $state<'advances' | 'leaders'>('advances');
|
||||
const civilization = $derived(civilizations.find((c) => c.name === selected) ?? civilizations[0]);
|
||||
function show(node: HTMLDialogElement) {
|
||||
node.showModal();
|
||||
}
|
||||
let dialog: HTMLDialogElement;
|
||||
$effect(() => {
|
||||
if (!dialog) return;
|
||||
if ($session.activityOpen) dialog.close();
|
||||
else if (!dialog.open) dialog.show();
|
||||
});
|
||||
</script>
|
||||
|
||||
<dialog
|
||||
class="field-guide civilization-picker"
|
||||
aria-labelledby="civilization-title"
|
||||
use:show
|
||||
bind:this={dialog}
|
||||
oncancel={(e) => e.preventDefault()}
|
||||
>
|
||||
<button class="draft-chat" onclick={() => controller.setTab('chat')}>
|
||||
<MessageCircle size={18} />Chat{#if $session.unread}<span class="unread">{$session.unread}</span>{/if}
|
||||
</button>
|
||||
<h2 id="civilization-title">{draft ? 'Choose your civilization' : 'Choose civilization'}</h2>
|
||||
{#if draft}
|
||||
<p class="draft-intro">
|
||||
|
|
|
|||
|
|
@ -151,3 +151,18 @@
|
|||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.civilization-picker[open] {
|
||||
inset: 12px 0;
|
||||
margin: auto;
|
||||
height: fit-content;
|
||||
z-index: 25;
|
||||
max-height: calc(100dvh - 110px);
|
||||
}
|
||||
.civilization-picker .draft-chat {
|
||||
float: right;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0 0 12px 12px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue