사용자 서비스 로그 갱신 흐름 정리
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
settingsPayload: null,
|
||||
settingsOpen: false,
|
||||
settingsDirty: false,
|
||||
customServiceScrollHoldUntil: 0,
|
||||
};
|
||||
|
||||
const storageKeys = {
|
||||
@@ -1621,6 +1622,9 @@
|
||||
|
||||
function renderCustomServices(rows = []) {
|
||||
if (!els.customServiceList) return;
|
||||
if (Date.now() < state.customServiceScrollHoldUntil) return;
|
||||
|
||||
const scrollTop = els.customServiceList.scrollTop;
|
||||
|
||||
els.customServiceList.innerHTML = rows.length
|
||||
? rows.map(row => {
|
||||
@@ -1653,6 +1657,8 @@
|
||||
`;
|
||||
}).join('')
|
||||
: `<div class="spike-log-empty">${escapeHtml(t('noCustomServices'))}</div>`;
|
||||
|
||||
els.customServiceList.scrollTop = scrollTop;
|
||||
}
|
||||
|
||||
function renderFanCause(data) {
|
||||
@@ -2214,6 +2220,12 @@
|
||||
els.dmesgToggle?.addEventListener('click', () => {
|
||||
setDmesgOpen(!state.dmesgOpen);
|
||||
});
|
||||
const holdCustomServiceScroll = () => {
|
||||
state.customServiceScrollHoldUntil = Date.now() + 4000;
|
||||
};
|
||||
['scroll', 'wheel', 'touchstart', 'touchmove', 'pointerdown'].forEach(eventName => {
|
||||
els.customServiceList?.addEventListener(eventName, holdCustomServiceScroll, { passive: true });
|
||||
});
|
||||
els.wifiTable?.addEventListener('click', event => {
|
||||
const button = event.target?.closest?.('.wifi-host-edit');
|
||||
if (!button) return;
|
||||
|
||||
Reference in New Issue
Block a user