fix: note creator mobile
Some checks failed
Release / tauri_release (macos-latest) (push) Has been cancelled
Release / tauri_release (ubuntu-20.04) (push) Has been cancelled
Release / tauri_release (windows-latest) (push) Has been cancelled
Release / app (push) Has been cancelled

This commit is contained in:
2023-10-21 22:26:04 +01:00
parent 63950f1e6b
commit c2991b8e26
6 changed files with 23 additions and 31 deletions

View File

@ -465,7 +465,9 @@ export function NoteCreator() {
onClick={() => note.update(v => (v.advanced = !v.advanced))}
className={classNames("note-creator-icon", { active: note.advanced })}
/>
<FormattedMessage defaultMessage="Preview" />
<span className="sm:inline hidden">
<FormattedMessage defaultMessage="Preview" />
</span>
<ToggleSwitch
onClick={() => loadPreview()}
size={40}
@ -546,10 +548,10 @@ export function NoteCreator() {
)}
{note.preview && getPreviewNote()}
{!note.preview && (
<div onPaste={handlePaste} className={`note-creator${note.pollOptions ? " poll" : ""}`}>
<div onPaste={handlePaste} className={classNames("note-creator", { poll: Boolean(note.pollOptions) })}>
<Textarea
autoFocus
className={`textarea ${note.active ? "textarea--focused" : ""}`}
className={classNames("textarea", { "textarea--focused": note.active })}
onChange={c => onChange(c)}
value={note.note}
onFocus={() => note.update(v => (v.active = true))}