- Export button in AoE Timeline card title row (replaces bottom bar) - Import modal with mechanic-only vs with-mitigations choice, new plan vs merge into existing plan - Merge logic: match by abilityName + timestamp ±5s, keep existing assignments - Color-coded assignment badges: blue=buff, red=debuff, gold=shield - buffType stored in assignments for color rendering - Modal radio button layout fix (override global input width:100%) - Auto-switch to Planner tab after import - window.showTab exposed from tabs.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
847 B
JavaScript
22 lines
847 B
JavaScript
document.addEventListener('DOMContentLoaded', () => {
|
|
const tabs = document.querySelectorAll('.tabs .tab');
|
|
const contents = document.querySelectorAll('.tab-content');
|
|
|
|
function showTab(name) {
|
|
contents.forEach(el => el.style.display = 'none');
|
|
tabs.forEach(btn => btn.classList.remove('active'));
|
|
|
|
const content = document.getElementById('tab-' + name);
|
|
const btn = document.querySelector(`.tabs .tab[data-tab="${name}"]`);
|
|
|
|
if (content) content.style.display = 'block';
|
|
if (btn) btn.classList.add('active');
|
|
|
|
if (name === 'analysis') window.analysisTab?.onTabOpen?.();
|
|
if (name === 'planner') window.plannerTab?.onTabOpen?.();
|
|
}
|
|
|
|
tabs.forEach(btn => btn.addEventListener('click', () => showTab(btn.dataset.tab)));
|
|
window.showTab = showTab;
|
|
});
|