@phenx-inc/ctlsurf 0.3.13 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ctlsurf-worker.js +38 -22
- package/out/headless/index.mjs +295 -3
- package/out/headless/index.mjs.map +4 -4
- package/out/main/index.js +351 -48
- package/out/preload/index.js +11 -0
- package/out/renderer/assets/{cssMode-CYoo4t9f.js → cssMode-D5dPwEy5.js} +3 -3
- package/out/renderer/assets/{freemarker2--UQnPZsn.js → freemarker2-c5jJjQ9s.js} +1 -1
- package/out/renderer/assets/{handlebars-DVDrmX0C.js → handlebars-BTbmOxx9.js} +1 -1
- package/out/renderer/assets/{html-D1-cXoLy.js → html-3cIIQcxO.js} +1 -1
- package/out/renderer/assets/{htmlMode-f5nBuprq.js → htmlMode-DYbpW1yY.js} +3 -3
- package/out/renderer/assets/{index-65hyKM_8.css → index-6KvOnYL1.css} +404 -0
- package/out/renderer/assets/{index-D23nru43.js → index-D2MUZin7.js} +332 -23
- package/out/renderer/assets/{javascript-CcarFzBL.js → javascript-CDuCMm-6.js} +2 -2
- package/out/renderer/assets/{jsonMode-BvF-xK9U.js → jsonMode-COLqbq0s.js} +3 -3
- package/out/renderer/assets/{liquid-CHLtUKl2.js → liquid-BFcqZizB.js} +1 -1
- package/out/renderer/assets/{lspLanguageFeatures-B9aNeatS.js → lspLanguageFeatures-CbkEcL-z.js} +1 -1
- package/out/renderer/assets/{mdx-HGDrkifZ.js → mdx-DyK93oEE.js} +1 -1
- package/out/renderer/assets/{python-B_dPzjJ6.js → python-D4lCwSVr.js} +1 -1
- package/out/renderer/assets/{razor-CHheM4ot.js → razor-DdkE9XVt.js} +1 -1
- package/out/renderer/assets/{tsMode-CdC3i1gG.js → tsMode-BrQ4Fsc-.js} +1 -1
- package/out/renderer/assets/{typescript-BX6guVRK.js → typescript-BakbYMnC.js} +1 -1
- package/out/renderer/assets/{xml-CpS-pOPE.js → xml-DHDW9Xhp.js} +1 -1
- package/out/renderer/assets/{yaml-Du0AjOHW.js → yaml-1Ayv_J3q.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/package.json +1 -1
- package/src/main/agents.ts +36 -1
- package/src/main/ctlsurfApi.ts +11 -0
- package/src/main/headless.ts +5 -3
- package/src/main/index.ts +24 -2
- package/src/main/orchestrator.ts +66 -0
- package/src/main/ticketStore.ts +252 -0
- package/src/preload/index.ts +17 -0
- package/src/renderer/App.tsx +40 -1
- package/src/renderer/components/TicketPanel.tsx +308 -0
- package/src/renderer/styles.css +404 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from 'react'
|
|
2
|
+
|
|
3
|
+
interface Option { value: string; color: string }
|
|
4
|
+
|
|
5
|
+
const STATUS_OPTIONS: Option[] = [
|
|
6
|
+
{ value: 'Open', color: '#7aa2f7' },
|
|
7
|
+
{ value: 'In Progress', color: '#e0af68' },
|
|
8
|
+
{ value: 'Blocked', color: '#f7768e' },
|
|
9
|
+
{ value: 'Done', color: '#9ece6a' },
|
|
10
|
+
]
|
|
11
|
+
const PRIORITY_OPTIONS: Option[] = [
|
|
12
|
+
{ value: 'Low', color: '#565f89' },
|
|
13
|
+
{ value: 'Med', color: '#e0af68' },
|
|
14
|
+
{ value: 'High', color: '#f7768e' },
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
const colorOf = (opts: Option[], value: string): string =>
|
|
18
|
+
opts.find(o => o.value === value)?.color ?? '#565f89'
|
|
19
|
+
|
|
20
|
+
interface Ticket {
|
|
21
|
+
id: string
|
|
22
|
+
title: string
|
|
23
|
+
description: string
|
|
24
|
+
status: string
|
|
25
|
+
priority: string
|
|
26
|
+
created: string | null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface TicketPanelProps {
|
|
30
|
+
open: boolean
|
|
31
|
+
onClose: () => void
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type SaveState = { kind: 'idle' } | { kind: 'saving' } | { kind: 'error'; message: string }
|
|
35
|
+
type View = 'list' | 'form'
|
|
36
|
+
|
|
37
|
+
function formatDate(iso: string | null): string {
|
|
38
|
+
if (!iso) return ''
|
|
39
|
+
const d = new Date(iso)
|
|
40
|
+
if (Number.isNaN(d.getTime())) return ''
|
|
41
|
+
return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function TagIcon({ size = 16 }: { size?: number }) {
|
|
45
|
+
return (
|
|
46
|
+
<svg viewBox="0 0 24 24" width={size} height={size} fill="none"
|
|
47
|
+
stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
48
|
+
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" />
|
|
49
|
+
<line x1="7" y1="7" x2="7.01" y2="7" />
|
|
50
|
+
</svg>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface SegmentedProps {
|
|
55
|
+
options: Option[]
|
|
56
|
+
value: string
|
|
57
|
+
onChange: (v: string) => void
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function Segmented({ options, value, onChange }: SegmentedProps) {
|
|
61
|
+
return (
|
|
62
|
+
<div className="ticket-segmented">
|
|
63
|
+
{options.map(o => {
|
|
64
|
+
const active = o.value === value
|
|
65
|
+
return (
|
|
66
|
+
<button
|
|
67
|
+
key={o.value}
|
|
68
|
+
type="button"
|
|
69
|
+
className={`ticket-seg ${active ? 'active' : ''}`}
|
|
70
|
+
style={active ? { borderColor: o.color, color: o.color, background: `${o.color}1f` } : undefined}
|
|
71
|
+
onClick={() => onChange(o.value)}
|
|
72
|
+
>
|
|
73
|
+
<span className="ticket-seg-dot" style={{ background: o.color }} />
|
|
74
|
+
{o.value}
|
|
75
|
+
</button>
|
|
76
|
+
)
|
|
77
|
+
})}
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function TicketPanel({ open, onClose }: TicketPanelProps) {
|
|
83
|
+
const [project, setProject] = useState<string | null>(null)
|
|
84
|
+
const [view, setView] = useState<View>('list')
|
|
85
|
+
|
|
86
|
+
// list state
|
|
87
|
+
const [tickets, setTickets] = useState<Ticket[]>([])
|
|
88
|
+
const [listLoading, setListLoading] = useState(false)
|
|
89
|
+
const [listError, setListError] = useState<string | null>(null)
|
|
90
|
+
|
|
91
|
+
// form state
|
|
92
|
+
const [editingId, setEditingId] = useState<string | null>(null)
|
|
93
|
+
const [title, setTitle] = useState('')
|
|
94
|
+
const [description, setDescription] = useState('')
|
|
95
|
+
const [status, setStatus] = useState(STATUS_OPTIONS[0].value)
|
|
96
|
+
const [priority, setPriority] = useState('Med')
|
|
97
|
+
const [save, setSave] = useState<SaveState>({ kind: 'idle' })
|
|
98
|
+
|
|
99
|
+
const refreshList = useCallback(async () => {
|
|
100
|
+
setListLoading(true)
|
|
101
|
+
setListError(null)
|
|
102
|
+
try {
|
|
103
|
+
const r = await window.worker.listTickets()
|
|
104
|
+
if (r?.ok) setTickets(r.tickets || [])
|
|
105
|
+
else { setTickets([]); setListError(r?.error || 'Failed to load tickets') }
|
|
106
|
+
} catch (err: any) {
|
|
107
|
+
setTickets([])
|
|
108
|
+
setListError(err?.message || 'Failed to load tickets')
|
|
109
|
+
} finally {
|
|
110
|
+
setListLoading(false)
|
|
111
|
+
}
|
|
112
|
+
}, [])
|
|
113
|
+
|
|
114
|
+
// On open: reset to the list and (re)load project + tickets.
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!open) return
|
|
117
|
+
setView('list')
|
|
118
|
+
let cancelled = false
|
|
119
|
+
window.worker.getTicketProject()
|
|
120
|
+
.then(r => { if (!cancelled) setProject(r?.name ?? null) })
|
|
121
|
+
.catch(() => { if (!cancelled) setProject(null) })
|
|
122
|
+
void refreshList()
|
|
123
|
+
return () => { cancelled = true }
|
|
124
|
+
}, [open, refreshList])
|
|
125
|
+
|
|
126
|
+
const openNewForm = useCallback(() => {
|
|
127
|
+
setEditingId(null)
|
|
128
|
+
setTitle('')
|
|
129
|
+
setDescription('')
|
|
130
|
+
setStatus(STATUS_OPTIONS[0].value)
|
|
131
|
+
setPriority('Med')
|
|
132
|
+
setSave({ kind: 'idle' })
|
|
133
|
+
setView('form')
|
|
134
|
+
}, [])
|
|
135
|
+
|
|
136
|
+
const openEditForm = useCallback((t: Ticket) => {
|
|
137
|
+
setEditingId(t.id)
|
|
138
|
+
setTitle(t.title)
|
|
139
|
+
setDescription(t.description)
|
|
140
|
+
setStatus(STATUS_OPTIONS.some(o => o.value === t.status) ? t.status : STATUS_OPTIONS[0].value)
|
|
141
|
+
setPriority(PRIORITY_OPTIONS.some(o => o.value === t.priority) ? t.priority : 'Med')
|
|
142
|
+
setSave({ kind: 'idle' })
|
|
143
|
+
setView('form')
|
|
144
|
+
}, [])
|
|
145
|
+
|
|
146
|
+
const handleSave = useCallback(async () => {
|
|
147
|
+
if (!title.trim() || save.kind === 'saving') return
|
|
148
|
+
setSave({ kind: 'saving' })
|
|
149
|
+
const payload = { title: title.trim(), description: description.trim(), status, priority }
|
|
150
|
+
try {
|
|
151
|
+
const r = editingId
|
|
152
|
+
? await window.worker.updateTicket(editingId, payload)
|
|
153
|
+
: await window.worker.addTicket(payload)
|
|
154
|
+
if (r?.ok) {
|
|
155
|
+
setView('list')
|
|
156
|
+
void refreshList()
|
|
157
|
+
} else {
|
|
158
|
+
setSave({ kind: 'error', message: r?.error || 'Failed to save ticket' })
|
|
159
|
+
}
|
|
160
|
+
} catch (err: any) {
|
|
161
|
+
setSave({ kind: 'error', message: err?.message || 'Failed to save ticket' })
|
|
162
|
+
}
|
|
163
|
+
}, [title, description, status, priority, editingId, save.kind, refreshList])
|
|
164
|
+
|
|
165
|
+
// Esc: form → back to list, list → close. Cmd/Ctrl+Enter saves in the form.
|
|
166
|
+
useEffect(() => {
|
|
167
|
+
if (!open) return
|
|
168
|
+
const onKey = (e: KeyboardEvent) => {
|
|
169
|
+
if (e.key === 'Escape') {
|
|
170
|
+
e.preventDefault()
|
|
171
|
+
if (view === 'form') setView('list')
|
|
172
|
+
else onClose()
|
|
173
|
+
} else if (e.key === 'Enter' && (e.metaKey || e.ctrlKey) && view === 'form') {
|
|
174
|
+
e.preventDefault()
|
|
175
|
+
void handleSave()
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
window.addEventListener('keydown', onKey)
|
|
179
|
+
return () => window.removeEventListener('keydown', onKey)
|
|
180
|
+
}, [open, view, onClose, handleSave])
|
|
181
|
+
|
|
182
|
+
return (
|
|
183
|
+
<>
|
|
184
|
+
<div className={`ticket-scrim ${open ? 'open' : ''}`} onClick={onClose} />
|
|
185
|
+
<div className={`ticket-drawer ${open ? 'open' : ''}`} role="dialog" aria-label="Tickets">
|
|
186
|
+
<div className="ticket-drawer-header">
|
|
187
|
+
<div className="ticket-drawer-heading">
|
|
188
|
+
{view === 'form' ? (
|
|
189
|
+
<button className="ticket-drawer-back" onClick={() => setView('list')} title="Back (Esc)">‹</button>
|
|
190
|
+
) : (
|
|
191
|
+
<span className="ticket-drawer-badge"><TagIcon size={16} /></span>
|
|
192
|
+
)}
|
|
193
|
+
<div className="ticket-drawer-headtext">
|
|
194
|
+
<span className="ticket-drawer-title">
|
|
195
|
+
{view === 'form' ? (editingId ? 'Edit ticket' : 'New ticket') : 'Tickets'}
|
|
196
|
+
</span>
|
|
197
|
+
<span className="ticket-drawer-subtitle">
|
|
198
|
+
{project
|
|
199
|
+
? <>in <strong>{project}</strong></>
|
|
200
|
+
: <span className="ticket-drawer-warn">no ctlsurf project for this tab</span>}
|
|
201
|
+
</span>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<button className="ticket-drawer-close" onClick={onClose} title="Close">×</button>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
{view === 'list' ? (
|
|
208
|
+
<>
|
|
209
|
+
<div className="ticket-list-body">
|
|
210
|
+
{listLoading && <div className="ticket-list-msg">Loading tickets…</div>}
|
|
211
|
+
{!listLoading && listError && (
|
|
212
|
+
<div className="ticket-drawer-error">⚠ {listError}</div>
|
|
213
|
+
)}
|
|
214
|
+
{!listLoading && !listError && tickets.length === 0 && (
|
|
215
|
+
<div className="ticket-empty">
|
|
216
|
+
<span className="ticket-empty-icon"><TagIcon size={26} /></span>
|
|
217
|
+
<span className="ticket-empty-title">No tickets yet</span>
|
|
218
|
+
<span className="ticket-empty-hint">Log the first one for this project.</span>
|
|
219
|
+
</div>
|
|
220
|
+
)}
|
|
221
|
+
{!listLoading && tickets.map(t => (
|
|
222
|
+
<button key={t.id} className="ticket-card" onClick={() => openEditForm(t)}>
|
|
223
|
+
<span className="ticket-card-bar" style={{ background: colorOf(STATUS_OPTIONS, t.status) }} />
|
|
224
|
+
<div className="ticket-card-main">
|
|
225
|
+
<span className="ticket-card-title">{t.title || 'Untitled'}</span>
|
|
226
|
+
<div className="ticket-card-meta">
|
|
227
|
+
<span className="ticket-card-status" style={{ color: colorOf(STATUS_OPTIONS, t.status) }}>
|
|
228
|
+
<span className="ticket-seg-dot" style={{ background: colorOf(STATUS_OPTIONS, t.status) }} />
|
|
229
|
+
{t.status}
|
|
230
|
+
</span>
|
|
231
|
+
{t.created && <span className="ticket-card-date">{formatDate(t.created)}</span>}
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
<span
|
|
235
|
+
className="ticket-card-pri"
|
|
236
|
+
style={{ color: colorOf(PRIORITY_OPTIONS, t.priority), borderColor: `${colorOf(PRIORITY_OPTIONS, t.priority)}66` }}
|
|
237
|
+
>
|
|
238
|
+
{t.priority}
|
|
239
|
+
</span>
|
|
240
|
+
</button>
|
|
241
|
+
))}
|
|
242
|
+
</div>
|
|
243
|
+
<div className="ticket-drawer-footer">
|
|
244
|
+
<span className="ticket-drawer-hint">
|
|
245
|
+
{tickets.length > 0 && `${tickets.length} ticket${tickets.length === 1 ? '' : 's'}`}
|
|
246
|
+
</span>
|
|
247
|
+
<button className="ticket-btn-primary" onClick={openNewForm}>+ New ticket</button>
|
|
248
|
+
</div>
|
|
249
|
+
</>
|
|
250
|
+
) : (
|
|
251
|
+
<>
|
|
252
|
+
<div className="ticket-drawer-body">
|
|
253
|
+
<label className="ticket-field">
|
|
254
|
+
<span className="ticket-field-label">Title</span>
|
|
255
|
+
<input
|
|
256
|
+
type="text"
|
|
257
|
+
className="ticket-input-title"
|
|
258
|
+
value={title}
|
|
259
|
+
autoFocus
|
|
260
|
+
placeholder="What needs doing?"
|
|
261
|
+
onChange={e => setTitle(e.target.value)}
|
|
262
|
+
/>
|
|
263
|
+
</label>
|
|
264
|
+
|
|
265
|
+
<label className="ticket-field">
|
|
266
|
+
<span className="ticket-field-label">Description</span>
|
|
267
|
+
<textarea
|
|
268
|
+
value={description}
|
|
269
|
+
rows={5}
|
|
270
|
+
placeholder="Add detail, context, links…"
|
|
271
|
+
onChange={e => setDescription(e.target.value)}
|
|
272
|
+
/>
|
|
273
|
+
</label>
|
|
274
|
+
|
|
275
|
+
<div className="ticket-field">
|
|
276
|
+
<span className="ticket-field-label">Status</span>
|
|
277
|
+
<Segmented options={STATUS_OPTIONS} value={status} onChange={setStatus} />
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<div className="ticket-field">
|
|
281
|
+
<span className="ticket-field-label">Priority</span>
|
|
282
|
+
<Segmented options={PRIORITY_OPTIONS} value={priority} onChange={setPriority} />
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
{save.kind === 'error' && (
|
|
286
|
+
<div className="ticket-drawer-error">⚠ {save.message}</div>
|
|
287
|
+
)}
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
<div className="ticket-drawer-footer">
|
|
291
|
+
<span className="ticket-drawer-hint">⌘↵ to save</span>
|
|
292
|
+
<div className="ticket-drawer-footer-btns">
|
|
293
|
+
<button className="ticket-btn-secondary" onClick={() => setView('list')}>Cancel</button>
|
|
294
|
+
<button
|
|
295
|
+
className="ticket-btn-primary"
|
|
296
|
+
onClick={handleSave}
|
|
297
|
+
disabled={!title.trim() || save.kind === 'saving'}
|
|
298
|
+
>
|
|
299
|
+
{save.kind === 'saving' ? 'Saving…' : editingId ? 'Save changes' : 'Save ticket'}
|
|
300
|
+
</button>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
</>
|
|
304
|
+
)}
|
|
305
|
+
</div>
|
|
306
|
+
</>
|
|
307
|
+
)
|
|
308
|
+
}
|
package/src/renderer/styles.css
CHANGED
|
@@ -36,6 +36,24 @@ html, body, #root {
|
|
|
36
36
|
.titlebar-title {
|
|
37
37
|
font-weight: 600;
|
|
38
38
|
color: #c0caf5;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 6px;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.titlebar-title-sep {
|
|
46
|
+
color: #565f89;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.titlebar-project {
|
|
51
|
+
color: #7aa2f7;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
max-width: 280px;
|
|
39
57
|
}
|
|
40
58
|
|
|
41
59
|
.titlebar-controls {
|
|
@@ -1027,3 +1045,389 @@ html, body, #root {
|
|
|
1027
1045
|
display: flex;
|
|
1028
1046
|
gap: 4px;
|
|
1029
1047
|
}
|
|
1048
|
+
|
|
1049
|
+
/* ─── Ticket drawer ──────────────────────────────── */
|
|
1050
|
+
|
|
1051
|
+
.ticket-scrim {
|
|
1052
|
+
position: fixed;
|
|
1053
|
+
inset: 0;
|
|
1054
|
+
background: rgba(13, 14, 22, 0.55);
|
|
1055
|
+
backdrop-filter: blur(2px);
|
|
1056
|
+
opacity: 0;
|
|
1057
|
+
pointer-events: none;
|
|
1058
|
+
transition: opacity 0.2s ease;
|
|
1059
|
+
z-index: 90;
|
|
1060
|
+
}
|
|
1061
|
+
.ticket-scrim.open {
|
|
1062
|
+
opacity: 1;
|
|
1063
|
+
pointer-events: auto;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.ticket-drawer {
|
|
1067
|
+
position: fixed;
|
|
1068
|
+
top: 0;
|
|
1069
|
+
right: 0;
|
|
1070
|
+
bottom: 0;
|
|
1071
|
+
width: 380px;
|
|
1072
|
+
background: linear-gradient(180deg, #20243a 0%, #1b1e2e 100%);
|
|
1073
|
+
border-left: 1px solid #343860;
|
|
1074
|
+
box-shadow: -16px 0 48px rgba(0, 0, 0, 0.5);
|
|
1075
|
+
display: flex;
|
|
1076
|
+
flex-direction: column;
|
|
1077
|
+
transform: translateX(100%);
|
|
1078
|
+
transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
|
|
1079
|
+
z-index: 100;
|
|
1080
|
+
}
|
|
1081
|
+
.ticket-drawer.open {
|
|
1082
|
+
transform: translateX(0);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/* ── header ── */
|
|
1086
|
+
.ticket-drawer-header {
|
|
1087
|
+
display: flex;
|
|
1088
|
+
align-items: flex-start;
|
|
1089
|
+
justify-content: space-between;
|
|
1090
|
+
padding: 16px 16px 14px;
|
|
1091
|
+
border-bottom: 1px solid #2a2b3d;
|
|
1092
|
+
}
|
|
1093
|
+
.ticket-drawer-heading {
|
|
1094
|
+
display: flex;
|
|
1095
|
+
gap: 11px;
|
|
1096
|
+
align-items: center;
|
|
1097
|
+
}
|
|
1098
|
+
.ticket-drawer-badge {
|
|
1099
|
+
width: 34px;
|
|
1100
|
+
height: 34px;
|
|
1101
|
+
border-radius: 9px;
|
|
1102
|
+
background: rgba(122, 162, 247, 0.14);
|
|
1103
|
+
border: 1px solid rgba(122, 162, 247, 0.3);
|
|
1104
|
+
display: flex;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
justify-content: center;
|
|
1107
|
+
font-size: 16px;
|
|
1108
|
+
flex-shrink: 0;
|
|
1109
|
+
}
|
|
1110
|
+
.ticket-drawer-headtext {
|
|
1111
|
+
display: flex;
|
|
1112
|
+
flex-direction: column;
|
|
1113
|
+
gap: 1px;
|
|
1114
|
+
}
|
|
1115
|
+
.ticket-drawer-title {
|
|
1116
|
+
font-size: 14px;
|
|
1117
|
+
font-weight: 650;
|
|
1118
|
+
color: #d5dbf5;
|
|
1119
|
+
letter-spacing: 0.01em;
|
|
1120
|
+
}
|
|
1121
|
+
.ticket-drawer-subtitle {
|
|
1122
|
+
font-size: 11.5px;
|
|
1123
|
+
color: #6b739b;
|
|
1124
|
+
}
|
|
1125
|
+
.ticket-drawer-subtitle strong {
|
|
1126
|
+
color: #7aa2f7;
|
|
1127
|
+
font-weight: 600;
|
|
1128
|
+
}
|
|
1129
|
+
.ticket-drawer-warn {
|
|
1130
|
+
color: #e0af68;
|
|
1131
|
+
}
|
|
1132
|
+
.ticket-drawer-close {
|
|
1133
|
+
background: none;
|
|
1134
|
+
border: none;
|
|
1135
|
+
color: #565f89;
|
|
1136
|
+
font-size: 20px;
|
|
1137
|
+
line-height: 1;
|
|
1138
|
+
cursor: pointer;
|
|
1139
|
+
padding: 2px 6px;
|
|
1140
|
+
border-radius: 6px;
|
|
1141
|
+
transition: background 0.12s ease, color 0.12s ease;
|
|
1142
|
+
}
|
|
1143
|
+
.ticket-drawer-close:hover {
|
|
1144
|
+
color: #d5dbf5;
|
|
1145
|
+
background: rgba(255, 255, 255, 0.06);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/* ── body ── */
|
|
1149
|
+
.ticket-drawer-body {
|
|
1150
|
+
flex: 1;
|
|
1151
|
+
overflow-y: auto;
|
|
1152
|
+
padding: 16px;
|
|
1153
|
+
display: flex;
|
|
1154
|
+
flex-direction: column;
|
|
1155
|
+
gap: 16px;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.ticket-field {
|
|
1159
|
+
display: flex;
|
|
1160
|
+
flex-direction: column;
|
|
1161
|
+
gap: 7px;
|
|
1162
|
+
}
|
|
1163
|
+
.ticket-field-label {
|
|
1164
|
+
font-size: 10.5px;
|
|
1165
|
+
font-weight: 600;
|
|
1166
|
+
color: #6b739b;
|
|
1167
|
+
text-transform: uppercase;
|
|
1168
|
+
letter-spacing: 0.07em;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.ticket-field input,
|
|
1172
|
+
.ticket-field textarea {
|
|
1173
|
+
background: #15161f;
|
|
1174
|
+
border: 1px solid #2a2b3d;
|
|
1175
|
+
border-radius: 8px;
|
|
1176
|
+
color: #d5dbf5;
|
|
1177
|
+
font-size: 13px;
|
|
1178
|
+
font-family: inherit;
|
|
1179
|
+
padding: 9px 11px;
|
|
1180
|
+
outline: none;
|
|
1181
|
+
transition: border-color 0.14s ease, box-shadow 0.14s ease;
|
|
1182
|
+
}
|
|
1183
|
+
.ticket-field input::placeholder,
|
|
1184
|
+
.ticket-field textarea::placeholder {
|
|
1185
|
+
color: #4a4f6e;
|
|
1186
|
+
}
|
|
1187
|
+
.ticket-field input:focus,
|
|
1188
|
+
.ticket-field textarea:focus {
|
|
1189
|
+
border-color: #7aa2f7;
|
|
1190
|
+
box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.13);
|
|
1191
|
+
}
|
|
1192
|
+
.ticket-input-title {
|
|
1193
|
+
font-size: 14px !important;
|
|
1194
|
+
font-weight: 550;
|
|
1195
|
+
}
|
|
1196
|
+
.ticket-field textarea {
|
|
1197
|
+
resize: vertical;
|
|
1198
|
+
line-height: 1.5;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
/* ── segmented pill controls ── */
|
|
1202
|
+
.ticket-segmented {
|
|
1203
|
+
display: flex;
|
|
1204
|
+
flex-wrap: wrap;
|
|
1205
|
+
gap: 6px;
|
|
1206
|
+
}
|
|
1207
|
+
.ticket-seg {
|
|
1208
|
+
display: inline-flex;
|
|
1209
|
+
align-items: center;
|
|
1210
|
+
gap: 6px;
|
|
1211
|
+
background: #15161f;
|
|
1212
|
+
border: 1px solid #2a2b3d;
|
|
1213
|
+
border-radius: 999px;
|
|
1214
|
+
color: #8088ac;
|
|
1215
|
+
font-size: 12px;
|
|
1216
|
+
font-family: inherit;
|
|
1217
|
+
font-weight: 550;
|
|
1218
|
+
padding: 5px 11px 5px 9px;
|
|
1219
|
+
cursor: pointer;
|
|
1220
|
+
transition: background 0.13s ease, border-color 0.13s ease, color 0.13s ease;
|
|
1221
|
+
}
|
|
1222
|
+
.ticket-seg:hover {
|
|
1223
|
+
border-color: #3b3d57;
|
|
1224
|
+
color: #c0caf5;
|
|
1225
|
+
}
|
|
1226
|
+
.ticket-seg-dot {
|
|
1227
|
+
width: 7px;
|
|
1228
|
+
height: 7px;
|
|
1229
|
+
border-radius: 50%;
|
|
1230
|
+
flex-shrink: 0;
|
|
1231
|
+
}
|
|
1232
|
+
.ticket-seg.active {
|
|
1233
|
+
font-weight: 650;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
.ticket-drawer-error {
|
|
1237
|
+
background: rgba(247, 118, 142, 0.13);
|
|
1238
|
+
border: 1px solid rgba(247, 118, 142, 0.38);
|
|
1239
|
+
color: #f7768e;
|
|
1240
|
+
font-size: 12px;
|
|
1241
|
+
border-radius: 8px;
|
|
1242
|
+
padding: 8px 10px;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/* ── footer ── */
|
|
1246
|
+
.ticket-drawer-footer {
|
|
1247
|
+
display: flex;
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
justify-content: space-between;
|
|
1250
|
+
gap: 8px;
|
|
1251
|
+
padding: 12px 16px;
|
|
1252
|
+
border-top: 1px solid #2a2b3d;
|
|
1253
|
+
background: rgba(13, 14, 22, 0.35);
|
|
1254
|
+
}
|
|
1255
|
+
.ticket-drawer-hint {
|
|
1256
|
+
font-size: 11px;
|
|
1257
|
+
color: #565f89;
|
|
1258
|
+
}
|
|
1259
|
+
.ticket-drawer-footer-btns {
|
|
1260
|
+
display: flex;
|
|
1261
|
+
gap: 8px;
|
|
1262
|
+
}
|
|
1263
|
+
.ticket-btn-secondary,
|
|
1264
|
+
.ticket-btn-primary {
|
|
1265
|
+
font-size: 12.5px;
|
|
1266
|
+
font-family: inherit;
|
|
1267
|
+
font-weight: 600;
|
|
1268
|
+
border-radius: 8px;
|
|
1269
|
+
padding: 8px 14px;
|
|
1270
|
+
cursor: pointer;
|
|
1271
|
+
transition: background 0.13s ease, border-color 0.13s ease, transform 0.06s ease;
|
|
1272
|
+
}
|
|
1273
|
+
.ticket-btn-secondary {
|
|
1274
|
+
background: transparent;
|
|
1275
|
+
color: #c0caf5;
|
|
1276
|
+
border: 1px solid #2a2b3d;
|
|
1277
|
+
}
|
|
1278
|
+
.ticket-btn-secondary:hover {
|
|
1279
|
+
background: rgba(255, 255, 255, 0.05);
|
|
1280
|
+
border-color: #3b3d57;
|
|
1281
|
+
}
|
|
1282
|
+
.ticket-btn-primary {
|
|
1283
|
+
background: linear-gradient(180deg, #8db0fa 0%, #7aa2f7 100%);
|
|
1284
|
+
color: #11131f;
|
|
1285
|
+
border: 1px solid #7aa2f7;
|
|
1286
|
+
}
|
|
1287
|
+
.ticket-btn-primary:hover:not(:disabled) {
|
|
1288
|
+
background: linear-gradient(180deg, #9bbcfb 0%, #89b4fa 100%);
|
|
1289
|
+
}
|
|
1290
|
+
.ticket-btn-primary:active:not(:disabled) {
|
|
1291
|
+
transform: translateY(1px);
|
|
1292
|
+
}
|
|
1293
|
+
.ticket-btn-primary:disabled {
|
|
1294
|
+
opacity: 0.4;
|
|
1295
|
+
cursor: not-allowed;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
/* ── titlebar tickets icon ── */
|
|
1299
|
+
.ticket-tag-icon {
|
|
1300
|
+
display: inline-block;
|
|
1301
|
+
vertical-align: -2px;
|
|
1302
|
+
margin-right: 5px;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/* ── drawer badge / back button ── */
|
|
1306
|
+
.ticket-drawer-badge {
|
|
1307
|
+
color: #7aa2f7;
|
|
1308
|
+
}
|
|
1309
|
+
.ticket-drawer-back {
|
|
1310
|
+
width: 34px;
|
|
1311
|
+
height: 34px;
|
|
1312
|
+
border-radius: 9px;
|
|
1313
|
+
background: rgba(122, 162, 247, 0.1);
|
|
1314
|
+
border: 1px solid rgba(122, 162, 247, 0.28);
|
|
1315
|
+
color: #7aa2f7;
|
|
1316
|
+
font-size: 22px;
|
|
1317
|
+
line-height: 1;
|
|
1318
|
+
cursor: pointer;
|
|
1319
|
+
flex-shrink: 0;
|
|
1320
|
+
transition: background 0.12s ease;
|
|
1321
|
+
}
|
|
1322
|
+
.ticket-drawer-back:hover {
|
|
1323
|
+
background: rgba(122, 162, 247, 0.2);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
/* ── ticket list ── */
|
|
1327
|
+
.ticket-list-body {
|
|
1328
|
+
flex: 1;
|
|
1329
|
+
overflow-y: auto;
|
|
1330
|
+
padding: 12px;
|
|
1331
|
+
display: flex;
|
|
1332
|
+
flex-direction: column;
|
|
1333
|
+
gap: 7px;
|
|
1334
|
+
}
|
|
1335
|
+
.ticket-list-msg {
|
|
1336
|
+
color: #6b739b;
|
|
1337
|
+
font-size: 12.5px;
|
|
1338
|
+
padding: 16px 4px;
|
|
1339
|
+
text-align: center;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.ticket-empty {
|
|
1343
|
+
display: flex;
|
|
1344
|
+
flex-direction: column;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
gap: 5px;
|
|
1347
|
+
padding: 48px 16px;
|
|
1348
|
+
text-align: center;
|
|
1349
|
+
}
|
|
1350
|
+
.ticket-empty-icon {
|
|
1351
|
+
color: #3b3d57;
|
|
1352
|
+
margin-bottom: 4px;
|
|
1353
|
+
}
|
|
1354
|
+
.ticket-empty-title {
|
|
1355
|
+
font-size: 13.5px;
|
|
1356
|
+
font-weight: 600;
|
|
1357
|
+
color: #8088ac;
|
|
1358
|
+
}
|
|
1359
|
+
.ticket-empty-hint {
|
|
1360
|
+
font-size: 12px;
|
|
1361
|
+
color: #565f89;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
/* ── ticket card ── */
|
|
1365
|
+
.ticket-card {
|
|
1366
|
+
display: flex;
|
|
1367
|
+
align-items: stretch;
|
|
1368
|
+
gap: 10px;
|
|
1369
|
+
background: #15161f;
|
|
1370
|
+
border: 1px solid #262a3f;
|
|
1371
|
+
border-radius: 10px;
|
|
1372
|
+
padding: 10px 11px 10px 0;
|
|
1373
|
+
cursor: pointer;
|
|
1374
|
+
text-align: left;
|
|
1375
|
+
font-family: inherit;
|
|
1376
|
+
overflow: hidden;
|
|
1377
|
+
transition: border-color 0.13s ease, background 0.13s ease, transform 0.06s ease;
|
|
1378
|
+
}
|
|
1379
|
+
.ticket-card:hover {
|
|
1380
|
+
border-color: #3d425f;
|
|
1381
|
+
background: #181a26;
|
|
1382
|
+
}
|
|
1383
|
+
.ticket-card:active {
|
|
1384
|
+
transform: scale(0.99);
|
|
1385
|
+
}
|
|
1386
|
+
.ticket-card-bar {
|
|
1387
|
+
width: 3px;
|
|
1388
|
+
border-radius: 3px;
|
|
1389
|
+
flex-shrink: 0;
|
|
1390
|
+
align-self: stretch;
|
|
1391
|
+
}
|
|
1392
|
+
.ticket-card-main {
|
|
1393
|
+
flex: 1;
|
|
1394
|
+
min-width: 0;
|
|
1395
|
+
display: flex;
|
|
1396
|
+
flex-direction: column;
|
|
1397
|
+
gap: 5px;
|
|
1398
|
+
}
|
|
1399
|
+
.ticket-card-title {
|
|
1400
|
+
font-size: 13px;
|
|
1401
|
+
font-weight: 550;
|
|
1402
|
+
color: #d5dbf5;
|
|
1403
|
+
white-space: nowrap;
|
|
1404
|
+
overflow: hidden;
|
|
1405
|
+
text-overflow: ellipsis;
|
|
1406
|
+
}
|
|
1407
|
+
.ticket-card-meta {
|
|
1408
|
+
display: flex;
|
|
1409
|
+
align-items: center;
|
|
1410
|
+
gap: 10px;
|
|
1411
|
+
}
|
|
1412
|
+
.ticket-card-status {
|
|
1413
|
+
display: inline-flex;
|
|
1414
|
+
align-items: center;
|
|
1415
|
+
gap: 5px;
|
|
1416
|
+
font-size: 11px;
|
|
1417
|
+
font-weight: 600;
|
|
1418
|
+
}
|
|
1419
|
+
.ticket-card-date {
|
|
1420
|
+
font-size: 11px;
|
|
1421
|
+
color: #565f89;
|
|
1422
|
+
}
|
|
1423
|
+
.ticket-card-pri {
|
|
1424
|
+
align-self: center;
|
|
1425
|
+
font-size: 10px;
|
|
1426
|
+
font-weight: 700;
|
|
1427
|
+
letter-spacing: 0.04em;
|
|
1428
|
+
text-transform: uppercase;
|
|
1429
|
+
border: 1px solid;
|
|
1430
|
+
border-radius: 999px;
|
|
1431
|
+
padding: 2px 8px;
|
|
1432
|
+
flex-shrink: 0;
|
|
1433
|
+
}
|