Fix dashboard swipe and visual details
This commit is contained in:
@@ -121,23 +121,6 @@ $jsVersion = is_file(base_path('assets/js/app.js')) ? (string) filemtime(base_pa
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
|
||||
<?php if ($authUser !== null && !$immersiveDashboard): ?>
|
||||
<nav class="mobile-nav glass-panel" aria-label="Mobile Hauptnavigation">
|
||||
<a class="<?= is_active_path('/') ? 'active' : '' ?>" href="/">
|
||||
<img class="nav-icon" src="<?= e(icon_path('dashboard')) ?>" alt="">
|
||||
<span>Start</span>
|
||||
</a>
|
||||
<a class="<?= is_active_path('/archive') ? 'active' : '' ?>" href="/archive">
|
||||
<img class="nav-icon" src="<?= e(icon_path('archive')) ?>" alt="">
|
||||
<span>Archiv</span>
|
||||
</a>
|
||||
<a class="<?= is_active_path('/options') ? 'active' : '' ?>" href="/options">
|
||||
<img class="nav-icon" src="<?= e(icon_path('options')) ?>" alt="">
|
||||
<span>Optionen</span>
|
||||
</a>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -40,7 +40,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
||||
|
||||
<header class="dashboard-topbar">
|
||||
<nav class="dashboard-switcher glass-panel" aria-label="Ansicht wechseln">
|
||||
<a class="<?= $dashboardView === 'day' ? 'active' : '' ?>" href="/?view=day&date=<?= e(rawurlencode($dashboardDate)) ?>">Tag</a>
|
||||
<a class="<?= $dashboardView === 'day' && $dashboardDate === today() ? 'active' : '' ?>" href="/?view=day&date=<?= e(rawurlencode(today())) ?>">Heute</a>
|
||||
<a class="<?= $dashboardView === 'week' ? 'active' : '' ?>" href="/?view=week&date=<?= e(rawurlencode(today())) ?>">Woche</a>
|
||||
<a class="<?= $dashboardView === 'month' ? 'active' : '' ?>" href="/?view=month&date=<?= e(rawurlencode(today())) ?>">Monat</a>
|
||||
</nav>
|
||||
@@ -214,7 +214,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
||||
<?php $phaseHours = max(0.0, (float) ($sleepPhases[$phase] ?? 0)); ?>
|
||||
<?php if ($phaseHours <= 0) { continue; } ?>
|
||||
<?php $phasePercent = $sleepBarTotal > 0 ? max(0.5, min(100, ($phaseHours / $sleepBarTotal) * 100)) : 0; ?>
|
||||
<span class="sleep-phase-bar__segment sleep-phase-bar__segment--<?= e($class) ?>" style="--sleep-segment-width: <?= e((string) $phasePercent) ?>%" title="<?= e($label) ?>: <?= e(format_points($phaseHours)) ?> h" data-tooltip="<?= e($label) ?>: <?= e(format_points($phaseHours)) ?> h">
|
||||
<span class="sleep-phase-bar__segment sleep-phase-bar__segment--<?= e($class) ?><?= $phasePercent < 13 ? ' is-compact' : '' ?>" style="--sleep-segment-width: <?= e((string) $phasePercent) ?>%" title="<?= e($label) ?>: <?= e(format_points($phaseHours)) ?> h" data-tooltip="<?= e($label) ?>: <?= e(format_points($phaseHours)) ?> h">
|
||||
<strong><?= e($label) ?></strong> <?= e(format_points($phaseHours)) ?> h
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
@@ -238,6 +238,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
||||
<?php foreach (['mood' => 'Stimmung', 'energy' => 'Energie', 'stress' => 'Stress'] as $metric => $label): ?>
|
||||
<?php $value = normalize_signal_value($item[$metric] ?? 0); ?>
|
||||
<?php $valueTone = signal_value_class($metric === 'stress' ? -$value : $value); ?>
|
||||
<?php if ($value === 0) { continue; } ?>
|
||||
<span class="signal-pill signal-pill--<?= e(signal_badge_tone($value, $metric)) ?> signal-pill--<?= e($valueTone) ?>">
|
||||
<strong><?= e($label) ?></strong>
|
||||
<img class="signal-pill__icon" src="<?= e(icon_path($metric === 'mood' ? 'signal-mood' : ($metric === 'energy' ? 'signal-energy' : 'signal-stress'))) ?>" alt="<?= e($label) ?>">
|
||||
@@ -534,7 +535,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php $weekDetailDays = array_values(array_filter($dashboardWeek['days'], static fn (array $day): bool => !empty($day['has_content']))); ?>
|
||||
<?php $weekDetailDays = array_values(array_reverse(array_filter($dashboardWeek['days'], static fn (array $day): bool => !empty($day['has_content'])))); ?>
|
||||
<?php if ($weekDetailDays !== []): ?>
|
||||
<div class="range-day-list">
|
||||
<?php foreach ($weekDetailDays as $day): ?>
|
||||
@@ -632,6 +633,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
||||
|
||||
return !empty($day['has_content']) || $summaryText !== '';
|
||||
})); ?>
|
||||
<?php $monthDetailDays = array_reverse($monthDetailDays); ?>
|
||||
<?php if ($monthDetailDays !== []): ?>
|
||||
<div class="range-day-list range-day-list--month">
|
||||
<?php foreach ($monthDetailDays as $day): ?>
|
||||
|
||||
Reference in New Issue
Block a user