v0.1.22: 灯下春秋(双 UI 修复)+ 文档同步
【速度暂停根因】onYearPaper 岁末族簿弹出时强制 speed:0——缓行一年整遇年报即'自动变暂停' → 修复:年报不打断自动速度(弹窗与时间流解耦;玩家随手翻页) 【弹框层级根因】MemberModal/EventModal 渲染于 .main-left(z-index:1) 内部, 层叠上下文被 tabs(z-index:2) 压制——'弹框出现在宗族/谱系菜单下面' → 修复:ModalShell 全量走 React Portal 到 document.body(免疫一切祖先层叠上下文) + .modal-outer z-index 50→100 双保险 【测试】1018 全绿(纯 UI 修复,引擎基线 0.1.21 不动);build 通过
This commit is contained in:
@@ -137,7 +137,7 @@ export class GameFacade {
|
||||
about(): { title: string; version: string; modules: number; systems: number; plugins: number; packFingerprint: string } {
|
||||
return {
|
||||
title: '仙途家族志',
|
||||
version: '0.1.21',
|
||||
version: '0.1.22',
|
||||
modules: this.world.systemList().length,
|
||||
systems: this.world.systemList().filter((s) => s.enabled).length,
|
||||
plugins: this.world.pluginList().length,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useEffect, type ReactNode } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
|
||||
export interface ModalShellProps {
|
||||
title: string
|
||||
@@ -41,7 +42,9 @@ export function ModalShell({
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [onClose])
|
||||
|
||||
return (
|
||||
// Portal 到 document.body:任何祖先(.main-left z1 / .app)的层叠上下文都无法压住弹框,
|
||||
// 顶部菜单/主域均在其下(0.1.22 修复:弹框出现在宗族/谱系菜单下方的 z-index 越界)。
|
||||
const shell = (
|
||||
<div className="modal-outer" onClick={allowOuter ? onClose : undefined}>
|
||||
<div className="modal" style={{ width: `min(92vw, ${width}px)` }} onClick={(e) => e.stopPropagation()} data-modal-kind="shell">
|
||||
<button className="modal-close" onClick={onClose} title={closeLabel} aria-label={closeLabel}>
|
||||
@@ -58,4 +61,6 @@ export function ModalShell({
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
if (typeof document === 'undefined') return shell
|
||||
return createPortal(shell, document.body)
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ export default function SettingsPanel() {
|
||||
· 「外交」与四邻结好联姻;仇雠之族隔岁来犯,打得赢名望大涨,打不赢蚀钱伤丁。<br />
|
||||
· 「史书」自动记述繁华与凋零——百年之后,后人翻开这一卷家族志,见代代薪火、历历雪泥。
|
||||
</div>
|
||||
<div className="dim2" style={{ marginTop: 8 }}>版本 0.1.21 · Chronicle of the Immortal Clan</div>
|
||||
<div className="dim2" style={{ marginTop: 8 }}>版本 0.1.22 · Chronicle of the Immortal Clan</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -286,7 +286,8 @@ export const useGameStore = create<GameStore>((set, get) => ({
|
||||
onYearPaper: (report) => {
|
||||
if (report.year >= 2) {
|
||||
sPaper()
|
||||
set({ paperReport: report, speed: 0 })
|
||||
// 0.1.22:年报不打断自动速度(旧:speed:0 导致「缓行过一月就变暂停」)
|
||||
set({ paperReport: report })
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1237,7 +1237,7 @@ html[data-blade] .battle-lines {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 50;
|
||||
z-index: 100; /* 0.1.22 高于顶栏/菜单(2)与警讯(60)——配合 body Portal 双保险 */
|
||||
}
|
||||
.modal {
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user