Skip to content

Commit df80a04

Browse files
committed
Update script.js
1 parent 5c0dc86 commit df80a04

File tree

1 file changed

+41
-22
lines changed

1 file changed

+41
-22
lines changed

wwwroot/script.js

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ function showStatus(message) {
6060
if (statusElement) {
6161
statusElement.textContent = message;
6262
statusElement.style.display = 'block';
63-
64-
// Auto-hide after 5 seconds if it's a success message
65-
if (message.includes('✅') || message.includes('Saved') || message.includes('Converted')) {
66-
setTimeout(() => {
67-
statusElement.style.display = 'none';
68-
}, 5000);
69-
}
7063
}
7164
}
7265

@@ -128,7 +121,7 @@ function ensureWebSocket() {
128121
return;
129122
}
130123
} catch (e) {
131-
// ignore
124+
console.error('WebSocket message processing error:', e);
132125
}
133126
};
134127
}
@@ -316,6 +309,32 @@ function onUserJamlEdit() {
316309
}
317310
}
318311

312+
// ================================================
313+
// Filter Builder Functions
314+
// ================================================
315+
function updateBuilderValues2() {
316+
// Initialize filter builder UI values
317+
// This would populate dropdowns and set up the filter builder interface
318+
console.log('Filter builder initialized');
319+
}
320+
321+
function initPanelSplitter() {
322+
// Initialize panel resizing functionality
323+
const splitter = document.getElementById('panelSplitter');
324+
if (splitter) {
325+
splitter.addEventListener('mousedown', (e) => {
326+
// Implement panel resizing logic
327+
console.log('Panel splitter initialized');
328+
});
329+
}
330+
}
331+
332+
function quickAnalyze(seed) {
333+
// Quick analysis of a seed - could open a modal or navigate to analysis
334+
console.log('Quick analyze seed:', seed);
335+
alert(`Analysis for seed ${seed} - feature not yet implemented`);
336+
}
337+
319338
// ================================================
320339
// Initialization
321340
// ================================================
@@ -877,20 +896,20 @@ function closeSettingsModal() {
877896
modal.style.display = 'none';
878897
}
879898

880-
// Initialize builder on page load
881-
document.addEventListener('DOMContentLoaded', () => {
882-
updateBuilderValues2();
883-
884-
// Add click handlers for ante buttons
885-
document.querySelectorAll('.ante-btn').forEach(btn => {
886-
// Add ante button functionality here if needed
887-
btn.addEventListener('click', () => {
888-
console.log('Ante button clicked');
889-
});
890-
});
891-
892-
initPanelSplitter();
893-
});
899+
function refreshSettingsModalUI() {
900+
// Update the settings modal UI with current values
901+
const seedSourceSelect = document.getElementById('settingsSeedSource');
902+
if (seedSourceSelect && currentSeedSource) {
903+
seedSourceSelect.value = currentSeedSource;
904+
}
905+
906+
// Update word list editor visibility
907+
const isTxt = currentSeedSource && currentSeedSource.startsWith('txt:');
908+
const editBtn = document.getElementById('settingsEditWordListBtn');
909+
if (editBtn) {
910+
editBtn.disabled = !isTxt;
911+
}
912+
}
894913

895914
// ================================================
896915
// Filter Builder - Item Data

0 commit comments

Comments
 (0)