feat(ux): user-select global, swipe-gauche édition, clavier numérique, versionnage v0.4.0
- user-select:none global (index.css) + reset sur input/textarea/select - ItemRow: swipe gauche → édition (fond bleu), suppression long press, bouton ✕ toujours visible sur mobile - SwipeableRow: prop onSwipeLeft, révèle rightContent entre seuil/2 et seuil, déclenche onSwipeLeft au seuil complet - TodosPage: onSwipeLeft → édition (remplace double-tap) - inputMode=decimal sur tous les champs quantité et prix - formatQty: affiche "2" au lieu de "2.000" - Versionnage: __APP_VERSION__ injecté par Vite depuis package.json v0.4.0 - HomePage: version affichée à côté du titre (v0.4.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,14 @@ export default function HomePage() {
|
||||
return (
|
||||
<div className="p-4">
|
||||
<div className="glass" style={{ padding: 20, borderRadius: 10, marginBottom: 16 }}>
|
||||
<h1 style={{ color: 'var(--accent)', fontFamily: 'var(--font-mono)', margin: 0 }}>
|
||||
HomeHub
|
||||
</h1>
|
||||
<div style={{ display: 'flex', alignItems: 'baseline', gap: 10 }}>
|
||||
<h1 style={{ color: 'var(--accent)', fontFamily: 'var(--font-mono)', margin: 0 }}>
|
||||
HomeHub
|
||||
</h1>
|
||||
<span style={{ color: 'var(--ink-4)', fontFamily: 'var(--font-mono)', fontSize: 12 }}>
|
||||
v{__APP_VERSION__}
|
||||
</span>
|
||||
</div>
|
||||
<p style={{ color: 'var(--ink-2)', marginTop: 8 }}>
|
||||
Application d'organisation personnelle
|
||||
</p>
|
||||
|
||||
@@ -447,6 +447,7 @@ export default function ShoppingPage() {
|
||||
<input
|
||||
style={inputStyle}
|
||||
placeholder="Quantité"
|
||||
inputMode="decimal"
|
||||
value={editQty}
|
||||
onChange={e => setEditQty(e.target.value)}
|
||||
autoFocus
|
||||
@@ -555,6 +556,7 @@ export default function ShoppingPage() {
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }}>
|
||||
<input
|
||||
style={inputStyle} placeholder="Quantité"
|
||||
inputMode="decimal"
|
||||
value={newItemQty}
|
||||
onChange={e => setNewItemQty(e.target.value)}
|
||||
/>
|
||||
|
||||
@@ -197,7 +197,7 @@ export default function TodosPage() {
|
||||
<SwipeableRow
|
||||
key={todo.id}
|
||||
onSwipeRight={() => void handleDone(todo.id)}
|
||||
onDoubleTap={() => setEditingTodo(todo)}
|
||||
onSwipeLeft={() => setEditingTodo(todo)}
|
||||
rightContent={
|
||||
<div style={{ display: 'flex', gap: 4, padding: '0 8px' }}>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user