Add files via upload

This commit is contained in:
2025-08-11 05:54:40 +08:00
committed by GitHub
parent cee8d3548f
commit 0070d1e682
2 changed files with 164 additions and 230 deletions

View File

@@ -17,6 +17,7 @@
</div>
<hr class="header-divider" style="margin-top: 5px; margin-bottom: 10px;">
<div id="upper-controls-wrapper">
<fieldset class="settings-group" style="padding: 10px; margin-bottom: 10px;">
<legend><i class="fas fa-brain"></i> 中枢决策室</legend>
@@ -57,6 +58,17 @@
<span class="slider"></span>
</label>
</div>
<div class="control-block-with-switch" style="margin-bottom: 10px;">
<label>填表模式</label>
<div class="radio-group">
<input type="radio" id="main-api-mode" name="filling-mode" value="main-api" checked>
<label for="main-api-mode">原始</label>
<input type="radio" id="secondary-api-mode" name="filling-mode" value="secondary-api">
<label for="secondary-api-mode">分步</label>
<input type="radio" id="optimized-mode" name="filling-mode" value="optimized">
<label for="optimized-mode">兼容优化</label>
</div>
</div>
<div class="action-center-buttons" style="gap: 8px;">
<button id="amily2-export-preset-btn" class="menu_button primary small_button interactable"><i class="fas fa-file-export"></i> 导出预设</button>
<button id="amily2-export-preset-full-btn" class="menu_button primary small_button interactable"><i class="fas fa-file-archive"></i> 导出备份</button>
@@ -102,10 +114,6 @@
<hr class="section-divider" style="margin: 10px 0;">
<div id="table-filling-controls" style="display: flex; gap: 10px; align-items: center; justify-content: center;">
<div class="radio-group" style="display: flex; gap: 10px;">
<label title="使用主API进行填表"><input type="radio" name="filling-mode" value="main-api" checked> 主API</label>
<label title="使用备用API进行填表"><input type="radio" name="filling-mode" value="secondary-api"> 副API</label>
</div>
<button id="fill-table-now-btn" class="menu_button small_button">立即填表</button>
</div>
</div>
@@ -115,14 +123,13 @@
<div id="table-log-display" class="hly-log-display" style="margin-top: 10px; margin-bottom: 10px;">
</div>
</div>
<div id="table-container-wrapper" class="hly-scroll">
<div id="all-tables-container">
<div id="all-tables-container" class="hly-scroll">
<div id="add-table-placeholder" title="敕令新表">
<i class="fas fa-plus"></i>
</div>
</div>
</div>
</body>

View File

