Add compact auto-growing ticket composer with collapsible mail settings
This commit is contained in:
parent
5057574bff
commit
0eacbdd41f
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Aktueller Stand
|
## Aktueller Stand
|
||||||
|
|
||||||
|
- Kompaktes Schreibfeld mit 72 px Höhe, automatischem Erweitern beim Fokussieren und Mitwachsen beim Schreiben. Versanddetails und Signaturvorschau lassen sich aufklappen; beim Verkleinern bleiben Text, CC/BCC und Anhänge im geöffneten Ticket erhalten.
|
||||||
- „Offene Tickets“ als Startansicht für unerledigte Tickets ohne Bearbeiter. „Alle Tickets“ bleibt in der Seitenleiste verfügbar. Der Filter und die Zähler verwenden die bestehende serverseitige Paginierung.
|
- „Offene Tickets“ als Startansicht für unerledigte Tickets ohne Bearbeiter. „Alle Tickets“ bleibt in der Seitenleiste verfügbar. Der Filter und die Zähler verwenden die bestehende serverseitige Paginierung.
|
||||||
- Blackscreen nach Anmeldung behoben. Die Ticketübersicht liest die Einträge aus der paginierten API-Antwort.
|
- Blackscreen nach Anmeldung behoben. Die Ticketübersicht liest die Einträge aus der paginierten API-Antwort.
|
||||||
- Ticketnummer in den Betreff aller Antworten, Eingangsbestätigungen und Bearbeiter-Benachrichtigungen aufgenommen; Versandbetreff im Antworteditor sichtbar.
|
- Ticketnummer in den Betreff aller Antworten, Eingangsbestätigungen und Bearbeiter-Benachrichtigungen aufgenommen; Versandbetreff im Antworteditor sichtbar.
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Die **Volltextsuche in der Headerleiste** findet Ticketnummern, Betreff, Kundenk
|
|||||||
|
|
||||||
### Ein Ticket bearbeiten
|
### Ein Ticket bearbeiten
|
||||||
|
|
||||||
Ein Klick auf den Betreff öffnet Nachrichten, Anhänge, interne Notizen und die Aktivitätshistorie. Im Antworteditor werden ein freigegebener Queue-Absender und eine Signatur ausgewählt. Die Vorschau zeigt die aufgelösten Daten des antwortenden Benutzers. Interne Notizen bleiben intern.
|
Ein Klick auf den Betreff öffnet Nachrichten, Anhänge, interne Notizen und die Aktivitätshistorie. Das Schreibfeld über dem Verlauf startet kompakt mit 72 px Höhe, erweitert sich beim Anklicken und wächst beim Schreiben mit. **Verkleinern** erhält den Entwurf einschließlich CC/BCC und Anhängen innerhalb des geöffneten Tickets. Unter **Versanddetails** werden ein freigegebener Queue-Absender und eine Signatur ausgewählt. Die aufklappbare Signaturvorschau zeigt die aufgelösten Daten des antwortenden Benutzers. Die neuesten Nachrichten stehen oben. Interne Notizen bleiben intern.
|
||||||
|
|
||||||
Ausgehende Antworten tragen immer die eigene Ticketnummer im Betreff, beispielsweise **`Re: [SYN-00074] Blickschutz installieren`**. Der Antworteditor zeigt den tatsächlichen Versandbetreff an. Auch Eingangsbestätigungen mit individuell konfiguriertem Betreff und E-Mail-Benachrichtigungen an Bearbeiter erhalten die Ticketnummer; bereits vorhandene Ticketmarkierungen werden beim Versand durch die aktuelle Nummer ersetzt.
|
Ausgehende Antworten tragen immer die eigene Ticketnummer im Betreff, beispielsweise **`Re: [SYN-00074] Blickschutz installieren`**. Der Antworteditor zeigt den tatsächlichen Versandbetreff an. Auch Eingangsbestätigungen mit individuell konfiguriertem Betreff und E-Mail-Benachrichtigungen an Bearbeiter erhalten die Ticketnummer; bereits vorhandene Ticketmarkierungen werden beim Versand durch die aktuelle Nummer ersetzt.
|
||||||
|
|
||||||
|
|||||||
391
src/App.tsx
391
src/App.tsx
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState, useRef, type ReactNode } from 'react'
|
import { useEffect, useLayoutEffect, useState, useRef, type ReactNode } from 'react'
|
||||||
import {
|
import {
|
||||||
Inbox,
|
Inbox,
|
||||||
Search,
|
Search,
|
||||||
@ -30,6 +30,7 @@ import {
|
|||||||
SlidersHorizontal,
|
SlidersHorizontal,
|
||||||
Headphones,
|
Headphones,
|
||||||
ArrowDownUp,
|
ArrowDownUp,
|
||||||
|
Minimize2,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { Button } from './components/ui/button'
|
import { Button } from './components/ui/button'
|
||||||
import { Input } from './components/ui/input'
|
import { Input } from './components/ui/input'
|
||||||
@ -1046,6 +1047,8 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
const [t, setT] = useState<Data>(null),
|
const [t, setT] = useState<Data>(null),
|
||||||
[tab, setTab] = useState('messages'),
|
[tab, setTab] = useState('messages'),
|
||||||
[kind, setKind] = useState('outgoing'),
|
[kind, setKind] = useState('outgoing'),
|
||||||
|
[expanded, setExpanded] = useState(false),
|
||||||
|
[signatureOpen, setSignatureOpen] = useState(false),
|
||||||
[body, setBody] = useState(''),
|
[body, setBody] = useState(''),
|
||||||
[from, setFrom] = useState(''),
|
[from, setFrom] = useState(''),
|
||||||
[cc, setCc] = useState(''),
|
[cc, setCc] = useState(''),
|
||||||
@ -1086,6 +1089,8 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
setCc('')
|
setCc('')
|
||||||
setBcc('')
|
setBcc('')
|
||||||
setShowCopies(false)
|
setShowCopies(false)
|
||||||
|
setExpanded(false)
|
||||||
|
setSignatureOpen(false)
|
||||||
}
|
}
|
||||||
}, [q?.id])
|
}, [q?.id])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -1104,6 +1109,23 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
alive = false
|
alive = false
|
||||||
}
|
}
|
||||||
}, [id, q, sig, from, kind, t?.revision])
|
}, [id, q, sig, from, kind, t?.revision])
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
const editor = bodyEditor.current
|
||||||
|
if (!editor) return
|
||||||
|
const resize = () => {
|
||||||
|
editor.style.height = '0px'
|
||||||
|
editor.style.height = `${expanded ? Math.max(150, editor.scrollHeight) : 72}px`
|
||||||
|
}
|
||||||
|
resize()
|
||||||
|
let width = editor.clientWidth
|
||||||
|
const observer = new ResizeObserver(() => {
|
||||||
|
if (editor.clientWidth === width) return
|
||||||
|
width = editor.clientWidth
|
||||||
|
resize()
|
||||||
|
})
|
||||||
|
observer.observe(editor)
|
||||||
|
return () => observer.disconnect()
|
||||||
|
}, [body, expanded, tab, t?.id])
|
||||||
if (localError)
|
if (localError)
|
||||||
return (
|
return (
|
||||||
<div className="error" role="alert">
|
<div className="error" role="alert">
|
||||||
@ -1187,9 +1209,10 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
<>
|
<>
|
||||||
{(can(q.id, 'reply') || can(q.id, 'note')) && (
|
{(can(q.id, 'reply') || can(q.id, 'note')) && (
|
||||||
<form
|
<form
|
||||||
className={`reply-editor ${kind === 'note' ? 'note' : ''}`}
|
className={`reply-editor ${kind === 'note' ? 'note' : ''} ${expanded ? 'expanded' : 'compact'}`}
|
||||||
onSubmit={async (e) => {
|
onSubmit={async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
if (!expanded || busy || reading) return
|
||||||
setBusy(true)
|
setBusy(true)
|
||||||
await run(
|
await run(
|
||||||
async () => {
|
async () => {
|
||||||
@ -1211,6 +1234,8 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
setCc('')
|
setCc('')
|
||||||
setBcc('')
|
setBcc('')
|
||||||
setShowCopies(false)
|
setShowCopies(false)
|
||||||
|
setExpanded(false)
|
||||||
|
setSignatureOpen(false)
|
||||||
await load()
|
await load()
|
||||||
},
|
},
|
||||||
kind === 'note'
|
kind === 'note'
|
||||||
@ -1225,7 +1250,10 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={kind === 'outgoing' ? 'selected' : ''}
|
className={kind === 'outgoing' ? 'selected' : ''}
|
||||||
onClick={() => setKind('outgoing')}
|
onClick={() => {
|
||||||
|
setKind('outgoing')
|
||||||
|
bodyEditor.current?.focus()
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Send size={15} /> E-Mail-Antwort
|
<Send size={15} /> E-Mail-Antwort
|
||||||
</button>
|
</button>
|
||||||
@ -1237,121 +1265,39 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setKind('note')
|
setKind('note')
|
||||||
setFiles([])
|
setFiles([])
|
||||||
|
bodyEditor.current?.focus()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MessageSquare size={15} /> Interne Notiz
|
<MessageSquare size={15} /> Interne Notiz
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
<small className="reply-context">
|
||||||
|
{kind === 'outgoing' ? `An ${t.customer}` : 'Nur intern sichtbar'}
|
||||||
|
</small>
|
||||||
|
{!expanded && (body.trim() || files.length > 0 || cc || bcc) && (
|
||||||
|
<small className="reply-draft">
|
||||||
|
Entwurf
|
||||||
|
{files.length > 0 &&
|
||||||
|
` · ${files.length} ${files.length === 1 ? 'Anhang' : 'Anhänge'}`}
|
||||||
|
</small>
|
||||||
|
)}
|
||||||
|
{expanded && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="reply-minimize"
|
||||||
|
aria-label="Editor verkleinern"
|
||||||
|
aria-expanded={expanded}
|
||||||
|
disabled={busy || reading}
|
||||||
|
onClick={() => setExpanded(false)}
|
||||||
|
>
|
||||||
|
<Minimize2 size={15} /> Verkleinern
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{kind === 'outgoing' ? (
|
|
||||||
<div className="reply-meta">
|
|
||||||
<Field label="Von">
|
|
||||||
<Select value={from} onChange={setFrom}>
|
|
||||||
{q.addresses
|
|
||||||
.filter((a: Data) => a.outgoing)
|
|
||||||
.map((a: Data) => (
|
|
||||||
<option key={a.email}>{a.email}</option>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</Field>
|
|
||||||
<Field label="Signatur">
|
|
||||||
<Select value={sig} onChange={setSig}>
|
|
||||||
{q.signatures.map((s: Data) => (
|
|
||||||
<option key={s.id} value={s.id}>
|
|
||||||
{s.name}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</Field>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="note-label">
|
|
||||||
Diese Notiz bleibt intern und wird niemals an Kunden versendet.
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{kind === 'outgoing' && (
|
|
||||||
<div className="reply-recipients">
|
|
||||||
<div className="reply-recipient-heading">
|
|
||||||
<span>
|
|
||||||
An: <strong>{t.customer}</strong>
|
|
||||||
</span>
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
variant="plain"
|
|
||||||
size="sm"
|
|
||||||
disabled={busy}
|
|
||||||
aria-expanded={showCopies}
|
|
||||||
onClick={() => setShowCopies(!showCopies)}
|
|
||||||
>
|
|
||||||
{showCopies
|
|
||||||
? 'CC / BCC ausblenden'
|
|
||||||
: cc || bcc
|
|
||||||
? 'CC / BCC bearbeiten'
|
|
||||||
: 'CC / BCC hinzufügen'}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
<p className="reply-subject">
|
|
||||||
<span>Betreff:</span> <strong>{t.reply_subject}</strong>
|
|
||||||
</p>
|
|
||||||
{!showCopies && (cc || bcc) && (
|
|
||||||
<p className="muted">
|
|
||||||
{cc && `CC: ${cc}`}
|
|
||||||
{cc && bcc && ' · '}
|
|
||||||
{bcc && `BCC: ${bcc}`}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{showCopies && (
|
|
||||||
<div className="form-columns">
|
|
||||||
<Field label="CC (optional)">
|
|
||||||
<Input
|
|
||||||
disabled={busy}
|
|
||||||
value={cc}
|
|
||||||
maxLength={6000}
|
|
||||||
placeholder="kopie@example.de; team@example.de"
|
|
||||||
onChange={(event) => setCc(event.target.value)}
|
|
||||||
/>
|
|
||||||
</Field>
|
|
||||||
<Field label="BCC (optional)">
|
|
||||||
<Input
|
|
||||||
disabled={busy}
|
|
||||||
value={bcc}
|
|
||||||
maxLength={6000}
|
|
||||||
placeholder="blindkopie@example.de"
|
|
||||||
onChange={(event) => setBcc(event.target.value)}
|
|
||||||
/>
|
|
||||||
</Field>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{showCopies && (
|
|
||||||
<p className="muted">
|
|
||||||
Adressen mit Komma oder Semikolon trennen. BCC bleibt in der versendeten
|
|
||||||
Mail verborgen.
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{kind === 'outgoing' && (
|
|
||||||
<ReplyTemplates
|
|
||||||
queue={q}
|
|
||||||
ticketId={id}
|
|
||||||
from={from}
|
|
||||||
onInsert={(text: string) => {
|
|
||||||
const el = bodyEditor.current
|
|
||||||
if (!el) return
|
|
||||||
const start = el.selectionStart,
|
|
||||||
end = el.selectionEnd
|
|
||||||
setBody(
|
|
||||||
(current: string) => current.slice(0, start) + text + current.slice(end),
|
|
||||||
)
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
el.focus()
|
|
||||||
el.setSelectionRange(start + text.length, start + text.length)
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<Textarea
|
<Textarea
|
||||||
ref={bodyEditor}
|
ref={bodyEditor}
|
||||||
|
rows={2}
|
||||||
|
onFocus={() => setExpanded(true)}
|
||||||
aria-label="Nachricht verfassen"
|
aria-label="Nachricht verfassen"
|
||||||
placeholder={
|
placeholder={
|
||||||
kind === 'note' ? 'Notiz für Ihr Team …' : 'Schreiben Sie Ihre Antwort …'
|
kind === 'note' ? 'Notiz für Ihr Team …' : 'Schreiben Sie Ihre Antwort …'
|
||||||
@ -1360,55 +1306,188 @@ function TicketDetail({ id, boot, can, onBack, run }: any) {
|
|||||||
value={body}
|
value={body}
|
||||||
onChange={(e) => setBody(e.target.value)}
|
onChange={(e) => setBody(e.target.value)}
|
||||||
/>
|
/>
|
||||||
{kind === 'outgoing' && (
|
<div className="reply-expanded" hidden={!expanded}>
|
||||||
<div className="signature-preview" aria-label="Signatur vor dem Versand">
|
<details className="reply-options">
|
||||||
{signatureError ? (
|
<summary>
|
||||||
<span className="error" role="alert">
|
{kind === 'outgoing' ? 'Versanddetails' : 'Hinweis zur Notiz'}
|
||||||
{signatureError}
|
</summary>
|
||||||
</span>
|
{kind === 'outgoing' ? (
|
||||||
) : !signaturePreview ? (
|
<div className="reply-meta">
|
||||||
'Signaturvorschau wird geladen …'
|
<Field label="Von">
|
||||||
) : signaturePreview.html !== null ? (
|
<Select value={from} onChange={setFrom}>
|
||||||
<HtmlPreview
|
{q.addresses
|
||||||
html={signaturePreview.html}
|
.filter((a: Data) => a.outgoing)
|
||||||
title="Signatur vor dem Versand"
|
.map((a: Data) => (
|
||||||
/>
|
<option key={a.email}>{a.email}</option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Field>
|
||||||
|
<Field label="Signatur">
|
||||||
|
<Select value={sig} onChange={setSig}>
|
||||||
|
{q.signatures.map((s: Data) => (
|
||||||
|
<option key={s.id} value={s.id}>
|
||||||
|
{s.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
signaturePreview.text
|
<div className="note-label">
|
||||||
|
Diese Notiz bleibt intern und wird niemals an Kunden versendet.
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{kind === 'outgoing' && (
|
||||||
|
<div className="reply-recipients">
|
||||||
|
<div className="reply-recipient-heading">
|
||||||
|
<span>
|
||||||
|
An: <strong>{t.customer}</strong>
|
||||||
|
</span>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="plain"
|
||||||
|
size="sm"
|
||||||
|
disabled={busy}
|
||||||
|
aria-expanded={showCopies}
|
||||||
|
onClick={() => setShowCopies(!showCopies)}
|
||||||
|
>
|
||||||
|
{showCopies
|
||||||
|
? 'CC / BCC ausblenden'
|
||||||
|
: cc || bcc
|
||||||
|
? 'CC / BCC bearbeiten'
|
||||||
|
: 'CC / BCC hinzufügen'}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<p className="reply-subject">
|
||||||
|
<span>Betreff:</span> <strong>{t.reply_subject}</strong>
|
||||||
|
</p>
|
||||||
|
{!showCopies && (cc || bcc) && (
|
||||||
|
<p className="muted">
|
||||||
|
{cc && `CC: ${cc}`}
|
||||||
|
{cc && bcc && ' · '}
|
||||||
|
{bcc && `BCC: ${bcc}`}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
{showCopies && (
|
||||||
|
<div className="form-columns">
|
||||||
|
<Field label="CC (optional)">
|
||||||
|
<Input
|
||||||
|
disabled={busy}
|
||||||
|
value={cc}
|
||||||
|
maxLength={6000}
|
||||||
|
placeholder="kopie@example.de; team@example.de"
|
||||||
|
onChange={(event) => setCc(event.target.value)}
|
||||||
|
/>
|
||||||
|
</Field>
|
||||||
|
<Field label="BCC (optional)">
|
||||||
|
<Input
|
||||||
|
disabled={busy}
|
||||||
|
value={bcc}
|
||||||
|
maxLength={6000}
|
||||||
|
placeholder="blindkopie@example.de"
|
||||||
|
onChange={(event) => setBcc(event.target.value)}
|
||||||
|
/>
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{showCopies && (
|
||||||
|
<p className="muted">
|
||||||
|
Adressen mit Komma oder Semikolon trennen. BCC bleibt in der
|
||||||
|
versendeten Mail verborgen.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</details>
|
||||||
|
{kind === 'outgoing' && (
|
||||||
|
<ReplyTemplates
|
||||||
|
queue={q}
|
||||||
|
ticketId={id}
|
||||||
|
from={from}
|
||||||
|
onInsert={(text: string) => {
|
||||||
|
const el = bodyEditor.current
|
||||||
|
if (!el) return
|
||||||
|
const start = el.selectionStart,
|
||||||
|
end = el.selectionEnd
|
||||||
|
setBody(
|
||||||
|
(current: string) =>
|
||||||
|
current.slice(0, start) + text + current.slice(end),
|
||||||
|
)
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
el.focus()
|
||||||
|
el.setSelectionRange(start + text.length, start + text.length)
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{kind === 'outgoing' && (
|
||||||
|
<>
|
||||||
|
<details
|
||||||
|
className="reply-signature"
|
||||||
|
open={signatureOpen}
|
||||||
|
onToggle={(event) => setSignatureOpen(event.currentTarget.open)}
|
||||||
|
>
|
||||||
|
<summary>
|
||||||
|
Signatur ·{' '}
|
||||||
|
{q.signatures.find((s: Data) => s.id === sig)?.name || 'Keine'}
|
||||||
|
</summary>
|
||||||
|
{expanded && signatureOpen && (
|
||||||
|
<div
|
||||||
|
className="signature-preview"
|
||||||
|
aria-label="Signatur vor dem Versand"
|
||||||
|
>
|
||||||
|
{!signaturePreview ? (
|
||||||
|
'Signaturvorschau wird geladen …'
|
||||||
|
) : signaturePreview.html !== null ? (
|
||||||
|
<HtmlPreview
|
||||||
|
html={signaturePreview.html}
|
||||||
|
title="Signatur vor dem Versand"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
signaturePreview.text
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</details>
|
||||||
|
{signatureError && (
|
||||||
|
<div className="error" role="alert">
|
||||||
|
{signatureError}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{kind === 'outgoing' && (
|
||||||
|
<AttachmentPicker
|
||||||
|
files={files}
|
||||||
|
setFiles={setFiles}
|
||||||
|
disabled={busy || reading}
|
||||||
|
onBusy={setReading}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="reply-footer">
|
||||||
|
<small>
|
||||||
|
{kind === 'note'
|
||||||
|
? 'Nur für berechtigte Teammitglieder'
|
||||||
|
: `Antwort an ${t.customer}`}
|
||||||
|
</small>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
disabled={
|
||||||
|
busy ||
|
||||||
|
reading ||
|
||||||
|
(kind === 'outgoing' && (!signaturePreview || !!signatureError)) ||
|
||||||
|
(!body.trim() && !files.length) ||
|
||||||
|
!can(q.id, kind === 'note' ? 'note' : 'reply')
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Send size={15} />
|
||||||
|
{busy
|
||||||
|
? 'Wird gespeichert …'
|
||||||
|
: kind === 'note'
|
||||||
|
? 'Notiz speichern'
|
||||||
|
: 'Antwort senden'}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
{kind === 'outgoing' && (
|
|
||||||
<AttachmentPicker
|
|
||||||
files={files}
|
|
||||||
setFiles={setFiles}
|
|
||||||
disabled={busy || reading}
|
|
||||||
onBusy={setReading}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<div className="reply-footer">
|
|
||||||
<small>
|
|
||||||
{kind === 'note'
|
|
||||||
? 'Nur für berechtigte Teammitglieder'
|
|
||||||
: `Antwort an ${t.customer}`}
|
|
||||||
</small>
|
|
||||||
<Button
|
|
||||||
type="submit"
|
|
||||||
disabled={
|
|
||||||
busy ||
|
|
||||||
reading ||
|
|
||||||
(kind === 'outgoing' && (!signaturePreview || !!signatureError)) ||
|
|
||||||
(!body.trim() && !files.length) ||
|
|
||||||
!can(q.id, kind === 'note' ? 'note' : 'reply')
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Send size={15} />
|
|
||||||
{busy
|
|
||||||
? 'Wird gespeichert …'
|
|
||||||
: kind === 'note'
|
|
||||||
? 'Notiz speichern'
|
|
||||||
: 'Antwort senden'}
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -1264,6 +1264,8 @@ main {
|
|||||||
}
|
}
|
||||||
.reply-tabs {
|
.reply-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
@ -1279,6 +1281,38 @@ main {
|
|||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
.reply-context {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
font-size: 10px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
.reply-draft {
|
||||||
|
font-size: 10px;
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
.reply-tabs .reply-minimize {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.reply-expanded[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.reply-options,
|
||||||
|
.reply-signature {
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
.reply-options > summary,
|
||||||
|
.reply-signature > summary {
|
||||||
|
padding: 12px 15px;
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--muted);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.reply-options > summary:hover,
|
||||||
|
.reply-signature > summary:hover {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
.reply-meta {
|
.reply-meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@ -1295,9 +1329,14 @@ main {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
min-height: 150px;
|
min-height: 72px;
|
||||||
|
resize: none;
|
||||||
|
overflow-y: hidden;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
.reply-editor.compact > textarea {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
.signature-preview {
|
.signature-preview {
|
||||||
padding: 0 18px 22px;
|
padding: 0 18px 22px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user