mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix rare race condition on band change and minor translation update.
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
var lang_dxwaterfall_cycle_unworked = "<?= __("Cycle through unworked continents/DXCC"); ?>";
|
||||
var lang_dxwaterfall_dx_hunter = "<?= __("DX Hunter"); ?>";
|
||||
var lang_dxwaterfall_no_unworked = "<?= __("No unworked continents/DXCC on this band"); ?>";
|
||||
var lang_dxwaterfall_fetching_spots = "<?= __("Fetching spots..."); ?>";
|
||||
var lang_dxwaterfall_click_to_cycle = "<?= __("Click to cycle or wait 1.5s to apply"); ?>";
|
||||
var lang_dxwaterfall_change_continent = "<?= __("Change spotter continent"); ?>";
|
||||
var lang_dxwaterfall_filter_by_mode = "<?= __("Filter by mode"); ?>";
|
||||
@@ -38,7 +37,7 @@
|
||||
var lang_dxwaterfall_zoom_out = "<?= __("Zoom out"); ?>" + " [" + modKey + "+-]";
|
||||
var lang_dxwaterfall_reset_zoom = "<?= __("Reset zoom to default (3)"); ?>";
|
||||
var lang_dxwaterfall_zoom_in = "<?= __("Zoom in"); ?>" + " [" + modKey + "++]";
|
||||
var lang_dxwaterfall_waiting_data = "<?= __("Waiting for DX Cluster data..."); ?>";
|
||||
var lang_dxwaterfall_downloading_data = "<?= __("Downloading DX Cluster data"); ?>";
|
||||
var lang_dxwaterfall_comment = "<?= __("Comment: "); ?>";
|
||||
var lang_dxwaterfall_modes_label = "<?= __("modes:"); ?>";
|
||||
var lang_dxwaterfall_out_of_bandplan = "<?= __("OUT OF BANDPLAN"); ?>";
|
||||
@@ -46,7 +45,7 @@
|
||||
var lang_dxwaterfall_invalid = "<?= __("INVALID"); ?>";
|
||||
var lang_dxwaterfall_turn_on = "<?= __("Click to turn on the DX Waterfall"); ?>";
|
||||
var lang_dxwaterfall_turn_off = "<?= __("Turn off DX Waterfall"); ?>";
|
||||
var lang_dxwaterfall_warming_up = "<?= __("Warming up..."); ?>";
|
||||
var lang_dxwaterfall_please_wait = "<?= __("Please wait"); ?>";
|
||||
var lang_dxwaterfall_label_size_cycle = "<?= __("Cycle label size"); ?>";
|
||||
var lang_dxwaterfall_label_size_xsmall = "<?= __("X-Small"); ?>";
|
||||
var lang_dxwaterfall_label_size_small = "<?= __("Small"); ?>";
|
||||
|
||||
@@ -3282,7 +3282,8 @@ var dxWaterfall = {
|
||||
self.currentSmartHunterIndex = 0;
|
||||
|
||||
// Populate menu even if no spots (so user can still interact)
|
||||
self.updateZoomMenu();
|
||||
// Force update to bypass catTuning/frequencyChanging check
|
||||
self.updateZoomMenu(true); // Pass true to force update
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@@ -3491,8 +3492,8 @@ var dxWaterfall = {
|
||||
// Text position (moved down lower for more space)
|
||||
var textY = centerY + DX_WATERFALL_CONSTANTS.CANVAS.TEXT_OFFSET_Y;
|
||||
|
||||
// Draw "Waiting for DX Cluster data..." message
|
||||
DX_WATERFALL_UTILS.drawing.drawCenteredText(this.ctx, lang_dxwaterfall_waiting_data, centerX, textY, 'WAITING_MESSAGE', 'MESSAGE_TEXT_WHITE');
|
||||
// Draw "Downloading DX Cluster data" message
|
||||
DX_WATERFALL_UTILS.drawing.drawCenteredText(this.ctx, lang_dxwaterfall_downloading_data, centerX, textY, 'WAITING_MESSAGE', 'MESSAGE_TEXT_WHITE');
|
||||
|
||||
// Reset opacity
|
||||
this.ctx.globalAlpha = 1.0;
|
||||
@@ -4886,9 +4887,9 @@ var dxWaterfall = {
|
||||
if (this.fetchInProgress) {
|
||||
if (this.operationStartTime) {
|
||||
var elapsed = ((Date.now() - this.operationStartTime) / 1000).toFixed(1);
|
||||
// Only show "Warming up..." if we haven't received ANY data yet
|
||||
// Once we have data, always show counter (prevents "Warming up" from reappearing)
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_warming_up : elapsed + 's';
|
||||
// Only show "Please wait" if we haven't received ANY data yet
|
||||
// Once we have data, always show counter (prevents "Please wait" from reappearing)
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_please_wait : elapsed + 's';
|
||||
this.zoomMenuDiv.innerHTML = '<div style="display: flex; align-items: center; flex: 1;"><i class="fas fa-hourglass-half" style="margin-right: 5px; animation: blink 1s infinite;"></i><span style="margin-right: 10px;">' + displayText + '</span></div>';
|
||||
} else {
|
||||
// Fetch in progress but timer not started - show hourglass without counter
|
||||
@@ -4906,12 +4907,12 @@ var dxWaterfall = {
|
||||
// Use operationStartTime check as fallback to catch brief transition moments
|
||||
if (this.operationStartTime) {
|
||||
var elapsed = ((Date.now() - this.operationStartTime) / 1000).toFixed(1);
|
||||
// Only show "Warming up..." if we haven't received ANY data yet and elapsed < 1s
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_warming_up : elapsed + 's';
|
||||
// Only show "Please wait" if we haven't received ANY data yet and elapsed < 1s
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_please_wait : elapsed + 's';
|
||||
this.zoomMenuDiv.innerHTML = '<div style="display: flex; align-items: center; flex: 1;"><i class="fas fa-hourglass-half" style="margin-right: 5px; animation: blink 1s infinite;"></i><span style="margin-right: 10px;">' + displayText + '</span></div>';
|
||||
} else {
|
||||
// Waiting but no timer started yet - show hourglass without counter
|
||||
this.zoomMenuDiv.innerHTML = '<div style="display: flex; align-items: center; flex: 1;"><i class="fas fa-hourglass-half" style="margin-right: 5px; animation: blink 1s infinite;"></i><span style="margin-right: 10px;">' + lang_dxwaterfall_warming_up + '</span></div>';
|
||||
this.zoomMenuDiv.innerHTML = '<div style="display: flex; align-items: center; flex: 1;"><i class="fas fa-hourglass-half" style="margin-right: 5px; animation: blink 1s infinite;"></i><span style="margin-right: 10px;">' + lang_dxwaterfall_please_wait + '</span></div>';
|
||||
}
|
||||
} else {
|
||||
// No data yet and not waiting - show hourglass placeholder to maintain height and prevent empty state
|
||||
@@ -4934,9 +4935,9 @@ var dxWaterfall = {
|
||||
if (this.operationStartTime) {
|
||||
// Calculate elapsed time with tenths of seconds
|
||||
var elapsed = ((Date.now() - this.operationStartTime) / 1000).toFixed(1);
|
||||
// Only show "Warming up..." if we haven't received ANY data yet
|
||||
// Once we have data, always show counter (prevents "Warming up" from reappearing)
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_warming_up : elapsed + 's';
|
||||
// Only show "Please wait" if we haven't received ANY data yet
|
||||
// Once we have data, always show counter (prevents "Please wait" from reappearing)
|
||||
var displayText = (!this.dataReceived && elapsed < 1.0) ? lang_dxwaterfall_please_wait : elapsed + 's';
|
||||
zoomHTML += '<i class="fas fa-hourglass-half" style="margin-right: 5px; animation: blink 1s infinite;"></i><span style="margin-right: 10px;">' + displayText + '</span>';
|
||||
} else {
|
||||
// Show hourglass without counter if timer not started yet
|
||||
@@ -5005,8 +5006,8 @@ var dxWaterfall = {
|
||||
// Add continent cycling controls
|
||||
if (this.continentChanging) {
|
||||
// Fetching data - show as disabled
|
||||
zoomHTML += '<i class="fas fa-globe-americas continent-cycle-icon disabled" title="' + lang_dxwaterfall_fetching_spots + '" style="opacity: 0.3; cursor: not-allowed;"></i>';
|
||||
zoomHTML += '<span class="continent-cycle-text disabled" title="' + lang_dxwaterfall_fetching_spots + '" style="opacity: 0.3; cursor: not-allowed;">de ' + this.currentContinent + '</span>';
|
||||
zoomHTML += '<i class="fas fa-globe-americas continent-cycle-icon disabled" title="' + lang_dxwaterfall_downloading_data + '" style="opacity: 0.3; cursor: not-allowed;"></i>';
|
||||
zoomHTML += '<span class="continent-cycle-text disabled" title="' + lang_dxwaterfall_downloading_data + '" style="opacity: 0.3; cursor: not-allowed;">de ' + this.currentContinent + '</span>';
|
||||
} else if (this.pendingContinent) {
|
||||
// Pending change - show with blinking effect
|
||||
zoomHTML += '<i class="fas fa-globe-americas continent-cycle-icon" title="' + lang_dxwaterfall_click_to_cycle + '" style="animation: blink 0.5s linear infinite;"></i>';
|
||||
|
||||
Reference in New Issue
Block a user