feedback4: merge master — PR #183 (a settings button on the title / login screen); golden unchanged (client only)
This commit is contained in:
commit
3af5b847bd
3 files changed
+15
-1
No files matched your search
@@ -17,6 +17,8 @@ import { net, identity } from '../net.js';
|
||||
import { store, useStore, shallowEqual } from '../store.js';
|
||||
import { data, useData } from '../data.js';
|
||||
import { FullscreenButton, detectFeatures } from '../ui/device.js';
|
||||
import { GIcon } from '../ui/gameComponents.js';
|
||||
import { SettingsModal } from '../ui/settings.js';
|
||||
|
||||
// Same character classes as server/net.js sanitizeName (control, zero-width, bidi, BOM), so a name
|
||||
// the client accepts is never rejected by the server's hello validation.
|
||||
@@ -183,6 +185,7 @@ export function TitleScreen() {
|
||||
const conn = useStore((s) => s.connection, shallowEqual);
|
||||
const pendingJoin = useStore((s) => s.ui.pendingJoin);
|
||||
const [name, setName] = useState(() => store.get().me.name || identity.loadName() || '');
|
||||
const [settingsOpen, setSettingsOpen] = useState(false);
|
||||
const assetsSettled = useData('assets');
|
||||
const assets = data.get('assets');
|
||||
const backdrop = findUiAsset(assets, BACKDROP_KEYS);
|
||||
@@ -258,11 +261,15 @@ export function TitleScreen() {
|
||||
<span>${STATUS_TEXT[conn.status] || conn.status}</span>
|
||||
${conn.status === 'online' ? html`<${PingPill} ms=${conn.ping} />` : null}
|
||||
<${GuideButton} class="title-guide" />
|
||||
<button type="button" class="title-settings fsbtn tapx" aria-label="设置" title="设置"
|
||||
onClick=${() => setSettingsOpen(true)}><${GIcon} name="gear" /></button>
|
||||
<${FullscreenButton} class="title-fs" />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<${SettingsModal} open=${settingsOpen} onClose=${() => setSettingsOpen(false)} />
|
||||
|
||||
<footer class="title-foot">
|
||||
<span>非官方同人复刻 · 游戏素材版权归 上海鹰角网络 / Yostar 所有</span>
|
||||
<${MicroLabel}>v${APP_VERSION} · WEB SIMULATION<//>
|
||||
|
||||
Reference in new issue
Block a user