Add files via upload

This commit is contained in:
2025-10-06 19:53:48 +08:00
committed by GitHub
parent 880ab64313
commit 09a39b41fc
2 changed files with 2219 additions and 2223 deletions

View File

@@ -107,6 +107,12 @@ export function updateOrInsertTableInChat() {
const container = document.createElement('div');
container.id = TABLE_CONTAINER_ID;
container.innerHTML = htmlContent;
// On mobile devices, add a specific class to enable horizontal scrolling via CSS
if (isTouchDevice()) {
container.classList.add('mobile-table-view');
}
lastMessage.appendChild(container);
bindSwipePreventer(container);
} else {

View File

@@ -13,10 +13,6 @@ import { characters, this_chid, eventSource, event_types } from "/script.js";
import { fetchNccsModels, testNccsApiConnection } from '../core/api/NccsApi.js';
const isTouchDevice = () => window.matchMedia('(pointer: coarse)').matches;
// More reliable check for mobile layout adjustments
const isMobileForScrolling = () => window.innerWidth <= 768;
const getAllTablesContainer = () => document.getElementById('all-tables-container');
let isResizing = false;
@@ -1200,12 +1196,6 @@ export function bindTableEvents() {
if (!panel || panel.dataset.eventsBound) {
return;
}
// Add a specific class for mobile devices to handle scrolling behavior via CSS
if (isMobileForScrolling()) {
panel.classList.add('mobile-scrolling');
}
log('开始为表格视图绑定交互事件...', 'info');
const fillingModeRadios = panel.querySelectorAll('input[name="filling-mode"]');
const contextSliderContainer = document.getElementById('context-reading-slider-container');