Merge APP_V2/main: Combine quality updates with league features
- Merged remote changes: Liga krog3 and league state management - Resolved merge conflicts in locale files and templates - Kept local v1.0.1 version and styling improvements - Added league combine functionality from remote - Preserved new league_state.json and tournament_results.json - Integrated i18n improvements Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -708,6 +708,7 @@
|
||||
</div>
|
||||
<div class="navbar-controls">
|
||||
<a href="/" class="nav-btn">📺 <span data-i18n="navigation.dashboard">Dashboard</span></a>
|
||||
<button class="nav-btn" onclick="exportResultsJSON()">💾 <span data-i18n="general.export">Export JSON</span></button>
|
||||
<button class="nav-btn" onclick="printResults()">🖨️ <span data-i18n="general.print">Print</span></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1007,6 +1008,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Export results as JSON
|
||||
function exportResultsJSON() {
|
||||
const tournamentData = {{ tournament | tojson | safe }};
|
||||
const resultsData = {{ results | tojson | safe }};
|
||||
|
||||
// Wrap in archive format for compatibility
|
||||
const archiveData = {
|
||||
tournament: tournamentData,
|
||||
results: resultsData,
|
||||
archived_at: new Date().toISOString()
|
||||
};
|
||||
|
||||
const dataStr = JSON.stringify(archiveData, null, 2);
|
||||
const dataBlob = new Blob([dataStr], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(dataBlob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
|
||||
// Generate filename with tournament info
|
||||
const tournamentId = tournamentData.tournament_id || 'tournament';
|
||||
const date = new Date().toISOString().slice(0, 10);
|
||||
link.download = `${tournamentId}_${date}.json`;
|
||||
|
||||
link.click();
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
// Initialize when page loads
|
||||
document.addEventListener('DOMContentLoaded', initializePage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user