mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 14:51:45 +00:00
Vacay drag-to-paint, "Everyone" button, live exchange rates
- Vacay: click-and-drag to paint/erase vacation days across calendar - Vacay: "Everyone" button sets days for all persons (2+ only) - Budget: live currency conversion via frankfurter.app (cached 1h) - Budget: conversion widget in total card with selectable target currency - Day planner: remove transport mode buttons from day view
This commit is contained in:
@@ -72,16 +72,36 @@ export default function VacayPersons() {
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-0.5">
|
||||
{users.length >= 2 && (
|
||||
<div
|
||||
onClick={() => setSelectedUserId('all')}
|
||||
className="flex items-center gap-2 px-2.5 py-1.5 rounded-lg group transition-all"
|
||||
style={{
|
||||
background: selectedUserId === 'all' ? 'var(--bg-hover)' : 'transparent',
|
||||
border: selectedUserId === 'all' ? '1px solid var(--border-primary)' : '1px solid transparent',
|
||||
cursor: 'pointer',
|
||||
}}>
|
||||
<div className="w-3.5 h-3.5 rounded-full shrink-0 flex items-center justify-center" style={{ background: 'var(--text-muted)' }}>
|
||||
<span style={{ fontSize: 8, fontWeight: 700, color: 'var(--bg-card)', lineHeight: 1 }}>A</span>
|
||||
</div>
|
||||
<span className="text-xs font-medium flex-1 truncate" style={{ color: 'var(--text-primary)' }}>
|
||||
{t('vacay.everyone')}
|
||||
</span>
|
||||
{selectedUserId === 'all' && (
|
||||
<Check size={12} style={{ color: 'var(--text-primary)' }} />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{users.map(u => {
|
||||
const isSelected = selectedUserId === u.id
|
||||
return (
|
||||
<div key={u.id}
|
||||
onClick={() => { if (isFused) setSelectedUserId(u.id) }}
|
||||
onClick={() => { if (isFused || users.length >= 2) setSelectedUserId(u.id) }}
|
||||
className="flex items-center gap-2 px-2.5 py-1.5 rounded-lg group transition-all"
|
||||
style={{
|
||||
background: isSelected ? 'var(--bg-hover)' : 'transparent',
|
||||
border: isSelected ? '1px solid var(--border-primary)' : '1px solid transparent',
|
||||
cursor: isFused ? 'pointer' : 'default',
|
||||
cursor: (isFused || users.length >= 2) ? 'pointer' : 'default',
|
||||
}}>
|
||||
<button
|
||||
onClick={(e) => { e.stopPropagation(); setColorEditUserId(u.id); setShowColorPicker(true) }}
|
||||
@@ -93,7 +113,7 @@ export default function VacayPersons() {
|
||||
{u.username}
|
||||
{u.id === currentUser?.id && <span style={{ color: 'var(--text-faint)' }}> ({t('vacay.you')})</span>}
|
||||
</span>
|
||||
{isSelected && isFused && (
|
||||
{isSelected && (isFused || users.length >= 2) && (
|
||||
<Check size={12} style={{ color: 'var(--text-primary)' }} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user