diff --git a/index.php b/index.php index 46fe07d..14ce54d 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,11 @@ require_once __DIR__ . '/config.php'; session_start_safe(); +function auth_start_href(): string { + $return = $_SERVER['REQUEST_URI'] ?? '/'; + return 'auth/start.php?return=' . urlencode($return); +} + $authenticated = !empty($_SESSION['access_token']) && ($_SESSION['token_expires'] ?? 0) > time(); diff --git a/js/planner.js b/js/planner.js index 7febf21..15bada1 100644 --- a/js/planner.js +++ b/js/planner.js @@ -1302,6 +1302,7 @@ function initTimeline(planId) { const timestamp = found ? assignmentStartMs(found.mechanic, found.assignment) : 0; const items = rows .filter(row => jobCanUseAbility(row.job, block.dataset.ability)) + .filter((row, idx, arr) => arr.findIndex(r => r.job === row.job) === idx) .map(row => ({ label: `${row.job}${row.name ? ` ยท ${row.name}` : ''}`, icon: MITIG_ICONS[block.dataset.ability] ?? '',