mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 06:41:46 +00:00
Note input: show char counter, textarea 3 rows
This commit is contained in:
@@ -928,16 +928,17 @@ export default function DayPlanSidebar({
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<input
|
<textarea
|
||||||
ref={noteInputRef}
|
ref={noteInputRef}
|
||||||
type="text"
|
|
||||||
value={ui.text}
|
value={ui.text}
|
||||||
maxLength={150}
|
maxLength={150}
|
||||||
|
rows={3}
|
||||||
onChange={e => setNoteUi(prev => ({ ...prev, [dayId]: { ...prev[dayId], text: e.target.value } }))}
|
onChange={e => setNoteUi(prev => ({ ...prev, [dayId]: { ...prev[dayId], text: e.target.value } }))}
|
||||||
onKeyDown={e => { if (e.key === 'Enter') { e.preventDefault(); saveNote(Number(dayId)) } if (e.key === 'Escape') cancelNote(Number(dayId)) }}
|
onKeyDown={e => { if (e.key === 'Escape') cancelNote(Number(dayId)) }}
|
||||||
placeholder={t('dayplan.noteTitle')}
|
placeholder={t('dayplan.noteTitle')}
|
||||||
style={{ fontSize: 13, fontWeight: 500, border: '1px solid var(--border-primary)', borderRadius: 8, padding: '8px 10px', fontFamily: 'inherit', outline: 'none', width: '100%', boxSizing: 'border-box', color: 'var(--text-primary)' }}
|
style={{ fontSize: 13, fontWeight: 500, border: '1px solid var(--border-primary)', borderRadius: 8, padding: '8px 10px', fontFamily: 'inherit', outline: 'none', width: '100%', boxSizing: 'border-box', color: 'var(--text-primary)', resize: 'none', lineHeight: 1.4 }}
|
||||||
/>
|
/>
|
||||||
|
<div style={{ textAlign: 'right', fontSize: 9, color: ui.text.length >= 140 ? '#d97706' : 'var(--text-faint)', marginTop: 2 }}>{ui.text.length}/150</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={ui.time}
|
value={ui.time}
|
||||||
|
|||||||
Reference in New Issue
Block a user