clupilot/app/resources/css
Boban Blaskovic 4aa7d544b7 Step 3/5: Workspace switcher dropdown + logout button
User: no logout button + clicking workspace switcher in sidebar did nothing.

Sidebar component:
- Workspace switcher now wraps in Alpine x-data={ wsOpen: false }.
  Click toggles dropdown, @click.outside + escape-key close it.
- Dropdown lists all workspaces the user can access (owned +
  TeamMember memberships), shows active one with accent checkmark.
  Fallback: if list is empty, shows just the current workspace so
  users never see an empty switcher.
- '+ Neuer Workspace' row at bottom of workspaces list.
- User section: shows auth user's name (header) + email.
- 'Profil' link → route('profile').
- 'Einstellungen' link → route('settings.index').
- 'Abmelden' button: POST form with CSRF to route('logout'),
  red-colored row.
- Workspace switch via ?workspace=<slug> query param — middleware
  ResolveCurrentWorkspace picks it up, persists in session +
  user.current_workspace_id, then page reloads with new scope.
- Sidebar nav title now reads workspace name dynamically.
- Plan-box footer reads real plan + sites/quota + has 'Upgrade →'
  link to settings.

CSS additions: clu-ws-dropdown (white 98% bg + glass shadow, z-index
60 to sit above sticky topbar 20 + sidebar 30), clu-ws-section
(uppercase muted header), clu-ws-item (hover bg + active accent
soft), clu-ws-divider (1px hairline). [x-cloak] global rule prevents
FOUC.

Browser-verified: clicking AC avatar + 'Acme Agency PRO' panel
expands dropdown with 'Acme Agency PRO · 87 sites' (current,
checkmark), Neuer Workspace, ADMIN section with email + Profil +
Einstellungen + red Abmelden. 0 console errors. 36/36 Page tests
green.
2026-06-01 01:26:10 +02:00
..
app.css Step 3/5: Workspace switcher dropdown + logout button 2026-06-01 01:26:10 +02:00
safelist-tailwindcss.txt Fix: chart.js race, burger desktop visibility, modal glass-themed 2026-05-31 23:33:07 +02:00