{{ __('My emotions') }}

{{ __('Log how you feel right now using the emotion wheel. Your emotion history is saved privately and helps you recognise patterns over time.') }}
@php $svgArc = function ($cx, $cy, $r1, $r2, $startDeg, $endDeg, $pad = 1.2) { $s = deg2rad($startDeg + $pad); $e = deg2rad($endDeg - $pad); $large = ($endDeg - $startDeg - 2 * $pad) > 180 ? 1 : 0; $f = fn ($n) => round($n, 3); return sprintf( 'M %s %s L %s %s A %s %s 0 %d 1 %s %s L %s %s A %s %s 0 %d 0 %s %s Z', $f($cx + $r1 * cos($s)), $f($cy + $r1 * sin($s)), $f($cx + $r2 * cos($s)), $f($cy + $r2 * sin($s)), $f($r2), $f($r2), $large, $f($cx + $r2 * cos($e)), $f($cy + $r2 * sin($e)), $f($cx + $r1 * cos($e)), $f($cy + $r1 * sin($e)), $f($r1), $f($r1), $large, $f($cx + $r1 * cos($s)), $f($cy + $r1 * sin($s)) ); }; $midPoint = function ($cx, $cy, $r, $startDeg, $endDeg) { $mid = deg2rad(($startDeg + $endDeg) / 2); return [round($cx + $r * cos($mid), 1), round($cy + $r * sin($mid), 1)]; }; $cx = 200; $cy = 200; $r1z = 62; $r2z = 132; $r1e = 135; $r2e = 195; $lrZ = 97; $lrE = 165; $zoneAngles = [ 'purple' => [-90, -30], 'blue' => [-30, 30], 'green' => [ 30, 90], 'yellow' => [ 90, 150], 'orange' => [150, 210], 'red' => [210, 270], ]; @endphp
{{-- Saved feedback --}} {{-- SVG Emotion Wheel --}}
{{-- Ring 1: Zones --}} @foreach($zoneAngles as $zone => [$zStart, $zEnd]) @php $d = $svgArc($cx, $cy, $r1z, $r2z, $zStart, $zEnd); [$lx, $ly] = $midPoint($cx, $cy, $lrZ, $zStart, $zEnd); $color = $emotions[$zone]['color']; $colorSel = $emotions[$zone]['colorSelected']; $icon = $emotions[$zone]['icon']; @endphp {{ $icon }} @endforeach {{-- Ring 2: Emotions per zone --}} @foreach($zoneAngles as $zone => [$zStart, $zEnd]) @php $eKeys = array_keys($emotions[$zone]['emotions']); $degPer = ($zEnd - $zStart) / count($eKeys); $colorSel = $emotions[$zone]['colorSelected']; @endphp @foreach($eKeys as $i => $eKey) @php $eStart = $zStart + $i * $degPer; $eEnd = $eStart + $degPer; $d = $svgArc($cx, $cy, $r1e, $r2e, $eStart, $eEnd); [$lx, $ly] = $midPoint($cx, $cy, $lrE, $eStart, $eEnd); $emoji = $emotions[$zone]['emotions'][$eKey]['emoji']; @endphp {{ $emoji }} @endforeach @endforeach {{-- Center circle --}}
{{-- Instruction --}}

{{ __('Tap a colour to start') }}

{{-- Zone selected: badge + back --}} {{-- Step 2: Emotion pills --}} {{-- Step 3: Nuance pills --}} {{-- Step 4: Need card + save --}} {{-- History --}}

{{ __('Recent emotions') }}

{{ __('No emotions logged yet.') }}

{{-- end x-data --}}