mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 11:15:50 +00:00
Update fmt.Println message from 'Hello' to 'Goodbye'
This commit is contained in:
@@ -331,9 +331,7 @@ export function renderTables() {
|
|||||||
|
|
||||||
tables.forEach((tableData, tableIndex) => {
|
tables.forEach((tableData, tableIndex) => {
|
||||||
const header = document.createElement('div');
|
const header = document.createElement('div');
|
||||||
header.style.display = 'flex';
|
header.className = 'amily2-table-header-container';
|
||||||
header.style.justifyContent = 'space-between';
|
|
||||||
header.style.alignItems = 'center';
|
|
||||||
const title = document.createElement('h3');
|
const title = document.createElement('h3');
|
||||||
if (updatedTables.has(tableIndex)) {
|
if (updatedTables.has(tableIndex)) {
|
||||||
title.classList.add('table-updated'); // 【V15.2 新增】为更新的表格添加高亮
|
title.classList.add('table-updated'); // 【V15.2 新增】为更新的表格添加高亮
|
||||||
@@ -378,13 +376,17 @@ export function renderTables() {
|
|||||||
}
|
}
|
||||||
tableElement.appendChild(colgroup);
|
tableElement.appendChild(colgroup);
|
||||||
|
|
||||||
// Explicitly calculate and set the total table width to override CSS conflicts
|
|
||||||
let totalWidth = 0;
|
let totalWidth = 0;
|
||||||
const cols = colgroup.querySelectorAll('col');
|
const cols = colgroup.querySelectorAll('col');
|
||||||
cols.forEach(col => {
|
cols.forEach(col => {
|
||||||
totalWidth += parseInt(col.style.width, 10);
|
totalWidth += parseInt(col.style.width, 10);
|
||||||
});
|
});
|
||||||
tableElement.style.width = `${totalWidth}px`;
|
tableElement.style.minWidth = '100%';
|
||||||
|
if (totalWidth > 0) {
|
||||||
|
tableElement.style.width = `${Math.max(totalWidth, 0)}px`;
|
||||||
|
tableElement.style.minWidth = `${totalWidth}px`;
|
||||||
|
tableElement.style.width = '100%';
|
||||||
|
}
|
||||||
|
|
||||||
const thead = tableElement.createTHead();
|
const thead = tableElement.createTHead();
|
||||||
const headerRow = thead.insertRow();
|
const headerRow = thead.insertRow();
|
||||||
@@ -2096,9 +2098,7 @@ function bindChatTableDisplaySetting() {
|
|||||||
continuousRenderToggle.closest('.control-block-with-switch').style.opacity = '0.5';
|
continuousRenderToggle.closest('.control-block-with-switch').style.opacity = '0.5';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
updateContinuousRenderState();
|
updateContinuousRenderState();
|
||||||
|
|
||||||
showInChatToggle.addEventListener('change', () => {
|
showInChatToggle.addEventListener('change', () => {
|
||||||
settings.show_table_in_chat = showInChatToggle.checked;
|
settings.show_table_in_chat = showInChatToggle.checked;
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
|
|||||||
Reference in New Issue
Block a user