Compare commits

...

3 Commits

Author SHA1 Message Date
xziino
eecab6d76a Planer: Gantt-Zeilenreihenfolge auf Healer → DPS → Tank geändert
Innerhalb DPS: Phys. Range (BRD/MCH/DNC) → Caster (BLM/SMN/RDM/PCT)
→ Melee (MNK/DRG/NIN/SAM/RPR/VPR). Sortierung unabhängig von der
Reihenfolge der Job-Slots im Info-Panel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 08:53:37 +02:00
xziino
bb4eb301e0 Planer: Importierte Mitigations um 3s vor die Mechanik verschieben
Beim Report-Import landen alle erkannten Ability-Assignments standardmäßig
3 Sekunden vor dem Mechanik-Timestamp (IMPORT_OFFSET_MS = -3000ms).
Linksklick im Gantt und manuelle Zuweisungen bleiben unverändert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 08:50:11 +02:00
xziino
e40bdbea1c config: auth_start_href() in index.php definiert (fehlende Funktion nach Merge)
Commit 8217f68 rief auth_start_href() in report-form.php und login.php
auf, ohne die Funktion zu definieren. Generiert auth/start.php?return=
mit dem aktuellen Request-URI als Return-Pfad.
In index.php statt config.php da config.php skip-worktree hat.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 08:43:30 +02:00
2 changed files with 22 additions and 2 deletions

View File

@ -2,6 +2,11 @@
require_once __DIR__ . '/config.php'; require_once __DIR__ . '/config.php';
session_start_safe(); session_start_safe();
function auth_start_href(): string {
$return = $_SERVER['REQUEST_URI'] ?? '/';
return 'auth/start.php?return=' . urlencode($return);
}
$authenticated = !empty($_SESSION['access_token']) $authenticated = !empty($_SESSION['access_token'])
&& ($_SESSION['token_expires'] ?? 0) > time(); && ($_SESSION['token_expires'] ?? 0) > time();

View File

@ -599,11 +599,23 @@ function timelineScale(plan) {
return { duration, width: Math.max(720, Math.ceil(duration / 1000 * pxPerSecond)) }; return { duration, width: Math.max(720, Math.ceil(duration / 1000 * pxPerSecond)) };
} }
// Sortierreihenfolge im Gantt: Healer → Phys.Range → Caster → Melee → Tank
const JOB_GANTT_ORDER = {
'WHM': 0, 'SCH': 1, 'AST': 2, 'SGE': 3,
'BRD': 10, 'MCH': 11, 'DNC': 12,
'BLM': 20, 'SMN': 21, 'RDM': 22, 'PCT': 23,
'MNK': 30, 'DRG': 31, 'NIN': 32, 'SAM': 33, 'RPR': 34, 'VPR': 35,
'PLD': 40, 'WAR': 41, 'DRK': 42, 'GNB': 43,
};
function timelinePlayerRows(plan) { function timelinePlayerRows(plan) {
const roster = plan.playerRoster ?? []; const roster = plan.playerRoster ?? [];
const rows = []; const rows = [];
(plan.jobComposition ?? []).forEach((job, idx) => { const jobEntries = (plan.jobComposition ?? [])
if (!job) return; .map((job, idx) => ({ job, idx }))
.filter(e => !!e.job)
.sort((a, b) => (JOB_GANTT_ORDER[a.job] ?? 99) - (JOB_GANTT_ORDER[b.job] ?? 99));
jobEntries.forEach(({ job, idx }) => {
const name = roster[idx]?.name ?? ''; const name = roster[idx]?.name ?? '';
const role = JOB_ROLE[job] ?? ''; const role = JOB_ROLE[job] ?? '';
const abilities = (JOB_ABILITIES[job] ?? []) const abilities = (JOB_ABILITIES[job] ?? [])
@ -1302,6 +1314,7 @@ function initTimeline(planId) {
const timestamp = found ? assignmentStartMs(found.mechanic, found.assignment) : 0; const timestamp = found ? assignmentStartMs(found.mechanic, found.assignment) : 0;
const items = rows const items = rows
.filter(row => jobCanUseAbility(row.job, block.dataset.ability)) .filter(row => jobCanUseAbility(row.job, block.dataset.ability))
.filter((row, idx, arr) => arr.findIndex(r => r.job === row.job) === idx)
.map(row => ({ .map(row => ({
label: `${row.job}${row.name ? ` · ${row.name}` : ''}`, label: `${row.job}${row.name ? ` · ${row.name}` : ''}`,
icon: MITIG_ICONS[block.dataset.ability] ?? '', icon: MITIG_ICONS[block.dataset.ability] ?? '',
@ -1827,6 +1840,7 @@ function aoeEventsToMechanics(aoeEvents, fightStart, phases, players, withMitiga
? Math.round(relevantTargets.reduce((s, t) => s + t.unmitigatedAmount, 0) / relevantTargets.length) ? Math.round(relevantTargets.reduce((s, t) => s + t.unmitigatedAmount, 0) / relevantTargets.length)
: 0; : 0;
const IMPORT_OFFSET_MS = -3000;
let assignments = []; let assignments = [];
if (withMitigations) { if (withMitigations) {
const seen = new Set(); const seen = new Set();
@ -1841,6 +1855,7 @@ function aoeEventsToMechanics(aoeEvents, fightStart, phases, players, withMitiga
actionId: m.extraAbilityGameID ?? null, actionId: m.extraAbilityGameID ?? null,
job: guessJob(key, players), job: guessJob(key, players),
buffType: m.buffType ?? '', buffType: m.buffType ?? '',
timestamp: Math.max(0, relTs + IMPORT_OFFSET_MS),
}); });
} }
} }