@@ -1,13 +1,12 @@
#amily2_memorisation_forms_panel {
--am2-font-size-base: 14px;
--am2-gap-main: 10px;
--am2-padding-main: 8px 5px;
--am2-container-bg: rgba(0,0,0,0.1);
--am2-container-border: 1px solid rgba(255, 255, 255, 0.2);
--am2-container-border-radius: 12px;
--am2-container-padding: 10px;
--am2-container-padding: 10px 5px;
--am2-container-shadow: inset 0 0 15px rgba(0,0,0,0.2);
--am2-title-font-size: 1.1em;
@@ -20,8 +19,7 @@
--am2-table-bg: rgba(0,0,0,0.2);
--am2-table-border: 1px solid rgba(255, 255, 255, 0.25);
--am2-table-cell-padding: 6px 8px;
--am2-table-cell-font-size: 0.95em;
--am2-table-cell-padding: 3px 6px;
--am2-header-bg: rgba(255, 255, 255, 0.1);
--am2-header-color: #e0e0e0;
@@ -51,7 +49,9 @@
gap: var(--am2-gap-main);
padding: var(--am2-padding-main);
box-sizing: border-box;
font-size: var(--am2-font-size-base);
}
#upper-controls-wrapper {
}
#amily2_memorisation_forms_panel #all-tables-container {
@@ -88,43 +88,36 @@
margin-bottom: var(--am2-controls-margin-bottom);
}
/* ===================================================================== */
/* ================== 【V65.0】最终布局圣旨 - 智能兼容 ================== */
/* ===================================================================== */
#amily2_memorisation_forms_panel .table-instance-container {
margin-bottom: 20px;
/* 【V65.0 核心】为表格容器启用水平滚动,作为最终保险 */
overflow-x: auto;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] {
width: 100%;
border-collapse: collapse;
background-color: var(--am2-table-bg);
/* 【V65.0 修正】在桌面端,我们依然希望表格能自适应,而不是固定布局 */
/* table-layout: fixed; */
transition: box-shadow 0.5s ease-in-out;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td {
border: var(--am2-table-border);
padding: var(--am2-table-cell-padding);
text-align: left;
font-size: var(--am2-table-cell-font-size);
/* 【V65.0 核心】使用更智能的断词策略 */
overflow-wrap: break-word;
word-wrap: break-word; /* 兼容旧版浏览器 */
word-break: break-word; /* 优先在单词边界换行 */
word-wrap: break-word;
word-break: break-word;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td {
max-width: 250px;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th {
background-color: var(--am2-header-bg);
color: var(--am2-header-color);
/* 【V65.0 新增】为表头设置一个最小宽度,保证可读性 */
min-width: 120px;
font-weight: bold;
position: relative;
}
#amily2_memorisation_forms_panel .index-col {
@@ -132,11 +125,12 @@
text-align: center !important;
font-weight: bold;
color: var(--am2-index-col-color);
/* 【V72.0 谢罪圣旨】直接硬编码最终宽度,不再使用变量 */
width: 30px !important;
min-width: 30px !important;
padding: var(--am2-table-cell-padding);
word-break: normal;
position: relative;
cursor: pointer;
}
#amily2_memorisation_forms_panel th[contenteditable="true"] {
@@ -199,7 +193,6 @@
white-space: nowrap;
}
/* ================== 起居注 (日志) 样式 ================== */
#amily2_memorisation_forms_panel .hly-log-display {
background: rgba(0,0,0,0.25);
border-radius: 8px;
@@ -495,129 +488,63 @@ input:checked + .slider:before {
transform: translateX(22px);
}
/* ===================================================================== */
/* ================== 【V65.0】最终布局圣旨 - 移动端优化 ================== */
/* ===================================================================== */
.amily2-context-menu {
display: none;
position: absolute;
top: 100%;
left: 0;
z-index: 1001;
flex-direction: column;
gap: 0;
padding: 2px;
background-color: rgba(30, 30, 40, 0.98);
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
box-shadow: none;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}
.amily2-context-menu.amily2-menu-active {
display: flex;
}
#amily2_memorisation_forms_panel .amily2-context-menu .menu_button {
white-space: nowrap;
border: none !important;
border-radius: 0 !important;
padding: 4px 8px !important;
font-size: 0.85em !important;
background: transparent !important;
transition: background-color 0.2s ease !important;
text-align: left !important;
font-weight: normal !important;
transform: none !important;
box-shadow: none !important;
margin: 0 !important;
}
#amily2_memorisation_forms_panel .amily2-context-menu .menu_button:hover {
background: rgba(255, 255, 255, 0.15) !important;
transform: none !important;
box-shadow: none !important;
}
.amily2-row-context-menu {
top: 0;
left: 100%;
}
@media (max-width: 768px) {
/* 【V65.0 修正】在移动端,不再需要容器的水平滚动 */
#amily2_memorisation_forms_panel .table-instance-container {
overflow-x: initial;
#amily2_memorisation_forms_panel {
padding: 0;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"],
#amily2_memorisation_forms_panel table[id^="amily2-table-"] thead,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tbody,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td,
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr {
display: block;
#upper-controls-wrapper {
padding: var(--am2-padding-main);
}
/* 【V74.0 核心修正】不再隐藏表头,而是让它也参与到卡片式布局中 */
#amily2_memorisation_forms_panel table[id^="amily2-table-"] thead {
display: block;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] thead tr {
display: flex;
flex-wrap: wrap;
gap: 5px;
border: 1px solid var(--am2-header-editable-focus-outline, #79b8ff);
border-radius: 8px;
padding: 8px;
margin-bottom: 10px;
background: rgba(0,0,0,0.2);
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th {
flex-grow: 1;
min-width: 120px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--am2-header-editable-bg) !important;
border: 1px solid var(--am2-header-editable-focus-outline, #79b8ff);
border-radius: 5px;
padding: 5px 8px;
}
/* 【V74.0 新增】默认隐藏移动端编辑按钮 */
.mobile-edit-handle {
display: none;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr {
border: 1px solid var(--am2-table-border, #444);
border-radius: 8px;
margin-bottom: 15px;
background: rgba(0,0,0,0.1);
position: relative;
padding-top: 35px;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td {
border: none;
border-bottom: 1px dotted rgba(255, 255, 255, 0.15);
position: relative;
padding-left: 45% !important;
text-align: right !important;
min-height: 30px;
display: flex;
align-items: center;
justify-content: flex-end;
/* 【V65.0 核心】确保在移动端也能正确断词 */
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td:last-child {
border-bottom: none;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td:before {
content: attr(data-label);
position: absolute;
left: 10px;
width: 40%;
padding-right: 10px;
white-space: nowrap;
text-align: left !important;
font-weight: bold;
color: var(--am2-header-color, #e0e0e0);
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td.index-col {
display: none;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr .delete-row-handle {
display: block;
position: absolute;
top: 8px;
right: 8px;
width: 28px;
height: 28px;
background-color: rgba(255, 82, 82, 0.5) !important;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 28px;
font-size: 16px;
cursor: pointer;
padding: 0 !important;
border: none;
z-index: 10;
}
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr .delete-row-handle:before {
content: "×";
}
/* 【V74.0 新增】只在移动端显示编辑按钮 */
#amily2_memorisation_forms_panel .mobile-edit-handle {
display: inline-block;
color: var(--am2-title-icon-color, #9e8aff);
#amily2_memorisation_forms_panel #all-tables-container {
padding: 10px 2px;
}
}