From 49914fcc9acb34717819fe05ce1514e6e790d368 Mon Sep 17 00:00:00 2001 From: Florian Heinz Date: Fri, 22 May 2026 10:13:09 +0200 Subject: [PATCH] Refine mobile actions and Putzliga moments --- assets/css/app.css | 43 ++++++++++++++++++++++++++--------- assets/icons/putzliga.svg | 1 + src/App.php | 2 +- templates/pages/dashboard.php | 9 ++++---- templates/pages/options.php | 2 +- 5 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 assets/icons/putzliga.svg diff --git a/assets/css/app.css b/assets/css/app.css index 54cd546..dae8ba6 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -1345,7 +1345,9 @@ body.page-dashboard .content { .dashboard-fab { position: fixed; right: max(1rem, env(safe-area-inset-right)); - bottom: calc(1.2rem + env(safe-area-inset-bottom)); + top: calc(0.95rem + env(safe-area-inset-top)); + bottom: auto; + z-index: 124; width: 4rem; height: 4rem; border: 0; @@ -1369,15 +1371,16 @@ body.page-dashboard .content { .dashboard-fab-menu { position: fixed; right: max(1rem, env(safe-area-inset-right)); - bottom: calc(5.8rem + env(safe-area-inset-bottom)); - z-index: 28; + top: calc(5.45rem + env(safe-area-inset-top)); + bottom: auto; + z-index: 123; display: grid; gap: 0.55rem; width: min(18rem, calc(100vw - 2rem)); padding: 0.7rem; border-radius: 1.6rem; animation: fabMenuIn 180ms ease both; - transform-origin: right bottom; + transform-origin: right top; } .dashboard-fab-menu button { @@ -1399,7 +1402,7 @@ body.page-dashboard .content { } @keyframes fabMenuIn { - from { opacity: 0; transform: translateY(0.6rem) scale(0.94); } + from { opacity: 0; transform: translateY(-0.4rem) scale(0.94); } to { opacity: 1; transform: translateY(0) scale(1); } } @@ -2243,6 +2246,17 @@ body.page-dashboard .content { border-radius: var(--radius-xl); } +.options-menu-panel .section-head { + margin-bottom: 1.1rem; + padding: 1.15rem; + border-radius: 1.8rem; + background: + radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.18), transparent 52%), + linear-gradient(180deg, rgba(68, 92, 118, 0.38), rgba(20, 38, 58, 0.28)); + border: 1px solid rgba(180, 214, 246, 0.16); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); +} + .options-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); @@ -2261,15 +2275,18 @@ body.page-dashboard .content { gap: 0.35rem; align-items: flex-start; width: 100%; - padding: 1.15rem 1.25rem; - border-radius: 1.55rem; - border: 1px solid rgba(152, 194, 232, 0.16); + min-height: 6.7rem; + padding: 1.2rem 1.25rem; + border-radius: 1.75rem; + border: 1px solid rgba(190, 222, 250, 0.18); background: - linear-gradient(180deg, rgba(41, 59, 80, 0.72), rgba(25, 42, 63, 0.6)), - radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 48%); + radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.18), transparent 42%), + linear-gradient(180deg, rgba(60, 81, 105, 0.52), rgba(24, 41, 62, 0.34)); color: var(--text); text-decoration: none; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); + box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12); + backdrop-filter: blur(24px) saturate(1.45); + -webkit-backdrop-filter: blur(24px) saturate(1.45); } .options-menu-card strong { @@ -2282,6 +2299,10 @@ body.page-dashboard .content { text-align: left; } +.options-menu-card:active { + transform: scale(0.985); +} + .options-menu-card--danger { background: rgba(255, 130, 130, 0.08); border-color: rgba(255, 143, 143, 0.18); diff --git a/assets/icons/putzliga.svg b/assets/icons/putzliga.svg new file mode 100644 index 0000000..d3e4347 --- /dev/null +++ b/assets/icons/putzliga.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.php b/src/App.php index 843ac4d..e3a6e37 100644 --- a/src/App.php +++ b/src/App.php @@ -412,7 +412,7 @@ final class App 'id' => $importID, 'type' => 'event', 'time' => (string) ($payload['time'] ?? ''), - 'comment' => 'Du warst fleißig', + 'comment' => 'Putzliga', 'value' => 0, 'unit' => '', 'mood' => 0, diff --git a/templates/pages/dashboard.php b/templates/pages/dashboard.php index 64df0a6..0c5da15 100644 --- a/templates/pages/dashboard.php +++ b/templates/pages/dashboard.php @@ -119,7 +119,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string { 0 ? ($eventType === 'sleep' ? format_duration_hours((float) $item['value']) : rtrim(rtrim(number_format((float) $item['value'], 2, ',', '.'), '0'), ',') . ' ' . (string) $item['unit']) : ''; ?> - $isImportedWalkSport ? 'Spaziergang' : (string) ($sportType['label'] ?? 'Sport'), 'walk' => 'Spaziergang', 'sleep' => 'Schlaf', @@ -198,7 +198,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
- +
@@ -591,11 +591,12 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string { $sportType = $eventType === 'sport' ? find_sport_type($settings, (string) ($event['sport_type_id'] ?? '')) : null; $eventValue = (float) ($event['value'] ?? 0); $eventValueText = $eventValue > 0 ? ($eventType === 'sleep' ? format_duration_hours($eventValue) : rtrim(rtrim(number_format($eventValue, 2, ',', '.'), '0'), ',') . ' ' . (string) ($event['unit'] ?? '')) : ''; - $eventComment = trim((string) ($event['comment'] ?? '')); + $isPutzligaEvent = (string) ($event['source'] ?? '') === 'putzliga'; + $eventComment = $isPutzligaEvent ? '' : trim((string) ($event['comment'] ?? '')); if (preg_match('/^\s*-\s*(?:Stimmung|Energie|Stress)\s*:\s*[+-]?\d+\s*$/u', $eventComment) === 1) { $eventComment = ''; } - $eventTitle = day_event_type_label($eventType); + $eventTitle = $isPutzligaEvent ? 'Putzliga' : day_event_type_label($eventType); $eventDetails = array_values(array_filter([$eventValueText, $eventComment], static fn (string $value): bool => trim($value) !== '')); if ($eventType === 'sport') { diff --git a/templates/pages/options.php b/templates/pages/options.php index f65e002..5508f19 100644 --- a/templates/pages/options.php +++ b/templates/pages/options.php @@ -171,7 +171,7 @@
-

Putzliga erstellt ab 3 erledigten Aufgaben pro Tag einen Moment „Du warst fleißig“ und aktualisiert ihn, wenn weitere Aufgaben dazukommen.

+

Putzliga erstellt ab 3 erledigten Aufgaben pro Tag einen Moment mit den erledigten Aufgaben als Chips und aktualisiert ihn, wenn weitere Aufgaben dazukommen.