opencode-windows-scheduler 1.4.0 → 1.5.1
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/CHANGELOG.md +61 -1
- package/LICENSE +21 -21
- package/README.md +26 -4
- package/ROADMAP-STRATEGY.md +43 -24
- package/ROADMAP.md +549 -31
- package/dist/core/dry-run.d.ts +41 -0
- package/dist/core/dry-run.d.ts.map +1 -1
- package/dist/core/dry-run.js +165 -16
- package/dist/core/file-watcher.d.ts.map +1 -1
- package/dist/core/file-watcher.js +53 -10
- package/dist/core/git-trigger.d.ts +80 -0
- package/dist/core/git-trigger.d.ts.map +1 -0
- package/dist/core/git-trigger.js +294 -0
- package/dist/core/glob.d.ts +38 -0
- package/dist/core/glob.d.ts.map +1 -0
- package/dist/core/glob.js +233 -0
- package/dist/core/matrix.d.ts.map +1 -1
- package/dist/core/matrix.js +48 -22
- package/dist/core/ps-wrapper.d.ts.map +1 -1
- package/dist/core/ps-wrapper.js +7 -0
- package/dist/core/schedule-gate.js +55 -30
- package/dist/core/schedule-v2.d.ts +29 -1
- package/dist/core/schedule-v2.d.ts.map +1 -1
- package/dist/core/schedule-v2.js +107 -17
- package/dist/core/scheduler/types.d.ts +7 -1
- package/dist/core/scheduler/types.d.ts.map +1 -1
- package/dist/core/scheduler/windows.d.ts +6 -2
- package/dist/core/scheduler/windows.d.ts.map +1 -1
- package/dist/core/scheduler/windows.js +25 -10
- package/dist/core/telegram.d.ts.map +1 -1
- package/dist/core/telegram.js +13 -10
- package/dist/core/wrappers/bash.d.ts.map +1 -1
- package/dist/core/wrappers/bash.js +4 -0
- package/dist/db/git-state-repo.d.ts +16 -0
- package/dist/db/git-state-repo.d.ts.map +1 -0
- package/dist/db/git-state-repo.js +38 -0
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +8 -0
- package/dist/i18n.d.ts +52 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +292 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1020 -197
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +74 -40
- package/dist/rpc.d.ts +238 -2
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +79 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +89 -48
- package/dist/settings.d.ts +3 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +20 -8
- package/dist/task-transfer.d.ts +43 -3
- package/dist/task-transfer.d.ts.map +1 -1
- package/dist/task-transfer.js +94 -6
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +32 -0
- package/docs/ARCHITECTURE.md +37 -1
- package/docs/FEATURES.md +70 -0
- package/docs/README.ru.md +19 -3
- package/gui-experimental.cjs +9 -4
- package/locales/en.json +695 -0
- package/locales/ru.json +695 -0
- package/package.json +9 -3
- package/scripts/test-locale.mjs +44 -0
- package/src/core/dry-run.ts +244 -19
- package/src/core/file-watcher.ts +65 -10
- package/src/core/git-trigger.ts +373 -0
- package/src/core/glob.ts +226 -0
- package/src/core/matrix.ts +52 -26
- package/src/core/ps-wrapper.ts +7 -0
- package/src/core/schedule-gate.ts +67 -33
- package/src/core/schedule-v2.ts +152 -17
- package/src/core/scheduler/types.ts +7 -1
- package/src/core/scheduler/windows.ts +25 -10
- package/src/core/telegram.ts +16 -10
- package/src/core/wrappers/bash.ts +4 -0
- package/src/db/git-state-repo.ts +62 -0
- package/src/db/schema.ts +8 -0
- package/src/gui.tsx +772 -456
- package/src/i18n.ts +339 -0
- package/src/index.ts +1274 -212
- package/src/notifications.ts +83 -42
- package/src/rpc.ts +79 -2
- package/src/server.ts +89 -48
- package/src/settings.ts +38 -10
- package/src/task-transfer.ts +148 -5
- package/src/templates.ts +1 -1
- package/src/types.ts +37 -0
package/src/gui.tsx
CHANGED
|
@@ -2,6 +2,29 @@ import { createSignal, onCleanup, ErrorBoundary } from "solid-js"
|
|
|
2
2
|
import { Panel, Plugin } from "@opencode/plugin/gui"
|
|
3
3
|
import { SchedulerRpc } from "./rpc.js"
|
|
4
4
|
import { loadHistory, loadMetrics, type HistoryRecord } from "./history.js"
|
|
5
|
+
import { registerCatalog, setLocale, t, type TranslateParams, type Locale } from "./i18n.js"
|
|
6
|
+
// Каталоги встраиваются в бандл на этапе сборки: в webview OpenCode нет
|
|
7
|
+
// доступа к файлам пакета, поэтому ленивый fs-загрузчик из i18n.ts не работает.
|
|
8
|
+
import ruCatalog from "../locales/ru.json"
|
|
9
|
+
import enCatalog from "../locales/en.json"
|
|
10
|
+
|
|
11
|
+
registerCatalog("ru", ruCatalog)
|
|
12
|
+
registerCatalog("en", enCatalog)
|
|
13
|
+
|
|
14
|
+
/** Счётчик смены локали: чтение в JSX-геттерах делает строки реактивными. */
|
|
15
|
+
const [localeTick, setLocaleTick] = createSignal(0)
|
|
16
|
+
|
|
17
|
+
/** gt — t() + подписка на смену локали для Solid. */
|
|
18
|
+
const gt = (key: string, params?: TranslateParams): string => {
|
|
19
|
+
localeTick()
|
|
20
|
+
return t(key, params)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Переключает язык интерфейса без перезапуска панели. */
|
|
24
|
+
const applyLocale = (locale: unknown): void => {
|
|
25
|
+
setLocale(locale as Locale)
|
|
26
|
+
setLocaleTick((v) => v + 1)
|
|
27
|
+
}
|
|
5
28
|
|
|
6
29
|
/** Статус задачи для отображения в GUI. */
|
|
7
30
|
type JobStatus = "running" | "success" | "error" | "partial" | "idle" | "unknown"
|
|
@@ -103,7 +126,7 @@ interface Job {
|
|
|
103
126
|
beforeScript?: string
|
|
104
127
|
/** Post-flight команда (undefined — не задана). */
|
|
105
128
|
afterScript?: string
|
|
106
|
-
triggerType?: "cron" | "file" | "mcp-event" | "once"
|
|
129
|
+
triggerType?: "cron" | "file" | "git" | "mcp-event" | "once"
|
|
107
130
|
/** Для triggerType "once" — время одного запуска (ISO-8601). */
|
|
108
131
|
runAt?: string | null
|
|
109
132
|
/** OpenCode-сессия: new — каждый запуск новая, reuse — переиспользовать, last — --continue. */
|
|
@@ -142,8 +165,28 @@ interface Job {
|
|
|
142
165
|
notBefore?: string | null
|
|
143
166
|
/** Окно запуска: конец "HH:MM" (может быть меньше notBefore). */
|
|
144
167
|
notAfter?: string | null
|
|
168
|
+
/** Разрешённые дни недели 0=Вс..6=Сб (null — все дни). */
|
|
169
|
+
activeDays?: number[] | null
|
|
170
|
+
/** Поведение вне окна: skip / postpone / run (null — postpone). */
|
|
171
|
+
windowPolicy?: "skip" | "postpone" | "run" | null
|
|
172
|
+
/** Glob-маски файлового триггера (null — любое изменение). */
|
|
173
|
+
watchGlobs?: string[] | null
|
|
174
|
+
/** Glob-маски игнорируемых файлов файлового триггера. */
|
|
175
|
+
watchIgnore?: string[] | null
|
|
176
|
+
/** Git-триггер: фильтр по ветке (glob, через запятую). */
|
|
177
|
+
gitBranch?: string | null
|
|
178
|
+
/** Git-триггер: маски изменённых файлов, запускающих задачу. */
|
|
179
|
+
gitPaths?: string[] | null
|
|
180
|
+
/** Git-триггер: маски игнорируемых изменённых файлов. */
|
|
181
|
+
gitIgnore?: string[] | null
|
|
182
|
+
/** Git-триггер: период опроса, секунды. */
|
|
183
|
+
gitPollSeconds?: number | null
|
|
145
184
|
/** Пауза до даты (ISO) — задача включится автоматически. */
|
|
146
185
|
pausedUntil?: string | null
|
|
186
|
+
/** Windows: задача запускается и без входа пользователя (/ru SYSTEM). */
|
|
187
|
+
runWhenLoggedOff?: boolean | null
|
|
188
|
+
/** Windows: фактический режим входа из планировщика (Interactive/Background). */
|
|
189
|
+
logonMode?: string | null
|
|
147
190
|
}
|
|
148
191
|
|
|
149
192
|
/** Пользовательский шаблон, сохранённый в templates.json. */
|
|
@@ -161,9 +204,17 @@ interface CustomTemplate {
|
|
|
161
204
|
beforeScript?: string
|
|
162
205
|
afterScript?: string
|
|
163
206
|
dependsOn?: string[]
|
|
164
|
-
triggerType?: "cron" | "file" | "mcp-event"
|
|
207
|
+
triggerType?: "cron" | "file" | "git" | "mcp-event"
|
|
165
208
|
mcpEvent?: { server: string; event: string; filter?: string }
|
|
166
209
|
watchPath?: string
|
|
210
|
+
watchGlobs?: string[]
|
|
211
|
+
watchIgnore?: string[]
|
|
212
|
+
gitBranch?: string
|
|
213
|
+
gitPaths?: string[]
|
|
214
|
+
gitIgnore?: string[]
|
|
215
|
+
gitPollSeconds?: number
|
|
216
|
+
activeDays?: number[]
|
|
217
|
+
windowPolicy?: "skip" | "postpone" | "run"
|
|
167
218
|
workingDirectory?: string
|
|
168
219
|
workspaceId?: string
|
|
169
220
|
allowedTools?: string[]
|
|
@@ -208,24 +259,27 @@ function statusColor(status: JobStatus): string {
|
|
|
208
259
|
/** Приоритет по умолчанию — «Обычный». */
|
|
209
260
|
const DEFAULT_PRIORITY = 5
|
|
210
261
|
|
|
262
|
+
/** Внутренний маркер dry-run локальной формы — не переводится. */
|
|
263
|
+
const DRYRUN_FORM_MARKER = "form"
|
|
264
|
+
|
|
211
265
|
/** Человекочитаемая подпись приоритета (0..10). */
|
|
212
266
|
function priorityLabel(priority?: number): string {
|
|
213
267
|
const value =
|
|
214
268
|
typeof priority === "number" && Number.isFinite(priority)
|
|
215
269
|
? Math.min(10, Math.max(0, Math.floor(priority)))
|
|
216
270
|
: DEFAULT_PRIORITY
|
|
217
|
-
if (value >= 10) return "
|
|
218
|
-
if (value >= 8) return "
|
|
219
|
-
if (value <= 3) return "
|
|
220
|
-
return "
|
|
271
|
+
if (value >= 10) return gt("gui.priority.critical")
|
|
272
|
+
if (value >= 8) return gt("gui.priority.high")
|
|
273
|
+
if (value <= 3) return gt("gui.priority.low")
|
|
274
|
+
return gt("gui.priority.normal")
|
|
221
275
|
}
|
|
222
276
|
|
|
223
277
|
/** Варианты выпадающего списка «Приоритет». */
|
|
224
|
-
const
|
|
225
|
-
{ value: 2, label: "
|
|
226
|
-
{ value: 5, label: "
|
|
227
|
-
{ value: 8, label: "
|
|
228
|
-
{ value: 10, label: "
|
|
278
|
+
const priorityOptions = (): Array<{ value: number; label: string }> => [
|
|
279
|
+
{ value: 2, label: gt("gui.priority.low") },
|
|
280
|
+
{ value: 5, label: gt("gui.priority.normal") },
|
|
281
|
+
{ value: 8, label: gt("gui.priority.high") },
|
|
282
|
+
{ value: 10, label: gt("gui.priority.critical") },
|
|
229
283
|
]
|
|
230
284
|
|
|
231
285
|
/** Безопасно извлекает текст ошибки из любого thrown value. */
|
|
@@ -246,13 +300,26 @@ function shortError(msg: string, limit = 150): string {
|
|
|
246
300
|
return firstLine.length > limit ? firstLine.slice(0, limit - 1).trimEnd() + "…" : firstLine
|
|
247
301
|
}
|
|
248
302
|
|
|
303
|
+
/** Разбивает строку из textarea в список: по запятым и переводам строк. */
|
|
304
|
+
function splitListInput(raw: string): string[] {
|
|
305
|
+
return (raw || "")
|
|
306
|
+
.split(/[\r\n,]+/)
|
|
307
|
+
.map((item) => item.trim())
|
|
308
|
+
.filter(Boolean)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Обратное преобразование списка масок в строку для textarea. */
|
|
312
|
+
function joinListInput(list?: string[] | null): string {
|
|
313
|
+
return Array.isArray(list) ? list.join("\n") : ""
|
|
314
|
+
}
|
|
315
|
+
|
|
249
316
|
/** Пресеты cron-расписаний */
|
|
250
|
-
const
|
|
251
|
-
{ label: "
|
|
252
|
-
{ label: "
|
|
253
|
-
{ label: "
|
|
254
|
-
{ label: "
|
|
255
|
-
{ label: "
|
|
317
|
+
const cronPresets = (): Array<{ label: string; value: string }> => [
|
|
318
|
+
{ label: gt("gui.cron.everyMinute"), value: "* * * * *" },
|
|
319
|
+
{ label: gt("gui.cron.everyHour"), value: "0 * * * *" },
|
|
320
|
+
{ label: gt("gui.cron.dailyAt9"), value: "0 9 * * *" },
|
|
321
|
+
{ label: gt("gui.cron.mondayAt10"), value: "0 10 * * 1" },
|
|
322
|
+
{ label: gt("gui.cron.custom"), value: "__custom__" },
|
|
256
323
|
]
|
|
257
324
|
|
|
258
325
|
export default Plugin.define({
|
|
@@ -272,7 +339,7 @@ export default Plugin.define({
|
|
|
272
339
|
const [profilesOpen, setProfilesOpen] = createSignal(false)
|
|
273
340
|
const [profileBusy, setProfileBusy] = createSignal(false)
|
|
274
341
|
// Собственный текстовый prompt: в Electron/WebView window.prompt не работает
|
|
275
|
-
// (возвращает null), из-за чего
|
|
342
|
+
// (возвращает null), из-за чего «{gt("gui.createProfile")}» в профилях молча ничего не делал.
|
|
276
343
|
const [promptOpen, setPromptOpen] = createSignal(false)
|
|
277
344
|
const [promptTitle, setPromptTitle] = createSignal("")
|
|
278
345
|
const [promptValue, setPromptValue] = createSignal("")
|
|
@@ -307,22 +374,22 @@ export default Plugin.define({
|
|
|
307
374
|
const [history, setHistory] = createSignal<HistoryRecord[]>([])
|
|
308
375
|
|
|
309
376
|
// Шаблоны промптов
|
|
310
|
-
const
|
|
311
|
-
{ label: "
|
|
377
|
+
const promptTemplates = (): Array<{ label: string; value: string; prompt: string }> => [
|
|
378
|
+
{ label: gt("gui.promptTemplates.custom"), value: "custom", prompt: "" },
|
|
312
379
|
{
|
|
313
|
-
label: "
|
|
380
|
+
label: gt("gui.promptTemplates.nightWatch"),
|
|
314
381
|
value: "night-watch",
|
|
315
|
-
prompt: "
|
|
382
|
+
prompt: gt("gui.promptTemplates.nightWatchPrompt"),
|
|
316
383
|
},
|
|
317
384
|
{
|
|
318
|
-
label: "
|
|
385
|
+
label: gt("gui.promptTemplates.morningDigest"),
|
|
319
386
|
value: "morning-digest",
|
|
320
|
-
prompt: "
|
|
387
|
+
prompt: gt("gui.promptTemplates.morningDigestPrompt"),
|
|
321
388
|
},
|
|
322
389
|
{
|
|
323
|
-
label: "
|
|
390
|
+
label: gt("gui.promptTemplates.codeHygiene"),
|
|
324
391
|
value: "code-hygiene",
|
|
325
|
-
prompt: "
|
|
392
|
+
prompt: gt("gui.promptTemplates.codeHygienePrompt"),
|
|
326
393
|
},
|
|
327
394
|
]
|
|
328
395
|
const [template, setTemplate] = createSignal<string>("custom")
|
|
@@ -413,12 +480,15 @@ export default Plugin.define({
|
|
|
413
480
|
|
|
414
481
|
// Название планировщика приходит с бэкенда: на Windows — «Планировщик Windows»,
|
|
415
482
|
// на macOS/Linux — «OpenCode Scheduler». GUI не зависит от ОС напрямую.
|
|
416
|
-
const [schedulerTitle, setSchedulerTitle] = createSignal("
|
|
483
|
+
const [schedulerTitle, setSchedulerTitle] = createSignal(gt("gui.app.title"))
|
|
484
|
+
// Платформа нужна форме: режим входа есть только у Планировщика Windows.
|
|
485
|
+
const [schedulerPlatform, setSchedulerPlatform] = createSignal<NodeJS.Platform | "">("")
|
|
417
486
|
|
|
418
487
|
async function loadPlatformGui() {
|
|
419
488
|
try {
|
|
420
489
|
const info = await rpc.get_platform({})
|
|
421
490
|
if (info?.title) setSchedulerTitle(info.title)
|
|
491
|
+
if (info?.platform) setSchedulerPlatform(info.platform)
|
|
422
492
|
} catch (err: any) {
|
|
423
493
|
console.error("RPC Error (get_platform):", err)
|
|
424
494
|
}
|
|
@@ -479,6 +549,7 @@ export default Plugin.define({
|
|
|
479
549
|
setAuditRetentionEnabled(Boolean(au?.enabled !== false))
|
|
480
550
|
setAuditRetentionDays(Number(au?.retentionDays ?? 90))
|
|
481
551
|
setAuditMaxRecords(Number(au?.maxRecords ?? 10000))
|
|
552
|
+
applyLocale((s as { locale?: string }).locale)
|
|
482
553
|
} catch (err: any) {
|
|
483
554
|
console.error("RPC Error (get_settings):", err)
|
|
484
555
|
}
|
|
@@ -590,9 +661,10 @@ export default Plugin.define({
|
|
|
590
661
|
setAuditRetentionDays(Number(au?.retentionDays ?? 90))
|
|
591
662
|
setAuditMaxRecords(Number(au?.maxRecords ?? 10000))
|
|
592
663
|
}
|
|
664
|
+
applyLocale((s as { locale?: string }).locale)
|
|
593
665
|
} catch (err: any) {
|
|
594
666
|
console.error("RPC Error (save_settings):", err)
|
|
595
|
-
ctx.toast.show({ title: "
|
|
667
|
+
ctx.toast.show({ title: gt("gui.toast.settingsSaveFailed"), variant: "error", description: errorMessage(err) })
|
|
596
668
|
}
|
|
597
669
|
}
|
|
598
670
|
|
|
@@ -620,15 +692,16 @@ export default Plugin.define({
|
|
|
620
692
|
setHistoryMaxRecords(Number(h?.maxRecords ?? 5000))
|
|
621
693
|
setHistoryLastCleanupAt(h?.lastCleanupAt ?? null)
|
|
622
694
|
setHistoryLastCleanupDeleted(Number(h?.lastCleanupDeleted ?? 0))
|
|
695
|
+
applyLocale((s as { locale?: string }).locale)
|
|
623
696
|
ctx.toast.show({
|
|
624
|
-
title: result.success ? "
|
|
697
|
+
title: result.success ? gt("gui.toast.historyCleanupDone") : gt("gui.toast.historyCleanupFailed"),
|
|
625
698
|
variant: result.success ? "success" : "error",
|
|
626
699
|
description: result.message,
|
|
627
700
|
})
|
|
628
701
|
} catch (err: any) {
|
|
629
702
|
console.error("RPC Error (cleanup_history):", err)
|
|
630
703
|
ctx.toast.show({
|
|
631
|
-
title: "
|
|
704
|
+
title: gt("gui.toast.historyCleanupFailed"),
|
|
632
705
|
variant: "error",
|
|
633
706
|
description: errorMessage(err),
|
|
634
707
|
})
|
|
@@ -661,14 +734,14 @@ export default Plugin.define({
|
|
|
661
734
|
if (result?.success) {
|
|
662
735
|
setSecretName("")
|
|
663
736
|
setSecretValue("")
|
|
664
|
-
ctx.toast.show({ title: "
|
|
737
|
+
ctx.toast.show({ title: gt("gui.toast.secretSaved"), variant: "success", description: result.message })
|
|
665
738
|
void loadSecretsGui()
|
|
666
739
|
} else {
|
|
667
|
-
ctx.toast.show({ title: "
|
|
740
|
+
ctx.toast.show({ title: gt("gui.toast.secretNotSaved"), variant: "error", description: result?.message ?? "" })
|
|
668
741
|
}
|
|
669
742
|
} catch (err: any) {
|
|
670
743
|
console.error("RPC Error (save_secret):", err)
|
|
671
|
-
ctx.toast.show({ title: "
|
|
744
|
+
ctx.toast.show({ title: gt("gui.toast.secretNotSaved"), variant: "error", description: errorMessage(err) })
|
|
672
745
|
} finally {
|
|
673
746
|
setSecretsBusy(false)
|
|
674
747
|
}
|
|
@@ -680,14 +753,14 @@ export default Plugin.define({
|
|
|
680
753
|
try {
|
|
681
754
|
const result = await rpc.delete_secret({ name })
|
|
682
755
|
if (result?.success) {
|
|
683
|
-
ctx.toast.show({ title: "
|
|
756
|
+
ctx.toast.show({ title: gt("gui.toast.secretDeleted"), variant: "success", description: result?.message ?? "" })
|
|
684
757
|
void loadSecretsGui()
|
|
685
758
|
} else {
|
|
686
|
-
ctx.toast.show({ title: "
|
|
759
|
+
ctx.toast.show({ title: gt("gui.toast.secretNotDeleted"), variant: "error", description: result?.message ?? "" })
|
|
687
760
|
}
|
|
688
761
|
} catch (err: any) {
|
|
689
762
|
console.error("RPC Error (delete_secret):", err)
|
|
690
|
-
ctx.toast.show({ title: "
|
|
763
|
+
ctx.toast.show({ title: gt("gui.toast.secretNotDeleted"), variant: "error", description: errorMessage(err) })
|
|
691
764
|
} finally {
|
|
692
765
|
setSecretsBusy(false)
|
|
693
766
|
}
|
|
@@ -726,14 +799,14 @@ export default Plugin.define({
|
|
|
726
799
|
await saveNotificationSettings()
|
|
727
800
|
const result = await rpc.test_notification({})
|
|
728
801
|
ctx.toast.show({
|
|
729
|
-
title: result.success ? "
|
|
802
|
+
title: result.success ? gt("gui.toast.testSent") : gt("gui.toast.testFailed"),
|
|
730
803
|
variant: result.success ? "success" : "error",
|
|
731
804
|
description: result.message,
|
|
732
805
|
})
|
|
733
806
|
} catch (err: any) {
|
|
734
807
|
console.error("RPC Error (test_notification):", err)
|
|
735
808
|
ctx.toast.show({
|
|
736
|
-
title: "
|
|
809
|
+
title: gt("gui.toast.testFailed"),
|
|
737
810
|
variant: "error",
|
|
738
811
|
description: errorMessage(err),
|
|
739
812
|
})
|
|
@@ -750,14 +823,14 @@ export default Plugin.define({
|
|
|
750
823
|
await saveNotificationSettings()
|
|
751
824
|
const result = await rpc.send_digest({})
|
|
752
825
|
ctx.toast.show({
|
|
753
|
-
title: result.success ? "
|
|
826
|
+
title: result.success ? gt("gui.toast.digestSent") : gt("gui.toast.digestFailed"),
|
|
754
827
|
variant: result.success ? "success" : "error",
|
|
755
828
|
description: result.message,
|
|
756
829
|
})
|
|
757
830
|
} catch (err: any) {
|
|
758
831
|
console.error("RPC Error (send_digest):", err)
|
|
759
832
|
ctx.toast.show({
|
|
760
|
-
title: "
|
|
833
|
+
title: gt("gui.toast.digestFailed"),
|
|
761
834
|
variant: "error",
|
|
762
835
|
description: errorMessage(err),
|
|
763
836
|
})
|
|
@@ -805,8 +878,8 @@ export default Plugin.define({
|
|
|
805
878
|
const [beforeScript, setBeforeScript] = createSignal("")
|
|
806
879
|
const [afterScript, setAfterScript] = createSignal("")
|
|
807
880
|
|
|
808
|
-
// Триггеры (cron / file / mcp-event / once) и рабочая директория
|
|
809
|
-
const [triggerType, setTriggerType] = createSignal<"cron" | "file" | "mcp-event" | "once">("cron")
|
|
881
|
+
// Триггеры (cron / file / git / mcp-event / once) и рабочая директория
|
|
882
|
+
const [triggerType, setTriggerType] = createSignal<"cron" | "file" | "git" | "mcp-event" | "once">("cron")
|
|
810
883
|
const [watchPath, setWatchPath] = createSignal("")
|
|
811
884
|
// Разовое время: ISO-8601 или задержка в секундах от нажатия "Запланировать".
|
|
812
885
|
const [runAt, setRunAt] = createSignal("")
|
|
@@ -814,10 +887,22 @@ export default Plugin.define({
|
|
|
814
887
|
// Сессия OpenCode (Спринт 24): new / reuse (сохраняем sessionId на задаче) / last (--continue).
|
|
815
888
|
const [session, setSession] = createSignal<"new" | "reuse" | "last">("new")
|
|
816
889
|
const [sessionMaxRuns, setSessionMaxRuns] = createSignal("")
|
|
890
|
+
// Спринт 27.5.9: режим входа (Windows). false — только при активном входе,
|
|
891
|
+
// true — задача работает и без входа (/ru SYSTEM, session 0).
|
|
892
|
+
const [runWhenLoggedOff, setRunWhenLoggedOff] = createSignal(false)
|
|
817
893
|
// Часовой пояс и окно запуска (Спринт 19). Пусто = системный пояс / без окна.
|
|
818
894
|
const [timezone, setTimezone] = createSignal("")
|
|
819
895
|
const [notBefore, setNotBefore] = createSignal("")
|
|
820
896
|
const [notAfter, setNotAfter] = createSignal("")
|
|
897
|
+
// Спринт 27: дни недели, политика вне окна, glob- и git-фильтры.
|
|
898
|
+
const [activeDays, setActiveDays] = createSignal<number[]>([])
|
|
899
|
+
const [windowPolicy, setWindowPolicy] = createSignal<"skip" | "postpone" | "run">("postpone")
|
|
900
|
+
const [watchGlobs, setWatchGlobs] = createSignal("")
|
|
901
|
+
const [watchIgnore, setWatchIgnore] = createSignal("")
|
|
902
|
+
const [gitBranch, setGitBranch] = createSignal("")
|
|
903
|
+
const [gitPaths, setGitPaths] = createSignal("")
|
|
904
|
+
const [gitIgnore, setGitIgnore] = createSignal("")
|
|
905
|
+
const [gitPollSeconds, setGitPollSeconds] = createSignal("")
|
|
821
906
|
const [mcpServer, setMcpServer] = createSignal("")
|
|
822
907
|
const [mcpEventName, setMcpEventName] = createSignal("")
|
|
823
908
|
const [mcpFilter, setMcpFilter] = createSignal("")
|
|
@@ -932,6 +1017,24 @@ export default Plugin.define({
|
|
|
932
1017
|
}
|
|
933
1018
|
}
|
|
934
1019
|
|
|
1020
|
+
/** Спринт 27: дни недели, политика окна и glob/git-фильтры для payload. */
|
|
1021
|
+
const triggerExtrasPayload = () => {
|
|
1022
|
+
const pollRaw = gitPollSeconds().trim()
|
|
1023
|
+
const poll = pollRaw ? Number(pollRaw) : undefined
|
|
1024
|
+
return {
|
|
1025
|
+
activeDays: activeDays().length > 0 ? activeDays() : undefined,
|
|
1026
|
+
windowPolicy: windowPolicy(),
|
|
1027
|
+
watchGlobs: splitListInput(watchGlobs()),
|
|
1028
|
+
watchIgnore: splitListInput(watchIgnore()),
|
|
1029
|
+
gitBranch: (gitBranch() || "").trim(),
|
|
1030
|
+
gitPaths: splitListInput(gitPaths()),
|
|
1031
|
+
gitIgnore: splitListInput(gitIgnore()),
|
|
1032
|
+
...(poll !== undefined && Number.isFinite(poll) && poll >= 5
|
|
1033
|
+
? { gitPollSeconds: Math.floor(poll) }
|
|
1034
|
+
: {}),
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
|
|
935
1038
|
/** Сбрасывает поля формы матрицы. */
|
|
936
1039
|
function resetMatrixForm() {
|
|
937
1040
|
setMatrixMode(false)
|
|
@@ -970,7 +1073,7 @@ export default Plugin.define({
|
|
|
970
1073
|
try {
|
|
971
1074
|
const result = await rpc.export_tasks({})
|
|
972
1075
|
if (!result.success) {
|
|
973
|
-
ctx.toast.show({ title: "
|
|
1076
|
+
ctx.toast.show({ title: gt("gui.toast.exportFailed"), variant: "error", description: result.error })
|
|
974
1077
|
return
|
|
975
1078
|
}
|
|
976
1079
|
setExportData(result.data)
|
|
@@ -983,10 +1086,10 @@ export default Plugin.define({
|
|
|
983
1086
|
a.click()
|
|
984
1087
|
document.body.removeChild(a)
|
|
985
1088
|
URL.revokeObjectURL(url)
|
|
986
|
-
ctx.toast.show({ title:
|
|
1089
|
+
ctx.toast.show({ title: gt("gui.toast.exported", { count: result.count }), variant: "success" })
|
|
987
1090
|
} catch (err: any) {
|
|
988
1091
|
console.error("RPC Error (export_tasks):", err)
|
|
989
|
-
ctx.toast.show({ title: "
|
|
1092
|
+
ctx.toast.show({ title: gt("gui.toast.exportFailed"), variant: "error", description: errorMessage(err) })
|
|
990
1093
|
} finally {
|
|
991
1094
|
setExportBusy(false)
|
|
992
1095
|
}
|
|
@@ -1001,7 +1104,7 @@ export default Plugin.define({
|
|
|
1001
1104
|
async function handleImport() {
|
|
1002
1105
|
const file = importFile()
|
|
1003
1106
|
if (!file) {
|
|
1004
|
-
ctx.toast.show({ title: "
|
|
1107
|
+
ctx.toast.show({ title: gt("gui.toast.chooseFile"), variant: "error", description: gt("gui.toast.noFileForImport") })
|
|
1005
1108
|
return
|
|
1006
1109
|
}
|
|
1007
1110
|
setImportBusy(true)
|
|
@@ -1009,15 +1112,15 @@ export default Plugin.define({
|
|
|
1009
1112
|
const text = await file.text()
|
|
1010
1113
|
const result = await rpc.import_tasks({ data: text })
|
|
1011
1114
|
if (!result.success) {
|
|
1012
|
-
ctx.toast.show({ title: "
|
|
1115
|
+
ctx.toast.show({ title: gt("gui.toast.importFailed"), variant: "error", description: result.error })
|
|
1013
1116
|
return
|
|
1014
1117
|
}
|
|
1015
1118
|
setImportFile(null)
|
|
1016
|
-
ctx.toast.show({ title:
|
|
1119
|
+
ctx.toast.show({ title: gt("gui.toast.imported", { count: result.imported }), variant: "success" })
|
|
1017
1120
|
await loadJobs()
|
|
1018
1121
|
} catch (err: any) {
|
|
1019
1122
|
console.error("RPC Error (import_tasks):", err)
|
|
1020
|
-
ctx.toast.show({ title: "
|
|
1123
|
+
ctx.toast.show({ title: gt("gui.toast.importFailed"), variant: "error", description: errorMessage(err) })
|
|
1021
1124
|
} finally {
|
|
1022
1125
|
setImportBusy(false)
|
|
1023
1126
|
}
|
|
@@ -1066,35 +1169,35 @@ export default Plugin.define({
|
|
|
1066
1169
|
try {
|
|
1067
1170
|
const result = await rpc.set_profile({ name })
|
|
1068
1171
|
if (!result.success) {
|
|
1069
|
-
ctx.toast.show({ title: "
|
|
1172
|
+
ctx.toast.show({ title: gt("gui.toast.profileSwitchFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
|
|
1070
1173
|
return
|
|
1071
1174
|
}
|
|
1072
1175
|
setProfileCurrent(result.current ?? name)
|
|
1073
|
-
ctx.toast.show({ title: "
|
|
1176
|
+
ctx.toast.show({ title: gt("gui.toast.profileSwitched"), variant: "success", description: result.message })
|
|
1074
1177
|
await loadProfilesGui()
|
|
1075
1178
|
} catch (err: any) {
|
|
1076
1179
|
console.error("RPC Error (set_profile):", err)
|
|
1077
|
-
ctx.toast.show({ title: "
|
|
1180
|
+
ctx.toast.show({ title: gt("gui.toast.profileSwitchError"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1078
1181
|
} finally {
|
|
1079
1182
|
setProfileBusy(false)
|
|
1080
1183
|
}
|
|
1081
1184
|
}
|
|
1082
1185
|
|
|
1083
1186
|
async function handleCreateProfile() {
|
|
1084
|
-
const name = ((await askText("
|
|
1187
|
+
const name = ((await askText(gt("gui.profile.namePrompt"), "")) ?? "").trim()
|
|
1085
1188
|
if (!name) return
|
|
1086
1189
|
setProfileBusy(true)
|
|
1087
1190
|
try {
|
|
1088
1191
|
const result = await rpc.create_profile({ name })
|
|
1089
1192
|
if (!result.success) {
|
|
1090
|
-
ctx.toast.show({ title: "
|
|
1193
|
+
ctx.toast.show({ title: gt("gui.toast.profileCreateFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
|
|
1091
1194
|
return
|
|
1092
1195
|
}
|
|
1093
1196
|
await loadProfilesGui()
|
|
1094
|
-
ctx.toast.show({ title: "
|
|
1197
|
+
ctx.toast.show({ title: gt("gui.toast.profileCreated"), variant: "success", description: result.message })
|
|
1095
1198
|
} catch (err: any) {
|
|
1096
1199
|
console.error("RPC Error (create_profile):", err)
|
|
1097
|
-
ctx.toast.show({ title: "
|
|
1200
|
+
ctx.toast.show({ title: gt("gui.toast.profileCreateError"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1098
1201
|
} finally {
|
|
1099
1202
|
setProfileBusy(false)
|
|
1100
1203
|
}
|
|
@@ -1102,19 +1205,19 @@ export default Plugin.define({
|
|
|
1102
1205
|
|
|
1103
1206
|
async function handleDeleteProfile(name: string) {
|
|
1104
1207
|
if (!name || name === "default") return
|
|
1105
|
-
if (!window.confirm(
|
|
1208
|
+
if (!window.confirm(gt("gui.profile.deleteConfirm", { name }))) return
|
|
1106
1209
|
setProfileBusy(true)
|
|
1107
1210
|
try {
|
|
1108
1211
|
const result = await rpc.delete_profile({ name })
|
|
1109
1212
|
if (!result.success) {
|
|
1110
|
-
ctx.toast.show({ title: "
|
|
1213
|
+
ctx.toast.show({ title: gt("gui.toast.profileDeleteFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
|
|
1111
1214
|
return
|
|
1112
1215
|
}
|
|
1113
1216
|
await loadProfilesGui()
|
|
1114
|
-
ctx.toast.show({ title: "
|
|
1217
|
+
ctx.toast.show({ title: gt("gui.toast.profileDeleted"), variant: "success" })
|
|
1115
1218
|
} catch (err: any) {
|
|
1116
1219
|
console.error("RPC Error (delete_profile):", err)
|
|
1117
|
-
ctx.toast.show({ title: "
|
|
1220
|
+
ctx.toast.show({ title: gt("gui.toast.profileDeleteError"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1118
1221
|
} finally {
|
|
1119
1222
|
setProfileBusy(false)
|
|
1120
1223
|
}
|
|
@@ -1145,17 +1248,17 @@ export default Plugin.define({
|
|
|
1145
1248
|
|
|
1146
1249
|
async function handleEditWorkspaceEnv(workspace: Workspace) {
|
|
1147
1250
|
const envText = await askText(
|
|
1148
|
-
"
|
|
1251
|
+
gt("gui.workspace.envPrompt"),
|
|
1149
1252
|
envToText(workspace.env)
|
|
1150
1253
|
)
|
|
1151
1254
|
if (envText === null) return
|
|
1152
1255
|
const env = parseEnvText(envText)
|
|
1153
1256
|
if (!env) {
|
|
1154
|
-
ctx.toast.show({ title: "
|
|
1257
|
+
ctx.toast.show({ title: gt("gui.toast.envInvalid"), variant: "error", description: gt("gui.workspace.envInvalidHelp") })
|
|
1155
1258
|
return
|
|
1156
1259
|
}
|
|
1157
1260
|
const envFile = await askText(
|
|
1158
|
-
"
|
|
1261
|
+
gt("gui.workspace.envFilePrompt"),
|
|
1159
1262
|
workspace.envFile ?? ""
|
|
1160
1263
|
)
|
|
1161
1264
|
if (envFile === null) return
|
|
@@ -1167,23 +1270,23 @@ export default Plugin.define({
|
|
|
1167
1270
|
envFile: envFile.trim() || null,
|
|
1168
1271
|
})
|
|
1169
1272
|
if (!result.success) {
|
|
1170
|
-
ctx.toast.show({ title: "
|
|
1273
|
+
ctx.toast.show({ title: gt("gui.toast.envSaveFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
|
|
1171
1274
|
return
|
|
1172
1275
|
}
|
|
1173
1276
|
await loadWorkspacesGui()
|
|
1174
|
-
ctx.toast.show({ title: "
|
|
1277
|
+
ctx.toast.show({ title: gt("gui.toast.envSaved"), variant: "success", description: gt("gui.workspace.envSecretsMasked") })
|
|
1175
1278
|
} catch (err: any) {
|
|
1176
1279
|
console.error("RPC Error (update_workspace env):", err)
|
|
1177
|
-
ctx.toast.show({ title: "
|
|
1280
|
+
ctx.toast.show({ title: gt("gui.toast.envSaveError"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1178
1281
|
} finally {
|
|
1179
1282
|
setWorkspaceBusy(false)
|
|
1180
1283
|
}
|
|
1181
1284
|
}
|
|
1182
1285
|
|
|
1183
1286
|
async function handleAddWorkspace() {
|
|
1184
|
-
const workspacePath = ((await askText("
|
|
1287
|
+
const workspacePath = ((await askText(gt("gui.workspace.pathPrompt"), "")) ?? "").trim()
|
|
1185
1288
|
if (!workspacePath) return
|
|
1186
|
-
const workspaceName = ((await askText("
|
|
1289
|
+
const workspaceName = ((await askText(gt("gui.workspace.namePrompt"), "")) ?? "").trim()
|
|
1187
1290
|
setWorkspaceBusy(true)
|
|
1188
1291
|
try {
|
|
1189
1292
|
const result = await rpc.add_workspace({
|
|
@@ -1191,24 +1294,24 @@ export default Plugin.define({
|
|
|
1191
1294
|
...(workspaceName ? { name: workspaceName } : {}),
|
|
1192
1295
|
})
|
|
1193
1296
|
if (!result.success) {
|
|
1194
|
-
ctx.toast.show({ title: "
|
|
1297
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceAddFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
|
|
1195
1298
|
return
|
|
1196
1299
|
}
|
|
1197
1300
|
await loadWorkspacesGui()
|
|
1198
1301
|
if (result.workspace?.id) setWorkspaceId(result.workspace.id)
|
|
1199
|
-
ctx.toast.show({ title: "
|
|
1302
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceAdded"), variant: "success" })
|
|
1200
1303
|
} catch (err: any) {
|
|
1201
1304
|
console.error("RPC Error (add_workspace):", err)
|
|
1202
|
-
ctx.toast.show({ title: "
|
|
1305
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceAddFailed"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1203
1306
|
} finally {
|
|
1204
1307
|
setWorkspaceBusy(false)
|
|
1205
1308
|
}
|
|
1206
1309
|
}
|
|
1207
1310
|
|
|
1208
1311
|
async function handleEditWorkspace(workspace: Workspace) {
|
|
1209
|
-
const nextPath = ((await askText("
|
|
1312
|
+
const nextPath = ((await askText(gt("gui.workspace.pathPromptShort"), workspace.path)) ?? "").trim()
|
|
1210
1313
|
if (!nextPath) return
|
|
1211
|
-
const nextName = ((await askText("
|
|
1314
|
+
const nextName = ((await askText(gt("gui.workspace.namePromptShort"), workspace.name)) ?? "").trim()
|
|
1212
1315
|
setWorkspaceBusy(true)
|
|
1213
1316
|
try {
|
|
1214
1317
|
const result = await rpc.update_workspace({
|
|
@@ -1217,36 +1320,36 @@ export default Plugin.define({
|
|
|
1217
1320
|
...(nextName ? { name: nextName } : {}),
|
|
1218
1321
|
})
|
|
1219
1322
|
if (!result.success) {
|
|
1220
|
-
ctx.toast.show({ title: "
|
|
1323
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceUpdateFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
|
|
1221
1324
|
return
|
|
1222
1325
|
}
|
|
1223
1326
|
await loadWorkspacesGui()
|
|
1224
|
-
ctx.toast.show({ title: "
|
|
1327
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceUpdated"), variant: "success" })
|
|
1225
1328
|
} catch (err: any) {
|
|
1226
1329
|
console.error("RPC Error (update_workspace):", err)
|
|
1227
|
-
ctx.toast.show({ title: "
|
|
1330
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceUpdateFailed"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1228
1331
|
} finally {
|
|
1229
1332
|
setWorkspaceBusy(false)
|
|
1230
1333
|
}
|
|
1231
1334
|
}
|
|
1232
1335
|
|
|
1233
1336
|
async function handleDeleteWorkspace(workspace: Workspace) {
|
|
1234
|
-
if (!window.confirm(
|
|
1337
|
+
if (!window.confirm(gt("gui.workspace.deleteConfirm", { name: workspace.name }))) return
|
|
1235
1338
|
setWorkspaceBusy(true)
|
|
1236
1339
|
try {
|
|
1237
1340
|
const result = await rpc.delete_workspace({ id: workspace.id })
|
|
1238
1341
|
if (!result.success) {
|
|
1239
|
-
ctx.toast.show({ title: "
|
|
1342
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceDeleteFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
|
|
1240
1343
|
return
|
|
1241
1344
|
}
|
|
1242
1345
|
if (workspaceId() === workspace.id) setWorkspaceId("")
|
|
1243
1346
|
if (workspaceFilter() === workspace.id) setWorkspaceFilter("all")
|
|
1244
1347
|
await loadWorkspacesGui()
|
|
1245
1348
|
await loadJobs()
|
|
1246
|
-
ctx.toast.show({ title: "
|
|
1349
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceDeleted"), variant: "success", description: result.message })
|
|
1247
1350
|
} catch (err: any) {
|
|
1248
1351
|
console.error("RPC Error (delete_workspace):", err)
|
|
1249
|
-
ctx.toast.show({ title: "
|
|
1352
|
+
ctx.toast.show({ title: gt("gui.toast.workspaceDeleteFailed"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1250
1353
|
} finally {
|
|
1251
1354
|
setWorkspaceBusy(false)
|
|
1252
1355
|
}
|
|
@@ -1267,7 +1370,7 @@ export default Plugin.define({
|
|
|
1267
1370
|
setPrompt(t.prompt ?? "")
|
|
1268
1371
|
if (t.schedule) {
|
|
1269
1372
|
setSchedule(t.schedule)
|
|
1270
|
-
const preset =
|
|
1373
|
+
const preset = cronPresets().find((p) => p.value === t.schedule)
|
|
1271
1374
|
setCronPreset((preset ? preset.value : "__custom__") as any)
|
|
1272
1375
|
}
|
|
1273
1376
|
setRetryCount(t.retryCount ?? 0)
|
|
@@ -1281,11 +1384,21 @@ export default Plugin.define({
|
|
|
1281
1384
|
setTriggerType(
|
|
1282
1385
|
t.triggerType === "file"
|
|
1283
1386
|
? "file"
|
|
1387
|
+
: t.triggerType === "git"
|
|
1388
|
+
? "git"
|
|
1284
1389
|
: t.triggerType === "mcp-event"
|
|
1285
1390
|
? "mcp-event"
|
|
1286
1391
|
: "cron"
|
|
1287
1392
|
)
|
|
1288
1393
|
setWatchPath(t.watchPath ?? "")
|
|
1394
|
+
setWatchGlobs(joinListInput(t.watchGlobs))
|
|
1395
|
+
setWatchIgnore(joinListInput(t.watchIgnore))
|
|
1396
|
+
setGitBranch(t.gitBranch ?? "")
|
|
1397
|
+
setGitPaths(joinListInput(t.gitPaths))
|
|
1398
|
+
setGitIgnore(joinListInput(t.gitIgnore))
|
|
1399
|
+
setGitPollSeconds(t.gitPollSeconds ? String(t.gitPollSeconds) : "")
|
|
1400
|
+
setActiveDays(Array.isArray(t.activeDays) ? t.activeDays : [])
|
|
1401
|
+
setWindowPolicy(t.windowPolicy ?? "postpone")
|
|
1289
1402
|
setTimezone(t.timezone ?? "")
|
|
1290
1403
|
setNotBefore(t.notBefore ?? "")
|
|
1291
1404
|
setNotAfter(t.notAfter ?? "")
|
|
@@ -1314,7 +1427,7 @@ export default Plugin.define({
|
|
|
1314
1427
|
return
|
|
1315
1428
|
}
|
|
1316
1429
|
|
|
1317
|
-
const builtin =
|
|
1430
|
+
const builtin = promptTemplates().find((t) => t.value === val)
|
|
1318
1431
|
if (builtin) setPrompt(builtin.prompt)
|
|
1319
1432
|
}
|
|
1320
1433
|
|
|
@@ -1322,14 +1435,14 @@ export default Plugin.define({
|
|
|
1322
1435
|
async function handleSaveAsTemplate() {
|
|
1323
1436
|
if (!(prompt() || "").trim()) {
|
|
1324
1437
|
ctx.toast.show({
|
|
1325
|
-
title: "
|
|
1438
|
+
title: gt("gui.toast.nothingToSave"),
|
|
1326
1439
|
variant: "error",
|
|
1327
|
-
description: "
|
|
1440
|
+
description: gt("gui.toast.promptRequired"),
|
|
1328
1441
|
})
|
|
1329
1442
|
return
|
|
1330
1443
|
}
|
|
1331
1444
|
|
|
1332
|
-
const templateName = ((await askText("
|
|
1445
|
+
const templateName = ((await askText(gt("gui.templates.namePrompt"), "")) ?? "").trim()
|
|
1333
1446
|
if (!templateName) return
|
|
1334
1447
|
|
|
1335
1448
|
try {
|
|
@@ -1359,6 +1472,7 @@ export default Plugin.define({
|
|
|
1359
1472
|
}
|
|
1360
1473
|
: undefined,
|
|
1361
1474
|
watchPath: (watchPath() || "").trim(),
|
|
1475
|
+
...triggerExtrasPayload(),
|
|
1362
1476
|
workingDirectory: (workingDirectory() || "").trim(),
|
|
1363
1477
|
workspaceId: (workspaceId() || "").trim() || undefined,
|
|
1364
1478
|
allowedTools: allowedTools().length > 0 ? allowedTools() : undefined,
|
|
@@ -1367,20 +1481,20 @@ export default Plugin.define({
|
|
|
1367
1481
|
})
|
|
1368
1482
|
if (!result.success) {
|
|
1369
1483
|
ctx.toast.show({
|
|
1370
|
-
title: "
|
|
1484
|
+
title: gt("gui.toast.templateSaveFailed"),
|
|
1371
1485
|
variant: "error",
|
|
1372
|
-
description: result.error || "
|
|
1486
|
+
description: result.error || gt("gui.common.unknownError"),
|
|
1373
1487
|
})
|
|
1374
1488
|
return
|
|
1375
1489
|
}
|
|
1376
1490
|
await loadTemplatesGui()
|
|
1377
1491
|
const saved = (result as any).template
|
|
1378
1492
|
if (saved?.id) setTemplate(`custom:${saved.id}`)
|
|
1379
|
-
ctx.toast.show({ title:
|
|
1493
|
+
ctx.toast.show({ title: gt("gui.toast.templateSaved", { name: templateName }), variant: "success" })
|
|
1380
1494
|
} catch (err: any) {
|
|
1381
1495
|
console.error("RPC Error (save_template):", err)
|
|
1382
1496
|
ctx.toast.show({
|
|
1383
|
-
title: "
|
|
1497
|
+
title: gt("gui.toast.templateSaveError"),
|
|
1384
1498
|
variant: "error",
|
|
1385
1499
|
description: errorMessage(err),
|
|
1386
1500
|
})
|
|
@@ -1389,24 +1503,24 @@ export default Plugin.define({
|
|
|
1389
1503
|
|
|
1390
1504
|
/** Удаляет пользовательский шаблон по id. */
|
|
1391
1505
|
async function handleDeleteTemplate(t: CustomTemplate) {
|
|
1392
|
-
if (!window.confirm(
|
|
1506
|
+
if (!window.confirm(gt("gui.templates.deleteConfirm", { name: t.name }))) return
|
|
1393
1507
|
try {
|
|
1394
1508
|
const result = await rpc.delete_template({ id: t.id })
|
|
1395
1509
|
if (!result.success) {
|
|
1396
1510
|
ctx.toast.show({
|
|
1397
|
-
title: "
|
|
1511
|
+
title: gt("gui.toast.templateDeleteFailed"),
|
|
1398
1512
|
variant: "error",
|
|
1399
|
-
description: result.error || "
|
|
1513
|
+
description: result.error || gt("gui.common.unknownError"),
|
|
1400
1514
|
})
|
|
1401
1515
|
return
|
|
1402
1516
|
}
|
|
1403
1517
|
if (template() === `custom:${t.id}`) setTemplate("custom")
|
|
1404
1518
|
await loadTemplatesGui()
|
|
1405
|
-
ctx.toast.show({ title:
|
|
1519
|
+
ctx.toast.show({ title: gt("gui.toast.templateDeleted", { name: t.name }), variant: "success" })
|
|
1406
1520
|
} catch (err: any) {
|
|
1407
1521
|
console.error("RPC Error (delete_template):", err)
|
|
1408
1522
|
ctx.toast.show({
|
|
1409
|
-
title: "
|
|
1523
|
+
title: gt("gui.toast.templateDeleteError"),
|
|
1410
1524
|
variant: "error",
|
|
1411
1525
|
description: errorMessage(err),
|
|
1412
1526
|
})
|
|
@@ -1467,7 +1581,7 @@ export default Plugin.define({
|
|
|
1467
1581
|
} catch (err: any) {
|
|
1468
1582
|
console.error("RPC Error (get_tasks):", err)
|
|
1469
1583
|
// Оставляем старые данные на экране, не роняем UI
|
|
1470
|
-
ctx.toast.show({ title: "
|
|
1584
|
+
ctx.toast.show({ title: gt("gui.toast.jobsLoadFailed"), variant: "error", description: shortError(errorMessage(err)) })
|
|
1471
1585
|
}
|
|
1472
1586
|
}
|
|
1473
1587
|
|
|
@@ -1487,7 +1601,7 @@ export default Plugin.define({
|
|
|
1487
1601
|
setHistory(result.records ?? [])
|
|
1488
1602
|
} catch (err: any) {
|
|
1489
1603
|
console.error("RPC Error (get_history):", err)
|
|
1490
|
-
ctx.toast.show({ title: "
|
|
1604
|
+
ctx.toast.show({ title: gt("gui.toast.historyLoadFailed"), variant: "error", description: errorMessage(err) })
|
|
1491
1605
|
}
|
|
1492
1606
|
}
|
|
1493
1607
|
|
|
@@ -1553,16 +1667,18 @@ export default Plugin.define({
|
|
|
1553
1667
|
}
|
|
1554
1668
|
: undefined,
|
|
1555
1669
|
watchPath: (watchPath() || "").trim(),
|
|
1670
|
+
...triggerExtrasPayload(),
|
|
1556
1671
|
workingDirectory: (workingDirectory() || "").trim(),
|
|
1557
1672
|
workspaceId: (workspaceId() || "").trim() || undefined,
|
|
1558
1673
|
allowedTools: allowedTools().length > 0 ? allowedTools() : undefined,
|
|
1559
1674
|
deniedTools: deniedTools().length > 0 ? deniedTools() : undefined,
|
|
1675
|
+
runWhenLoggedOff: runWhenLoggedOff(),
|
|
1560
1676
|
matrix: matrixPayload(),
|
|
1561
1677
|
})
|
|
1562
1678
|
if (!result.success) {
|
|
1563
1679
|
const short = shortError(result.message)
|
|
1564
1680
|
setCronError(short)
|
|
1565
|
-
ctx.toast.show({ title: "
|
|
1681
|
+
ctx.toast.show({ title: gt("gui.toast.taskCreateFailed"), variant: "error", description: short })
|
|
1566
1682
|
return
|
|
1567
1683
|
}
|
|
1568
1684
|
// Windows регистрирует задачу в Планировщике не мгновенно:
|
|
@@ -1589,9 +1705,10 @@ export default Plugin.define({
|
|
|
1589
1705
|
setDelaySeconds("")
|
|
1590
1706
|
setSession("new")
|
|
1591
1707
|
setSessionMaxRuns("")
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1708
|
+
setRunWhenLoggedOff(false)
|
|
1709
|
+
setTimezone("")
|
|
1710
|
+
setNotBefore("")
|
|
1711
|
+
setNotAfter("")
|
|
1595
1712
|
setMcpServer("")
|
|
1596
1713
|
setMcpEventName("")
|
|
1597
1714
|
setMcpFilter("")
|
|
@@ -1602,12 +1719,12 @@ export default Plugin.define({
|
|
|
1602
1719
|
resetMatrixForm()
|
|
1603
1720
|
setEditingJob(null)
|
|
1604
1721
|
setTemplate("custom")
|
|
1605
|
-
ctx.toast.show({ title: "
|
|
1722
|
+
ctx.toast.show({ title: gt("gui.toast.taskCreated"), variant: "success" })
|
|
1606
1723
|
} catch (err: any) {
|
|
1607
1724
|
console.error("RPC Error (create_task):", err)
|
|
1608
1725
|
const msg = shortError(errorMessage(err))
|
|
1609
1726
|
setCronError(msg)
|
|
1610
|
-
ctx.toast.show({ title: "
|
|
1727
|
+
ctx.toast.show({ title: gt("gui.toast.taskCreateFailed"), variant: "error", description: msg })
|
|
1611
1728
|
} finally {
|
|
1612
1729
|
setBusy(false)
|
|
1613
1730
|
}
|
|
@@ -1653,7 +1770,7 @@ export default Plugin.define({
|
|
|
1653
1770
|
const seconds = ((Number(record.durationMs) || 0) / 1000).toFixed(1)
|
|
1654
1771
|
const reason = record.error ? `: ${record.error}` : ""
|
|
1655
1772
|
ctx.toast.show({
|
|
1656
|
-
title: ok ?
|
|
1773
|
+
title: ok ? gt("gui.toast.taskDone", { name: jobName }) : gt("gui.toast.taskCrashed", { name: jobName }),
|
|
1657
1774
|
variant: ok ? "success" : "error",
|
|
1658
1775
|
description: `${seconds}s${reason}`,
|
|
1659
1776
|
})
|
|
@@ -1676,12 +1793,12 @@ export default Plugin.define({
|
|
|
1676
1793
|
try {
|
|
1677
1794
|
const result = await rpc.run_task({ name: jobName })
|
|
1678
1795
|
if (!result.success) {
|
|
1679
|
-
ctx.toast.show({ title:
|
|
1796
|
+
ctx.toast.show({ title: gt("gui.toast.taskStartFailed", { name: jobName }), variant: "error", description: result.message })
|
|
1680
1797
|
return
|
|
1681
1798
|
}
|
|
1682
1799
|
// Уже выполняющаяся задача приходит как success с сообщением
|
|
1683
1800
|
// «Задача ... уже выполняется» — показываем мягкое уведомление, не ошибку.
|
|
1684
|
-
ctx.toast.show({ title: result.message ||
|
|
1801
|
+
ctx.toast.show({ title: result.message || gt("gui.toast.taskStarted", { name: jobName }), variant: "success" })
|
|
1685
1802
|
// Для уже идущего запуска не ждём новую запись истории.
|
|
1686
1803
|
if (!/уже выполняется/i.test(result.message || "")) {
|
|
1687
1804
|
watchManualRun(jobName)
|
|
@@ -1689,7 +1806,7 @@ export default Plugin.define({
|
|
|
1689
1806
|
await loadJobs()
|
|
1690
1807
|
} catch (err: any) {
|
|
1691
1808
|
console.error("RPC Error (run_task):", err)
|
|
1692
|
-
ctx.toast.show({ title: "
|
|
1809
|
+
ctx.toast.show({ title: gt("gui.toast.runFailed"), variant: "error", description: errorMessage(err) })
|
|
1693
1810
|
}
|
|
1694
1811
|
}
|
|
1695
1812
|
|
|
@@ -1697,14 +1814,14 @@ export default Plugin.define({
|
|
|
1697
1814
|
try {
|
|
1698
1815
|
const result = await rpc.pause_task({ name: jobName })
|
|
1699
1816
|
if (!result.success) {
|
|
1700
|
-
ctx.toast.show({ title:
|
|
1817
|
+
ctx.toast.show({ title: gt("gui.toast.pauseFailed", { name: jobName }), variant: "error", description: result.message })
|
|
1701
1818
|
return
|
|
1702
1819
|
}
|
|
1703
|
-
ctx.toast.show({ title:
|
|
1820
|
+
ctx.toast.show({ title: gt("gui.toast.paused", { name: jobName }), variant: "success" })
|
|
1704
1821
|
await loadJobs()
|
|
1705
1822
|
} catch (err: any) {
|
|
1706
1823
|
console.error("RPC Error (pause_task):", err)
|
|
1707
|
-
ctx.toast.show({ title: "
|
|
1824
|
+
ctx.toast.show({ title: gt("gui.toast.pauseError"), variant: "error", description: errorMessage(err) })
|
|
1708
1825
|
}
|
|
1709
1826
|
}
|
|
1710
1827
|
|
|
@@ -1712,46 +1829,46 @@ export default Plugin.define({
|
|
|
1712
1829
|
try {
|
|
1713
1830
|
const result = await rpc.resume_task({ name: jobName })
|
|
1714
1831
|
if (!result.success) {
|
|
1715
|
-
ctx.toast.show({ title:
|
|
1832
|
+
ctx.toast.show({ title: gt("gui.toast.resumeFailed", { name: jobName }), variant: "error", description: result.message })
|
|
1716
1833
|
return
|
|
1717
1834
|
}
|
|
1718
|
-
ctx.toast.show({ title:
|
|
1835
|
+
ctx.toast.show({ title: gt("gui.toast.resumed", { name: jobName }), variant: "success" })
|
|
1719
1836
|
await loadJobs()
|
|
1720
1837
|
} catch (err: any) {
|
|
1721
1838
|
console.error("RPC Error (resume_task):", err)
|
|
1722
|
-
ctx.toast.show({ title: "
|
|
1839
|
+
ctx.toast.show({ title: gt("gui.toast.resumeError"), variant: "error", description: errorMessage(err) })
|
|
1723
1840
|
}
|
|
1724
1841
|
}
|
|
1725
1842
|
|
|
1726
1843
|
async function handleCancelMatrix(jobName: string) {
|
|
1727
|
-
if (!window.confirm(
|
|
1844
|
+
if (!window.confirm(gt("gui.matrix.cancelClonesConfirm", { name: jobName }))) return
|
|
1728
1845
|
try {
|
|
1729
1846
|
const result = await rpc.cancel_matrix({ name: jobName })
|
|
1730
1847
|
if (!result.success) {
|
|
1731
|
-
ctx.toast.show({ title: "
|
|
1848
|
+
ctx.toast.show({ title: gt("gui.toast.matrixCancelFailed"), variant: "error", description: result.message })
|
|
1732
1849
|
return
|
|
1733
1850
|
}
|
|
1734
1851
|
ctx.toast.show({ title: result.message, variant: "success" })
|
|
1735
1852
|
await loadJobs()
|
|
1736
1853
|
} catch (err: any) {
|
|
1737
1854
|
console.error("RPC Error (cancel_matrix):", err)
|
|
1738
|
-
ctx.toast.show({ title: "
|
|
1855
|
+
ctx.toast.show({ title: gt("gui.toast.matrixCancelError"), variant: "error", description: errorMessage(err) })
|
|
1739
1856
|
}
|
|
1740
1857
|
}
|
|
1741
1858
|
|
|
1742
1859
|
async function handleDelete(jobName: string) {
|
|
1743
1860
|
const target = jobs().find((job) => job.name === jobName)
|
|
1744
1861
|
const message = target?.matrix
|
|
1745
|
-
?
|
|
1746
|
-
:
|
|
1862
|
+
? gt("gui.matrix.deleteConfirm", { name: jobName })
|
|
1863
|
+
: gt("gui.task.deleteConfirm", { name: jobName })
|
|
1747
1864
|
if (!window.confirm(message)) return
|
|
1748
1865
|
try {
|
|
1749
1866
|
const result = await rpc.delete_task({ name: jobName })
|
|
1750
1867
|
if (!result.success) {
|
|
1751
|
-
ctx.toast.show({ title: "
|
|
1868
|
+
ctx.toast.show({ title: gt("gui.toast.deleteFailed"), variant: "error", description: result.message })
|
|
1752
1869
|
return
|
|
1753
1870
|
}
|
|
1754
|
-
ctx.toast.show({ title:
|
|
1871
|
+
ctx.toast.show({ title: gt("gui.toast.taskDeleted", { name: jobName }), variant: "success" })
|
|
1755
1872
|
if (logsTask() === jobName) {
|
|
1756
1873
|
setLogs("")
|
|
1757
1874
|
setLogsTask(null)
|
|
@@ -1760,24 +1877,24 @@ export default Plugin.define({
|
|
|
1760
1877
|
await loadJobs()
|
|
1761
1878
|
} catch (err: any) {
|
|
1762
1879
|
console.error("RPC Error (delete_task):", err)
|
|
1763
|
-
ctx.toast.show({ title: "
|
|
1880
|
+
ctx.toast.show({ title: gt("gui.toast.deleteFailed"), variant: "error", description: errorMessage(err) })
|
|
1764
1881
|
}
|
|
1765
1882
|
}
|
|
1766
1883
|
|
|
1767
1884
|
async function showLogs(jobName: string) {
|
|
1768
1885
|
setLogsTask(jobName)
|
|
1769
|
-
setLogs("
|
|
1886
|
+
setLogs(gt("gui.logs.loading"))
|
|
1770
1887
|
try {
|
|
1771
1888
|
const result = await rpc.get_task_logs({ name: jobName })
|
|
1772
1889
|
if (!result.success) {
|
|
1773
|
-
setLogs(result.error || "
|
|
1774
|
-
ctx.toast.show({ title: "
|
|
1890
|
+
setLogs(result.error || gt("gui.logs.loadFailed"))
|
|
1891
|
+
ctx.toast.show({ title: gt("gui.toast.logsReadFailed"), variant: "error", description: result.error })
|
|
1775
1892
|
return
|
|
1776
1893
|
}
|
|
1777
|
-
setLogs(result.logs ||
|
|
1894
|
+
setLogs(result.logs || gt("gui.logs.empty"))
|
|
1778
1895
|
} catch (err: any) {
|
|
1779
1896
|
console.error("RPC Error (get_task_logs):", err)
|
|
1780
|
-
setLogs("
|
|
1897
|
+
setLogs(gt("gui.logs.readError", { error: errorMessage(err) }))
|
|
1781
1898
|
}
|
|
1782
1899
|
}
|
|
1783
1900
|
|
|
@@ -1821,15 +1938,17 @@ export default Plugin.define({
|
|
|
1821
1938
|
}
|
|
1822
1939
|
: undefined,
|
|
1823
1940
|
watchPath: (watchPath() || "").trim(),
|
|
1941
|
+
...triggerExtrasPayload(),
|
|
1824
1942
|
workingDirectory: (workingDirectory() || "").trim(),
|
|
1825
1943
|
workspaceId: (workspaceId() || "").trim() || undefined,
|
|
1826
1944
|
allowedTools: allowedTools().length > 0 ? allowedTools() : [],
|
|
1827
1945
|
deniedTools: deniedTools().length > 0 ? deniedTools() : [],
|
|
1946
|
+
runWhenLoggedOff: runWhenLoggedOff(),
|
|
1828
1947
|
matrix: matrixPayload(),
|
|
1829
1948
|
})
|
|
1830
1949
|
if (!result.success) {
|
|
1831
1950
|
setCronError(result.message)
|
|
1832
|
-
ctx.toast.show({ title: "
|
|
1951
|
+
ctx.toast.show({ title: gt("gui.toast.taskUpdateFailed"), variant: "error", description: result.message })
|
|
1833
1952
|
return
|
|
1834
1953
|
}
|
|
1835
1954
|
setEditingJob(null)
|
|
@@ -1850,9 +1969,10 @@ export default Plugin.define({
|
|
|
1850
1969
|
setDelaySeconds("")
|
|
1851
1970
|
setSession("new")
|
|
1852
1971
|
setSessionMaxRuns("")
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1972
|
+
setRunWhenLoggedOff(false)
|
|
1973
|
+
setTimezone("")
|
|
1974
|
+
setNotBefore("")
|
|
1975
|
+
setNotAfter("")
|
|
1856
1976
|
setMcpServer("")
|
|
1857
1977
|
setMcpEventName("")
|
|
1858
1978
|
setMcpFilter("")
|
|
@@ -1863,12 +1983,12 @@ export default Plugin.define({
|
|
|
1863
1983
|
resetMatrixForm()
|
|
1864
1984
|
setCronPreset("* * * * *")
|
|
1865
1985
|
await loadJobs()
|
|
1866
|
-
ctx.toast.show({ title: "
|
|
1986
|
+
ctx.toast.show({ title: gt("gui.toast.taskUpdated"), variant: "success" })
|
|
1867
1987
|
} catch (err: any) {
|
|
1868
1988
|
console.error("RPC Error (update_task):", err)
|
|
1869
1989
|
const msg = errorMessage(err)
|
|
1870
1990
|
setCronError(msg)
|
|
1871
|
-
ctx.toast.show({ title: "
|
|
1991
|
+
ctx.toast.show({ title: gt("gui.toast.taskUpdateFailed"), variant: "error", description: msg })
|
|
1872
1992
|
} finally {
|
|
1873
1993
|
setBusy(false)
|
|
1874
1994
|
}
|
|
@@ -1890,9 +2010,20 @@ export default Plugin.define({
|
|
|
1890
2010
|
setAfterScript(job.afterScript ?? "")
|
|
1891
2011
|
setTriggerType(job.triggerType ?? "cron")
|
|
1892
2012
|
setWatchPath(job.watchPath ?? "")
|
|
2013
|
+
setWatchGlobs(joinListInput(job.watchGlobs))
|
|
2014
|
+
setWatchIgnore(joinListInput(job.watchIgnore))
|
|
2015
|
+
setGitBranch(job.gitBranch ?? "")
|
|
2016
|
+
setGitPaths(joinListInput(job.gitPaths))
|
|
2017
|
+
setGitIgnore(joinListInput(job.gitIgnore))
|
|
2018
|
+
setGitPollSeconds(
|
|
2019
|
+
typeof job.gitPollSeconds === "number" ? String(job.gitPollSeconds) : ""
|
|
2020
|
+
)
|
|
2021
|
+
setActiveDays(Array.isArray(job.activeDays) ? job.activeDays : [])
|
|
2022
|
+
setWindowPolicy(job.windowPolicy ?? "postpone")
|
|
1893
2023
|
setRunAt(job.runAt ?? "")
|
|
1894
2024
|
setDelaySeconds("")
|
|
1895
2025
|
setSession(job.session === "reuse" || job.session === "last" ? job.session : "new")
|
|
2026
|
+
setRunWhenLoggedOff(job.runWhenLoggedOff === true)
|
|
1896
2027
|
setSessionMaxRuns(
|
|
1897
2028
|
typeof job.sessionMaxRuns === "number" ? String(job.sessionMaxRuns) : ""
|
|
1898
2029
|
)
|
|
@@ -1957,29 +2088,36 @@ export default Plugin.define({
|
|
|
1957
2088
|
|
|
1958
2089
|
const validationError = (): string => {
|
|
1959
2090
|
const taskName = (name() || "").trim()
|
|
1960
|
-
if (!taskName) return "
|
|
1961
|
-
if (!(prompt() || "").trim()) return "
|
|
1962
|
-
if (triggerType() === "cron" && !(schedule() || "").trim()) return "
|
|
2091
|
+
if (!taskName) return gt("gui.validation.taskNameRequired")
|
|
2092
|
+
if (!(prompt() || "").trim()) return gt("gui.validation.promptRequired")
|
|
2093
|
+
if (triggerType() === "cron" && !(schedule() || "").trim()) return gt("gui.validation.cronRequired")
|
|
1963
2094
|
if (triggerType() === "once" && !(runAt() || "").trim() && !(delaySeconds() || "").trim()) {
|
|
1964
|
-
return "
|
|
2095
|
+
return gt("gui.validation.runAtRequired")
|
|
2096
|
+
}
|
|
2097
|
+
// Спринт 27: git-триггер работает только в git-репозитории задачи.
|
|
2098
|
+
if (triggerType() === "git" && !(workspaceId() || "").trim() && !(workingDirectory() || "").trim()) {
|
|
2099
|
+
return gt("gui.validation.gitWorkspaceRequired")
|
|
1965
2100
|
}
|
|
1966
|
-
if (
|
|
2101
|
+
if ((gitPollSeconds() || "").trim() && !/^([5-9]|[1-9]\d+)$/.test(gitPollSeconds().trim())) {
|
|
2102
|
+
return gt("gui.validation.gitPollInvalid")
|
|
2103
|
+
}
|
|
2104
|
+
if (matrixMode() && matrixWorkspaceIds().length === 0) return gt("gui.validation.matrixWorkspacesRequired")
|
|
1967
2105
|
if (session() === "reuse" && (sessionMaxRuns() || "").trim() && !/^[1-9]\d*$/.test(sessionMaxRuns().trim())) {
|
|
1968
|
-
return "
|
|
2106
|
+
return gt("gui.validation.sessionMaxRunsInvalid")
|
|
1969
2107
|
}
|
|
1970
2108
|
if (matrixMode() && (matrixConcurrency() || "").trim() && !/^[1-9]\d*$/.test(matrixConcurrency().trim())) {
|
|
1971
|
-
return "
|
|
2109
|
+
return gt("gui.validation.matrixConcurrencyInvalid")
|
|
1972
2110
|
}
|
|
1973
2111
|
if (((notBefore() || "").trim() === "") !== ((notAfter() || "").trim() === "")) {
|
|
1974
|
-
return "
|
|
2112
|
+
return gt("gui.validation.windowPairRequired")
|
|
1975
2113
|
}
|
|
1976
|
-
if (!validTimezone()) return "
|
|
1977
|
-
if (!isIntInRange(priority(), 0, 10)) return "
|
|
1978
|
-
if (!isIntInRange(retryCount(), 0)) return "
|
|
1979
|
-
if (!isIntInRange(retryDelay(), 0)) return "
|
|
2114
|
+
if (!validTimezone()) return gt("gui.validation.timezoneInvalid")
|
|
2115
|
+
if (!isIntInRange(priority(), 0, 10)) return gt("gui.validation.priorityInvalid")
|
|
2116
|
+
if (!isIntInRange(retryCount(), 0)) return gt("gui.validation.retryCountInvalid")
|
|
2117
|
+
if (!isIntInRange(retryDelay(), 0)) return gt("gui.validation.retryDelayInvalid")
|
|
1980
2118
|
const self = taskName.toLowerCase()
|
|
1981
2119
|
if (dependsOn().some((dep) => dep.trim().toLowerCase() === self)) {
|
|
1982
|
-
return "
|
|
2120
|
+
return gt("gui.validation.dependsOnSelf")
|
|
1983
2121
|
}
|
|
1984
2122
|
return ""
|
|
1985
2123
|
}
|
|
@@ -2067,35 +2205,60 @@ export default Plugin.define({
|
|
|
2067
2205
|
)}
|
|
2068
2206
|
{job.isMatrixParent && job.matrix && (
|
|
2069
2207
|
<span
|
|
2070
|
-
title={
|
|
2071
|
-
job.matrix.
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2208
|
+
title={gt("gui.job.fanoutTitle", {
|
|
2209
|
+
count: job.matrix.workspaceIds.length,
|
|
2210
|
+
strategy: job.matrix.strategy ?? "parallel",
|
|
2211
|
+
failureMode: job.matrix.failureMode ?? "continue",
|
|
2212
|
+
concurrency: job.matrix.concurrency
|
|
2213
|
+
? gt("gui.job.fanoutConcurrency", { concurrency: job.matrix.concurrency })
|
|
2214
|
+
: "",
|
|
2215
|
+
overrides: job.matrix.overrides
|
|
2216
|
+
? gt("gui.job.fanoutOverrides", { overrides: Object.keys(job.matrix.overrides).length })
|
|
2217
|
+
: "",
|
|
2218
|
+
})}
|
|
2079
2219
|
style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)"
|
|
2080
2220
|
>📦 Matrix ({job.matrix.workspaceIds.length}){job.matrix.concurrency ? ` ⚙${job.matrix.concurrency}` : ""}</span>
|
|
2081
2221
|
)}
|
|
2082
2222
|
{job.matrixParentId && (
|
|
2083
2223
|
<span
|
|
2084
|
-
title={
|
|
2224
|
+
title={gt("gui.job.matrixClone", { parent: job.matrixParentId })}
|
|
2085
2225
|
style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #8e8e93;color:#b0b0b6;background:rgba(142,142,147,0.12)"
|
|
2086
2226
|
>↳ matrix {job.matrixParentId}</span>
|
|
2087
2227
|
)}
|
|
2088
2228
|
{job.watchPath && (
|
|
2089
|
-
<span title={
|
|
2229
|
+
<span title={gt("gui.job.watchFile", { path: job.watchPath })} style="font-size:13px;flex-shrink:0;cursor:help">👁️</span>
|
|
2230
|
+
)}
|
|
2231
|
+
{Array.isArray(job.watchGlobs) && job.watchGlobs.length > 0 && (
|
|
2232
|
+
<span title={gt("gui.job.watchGlobsTitle", { globs: job.watchGlobs.join(", ") })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #5ac8fa;color:#5ac8fa;background:rgba(90,200,250,0.12)">{gt("gui.job.watchGlobsCount", { count: job.watchGlobs.length })}</span>
|
|
2233
|
+
)}
|
|
2234
|
+
{job.triggerType === "git" && (
|
|
2235
|
+
<span title={gt("gui.job.gitTriggerTitle", {
|
|
2236
|
+
branch: job.gitBranch ? gt("gui.job.gitTriggerBranch", { branch: job.gitBranch }) : "",
|
|
2237
|
+
paths: Array.isArray(job.gitPaths) && job.gitPaths.length > 0 ? gt("gui.job.gitTriggerPaths", { paths: job.gitPaths.join(", ") }) : "",
|
|
2238
|
+
seconds: job.gitPollSeconds ?? 60,
|
|
2239
|
+
})} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">🔀 git</span>
|
|
2240
|
+
)}
|
|
2241
|
+
{Array.isArray(job.activeDays) && job.activeDays.length > 0 && (
|
|
2242
|
+
<span title={gt("gui.job.activeDaysTitle", { days: job.activeDays.map((d) => [gt("gui.weekday.0"), gt("gui.weekday.1"), gt("gui.weekday.2"), gt("gui.weekday.3"), gt("gui.weekday.4"), gt("gui.weekday.5"), gt("gui.weekday.6")][d] ?? d).join(", ") })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">📅 {job.activeDays.length}/7</span>
|
|
2090
2243
|
)}
|
|
2091
2244
|
{job.timezone && (
|
|
2092
|
-
<span title={
|
|
2245
|
+
<span title={gt("gui.job.timezoneTitle", { tz: job.timezone })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #64d2ff;color:#64d2ff;background:rgba(100,210,255,0.12)">🌍 {job.timezone}</span>
|
|
2093
2246
|
)}
|
|
2094
2247
|
{job.notBefore && job.notAfter && (
|
|
2095
|
-
<span title={
|
|
2248
|
+
<span title={gt("gui.job.windowTitle", { from: job.notBefore, to: job.notAfter })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #bf5af2;color:#bf5af2;background:rgba(191,90,242,0.12)">🪟 {job.notBefore}–{job.notAfter}</span>
|
|
2096
2249
|
)}
|
|
2097
2250
|
{job.pausedUntil && (
|
|
2098
|
-
<span title={
|
|
2251
|
+
<span title={gt("gui.job.pausedUntilTitle", { date: new Date(job.pausedUntil).toLocaleString() })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ffd60a;color:#ffd60a;background:rgba(255,214,10,0.12)">{gt("gui.job.pausedUntilShort", { date: new Date(job.pausedUntil).toLocaleDateString() })}</span>
|
|
2252
|
+
)}
|
|
2253
|
+
{job.runWhenLoggedOff && (
|
|
2254
|
+
<span
|
|
2255
|
+
title={gt("gui.job.runWhenLoggedOffTitle", {
|
|
2256
|
+
mode: job.logonMode ?? gt("gui.job.logonModeUnknown"),
|
|
2257
|
+
})}
|
|
2258
|
+
style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)"
|
|
2259
|
+
>
|
|
2260
|
+
🌙 {gt("gui.job.runWhenLoggedOffShort")}
|
|
2261
|
+
</span>
|
|
2099
2262
|
)}
|
|
2100
2263
|
{(job.beforeScript || job.afterScript) && (
|
|
2101
2264
|
<span
|
|
@@ -2105,37 +2268,42 @@ export default Plugin.define({
|
|
|
2105
2268
|
)}
|
|
2106
2269
|
{job.triggerType === "mcp-event" && (
|
|
2107
2270
|
<span
|
|
2108
|
-
title={
|
|
2271
|
+
title={gt("gui.job.mcpEventTitle", {
|
|
2272
|
+
event: job.mcpEvent?.event ?? "—",
|
|
2273
|
+
filterSuffix: job.mcpEvent?.filter ? gt("gui.job.mcpEventFilterSuffix", { filter: job.mcpEvent.filter }) : "",
|
|
2274
|
+
})}
|
|
2109
2275
|
style="font-size:13px;flex-shrink:0;cursor:help"
|
|
2110
2276
|
>📡</span>
|
|
2111
2277
|
)}
|
|
2112
2278
|
{job.session && job.session !== "new" && (
|
|
2113
2279
|
<span
|
|
2114
2280
|
title={job.session === "reuse"
|
|
2115
|
-
?
|
|
2116
|
-
|
|
2281
|
+
? (job.sessionId
|
|
2282
|
+
? gt("gui.job.sessionReuseTitleId", { id: job.sessionId })
|
|
2283
|
+
: gt("gui.job.sessionReuseTitle"))
|
|
2284
|
+
: gt("gui.job.sessionContinueTitle")}
|
|
2117
2285
|
style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)"
|
|
2118
|
-
>{job.session === "reuse" ? "
|
|
2286
|
+
>{job.session === "reuse" ? gt("gui.job.sessionReuseShort") : gt("gui.job.sessionContinueShort")}</span>
|
|
2119
2287
|
)}
|
|
2120
2288
|
{job.model && (
|
|
2121
|
-
<span title={
|
|
2289
|
+
<span title={gt("gui.job.modelTitle", { model: job.model })} style="font-size:12px;flex-shrink:0;cursor:help;color:#c084fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px">🧠 {job.model}</span>
|
|
2122
2290
|
)}
|
|
2123
2291
|
{typeof job.priority === "number" && job.priority !== DEFAULT_PRIORITY && (
|
|
2124
|
-
<span title={
|
|
2292
|
+
<span title={gt("gui.job.priorityTitle", { label: priorityLabel(job.priority), priority: job.priority })} style="font-size:12px;flex-shrink:0;cursor:help;color:#f5a623;white-space:nowrap">🚀 {priorityLabel(job.priority)}</span>
|
|
2125
2293
|
)}
|
|
2126
2294
|
{(Array.isArray(job.allowedTools) && job.allowedTools.length > 0) || (Array.isArray(job.deniedTools) && job.deniedTools.length > 0) ? (
|
|
2127
2295
|
<span
|
|
2128
|
-
title={
|
|
2296
|
+
title={gt("gui.job.toolLimitsTitle", { limits: [
|
|
2129
2297
|
job.allowedTools?.length ? `allowed=[${job.allowedTools.join(", ")}]` : "",
|
|
2130
2298
|
job.deniedTools?.length ? `denied=[${job.deniedTools.join(", ")}]` : "",
|
|
2131
|
-
].filter(Boolean).join(" · ")}
|
|
2299
|
+
].filter(Boolean).join(" · ") })}
|
|
2132
2300
|
style="font-size:13px;flex-shrink:0;cursor:help"
|
|
2133
2301
|
>🔒</span>
|
|
2134
2302
|
) : null}
|
|
2135
2303
|
</div>
|
|
2136
2304
|
{Array.isArray(job.dependsOn) && job.dependsOn.length > 0 && (
|
|
2137
2305
|
<div style="display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35">
|
|
2138
|
-
<span style="color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
2306
|
+
<span style="color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{gt("gui.job.dependsOn", { list: job.dependsOn.join(" + ") })}</span>
|
|
2139
2307
|
</div>
|
|
2140
2308
|
)}
|
|
2141
2309
|
{job.isMatrixParent && job.matrixSummary && (
|
|
@@ -2144,17 +2312,17 @@ export default Plugin.define({
|
|
|
2144
2312
|
title={job.matrixSummary.message}
|
|
2145
2313
|
style={`cursor:help;color:${statusColor(job.matrixSummary.status as JobStatus)};white-space:nowrap;overflow:hidden;text-overflow:ellipsis`}
|
|
2146
2314
|
>
|
|
2147
|
-
|
|
2315
|
+
{gt("gui.job.matrixDone", { success: job.matrixSummary.successCount, total: job.matrixSummary.totalCount })}
|
|
2148
2316
|
{job.matrixSummary.errorCount > 0 ? ` · ❌ ${job.matrixSummary.errorCount}` : ""}
|
|
2149
2317
|
{job.matrixSummary.pendingCount > 0 ? ` · ⏳ ${job.matrixSummary.pendingCount}` : ""}
|
|
2150
2318
|
</span>
|
|
2151
2319
|
</div>
|
|
2152
2320
|
)}
|
|
2153
2321
|
<div
|
|
2154
|
-
title="
|
|
2322
|
+
title={gt("gui.job.runsTitle")}
|
|
2155
2323
|
style="font-size:12px;color:#a0a0a6;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
2156
2324
|
>
|
|
2157
|
-
|
|
2325
|
+
{gt("gui.job.runsLine", { total: job.runsTotal ?? 0, success: job.runsSuccess ?? 0, partial: job.runsPartial ?? 0, error: job.runsError ?? 0 })}
|
|
2158
2326
|
</div>
|
|
2159
2327
|
{(job.schedule || job.nextRun) && (
|
|
2160
2328
|
<div style="display:flex;align-items:center;gap:8px;font-size:12px;color:#a0a0a6;margin-top:2px">
|
|
@@ -2166,23 +2334,23 @@ export default Plugin.define({
|
|
|
2166
2334
|
<div style="display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:110px">
|
|
2167
2335
|
{job.status === "running" ? (
|
|
2168
2336
|
<div style="font-size:12px;color:#f5a623;font-weight:600;white-space:nowrap">
|
|
2169
|
-
|
|
2337
|
+
{gt("gui.jobStatus.running", { seconds: runningSec() })}
|
|
2170
2338
|
</div>
|
|
2171
2339
|
) : (
|
|
2172
2340
|
<div style="font-size:12px;font-weight:600;white-space:nowrap">
|
|
2173
2341
|
{job.orphaned
|
|
2174
|
-
? "
|
|
2342
|
+
? gt("gui.jobStatus.orphan")
|
|
2175
2343
|
: job.paused
|
|
2176
|
-
? "
|
|
2344
|
+
? gt("gui.jobStatus.paused")
|
|
2177
2345
|
: job.status === "success"
|
|
2178
|
-
? "
|
|
2346
|
+
? gt("gui.jobStatus.success")
|
|
2179
2347
|
: job.status === "error"
|
|
2180
|
-
? "
|
|
2348
|
+
? gt("gui.jobStatus.error")
|
|
2181
2349
|
: job.status === "partial"
|
|
2182
|
-
? "
|
|
2350
|
+
? gt("gui.jobStatus.partial")
|
|
2183
2351
|
: job.status === "idle"
|
|
2184
|
-
? "
|
|
2185
|
-
: "
|
|
2352
|
+
? gt("gui.jobStatus.never")
|
|
2353
|
+
: gt("gui.jobStatus.unknown")}
|
|
2186
2354
|
</div>
|
|
2187
2355
|
)}
|
|
2188
2356
|
</div>
|
|
@@ -2190,7 +2358,7 @@ export default Plugin.define({
|
|
|
2190
2358
|
<div style="display:flex;gap:6px">
|
|
2191
2359
|
<button
|
|
2192
2360
|
onClick={() => void handleRun(job.name)}
|
|
2193
|
-
title={
|
|
2361
|
+
title={gt("gui.job.runTitle", { name: job.name })}
|
|
2194
2362
|
style={iconButtonStyle()}
|
|
2195
2363
|
onMouseEnter={(e) => {
|
|
2196
2364
|
iconHover(e, true)
|
|
@@ -2211,10 +2379,10 @@ export default Plugin.define({
|
|
|
2211
2379
|
disabled={!!job.orphaned}
|
|
2212
2380
|
title={
|
|
2213
2381
|
job.orphaned
|
|
2214
|
-
?
|
|
2382
|
+
? gt("gui.job.pauseUnavailable", { name: job.name })
|
|
2215
2383
|
: job.paused
|
|
2216
|
-
?
|
|
2217
|
-
:
|
|
2384
|
+
? gt("gui.job.resumeTitle", { name: job.name })
|
|
2385
|
+
: gt("gui.job.pauseTitle", { name: job.name })
|
|
2218
2386
|
}
|
|
2219
2387
|
style={iconButtonStyle()}
|
|
2220
2388
|
onMouseEnter={(e) => iconHover(e, true)}
|
|
@@ -2224,7 +2392,7 @@ export default Plugin.define({
|
|
|
2224
2392
|
</button>
|
|
2225
2393
|
<button
|
|
2226
2394
|
onClick={() => void showLogs(job.name)}
|
|
2227
|
-
title={
|
|
2395
|
+
title={gt("gui.job.logsTitle", { name: job.name })}
|
|
2228
2396
|
style={iconButtonStyle()}
|
|
2229
2397
|
onMouseEnter={(e) => iconHover(e, true)}
|
|
2230
2398
|
onMouseLeave={(e) => iconHover(e, false)}
|
|
@@ -2233,7 +2401,7 @@ export default Plugin.define({
|
|
|
2233
2401
|
</button>
|
|
2234
2402
|
<button
|
|
2235
2403
|
onClick={() => void openDryRun(job.name)}
|
|
2236
|
-
title={
|
|
2404
|
+
title={gt("gui.job.dryRunTitle", { name: job.name })}
|
|
2237
2405
|
style={iconButtonStyle(dryRunOpen() && dryRunName() === job.name)}
|
|
2238
2406
|
onMouseEnter={(e) => iconHover(e, true, dryRunOpen() && dryRunName() === job.name)}
|
|
2239
2407
|
onMouseLeave={(e) => iconHover(e, false, dryRunOpen() && dryRunName() === job.name)}
|
|
@@ -2242,7 +2410,7 @@ export default Plugin.define({
|
|
|
2242
2410
|
</button>
|
|
2243
2411
|
<button
|
|
2244
2412
|
onClick={() => void fetchHistory(job.name)}
|
|
2245
|
-
title={
|
|
2413
|
+
title={gt("gui.job.historyTitle", { name: job.name })}
|
|
2246
2414
|
style={iconButtonStyle(historyOpen() === job.name)}
|
|
2247
2415
|
onMouseEnter={(e) => iconHover(e, true, historyOpen() === job.name)}
|
|
2248
2416
|
onMouseLeave={(e) => iconHover(e, false, historyOpen() === job.name)}
|
|
@@ -2251,7 +2419,7 @@ export default Plugin.define({
|
|
|
2251
2419
|
</button>
|
|
2252
2420
|
<button
|
|
2253
2421
|
onClick={() => void startEditing(job)}
|
|
2254
|
-
title={
|
|
2422
|
+
title={gt("gui.job.editTitle", { name: job.name })}
|
|
2255
2423
|
style={iconButtonStyle()}
|
|
2256
2424
|
onMouseEnter={(e) => iconHover(e, true)}
|
|
2257
2425
|
onMouseLeave={(e) => iconHover(e, false)}
|
|
@@ -2261,7 +2429,7 @@ export default Plugin.define({
|
|
|
2261
2429
|
{job.matrix && (
|
|
2262
2430
|
<button
|
|
2263
2431
|
onClick={() => void handleCancelMatrix(job.name)}
|
|
2264
|
-
title={
|
|
2432
|
+
title={gt("gui.job.cancelMatrixTitle", { name: job.name })}
|
|
2265
2433
|
style={iconButtonStyle()}
|
|
2266
2434
|
onMouseEnter={(e) => iconHover(e, true)}
|
|
2267
2435
|
onMouseLeave={(e) => iconHover(e, false)}
|
|
@@ -2272,7 +2440,7 @@ export default Plugin.define({
|
|
|
2272
2440
|
{!job.matrixParentId && (
|
|
2273
2441
|
<button
|
|
2274
2442
|
onClick={() => void handleDelete(job.name)}
|
|
2275
|
-
title={job.matrix ?
|
|
2443
|
+
title={job.matrix ? gt("gui.job.deleteMatrixTitle", { name: job.name }) : gt("gui.job.deleteTitle", { name: job.name })}
|
|
2276
2444
|
style={iconButtonStyle()}
|
|
2277
2445
|
onMouseEnter={(e) => iconHover(e, true)}
|
|
2278
2446
|
onMouseLeave={(e) => iconHover(e, false)}
|
|
@@ -2285,7 +2453,7 @@ export default Plugin.define({
|
|
|
2285
2453
|
{historyOpen() === job.name && (
|
|
2286
2454
|
<div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%">
|
|
2287
2455
|
<div style="font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px">
|
|
2288
|
-
|
|
2456
|
+
{gt("gui.job.historyPanelTitle")}
|
|
2289
2457
|
<button
|
|
2290
2458
|
onClick={() => setHistoryOpen(null)}
|
|
2291
2459
|
style="background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0"
|
|
@@ -2296,17 +2464,17 @@ export default Plugin.define({
|
|
|
2296
2464
|
</button>
|
|
2297
2465
|
</div>
|
|
2298
2466
|
{history().length === 0 ? (
|
|
2299
|
-
<div style="font-size:12px;color:#8e8e93;padding:6px 0"
|
|
2467
|
+
<div style="font-size:12px;color:#8e8e93;padding:6px 0">{gt("gui.job.historyEmpty")}</div>
|
|
2300
2468
|
) : (
|
|
2301
2469
|
history().map((r) => (
|
|
2302
2470
|
<div key={r.startedAt + r.durationMs} style="display:flex;align-items:flex-start;gap:10px;font-size:12px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333">
|
|
2303
2471
|
<span style="color:#8e8e93;white-space:nowrap">{new Date(r.startedAt).toLocaleString()}</span>
|
|
2304
2472
|
<span style={{color: r.status === "success" ? "#34c759" : "#ff3b30", fontWeight: 600, whiteSpace: "nowrap"}}>
|
|
2305
|
-
{r.status === "success" ? "
|
|
2473
|
+
{r.status === "success" ? gt("gui.history.success") : gt("gui.history.error")}
|
|
2306
2474
|
</span>
|
|
2307
|
-
<span style="color:#b0b0b0;white-space:nowrap">{r.durationMs}
|
|
2475
|
+
<span style="color:#b0b0b0;white-space:nowrap">{gt("gui.history.durationMs", { ms: r.durationMs })}</span>
|
|
2308
2476
|
{r.model && (
|
|
2309
|
-
<span style="color:#c084fc;white-space:nowrap" title={
|
|
2477
|
+
<span style="color:#c084fc;white-space:nowrap" title={gt("gui.history.modelTitle", { model: r.model })}>🧠 {r.model}</span>
|
|
2310
2478
|
)}
|
|
2311
2479
|
{r.preFlightStatus && r.preFlightStatus !== "skipped" && (
|
|
2312
2480
|
<span
|
|
@@ -2328,7 +2496,7 @@ export default Plugin.define({
|
|
|
2328
2496
|
<div style="margin-top:2px;color:#ff6b6b;font-size:11px;white-space:pre-wrap;word-break:break-word">{r.error}</div>
|
|
2329
2497
|
)}
|
|
2330
2498
|
{r.nextTask && (
|
|
2331
|
-
<span style="color:#5ac8fa;font-size:11px;white-space:nowrap" title="
|
|
2499
|
+
<span style="color:#5ac8fa;font-size:11px;white-space:nowrap" title={gt("gui.history.nextTaskTitle")}>🔗 → {r.nextTask}</span>
|
|
2332
2500
|
)}
|
|
2333
2501
|
</div>
|
|
2334
2502
|
))
|
|
@@ -2348,9 +2516,9 @@ export default Plugin.define({
|
|
|
2348
2516
|
✕
|
|
2349
2517
|
</button>
|
|
2350
2518
|
</div>
|
|
2351
|
-
{dryRunBusy() && <div style="font-size:12px;color:#8e8e93;padding:6px 0"
|
|
2519
|
+
{dryRunBusy() && <div style="font-size:12px;color:#8e8e93;padding:6px 0">{gt("gui.job.simulating")}</div>}
|
|
2352
2520
|
{!dryRunBusy() && dryRunReport() && !dryRunReport().success && (
|
|
2353
|
-
<div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ {dryRunReport().error ?? "
|
|
2521
|
+
<div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ {dryRunReport().error ?? gt("gui.job.simulationFailed")}</div>
|
|
2354
2522
|
)}
|
|
2355
2523
|
{!dryRunBusy() && dryRunReport() && dryRunReport().success && (
|
|
2356
2524
|
<div style="display:flex;flex-direction:column;gap:4px">
|
|
@@ -2365,10 +2533,10 @@ export default Plugin.define({
|
|
|
2365
2533
|
<span style="font-weight:600;white-space:nowrap">🧪 {t.name}</span>
|
|
2366
2534
|
{t.workspace && <span style="color:#5ac8fa;white-space:nowrap">📦 {t.workspace.name}</span>}
|
|
2367
2535
|
{t.matrixParent && <span style="color:#ff9f0a;white-space:nowrap">↳ matrix {t.matrixParent}</span>}
|
|
2368
|
-
<span style="color:#8e8e93;white-space:nowrap">cwd: {t.cwd || "
|
|
2536
|
+
<span style="color:#8e8e93;white-space:nowrap">cwd: {t.cwd || gt("gui.common.projectDir")}</span>
|
|
2369
2537
|
{t.roleScoped && <span style="cursor:help" title={`allowed=[${(t.roleScoped.allowed ?? []).join(", ")}] · denied=[${(t.roleScoped.denied ?? []).join(", ")}]`}>🔒</span>}
|
|
2370
|
-
{t.estimatedDurationSec != null && <span style="color:#8e8e93;white-space:nowrap"
|
|
2371
|
-
{t.estimatedTokens != null && <span style="color:#8e8e93;white-space:nowrap"
|
|
2538
|
+
{t.estimatedDurationSec != null && <span style="color:#8e8e93;white-space:nowrap">{gt("gui.job.durationEst", { seconds: t.estimatedDurationSec })}</span>}
|
|
2539
|
+
{t.estimatedTokens != null && <span style="color:#8e8e93;white-space:nowrap">{gt("gui.job.tokensEst", { tokens: t.estimatedTokens })}</span>}
|
|
2372
2540
|
{t.estimatedCostUsd != null && <span style="color:#8e8e93;white-space:nowrap">· ~${Number(t.estimatedCostUsd).toFixed(4)}</span>}
|
|
2373
2541
|
<div style="width:100%;color:#a0a0a6;overflow-wrap:anywhere">$ {t.command}</div>
|
|
2374
2542
|
{t.preFlight && <div style="width:100%;color:#8e8e93;overflow-wrap:anywhere">⚡ pre: {t.preFlight}</div>}
|
|
@@ -2378,9 +2546,11 @@ export default Plugin.define({
|
|
|
2378
2546
|
))}
|
|
2379
2547
|
{dryRunReport().totals && (dryRunReport().totals.estimatedDurationSec != null || dryRunReport().totals.estimatedTokens != null) && (
|
|
2380
2548
|
<div style="font-size:11px;color:#b0b0b0;padding:4px 0">
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2549
|
+
{gt("gui.job.totalsLine", {
|
|
2550
|
+
duration: dryRunReport().totals.estimatedDurationSec ?? "—",
|
|
2551
|
+
tokens: dryRunReport().totals.estimatedTokens ?? "—",
|
|
2552
|
+
cost: dryRunReport().totals.estimatedCostUsd != null ? ` · ~$${Number(dryRunReport().totals.estimatedCostUsd).toFixed(4)}` : "",
|
|
2553
|
+
})}
|
|
2384
2554
|
</div>
|
|
2385
2555
|
)}
|
|
2386
2556
|
</div>
|
|
@@ -2395,14 +2565,16 @@ export default Plugin.define({
|
|
|
2395
2565
|
return ctx.add(Panel, {
|
|
2396
2566
|
id: "scheduler-jobs",
|
|
2397
2567
|
region: "side",
|
|
2398
|
-
list: () => [{ id: "jobs", title: "
|
|
2568
|
+
list: () => [{ id: "jobs", title: gt("gui.jobsTitle"), pinned: true }],
|
|
2399
2569
|
render: () => (
|
|
2400
2570
|
<ErrorBoundary fallback={(err: any) => (
|
|
2401
2571
|
<div style="padding:16px;color:#ff3b30;font-size:13px">
|
|
2402
|
-
|
|
2572
|
+
{gt("gui.uiError", { message: err.message })}
|
|
2403
2573
|
</div>
|
|
2404
2574
|
)}>
|
|
2405
|
-
<div style={`display:flex;flex-direction:column;width:100%;height:100%;max-height:100vh;min-height:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;gap:24px;padding:20px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;transition:background 0.3s ease;scrollbar-width:thin;scrollbar-color:#444 transparent;background:${winterMode() ? "linear-gradient(180deg, #0f172a 0%, #000000 100%)" : "#0f0f0f"}`}>
|
|
2575
|
+
<div class="scheduler-panel-root" style={`display:flex;flex-direction:column;width:100%;height:100%;max-height:100vh;min-height:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;gap:24px;padding:20px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;transition:background 0.3s ease;scrollbar-width:thin;scrollbar-color:#444 transparent;background:${winterMode() ? "linear-gradient(180deg, #0f172a 0%, #000000 100%)" : "#0f0f0f"}`}>
|
|
2576
|
+
{/* Прокручивается корень, а не дети: иначе короткий viewport сжимает карточки до 2px. */}
|
|
2577
|
+
<style>{`.scheduler-panel-root > * { flex-shrink: 0; }`}</style>
|
|
2406
2578
|
<div style="display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap">
|
|
2407
2579
|
<div style="min-width:0">
|
|
2408
2580
|
<h2 style="margin:0;font-size:22px;font-weight:800;letter-spacing:0.2px;line-height:1.2;color:#ffffff">
|
|
@@ -2412,30 +2584,30 @@ export default Plugin.define({
|
|
|
2412
2584
|
Local AI CI/CD Orchestrator
|
|
2413
2585
|
</div>
|
|
2414
2586
|
<div
|
|
2415
|
-
title="
|
|
2587
|
+
title={gt("gui.metricsTotalsTitle")}
|
|
2416
2588
|
style="margin-top:4px;font-size:11px;color:#8e8e93"
|
|
2417
2589
|
>
|
|
2418
|
-
|
|
2590
|
+
{gt("gui.metricsTotalsLine", { total: metrics().total, success: metrics().success, error: metrics().error })}
|
|
2419
2591
|
</div>
|
|
2420
2592
|
</div>
|
|
2421
2593
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
2422
2594
|
<select
|
|
2423
2595
|
value={workspaceFilter()}
|
|
2424
2596
|
onChange={(e) => setWorkspaceFilter(e.currentTarget.value)}
|
|
2425
|
-
title="
|
|
2597
|
+
title={gt("gui.workspaceFilterTitle")}
|
|
2426
2598
|
style="padding:6px 10px;border-radius:999px;cursor:pointer;font-size:12px;border:1px solid #333;background:#1e1e1e;color:#e0e0e0;outline:none;max-width:200px"
|
|
2427
2599
|
>
|
|
2428
|
-
<option value="all"
|
|
2600
|
+
<option value="all">{gt("gui.workspaceAll")}</option>
|
|
2429
2601
|
{workspaces().map((workspace) => (
|
|
2430
2602
|
<option key={workspace.id} value={workspace.id}>📦 {workspace.name}</option>
|
|
2431
2603
|
))}
|
|
2432
|
-
<option value="none"
|
|
2604
|
+
<option value="none">{gt("gui.workspaceNone")}</option>
|
|
2433
2605
|
</select>
|
|
2434
2606
|
<button
|
|
2435
2607
|
onClick={() => setProfilesOpen((v) => !v)}
|
|
2436
2608
|
title={profilePinned()
|
|
2437
|
-
? "
|
|
2438
|
-
: "
|
|
2609
|
+
? gt("gui.profileEnvLockedTitle")
|
|
2610
|
+
: gt("gui.profilesTitle")}
|
|
2439
2611
|
style={`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;border:1px solid ${profilesOpen() ? "#bf5af2" : "#333"};background:${profilesOpen() ? "rgba(191,90,242,0.12)" : "#1e1e1e"};color:${profilesOpen() ? "#bf5af2" : "#e0e0e0"}`}
|
|
2440
2612
|
>
|
|
2441
2613
|
👤 {profileCurrent()}{profilePinned() ? " 🔒" : ""}
|
|
@@ -2457,15 +2629,15 @@ export default Plugin.define({
|
|
|
2457
2629
|
if (win) win.location.href = url;
|
|
2458
2630
|
else window.open(url, "_blank");
|
|
2459
2631
|
}}
|
|
2460
|
-
title="
|
|
2632
|
+
title={gt("gui.openDashboardTitle")}
|
|
2461
2633
|
style="display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid #333;background:#1e1e1e;color:#e0e0e0"
|
|
2462
2634
|
onMouseEnter={(e) => { const b = e.currentTarget; b.style.borderColor = "#5ac8fa"; b.style.background = "rgba(90,200,250,0.12)"; b.style.color = "#5ac8fa" }}
|
|
2463
2635
|
onMouseLeave={(e) => { const b = e.currentTarget; b.style.borderColor = "#333"; b.style.background = "#1e1e1e"; b.style.color = "#e0e0e0" }}
|
|
2464
2636
|
>
|
|
2465
|
-
|
|
2637
|
+
{gt("gui.openDashboard")}
|
|
2466
2638
|
</button>
|
|
2467
2639
|
<label
|
|
2468
|
-
title="
|
|
2640
|
+
title={gt("gui.winterModeTitle")}
|
|
2469
2641
|
style={`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid ${winterMode() ? "rgba(135, 206, 250, 0.5)" : "#333"};background:${winterMode() ? "rgba(135, 206, 250, 0.12)" : "#1e1e1e"};color:#e0e0e0`}
|
|
2470
2642
|
>
|
|
2471
2643
|
<input
|
|
@@ -2474,7 +2646,7 @@ export default Plugin.define({
|
|
|
2474
2646
|
onChange={(e) => void toggleWinterMode(e.currentTarget.checked)}
|
|
2475
2647
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2476
2648
|
/>
|
|
2477
|
-
|
|
2649
|
+
{gt("gui.winterMode")}
|
|
2478
2650
|
</label>
|
|
2479
2651
|
</div>
|
|
2480
2652
|
</div>
|
|
@@ -2482,39 +2654,39 @@ export default Plugin.define({
|
|
|
2482
2654
|
{profilesOpen() && (
|
|
2483
2655
|
<div style="background:#1e1e1e;border:1px solid #333;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px">
|
|
2484
2656
|
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap">
|
|
2485
|
-
<div style="font-size:12px;font-weight:600;color:#e0e0e0"
|
|
2657
|
+
<div style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.profilesHeading")}</div>
|
|
2486
2658
|
<button
|
|
2487
2659
|
onClick={() => void handleCreateProfile()}
|
|
2488
2660
|
disabled={profileBusy()}
|
|
2489
2661
|
style={`padding:4px 10px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${profileBusy() ? "not-allowed" : "pointer"}`}
|
|
2490
2662
|
>
|
|
2491
|
-
|
|
2663
|
+
{gt("gui.createProfile")}
|
|
2492
2664
|
</button>
|
|
2493
2665
|
</div>
|
|
2494
2666
|
{profilePinned() && (
|
|
2495
2667
|
<div style="font-size:11px;color:#ffd60a">
|
|
2496
|
-
|
|
2668
|
+
{gt("gui.profileEnvLocked")}
|
|
2497
2669
|
</div>
|
|
2498
2670
|
)}
|
|
2499
2671
|
<div style="display:flex;flex-direction:column;gap:6px">
|
|
2500
2672
|
{profiles().map((profile) => (
|
|
2501
2673
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px">
|
|
2502
2674
|
<span style={`font-weight:${profile.active ? 700 : 400};color:${profile.active ? "#bf5af2" : "#e0e0e0"}`}>
|
|
2503
|
-
{profile.name}{profile.isDefault ? "
|
|
2675
|
+
{profile.name}{profile.isDefault ? gt("gui.defaultSuffix") : ""}
|
|
2504
2676
|
</span>
|
|
2505
2677
|
<span style="font-size:11px;color:#8e8e93">
|
|
2506
|
-
{profile.port ?
|
|
2678
|
+
{profile.port ? gt("gui.profilePort", { port: profile.port }) : gt("gui.profilePortDefault")}
|
|
2507
2679
|
</span>
|
|
2508
2680
|
<span style="font-size:11px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;max-width:340px" title={profile.dir}>{profile.dir}</span>
|
|
2509
2681
|
{profile.active ? (
|
|
2510
|
-
<span style="font-size:11px;color:#34c759"
|
|
2682
|
+
<span style="font-size:11px;color:#34c759">{gt("gui.profileActive")}</span>
|
|
2511
2683
|
) : (
|
|
2512
2684
|
<button
|
|
2513
2685
|
onClick={() => void handleSwitchProfile(profile.name)}
|
|
2514
2686
|
disabled={profileBusy() || profilePinned()}
|
|
2515
2687
|
style={`padding:2px 8px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${profileBusy() || profilePinned() ? "not-allowed" : "pointer"};opacity:${profilePinned() ? 0.5 : 1}`}
|
|
2516
2688
|
>
|
|
2517
|
-
|
|
2689
|
+
{gt("gui.profileSwitch")}
|
|
2518
2690
|
</button>
|
|
2519
2691
|
)}
|
|
2520
2692
|
{!profile.isDefault && !profile.active && (
|
|
@@ -2523,14 +2695,14 @@ export default Plugin.define({
|
|
|
2523
2695
|
disabled={profileBusy()}
|
|
2524
2696
|
style={`padding:2px 8px;border-radius:6px;border:1px solid rgba(255,59,48,0.4);background:rgba(255,59,48,0.12);color:#ff3b30;font-size:11px;cursor:${profileBusy() ? "not-allowed" : "pointer"}`}
|
|
2525
2697
|
>
|
|
2526
|
-
|
|
2698
|
+
{gt("gui.profileDelete")}
|
|
2527
2699
|
</button>
|
|
2528
2700
|
)}
|
|
2529
2701
|
</div>
|
|
2530
2702
|
))}
|
|
2531
2703
|
</div>
|
|
2532
2704
|
<div style="font-size:11px;color:#8e8e93">
|
|
2533
|
-
|
|
2705
|
+
{gt("gui.profilesHint")}
|
|
2534
2706
|
</div>
|
|
2535
2707
|
</div>
|
|
2536
2708
|
)}
|
|
@@ -2541,7 +2713,7 @@ export default Plugin.define({
|
|
|
2541
2713
|
disabled={exportBusy()}
|
|
2542
2714
|
style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${exportBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${exportBusy() ? 0.6 : 1};transition:background 0.18s ease`}
|
|
2543
2715
|
>
|
|
2544
|
-
{exportBusy() ? "
|
|
2716
|
+
{exportBusy() ? gt("gui.exportBusy") : gt("gui.export")}
|
|
2545
2717
|
</button>
|
|
2546
2718
|
<input
|
|
2547
2719
|
type="file"
|
|
@@ -2554,12 +2726,12 @@ export default Plugin.define({
|
|
|
2554
2726
|
disabled={importBusy()}
|
|
2555
2727
|
style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${importBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${importBusy() ? 0.6 : 1};transition:background 0.18s ease`}
|
|
2556
2728
|
>
|
|
2557
|
-
{importBusy() ? "
|
|
2729
|
+
{importBusy() ? gt("gui.importBusy") : gt("gui.import")}
|
|
2558
2730
|
</button>
|
|
2559
2731
|
</div>
|
|
2560
2732
|
|
|
2561
2733
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px">
|
|
2562
|
-
<label style="font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap"
|
|
2734
|
+
<label style="font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap">{gt("gui.maxConcurrentLabel")}</label>
|
|
2563
2735
|
<input
|
|
2564
2736
|
type="number"
|
|
2565
2737
|
min="0"
|
|
@@ -2567,7 +2739,7 @@ export default Plugin.define({
|
|
|
2567
2739
|
onChange={(e) => saveSettingsGui(Number(e.currentTarget.value) || 1)}
|
|
2568
2740
|
style="width:60px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2569
2741
|
/>
|
|
2570
|
-
<span style="font-size:11px;color:#8e8e93;white-space:nowrap">(
|
|
2742
|
+
<span style="font-size:11px;color:#8e8e93;white-space:nowrap">{gt("gui.zeroUnlimited")}</span>
|
|
2571
2743
|
</div>
|
|
2572
2744
|
|
|
2573
2745
|
{/* 🔔 Уведомления (сворачиваемая секция, чтобы не загромождать форму) */}
|
|
@@ -2576,9 +2748,9 @@ export default Plugin.define({
|
|
|
2576
2748
|
onClick={() => setNotificationsCollapsed(!notificationsCollapsed())}
|
|
2577
2749
|
style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"
|
|
2578
2750
|
>
|
|
2579
|
-
<span
|
|
2751
|
+
<span>{gt("gui.notifications")}</span>
|
|
2580
2752
|
<span style="display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93">
|
|
2581
|
-
{notificationsEnabled() ? (onlyOnError() ? "
|
|
2753
|
+
{notificationsEnabled() ? (onlyOnError() ? gt("gui.notifyOnlyErrors") : gt("gui.notifyAllRuns")) : gt("gui.notifyDisabled")}
|
|
2582
2754
|
<span>{notificationsCollapsed() ? "▾" : "▴"}</span>
|
|
2583
2755
|
</span>
|
|
2584
2756
|
</button>
|
|
@@ -2595,7 +2767,7 @@ export default Plugin.define({
|
|
|
2595
2767
|
}}
|
|
2596
2768
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2597
2769
|
/>
|
|
2598
|
-
|
|
2770
|
+
{gt("gui.notifyEnable")}
|
|
2599
2771
|
</label>
|
|
2600
2772
|
|
|
2601
2773
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
|
|
@@ -2609,7 +2781,7 @@ export default Plugin.define({
|
|
|
2609
2781
|
}}
|
|
2610
2782
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2611
2783
|
/>
|
|
2612
|
-
|
|
2784
|
+
{gt("gui.notifyOnlyOnError")}
|
|
2613
2785
|
</label>
|
|
2614
2786
|
|
|
2615
2787
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
@@ -2624,7 +2796,7 @@ export default Plugin.define({
|
|
|
2624
2796
|
}}
|
|
2625
2797
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2626
2798
|
/>
|
|
2627
|
-
|
|
2799
|
+
{gt("gui.webhookLabel")}
|
|
2628
2800
|
</label>
|
|
2629
2801
|
<input
|
|
2630
2802
|
type="url"
|
|
@@ -2636,10 +2808,10 @@ export default Plugin.define({
|
|
|
2636
2808
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && webhookEnabled() ? 1 : 0.5}`}
|
|
2637
2809
|
/>
|
|
2638
2810
|
<div style="font-size:11px;color:#8e8e93">
|
|
2639
|
-
|
|
2811
|
+
{gt("gui.webhookPostHint", { payload: "{ content, text }" })}
|
|
2640
2812
|
</div>
|
|
2641
2813
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#b0b0b0">
|
|
2642
|
-
<span
|
|
2814
|
+
<span>{gt("gui.timeoutMs")}</span>
|
|
2643
2815
|
<input
|
|
2644
2816
|
type="number"
|
|
2645
2817
|
min="1000"
|
|
@@ -2651,7 +2823,7 @@ export default Plugin.define({
|
|
|
2651
2823
|
onChange={() => void saveNotificationSettings()}
|
|
2652
2824
|
style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2653
2825
|
/>
|
|
2654
|
-
<span
|
|
2826
|
+
<span>{gt("gui.retryCount")}</span>
|
|
2655
2827
|
<input
|
|
2656
2828
|
type="number"
|
|
2657
2829
|
min="0"
|
|
@@ -2662,7 +2834,7 @@ export default Plugin.define({
|
|
|
2662
2834
|
onChange={() => void saveNotificationSettings()}
|
|
2663
2835
|
style="width:56px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2664
2836
|
/>
|
|
2665
|
-
<span
|
|
2837
|
+
<span>{gt("gui.retryDelayMs")}</span>
|
|
2666
2838
|
<input
|
|
2667
2839
|
type="number"
|
|
2668
2840
|
min="100"
|
|
@@ -2676,7 +2848,7 @@ export default Plugin.define({
|
|
|
2676
2848
|
/>
|
|
2677
2849
|
</div>
|
|
2678
2850
|
<div style="font-size:11px;color:#8e8e93">
|
|
2679
|
-
|
|
2851
|
+
{gt("gui.retryHint")}
|
|
2680
2852
|
</div>
|
|
2681
2853
|
</div>
|
|
2682
2854
|
|
|
@@ -2702,7 +2874,7 @@ export default Plugin.define({
|
|
|
2702
2874
|
disabled={!notificationsEnabled() || !telegramEnabled()}
|
|
2703
2875
|
onInput={(e) => setTelegramBotToken(e.currentTarget.value)}
|
|
2704
2876
|
onChange={() => void saveNotificationSettings()}
|
|
2705
|
-
placeholder="
|
|
2877
|
+
placeholder={gt("gui.botTokenPlaceholder")}
|
|
2706
2878
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}
|
|
2707
2879
|
/>
|
|
2708
2880
|
<input
|
|
@@ -2711,11 +2883,11 @@ export default Plugin.define({
|
|
|
2711
2883
|
disabled={!notificationsEnabled() || !telegramEnabled()}
|
|
2712
2884
|
onInput={(e) => setTelegramChatId(e.currentTarget.value)}
|
|
2713
2885
|
onChange={() => void saveNotificationSettings()}
|
|
2714
|
-
placeholder="
|
|
2886
|
+
placeholder={gt("gui.chatIdPlaceholder")}
|
|
2715
2887
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}
|
|
2716
2888
|
/>
|
|
2717
2889
|
<div style={`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}>
|
|
2718
|
-
<span
|
|
2890
|
+
<span>{gt("gui.parseModeLabel")}</span>
|
|
2719
2891
|
<select
|
|
2720
2892
|
value={telegramParseMode()}
|
|
2721
2893
|
disabled={!notificationsEnabled() || !telegramEnabled()}
|
|
@@ -2741,7 +2913,7 @@ export default Plugin.define({
|
|
|
2741
2913
|
}}
|
|
2742
2914
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2743
2915
|
/>
|
|
2744
|
-
|
|
2916
|
+
{gt("gui.silent")}
|
|
2745
2917
|
</label>
|
|
2746
2918
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer">
|
|
2747
2919
|
<input
|
|
@@ -2754,15 +2926,15 @@ export default Plugin.define({
|
|
|
2754
2926
|
}}
|
|
2755
2927
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2756
2928
|
/>
|
|
2757
|
-
|
|
2929
|
+
{gt("gui.dashboardLink")}
|
|
2758
2930
|
</label>
|
|
2759
2931
|
</div>
|
|
2760
2932
|
<div style="font-size:11px;color:#8e8e93">
|
|
2761
|
-
|
|
2933
|
+
{gt("gui.botTokenEnvHint")}
|
|
2762
2934
|
</div>
|
|
2763
2935
|
</div>
|
|
2764
2936
|
|
|
2765
|
-
{/*
|
|
2937
|
+
{/* {gt("gui.nativeNotifications")} (Спринт 25) */}
|
|
2766
2938
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
2767
2939
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
|
|
2768
2940
|
<input
|
|
@@ -2775,7 +2947,7 @@ export default Plugin.define({
|
|
|
2775
2947
|
}}
|
|
2776
2948
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2777
2949
|
/>
|
|
2778
|
-
|
|
2950
|
+
{gt("gui.nativeNotifications")}
|
|
2779
2951
|
</label>
|
|
2780
2952
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() && nativeEnabled() ? 1 : 0.5}`}>
|
|
2781
2953
|
<input
|
|
@@ -2788,14 +2960,14 @@ export default Plugin.define({
|
|
|
2788
2960
|
}}
|
|
2789
2961
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2790
2962
|
/>
|
|
2791
|
-
|
|
2963
|
+
{gt("gui.withSound")}
|
|
2792
2964
|
</label>
|
|
2793
2965
|
<div style="font-size:11px;color:#8e8e93">
|
|
2794
|
-
|
|
2966
|
+
{gt("gui.nativeHint")}
|
|
2795
2967
|
</div>
|
|
2796
2968
|
</div>
|
|
2797
2969
|
|
|
2798
|
-
{/*
|
|
2970
|
+
{/* {gt("gui.quietHours")} (Спринт 25) */}
|
|
2799
2971
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
2800
2972
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
|
|
2801
2973
|
<input
|
|
@@ -2808,10 +2980,10 @@ export default Plugin.define({
|
|
|
2808
2980
|
}}
|
|
2809
2981
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2810
2982
|
/>
|
|
2811
|
-
|
|
2983
|
+
{gt("gui.quietHours")}
|
|
2812
2984
|
</label>
|
|
2813
2985
|
<div style={`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && quietEnabled() ? 1 : 0.5}`}>
|
|
2814
|
-
<span
|
|
2986
|
+
<span>{gt("gui.quietFrom")}</span>
|
|
2815
2987
|
<input
|
|
2816
2988
|
type="time"
|
|
2817
2989
|
value={quietFrom()}
|
|
@@ -2820,7 +2992,7 @@ export default Plugin.define({
|
|
|
2820
2992
|
onChange={() => void saveNotificationSettings()}
|
|
2821
2993
|
style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2822
2994
|
/>
|
|
2823
|
-
<span
|
|
2995
|
+
<span>{gt("gui.quietTo")}</span>
|
|
2824
2996
|
<input
|
|
2825
2997
|
type="time"
|
|
2826
2998
|
value={quietTo()}
|
|
@@ -2831,20 +3003,20 @@ export default Plugin.define({
|
|
|
2831
3003
|
/>
|
|
2832
3004
|
</div>
|
|
2833
3005
|
<div style="font-size:11px;color:#8e8e93">
|
|
2834
|
-
|
|
3006
|
+
{gt("gui.quietHoursHint")}
|
|
2835
3007
|
</div>
|
|
2836
3008
|
</div>
|
|
2837
3009
|
|
|
2838
3010
|
{/* Фильтры по задачам (Спринт 20) */}
|
|
2839
3011
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
2840
|
-
<div style="font-size:12px;color:#e0e0e0;font-weight:600"
|
|
3012
|
+
<div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.taskFiltersHeading")}</div>
|
|
2841
3013
|
<input
|
|
2842
3014
|
type="text"
|
|
2843
3015
|
value={filterInclude() || ""}
|
|
2844
3016
|
disabled={!notificationsEnabled()}
|
|
2845
3017
|
onInput={(e) => setFilterInclude(e.currentTarget.value)}
|
|
2846
3018
|
onChange={() => void saveNotificationSettings()}
|
|
2847
|
-
placeholder="
|
|
3019
|
+
placeholder={gt("gui.filterIncludePlaceholder")}
|
|
2848
3020
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
|
|
2849
3021
|
/>
|
|
2850
3022
|
<input
|
|
@@ -2853,24 +3025,24 @@ export default Plugin.define({
|
|
|
2853
3025
|
disabled={!notificationsEnabled()}
|
|
2854
3026
|
onInput={(e) => setFilterExclude(e.currentTarget.value)}
|
|
2855
3027
|
onChange={() => void saveNotificationSettings()}
|
|
2856
|
-
placeholder="
|
|
3028
|
+
placeholder={gt("gui.filterExcludePlaceholder")}
|
|
2857
3029
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
|
|
2858
3030
|
/>
|
|
2859
3031
|
<div style="font-size:11px;color:#8e8e93">
|
|
2860
|
-
|
|
3032
|
+
{gt("gui.filterHint")}
|
|
2861
3033
|
</div>
|
|
2862
3034
|
</div>
|
|
2863
3035
|
|
|
2864
3036
|
{/* Шаблоны сообщений (Спринт 20) */}
|
|
2865
3037
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
2866
|
-
<div style="font-size:12px;color:#e0e0e0;font-weight:600"
|
|
3038
|
+
<div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.templatesHeading")}</div>
|
|
2867
3039
|
<input
|
|
2868
3040
|
type="text"
|
|
2869
3041
|
value={templateSuccess() || ""}
|
|
2870
3042
|
disabled={!notificationsEnabled()}
|
|
2871
3043
|
onInput={(e) => setTemplateSuccess(e.currentTarget.value)}
|
|
2872
3044
|
onChange={() => void saveNotificationSettings()}
|
|
2873
|
-
placeholder={
|
|
3045
|
+
placeholder={gt("gui.templateSuccessPlaceholder")}
|
|
2874
3046
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
|
|
2875
3047
|
/>
|
|
2876
3048
|
<input
|
|
@@ -2879,18 +3051,18 @@ export default Plugin.define({
|
|
|
2879
3051
|
disabled={!notificationsEnabled()}
|
|
2880
3052
|
onInput={(e) => setTemplateError(e.currentTarget.value)}
|
|
2881
3053
|
onChange={() => void saveNotificationSettings()}
|
|
2882
|
-
placeholder={
|
|
3054
|
+
placeholder={gt("gui.templateErrorPlaceholder")}
|
|
2883
3055
|
style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
|
|
2884
3056
|
/>
|
|
2885
3057
|
<div style="font-size:11px;color:#8e8e93">
|
|
2886
|
-
|
|
3058
|
+
{gt("gui.templateHint")}
|
|
2887
3059
|
</div>
|
|
2888
3060
|
</div>
|
|
2889
3061
|
|
|
2890
3062
|
{/* 🔐 Секреты (Спринт 26) */}
|
|
2891
3063
|
<div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden">
|
|
2892
3064
|
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px">
|
|
2893
|
-
<span style="font-size:12px;font-weight:600;color:#e0e0e0"
|
|
3065
|
+
<span style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.secrets")}</span>
|
|
2894
3066
|
<span style="font-size:11px;color:#8e8e93">{secretsList().length}</span>
|
|
2895
3067
|
</div>
|
|
2896
3068
|
<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
|
|
@@ -2898,7 +3070,7 @@ export default Plugin.define({
|
|
|
2898
3070
|
<input
|
|
2899
3071
|
type="text"
|
|
2900
3072
|
value={secretName()}
|
|
2901
|
-
placeholder="
|
|
3073
|
+
placeholder={gt("gui.secretNamePlaceholder")}
|
|
2902
3074
|
onInput={(e) => setSecretName(e.currentTarget.value)}
|
|
2903
3075
|
style="width:220px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2904
3076
|
/>
|
|
@@ -2906,7 +3078,7 @@ export default Plugin.define({
|
|
|
2906
3078
|
type="password"
|
|
2907
3079
|
autocomplete="new-password"
|
|
2908
3080
|
value={secretValue()}
|
|
2909
|
-
placeholder="
|
|
3081
|
+
placeholder={gt("gui.secretValuePlaceholder")}
|
|
2910
3082
|
onInput={(e) => setSecretValue(e.currentTarget.value)}
|
|
2911
3083
|
style="width:320px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
2912
3084
|
/>
|
|
@@ -2917,7 +3089,7 @@ export default Plugin.define({
|
|
|
2917
3089
|
? "padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6"
|
|
2918
3090
|
: "padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1"}
|
|
2919
3091
|
>
|
|
2920
|
-
{secretsBusy() ? "
|
|
3092
|
+
{secretsBusy() ? gt("gui.saving") : gt("gui.save")}
|
|
2921
3093
|
</button>
|
|
2922
3094
|
</div>
|
|
2923
3095
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;overflow:auto">
|
|
@@ -2930,7 +3102,7 @@ export default Plugin.define({
|
|
|
2930
3102
|
<span style="color:#ce9178">•••• {item.preview}</span>
|
|
2931
3103
|
<button
|
|
2932
3104
|
onClick={() => void handleDeleteSecret(item.name)}
|
|
2933
|
-
title="
|
|
3105
|
+
title={gt("gui.delete")}
|
|
2934
3106
|
style="padding:2px 6px;background:#c43b2b;color:white;border:none;border-radius:3px;cursor:pointer;font-size:10px;font-weight:600;line-height:1"
|
|
2935
3107
|
>
|
|
2936
3108
|
×
|
|
@@ -2938,17 +3110,17 @@ export default Plugin.define({
|
|
|
2938
3110
|
</span>
|
|
2939
3111
|
))}
|
|
2940
3112
|
{secretsList().length === 0 && (
|
|
2941
|
-
<span style="font-size:11px;color:#8e8e93"
|
|
3113
|
+
<span style="font-size:11px;color:#8e8e93">{gt("gui.secretsEmpty")}</span>
|
|
2942
3114
|
)}
|
|
2943
3115
|
</div>
|
|
2944
3116
|
<div style="font-size:11px;color:#8e8e93">
|
|
2945
|
-
|
|
3117
|
+
{gt("gui.secretsUsage", { secretRef: "{secret:NAME}" })}
|
|
2946
3118
|
</div>
|
|
2947
3119
|
</div>
|
|
2948
3120
|
</div>
|
|
2949
3121
|
{/* Уведомления о матрицах (Спринт 20) */}
|
|
2950
3122
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
2951
|
-
<div style="font-size:12px;color:#e0e0e0;font-weight:600"
|
|
3123
|
+
<div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.matrixNotifyHeading")}</div>
|
|
2952
3124
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
|
|
2953
3125
|
<input
|
|
2954
3126
|
type="checkbox"
|
|
@@ -2960,7 +3132,7 @@ export default Plugin.define({
|
|
|
2960
3132
|
}}
|
|
2961
3133
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2962
3134
|
/>
|
|
2963
|
-
|
|
3135
|
+
{gt("gui.matrixNotifyEnable")}
|
|
2964
3136
|
</label>
|
|
2965
3137
|
<div style={`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && matrixNotifyEnabled() ? 1 : 0.5}`}>
|
|
2966
3138
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer">
|
|
@@ -2987,9 +3159,9 @@ export default Plugin.define({
|
|
|
2987
3159
|
}}
|
|
2988
3160
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
2989
3161
|
/>
|
|
2990
|
-
|
|
3162
|
+
{gt("gui.matrixAllFailed")}
|
|
2991
3163
|
</label>
|
|
2992
|
-
<span
|
|
3164
|
+
<span>{gt("gui.matrixStuckMinutes")}</span>
|
|
2993
3165
|
<input
|
|
2994
3166
|
type="number"
|
|
2995
3167
|
min="0"
|
|
@@ -3002,13 +3174,13 @@ export default Plugin.define({
|
|
|
3002
3174
|
/>
|
|
3003
3175
|
</div>
|
|
3004
3176
|
<div style="font-size:11px;color:#8e8e93">
|
|
3005
|
-
|
|
3177
|
+
{gt("gui.matrixStuckHint")}
|
|
3006
3178
|
</div>
|
|
3007
3179
|
</div>
|
|
3008
3180
|
|
|
3009
3181
|
{/* Дайджест (Спринт 20) */}
|
|
3010
3182
|
<div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
|
|
3011
|
-
<div style="font-size:12px;color:#e0e0e0;font-weight:600"
|
|
3183
|
+
<div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.digestHeading")}</div>
|
|
3012
3184
|
<label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
|
|
3013
3185
|
<input
|
|
3014
3186
|
type="checkbox"
|
|
@@ -3020,7 +3192,7 @@ export default Plugin.define({
|
|
|
3020
3192
|
}}
|
|
3021
3193
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
3022
3194
|
/>
|
|
3023
|
-
|
|
3195
|
+
{gt("gui.digestEnable")}
|
|
3024
3196
|
</label>
|
|
3025
3197
|
<div style={`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && digestEnabled() ? 1 : 0.5}`}>
|
|
3026
3198
|
<select
|
|
@@ -3032,8 +3204,8 @@ export default Plugin.define({
|
|
|
3032
3204
|
}}
|
|
3033
3205
|
style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3034
3206
|
>
|
|
3035
|
-
<option value="daily"
|
|
3036
|
-
<option value="weekly"
|
|
3207
|
+
<option value="daily">{gt("gui.digestDaily")}</option>
|
|
3208
|
+
<option value="weekly">{gt("gui.digestWeekly")}</option>
|
|
3037
3209
|
</select>
|
|
3038
3210
|
<input
|
|
3039
3211
|
type="time"
|
|
@@ -3045,12 +3217,12 @@ export default Plugin.define({
|
|
|
3045
3217
|
/>
|
|
3046
3218
|
<span style="font-size:11px;color:#8e8e93">
|
|
3047
3219
|
{digestLastSentAt()
|
|
3048
|
-
?
|
|
3049
|
-
: "
|
|
3220
|
+
? gt("gui.digestLastSent", { when: new Date(digestLastSentAt()!).toLocaleString() })
|
|
3221
|
+
: gt("gui.digestNeverSent")}
|
|
3050
3222
|
</span>
|
|
3051
3223
|
</div>
|
|
3052
3224
|
<div style="font-size:11px;color:#8e8e93">
|
|
3053
|
-
|
|
3225
|
+
{gt("gui.digestHint")}
|
|
3054
3226
|
</div>
|
|
3055
3227
|
</div>
|
|
3056
3228
|
|
|
@@ -3060,17 +3232,17 @@ export default Plugin.define({
|
|
|
3060
3232
|
disabled={testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled())}
|
|
3061
3233
|
style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? 0.6 : 1}`}
|
|
3062
3234
|
>
|
|
3063
|
-
{testNotificationBusy() ? "
|
|
3235
|
+
{testNotificationBusy() ? gt("gui.sending") : gt("gui.sendTestNotification")}
|
|
3064
3236
|
</button>
|
|
3065
3237
|
<button
|
|
3066
3238
|
onClick={() => void handleSendDigest()}
|
|
3067
3239
|
disabled={digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled())}
|
|
3068
3240
|
style={`padding:6px 12px;background:#2d7d46;color:white;border:none;border-radius:6px;cursor:${digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? 0.6 : 1}`}
|
|
3069
3241
|
>
|
|
3070
|
-
{digestBusy() ? "
|
|
3242
|
+
{digestBusy() ? gt("gui.sending") : gt("gui.sendDigestNow")}
|
|
3071
3243
|
</button>
|
|
3072
3244
|
<span style="font-size:11px;color:#8e8e93">
|
|
3073
|
-
|
|
3245
|
+
{gt("gui.digestChannels")}
|
|
3074
3246
|
</span>
|
|
3075
3247
|
</div>
|
|
3076
3248
|
</div>
|
|
@@ -3083,9 +3255,9 @@ export default Plugin.define({
|
|
|
3083
3255
|
onClick={() => setHistoryCollapsed(!historyCollapsed())}
|
|
3084
3256
|
style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"
|
|
3085
3257
|
>
|
|
3086
|
-
<span
|
|
3258
|
+
<span>{gt("gui.historyHeading")}</span>
|
|
3087
3259
|
<span style="display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93">
|
|
3088
|
-
{historyRetentionDays() > 0 ?
|
|
3260
|
+
{historyRetentionDays() > 0 ? gt("gui.historyOlderThan", { days: historyRetentionDays() }) : gt("gui.historyNoExpiry")} · {historyMaxRecords() > 0 ? gt("gui.historyUpToRecords", { count: historyMaxRecords() }) : gt("gui.historyNoLimit")}
|
|
3089
3261
|
<span>{historyCollapsed() ? "▾" : "▴"}</span>
|
|
3090
3262
|
</span>
|
|
3091
3263
|
</button>
|
|
@@ -3093,7 +3265,7 @@ export default Plugin.define({
|
|
|
3093
3265
|
{!historyCollapsed() && (
|
|
3094
3266
|
<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
|
|
3095
3267
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
3096
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3268
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyDeleteOlderLabel")}</label>
|
|
3097
3269
|
<input
|
|
3098
3270
|
type="number"
|
|
3099
3271
|
min="0"
|
|
@@ -3104,11 +3276,11 @@ export default Plugin.define({
|
|
|
3104
3276
|
}}
|
|
3105
3277
|
style="width:70px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3106
3278
|
/>
|
|
3107
|
-
<span style="font-size:11px;color:#8e8e93">
|
|
3279
|
+
<span style="font-size:11px;color:#8e8e93">{gt("gui.zeroKeepByAge")}</span>
|
|
3108
3280
|
</div>
|
|
3109
3281
|
|
|
3110
3282
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
3111
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3283
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyKeepMaxLabel")}</label>
|
|
3112
3284
|
<input
|
|
3113
3285
|
type="number"
|
|
3114
3286
|
min="0"
|
|
@@ -3119,14 +3291,14 @@ export default Plugin.define({
|
|
|
3119
3291
|
}}
|
|
3120
3292
|
style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3121
3293
|
/>
|
|
3122
|
-
<span style="font-size:11px;color:#8e8e93">
|
|
3294
|
+
<span style="font-size:11px;color:#8e8e93">{gt("gui.zeroNoLimit")}</span>
|
|
3123
3295
|
</div>
|
|
3124
3296
|
|
|
3125
3297
|
<div style="font-size:11px;color:#8e8e93">
|
|
3126
|
-
|
|
3298
|
+
{gt("gui.lastCleanupLabel")}{" "}
|
|
3127
3299
|
{historyLastCleanupAt()
|
|
3128
|
-
?
|
|
3129
|
-
: "
|
|
3300
|
+
? gt("gui.lastCleanupDone", { when: new Date(historyLastCleanupAt()!).toLocaleString(), deleted: historyLastCleanupDeleted() })
|
|
3301
|
+
: gt("gui.lastCleanupNever")}
|
|
3130
3302
|
</div>
|
|
3131
3303
|
|
|
3132
3304
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
@@ -3135,10 +3307,10 @@ export default Plugin.define({
|
|
|
3135
3307
|
disabled={historyCleanupBusy()}
|
|
3136
3308
|
style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${historyCleanupBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${historyCleanupBusy() ? 0.6 : 1}`}
|
|
3137
3309
|
>
|
|
3138
|
-
{historyCleanupBusy() ? "
|
|
3310
|
+
{historyCleanupBusy() ? gt("gui.cleaningUp") : gt("gui.cleanupNow")}
|
|
3139
3311
|
</button>
|
|
3140
3312
|
<span style="font-size:11px;color:#8e8e93">
|
|
3141
|
-
|
|
3313
|
+
{gt("gui.historyCleanupHint")}
|
|
3142
3314
|
</span>
|
|
3143
3315
|
</div>
|
|
3144
3316
|
</div>
|
|
@@ -3152,7 +3324,7 @@ export default Plugin.define({
|
|
|
3152
3324
|
onClick={() => setAuditCollapsed(!auditCollapsed())}
|
|
3153
3325
|
style="display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0"
|
|
3154
3326
|
>
|
|
3155
|
-
<span
|
|
3327
|
+
<span>{gt("gui.auditHeading")}</span>
|
|
3156
3328
|
<span style="font-size:11px;font-weight:400;color:#8e8e93">{auditRecords().length}</span>
|
|
3157
3329
|
<span style="font-size:11px;color:#8e8e93">{auditCollapsed() ? "▾" : "▴"}</span>
|
|
3158
3330
|
</button>
|
|
@@ -3161,16 +3333,16 @@ export default Plugin.define({
|
|
|
3161
3333
|
{!auditCollapsed() && (
|
|
3162
3334
|
<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
|
|
3163
3335
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
|
|
3164
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3336
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditAction")}</label>
|
|
3165
3337
|
<input
|
|
3166
3338
|
type="text"
|
|
3167
3339
|
value={auditFilterAction()}
|
|
3168
|
-
placeholder="
|
|
3340
|
+
placeholder={gt("gui.auditActionPlaceholder")}
|
|
3169
3341
|
onInput={(e) => setAuditFilterAction(e.currentTarget.value)}
|
|
3170
3342
|
onChange={() => void loadAuditGui()}
|
|
3171
3343
|
style="width:150px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3172
3344
|
/>
|
|
3173
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3345
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditSource")}</label>
|
|
3174
3346
|
<input
|
|
3175
3347
|
type="text"
|
|
3176
3348
|
value={auditFilterActor()}
|
|
@@ -3179,11 +3351,11 @@ export default Plugin.define({
|
|
|
3179
3351
|
onChange={() => void loadAuditGui()}
|
|
3180
3352
|
style="width:110px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3181
3353
|
/>
|
|
3182
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3354
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditTarget")}</label>
|
|
3183
3355
|
<input
|
|
3184
3356
|
type="text"
|
|
3185
3357
|
value={auditFilterTarget()}
|
|
3186
|
-
placeholder="
|
|
3358
|
+
placeholder={gt("gui.auditTargetPlaceholder")}
|
|
3187
3359
|
onInput={(e) => setAuditFilterTarget(e.currentTarget.value)}
|
|
3188
3360
|
onChange={() => void loadAuditGui()}
|
|
3189
3361
|
style="width:180px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
@@ -3195,19 +3367,19 @@ export default Plugin.define({
|
|
|
3195
3367
|
? "padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6"
|
|
3196
3368
|
: "padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1"}
|
|
3197
3369
|
>
|
|
3198
|
-
{auditBusy() ? "
|
|
3370
|
+
{auditBusy() ? gt("gui.loading") : gt("gui.refresh")}
|
|
3199
3371
|
</button>
|
|
3200
3372
|
</div>
|
|
3201
3373
|
<div style="width:100%;overflow:auto;border:1px solid #333;border-radius:6px;background:#0f0f0f">
|
|
3202
3374
|
<table style="width:100%;border-collapse:collapse;font-size:11px">
|
|
3203
3375
|
<thead>
|
|
3204
3376
|
<tr style="border-bottom:1px solid #333">
|
|
3205
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3206
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3207
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3208
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3209
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3210
|
-
<th style="text-align:left;padding:6px 8px;color:#8e8e93"
|
|
3377
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditTime")}</th>
|
|
3378
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditAction")}</th>
|
|
3379
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditTarget")}</th>
|
|
3380
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditSource")}</th>
|
|
3381
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditActor")}</th>
|
|
3382
|
+
<th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditDeletedFrom")}</th>
|
|
3211
3383
|
</tr>
|
|
3212
3384
|
</thead>
|
|
3213
3385
|
<tbody>
|
|
@@ -3223,14 +3395,14 @@ export default Plugin.define({
|
|
|
3223
3395
|
))}
|
|
3224
3396
|
{auditRecords().length === 0 && (
|
|
3225
3397
|
<tr>
|
|
3226
|
-
<td colspan="6" style="padding:10px 8px;color:#8e8e93;text-align:center"
|
|
3398
|
+
<td colspan="6" style="padding:10px 8px;color:#8e8e93;text-align:center">{gt("gui.auditEmpty")}</td>
|
|
3227
3399
|
</tr>
|
|
3228
3400
|
)}
|
|
3229
3401
|
</tbody>
|
|
3230
3402
|
</table>
|
|
3231
3403
|
</div>
|
|
3232
3404
|
<div style="font-size:11px;color:#8e8e93">
|
|
3233
|
-
|
|
3405
|
+
{gt("gui.auditHint", { redacted: "***" })}
|
|
3234
3406
|
</div>
|
|
3235
3407
|
</div>
|
|
3236
3408
|
)}
|
|
@@ -3239,7 +3411,7 @@ export default Plugin.define({
|
|
|
3239
3411
|
{/* 🧹 Настройки аудита (ретеншн) */}
|
|
3240
3412
|
<div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden">
|
|
3241
3413
|
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px">
|
|
3242
|
-
<span style="font-size:12px;font-weight:600;color:#e0e0e0"
|
|
3414
|
+
<span style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.auditStorageHeading")}</span>
|
|
3243
3415
|
</div>
|
|
3244
3416
|
<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
|
|
3245
3417
|
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
|
|
@@ -3253,11 +3425,11 @@ export default Plugin.define({
|
|
|
3253
3425
|
}}
|
|
3254
3426
|
style="accent-color:#5ac8fa;cursor:pointer;margin:0"
|
|
3255
3427
|
/>
|
|
3256
|
-
|
|
3428
|
+
{gt("gui.auditEnable")}
|
|
3257
3429
|
</label>
|
|
3258
3430
|
</div>
|
|
3259
3431
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
3260
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3432
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyDeleteOlderLabel")}</label>
|
|
3261
3433
|
<input
|
|
3262
3434
|
type="number"
|
|
3263
3435
|
min="0"
|
|
@@ -3268,10 +3440,10 @@ export default Plugin.define({
|
|
|
3268
3440
|
}}
|
|
3269
3441
|
style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3270
3442
|
/>
|
|
3271
|
-
<span style="font-size:11px;color:#8e8e93">
|
|
3443
|
+
<span style="font-size:11px;color:#8e8e93">{gt("gui.zeroKeepByAge")}</span>
|
|
3272
3444
|
</div>
|
|
3273
3445
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
3274
|
-
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap"
|
|
3446
|
+
<label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyKeepMaxLabel")}</label>
|
|
3275
3447
|
<input
|
|
3276
3448
|
type="number"
|
|
3277
3449
|
min="0"
|
|
@@ -3282,7 +3454,7 @@ export default Plugin.define({
|
|
|
3282
3454
|
}}
|
|
3283
3455
|
style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
|
|
3284
3456
|
/>
|
|
3285
|
-
<span style="font-size:11px;color:#8e8e93">
|
|
3457
|
+
<span style="font-size:11px;color:#8e8e93">{gt("gui.zeroNoLimit")}</span>
|
|
3286
3458
|
</div>
|
|
3287
3459
|
</div>
|
|
3288
3460
|
</div>
|
|
@@ -3301,17 +3473,17 @@ export default Plugin.define({
|
|
|
3301
3473
|
<button
|
|
3302
3474
|
onClick={() => void handleAddWorkspace()}
|
|
3303
3475
|
disabled={workspaceBusy()}
|
|
3304
|
-
title="
|
|
3476
|
+
title={gt("gui.workspaceAddTitle")}
|
|
3305
3477
|
style={`padding:5px 10px;border-radius:6px;border:1px solid #333;background:#252526;color:${workspaceBusy() ? "#666" : "#5ac8fa"};font-size:11px;font-weight:600;cursor:${workspaceBusy() ? "not-allowed" : "pointer"}`}
|
|
3306
3478
|
>
|
|
3307
|
-
|
|
3479
|
+
{gt("gui.add")}
|
|
3308
3480
|
</button>
|
|
3309
3481
|
</div>
|
|
3310
3482
|
{!workspacesCollapsed() && (
|
|
3311
3483
|
<div style="display:flex;flex-direction:column;gap:6px;padding:0 14px 12px">
|
|
3312
3484
|
{workspaces().length === 0 ? (
|
|
3313
3485
|
<div style="font-size:12px;color:#8e8e93;padding:4px 0">
|
|
3314
|
-
|
|
3486
|
+
{gt("gui.workspaceEmpty")}
|
|
3315
3487
|
</div>
|
|
3316
3488
|
) : (
|
|
3317
3489
|
workspaces().map((workspace) => (
|
|
@@ -3321,29 +3493,29 @@ export default Plugin.define({
|
|
|
3321
3493
|
<span style="font-size:12px;font-weight:700;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">📦 {workspace.name}</span>
|
|
3322
3494
|
<span style="font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis" title={workspace.path}>{workspace.path}</span>
|
|
3323
3495
|
<span style="font-size:10px;color:#a0a0a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">
|
|
3324
|
-
|
|
3496
|
+
{gt("gui.workspaceGitInfo", { branch: workspace.gitBranch || "—", remote: workspace.gitRemote || gt("gui.remoteNotSet") })}
|
|
3325
3497
|
</span>
|
|
3326
3498
|
<span style="font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">
|
|
3327
|
-
|
|
3499
|
+
{gt("gui.workspaceEnvLine", { count: workspace.env ? Object.keys(workspace.env).length : "—", envFile: workspace.envFile ? gt("gui.workspaceEnvFile") : "" })}
|
|
3328
3500
|
</span>
|
|
3329
3501
|
</div>
|
|
3330
3502
|
<div style="display:flex;gap:4px;flex-shrink:0">
|
|
3331
3503
|
<button
|
|
3332
3504
|
onClick={() => void handleEditWorkspaceEnv(workspace)}
|
|
3333
3505
|
disabled={workspaceBusy()}
|
|
3334
|
-
title="
|
|
3506
|
+
title={gt("gui.workspaceEnvTitle")}
|
|
3335
3507
|
style="background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px"
|
|
3336
3508
|
>🔑</button>
|
|
3337
3509
|
<button
|
|
3338
3510
|
onClick={() => void handleEditWorkspace(workspace)}
|
|
3339
3511
|
disabled={workspaceBusy()}
|
|
3340
|
-
title="
|
|
3512
|
+
title={gt("gui.workspaceEditTitle")}
|
|
3341
3513
|
style="background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px"
|
|
3342
3514
|
>✏️</button>
|
|
3343
3515
|
<button
|
|
3344
3516
|
onClick={() => void handleDeleteWorkspace(workspace)}
|
|
3345
3517
|
disabled={workspaceBusy()}
|
|
3346
|
-
title="
|
|
3518
|
+
title={gt("gui.workspaceDeleteTitle")}
|
|
3347
3519
|
style="background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;padding:2px"
|
|
3348
3520
|
>🗑</button>
|
|
3349
3521
|
</div>
|
|
@@ -3358,37 +3530,37 @@ export default Plugin.define({
|
|
|
3358
3530
|
{formCollapsed() ? (
|
|
3359
3531
|
<button
|
|
3360
3532
|
onClick={() => setFormCollapsed(false)}
|
|
3361
|
-
title="
|
|
3533
|
+
title={gt("gui.expandFormTitle")}
|
|
3362
3534
|
style="display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:700px;box-sizing:border-box;padding:12px 16px;background:#1e1e1e;border:1px dashed #3a3a3a;border-radius:10px;color:#e0e0e0;font-size:13px;font-weight:600;cursor:pointer;transition:border-color 0.18s ease, background 0.18s ease"
|
|
3363
3535
|
onMouseEnter={(e) => { const b = e.currentTarget; b.style.borderColor = "#5ac8fa"; b.style.background = "#232326" }}
|
|
3364
3536
|
onMouseLeave={(e) => { const b = e.currentTarget; b.style.borderColor = "#3a3a3a"; b.style.background = "#1e1e1e" }}
|
|
3365
3537
|
>
|
|
3366
|
-
|
|
3538
|
+
{gt("gui.createTask")}
|
|
3367
3539
|
</button>
|
|
3368
3540
|
) : (
|
|
3369
3541
|
<div style="display:block;width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;padding:20px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,0.2)">
|
|
3370
|
-
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px">
|
|
3542
|
+
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px;flex-wrap:wrap">
|
|
3371
3543
|
<h3 style="margin:0;font-size:14px;font-weight:600;color:#ffffff">
|
|
3372
|
-
{isEditing ? "
|
|
3544
|
+
{isEditing ? gt("gui.editingTask") : gt("gui.newTask")}
|
|
3373
3545
|
</h3>
|
|
3374
|
-
<div style="display:flex;align-items:center;gap:8px">
|
|
3546
|
+
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
|
|
3375
3547
|
<button
|
|
3376
3548
|
onClick={handleSaveAsTemplate}
|
|
3377
|
-
title="
|
|
3549
|
+
title={gt("gui.saveAsTemplateTitle")}
|
|
3378
3550
|
style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"
|
|
3379
3551
|
onMouseEnter={(e) => { const b = e.currentTarget; b.style.color = "#5ac8fa"; b.style.borderColor = "#5ac8fa" }}
|
|
3380
3552
|
onMouseLeave={(e) => { const b = e.currentTarget; b.style.color = "#a0a0a6"; b.style.borderColor = "#333" }}
|
|
3381
3553
|
>
|
|
3382
|
-
|
|
3554
|
+
{gt("gui.saveAsTemplate")}
|
|
3383
3555
|
</button>
|
|
3384
3556
|
<button
|
|
3385
3557
|
onClick={() => setFormCollapsed(true)}
|
|
3386
|
-
title="
|
|
3558
|
+
title={gt("gui.collapseFormTitle")}
|
|
3387
3559
|
style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"
|
|
3388
3560
|
onMouseEnter={(e) => { const b = e.currentTarget; b.style.color = "#5ac8fa"; b.style.borderColor = "#5ac8fa" }}
|
|
3389
3561
|
onMouseLeave={(e) => { const b = e.currentTarget; b.style.color = "#a0a0a6"; b.style.borderColor = "#333" }}
|
|
3390
3562
|
>
|
|
3391
|
-
|
|
3563
|
+
{gt("gui.hideForm")}
|
|
3392
3564
|
</button>
|
|
3393
3565
|
</div>
|
|
3394
3566
|
</div>
|
|
@@ -3414,17 +3586,17 @@ export default Plugin.define({
|
|
|
3414
3586
|
📦 Matrix (Fan-Out)
|
|
3415
3587
|
</label>
|
|
3416
3588
|
<div style="font-size:11px;color:#8e8e93;margin-top:4px;line-height:1.45">
|
|
3417
|
-
|
|
3589
|
+
{gt("gui.matrixHint")}
|
|
3418
3590
|
</div>
|
|
3419
3591
|
|
|
3420
3592
|
{matrixMode() && (
|
|
3421
3593
|
<div style="margin-top:10px;display:flex;flex-direction:column;gap:10px">
|
|
3422
3594
|
<div>
|
|
3423
3595
|
<div style="font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:6px">
|
|
3424
|
-
|
|
3596
|
+
{gt("gui.matrixWorkspacesSelected", { count: matrixWorkspaceIds().length })}
|
|
3425
3597
|
</div>
|
|
3426
3598
|
{workspaces().length === 0 ? (
|
|
3427
|
-
<div style="font-size:11px;color:#f5a623"
|
|
3599
|
+
<div style="font-size:11px;color:#f5a623">{gt("gui.addWorkspaceFirst")}</div>
|
|
3428
3600
|
) : (
|
|
3429
3601
|
<div style="display:flex;flex-direction:column;gap:4px;max-height:170px;overflow:auto;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px">
|
|
3430
3602
|
{workspaces().map((workspace) => (
|
|
@@ -3445,36 +3617,36 @@ export default Plugin.define({
|
|
|
3445
3617
|
|
|
3446
3618
|
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
|
3447
3619
|
<label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
|
|
3448
|
-
|
|
3620
|
+
{gt("gui.strategy")}
|
|
3449
3621
|
<select
|
|
3450
3622
|
value={matrixStrategy()}
|
|
3451
3623
|
onChange={(e) => setMatrixStrategy(e.currentTarget.value === "sequential" ? "sequential" : "parallel")}
|
|
3452
3624
|
style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
|
|
3453
3625
|
>
|
|
3454
|
-
<option value="parallel">
|
|
3455
|
-
<option value="sequential">
|
|
3626
|
+
<option value="parallel">{gt("gui.matrixParallel")}</option>
|
|
3627
|
+
<option value="sequential">{gt("gui.matrixSequential")}</option>
|
|
3456
3628
|
</select>
|
|
3457
3629
|
</label>
|
|
3458
3630
|
<label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
|
|
3459
|
-
|
|
3631
|
+
{gt("gui.onFailure")}
|
|
3460
3632
|
<select
|
|
3461
3633
|
value={matrixFailureMode()}
|
|
3462
3634
|
onChange={(e) => setMatrixFailureMode(e.currentTarget.value === "stop" ? "stop" : "continue")}
|
|
3463
3635
|
style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
|
|
3464
3636
|
>
|
|
3465
|
-
<option value="continue">
|
|
3466
|
-
<option value="stop">
|
|
3637
|
+
<option value="continue">{gt("gui.matrixContinue")}</option>
|
|
3638
|
+
<option value="stop">{gt("gui.matrixStop")}</option>
|
|
3467
3639
|
</select>
|
|
3468
3640
|
</label>
|
|
3469
3641
|
<label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
|
|
3470
|
-
|
|
3642
|
+
{gt("gui.aggregation")}
|
|
3471
3643
|
<select
|
|
3472
3644
|
value={matrixAggregation()}
|
|
3473
3645
|
onChange={(e) => setMatrixAggregation(e.currentTarget.value === "per-task" ? "per-task" : "summary")}
|
|
3474
3646
|
style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
|
|
3475
3647
|
>
|
|
3476
|
-
<option value="summary">
|
|
3477
|
-
<option value="per-task">
|
|
3648
|
+
<option value="summary">{gt("gui.matrixSummary")}</option>
|
|
3649
|
+
<option value="per-task">{gt("gui.matrixPerTask")}</option>
|
|
3478
3650
|
</select>
|
|
3479
3651
|
</label>
|
|
3480
3652
|
</div>
|
|
@@ -3486,20 +3658,18 @@ export default Plugin.define({
|
|
|
3486
3658
|
onChange={(e) => setMatrixAggregator(e.currentTarget.checked)}
|
|
3487
3659
|
style="accent-color:#ff9f0a"
|
|
3488
3660
|
/>
|
|
3489
|
-
|
|
3661
|
+
{gt("gui.matrixAggregator")}
|
|
3490
3662
|
</label>
|
|
3491
3663
|
|
|
3492
3664
|
<label style="font-size:11px;color:#b0b0b0;max-width:240px">
|
|
3493
|
-
|
|
3665
|
+
{gt("gui.matrixConcurrency")}
|
|
3494
3666
|
<input
|
|
3495
3667
|
type="number"
|
|
3496
3668
|
min="1"
|
|
3497
3669
|
step="1"
|
|
3498
3670
|
value={matrixConcurrency()}
|
|
3499
3671
|
onInput={(e) => setMatrixConcurrency(e.currentTarget.value)}
|
|
3500
|
-
placeholder={
|
|
3501
|
-
matrixStrategy() === "sequential" ? "1 (sequential)" : "без лимита"
|
|
3502
|
-
}
|
|
3672
|
+
placeholder={matrixStrategy() === "sequential" ? gt("gui.concurrencySequentialPlaceholder") : gt("gui.concurrencyUnlimitedPlaceholder")}
|
|
3503
3673
|
style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
|
|
3504
3674
|
/>
|
|
3505
3675
|
</label>
|
|
@@ -3507,7 +3677,7 @@ export default Plugin.define({
|
|
|
3507
3677
|
{matrixWorkspaceIds().length > 0 && (
|
|
3508
3678
|
<details style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px">
|
|
3509
3679
|
<summary style="cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500">
|
|
3510
|
-
|
|
3680
|
+
{gt("gui.matrixOverridesTitle", { count: matrixOverrideCount() })}
|
|
3511
3681
|
</summary>
|
|
3512
3682
|
<div style="margin-top:8px;display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto">
|
|
3513
3683
|
{matrixWorkspaceIds().map((wsId) => {
|
|
@@ -3525,14 +3695,14 @@ export default Plugin.define({
|
|
|
3525
3695
|
<div style="display:flex;flex-direction:column;gap:6px">
|
|
3526
3696
|
<textarea
|
|
3527
3697
|
rows={2}
|
|
3528
|
-
placeholder="
|
|
3698
|
+
placeholder={gt("gui.matrixPromptPlaceholder")}
|
|
3529
3699
|
value={override.prompt ?? ""}
|
|
3530
3700
|
onInput={(e) => updateMatrixOverride(wsId, "prompt", e.currentTarget.value)}
|
|
3531
3701
|
style={`${inputStyle};width:100%;resize:vertical;font-family:inherit`}
|
|
3532
3702
|
/>
|
|
3533
3703
|
<div style="display:flex;gap:6px;flex-wrap:wrap">
|
|
3534
3704
|
<input
|
|
3535
|
-
placeholder="
|
|
3705
|
+
placeholder={gt("gui.matrixModelPlaceholder")}
|
|
3536
3706
|
value={override.model ?? ""}
|
|
3537
3707
|
onInput={(e) => updateMatrixOverride(wsId, "model", e.currentTarget.value)}
|
|
3538
3708
|
style={`${inputStyle};flex:1;min-width:150px`}
|
|
@@ -3569,11 +3739,11 @@ export default Plugin.define({
|
|
|
3569
3739
|
<div style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6">
|
|
3570
3740
|
{matrixPreview().length > 0 ? (
|
|
3571
3741
|
<>
|
|
3572
|
-
<div style="color:#ff9f0a;font-weight:600"
|
|
3742
|
+
<div style="color:#ff9f0a;font-weight:600">{gt("gui.matrixWillCreate", { count: matrixPreview().length })}</div>
|
|
3573
3743
|
<div style="color:#e0e0e0;word-break:break-all">{matrixPreview().join(", ")}</div>
|
|
3574
3744
|
</>
|
|
3575
3745
|
) : (
|
|
3576
|
-
<span style="color:#f5a623"
|
|
3746
|
+
<span style="color:#f5a623">{gt("gui.matrixSelectHint")}</span>
|
|
3577
3747
|
)}
|
|
3578
3748
|
</div>
|
|
3579
3749
|
</div>
|
|
@@ -3582,7 +3752,7 @@ export default Plugin.define({
|
|
|
3582
3752
|
|
|
3583
3753
|
{!matrixMode() && (
|
|
3584
3754
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3585
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">
|
|
3755
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.workspaceMultiRepo")}</label>
|
|
3586
3756
|
<select
|
|
3587
3757
|
value={workspaceId()}
|
|
3588
3758
|
onChange={(e) => {
|
|
@@ -3591,7 +3761,7 @@ export default Plugin.define({
|
|
|
3591
3761
|
}}
|
|
3592
3762
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3593
3763
|
>
|
|
3594
|
-
<option value=""
|
|
3764
|
+
<option value="">{gt("gui.noWorkspaceOption")}</option>
|
|
3595
3765
|
{workspaces().map((workspace) => (
|
|
3596
3766
|
<option key={workspace.id} value={workspace.id}>📦 {workspace.name}</option>
|
|
3597
3767
|
))}
|
|
@@ -3607,32 +3777,32 @@ export default Plugin.define({
|
|
|
3607
3777
|
)}
|
|
3608
3778
|
|
|
3609
3779
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3610
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3780
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.taskNameLabel")}</label>
|
|
3611
3781
|
<input
|
|
3612
3782
|
type="text"
|
|
3613
3783
|
value={name() || ""}
|
|
3614
3784
|
onInput={(e) => setName(e.currentTarget.value)}
|
|
3615
|
-
placeholder="
|
|
3785
|
+
placeholder={gt("gui.taskNamePlaceholder")}
|
|
3616
3786
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3617
3787
|
/>
|
|
3618
3788
|
</div>
|
|
3619
3789
|
|
|
3620
3790
|
{!workspaceId() && !matrixMode() && (
|
|
3621
3791
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3622
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3792
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.workingDirectoryLabel")}</label>
|
|
3623
3793
|
<input
|
|
3624
3794
|
type="text"
|
|
3625
3795
|
value={workingDirectory() || ""}
|
|
3626
3796
|
onInput={(e) => setWorkingDirectory(e.currentTarget.value)}
|
|
3627
|
-
placeholder="
|
|
3797
|
+
placeholder={gt("gui.workingDirectoryPlaceholder")}
|
|
3628
3798
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3629
3799
|
/>
|
|
3630
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
3800
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.workingDirectoryHint")}</div>
|
|
3631
3801
|
</div>
|
|
3632
3802
|
)}
|
|
3633
3803
|
|
|
3634
3804
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3635
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3805
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.triggerTypeLabel")}</label>
|
|
3636
3806
|
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
|
3637
3807
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3638
3808
|
<input
|
|
@@ -3642,7 +3812,7 @@ export default Plugin.define({
|
|
|
3642
3812
|
onChange={() => setTriggerType("cron")}
|
|
3643
3813
|
style="accent-color:#007acc"
|
|
3644
3814
|
/>
|
|
3645
|
-
|
|
3815
|
+
{gt("gui.triggerCron")}
|
|
3646
3816
|
</label>
|
|
3647
3817
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3648
3818
|
<input
|
|
@@ -3652,7 +3822,17 @@ export default Plugin.define({
|
|
|
3652
3822
|
onChange={() => setTriggerType("file")}
|
|
3653
3823
|
style="accent-color:#007acc"
|
|
3654
3824
|
/>
|
|
3655
|
-
|
|
3825
|
+
{gt("gui.triggerFile")}
|
|
3826
|
+
</label>
|
|
3827
|
+
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3828
|
+
<input
|
|
3829
|
+
type="radio"
|
|
3830
|
+
name="triggerType"
|
|
3831
|
+
checked={triggerType() === "git"}
|
|
3832
|
+
onChange={() => setTriggerType("git")}
|
|
3833
|
+
style="accent-color:#007acc"
|
|
3834
|
+
/>
|
|
3835
|
+
{gt("gui.triggerGit")}
|
|
3656
3836
|
</label>
|
|
3657
3837
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3658
3838
|
<input
|
|
@@ -3672,85 +3852,149 @@ export default Plugin.define({
|
|
|
3672
3852
|
onChange={() => setTriggerType("once")}
|
|
3673
3853
|
style="accent-color:#007acc"
|
|
3674
3854
|
/>
|
|
3675
|
-
|
|
3855
|
+
{gt("gui.triggerOnce")}
|
|
3676
3856
|
</label>
|
|
3677
3857
|
</div>
|
|
3678
3858
|
</div>
|
|
3679
3859
|
|
|
3680
3860
|
{triggerType() === "file" && (
|
|
3681
3861
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3682
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3862
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchFileLabel")}</label>
|
|
3683
3863
|
<input
|
|
3684
3864
|
type="text"
|
|
3685
3865
|
value={watchPath() || ""}
|
|
3686
3866
|
onInput={(e) => setWatchPath(e.currentTarget.value)}
|
|
3687
|
-
placeholder="
|
|
3867
|
+
placeholder={gt("gui.watchFilePlaceholder")}
|
|
3688
3868
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3689
3869
|
/>
|
|
3870
|
+
<label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchGlobsLabel")}</label>
|
|
3871
|
+
<textarea
|
|
3872
|
+
value={watchGlobs() || ""}
|
|
3873
|
+
onInput={(e) => setWatchGlobs(e.currentTarget.value)}
|
|
3874
|
+
rows={3}
|
|
3875
|
+
placeholder={"**/*.md\nsrc/**"}
|
|
3876
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
|
|
3877
|
+
/>
|
|
3878
|
+
<label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchIgnoreLabel")}</label>
|
|
3879
|
+
<textarea
|
|
3880
|
+
value={watchIgnore() || ""}
|
|
3881
|
+
onInput={(e) => setWatchIgnore(e.currentTarget.value)}
|
|
3882
|
+
rows={2}
|
|
3883
|
+
placeholder={"node_modules/**\n*.log"}
|
|
3884
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
|
|
3885
|
+
/>
|
|
3886
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.watchGlobsHint")}</div>
|
|
3690
3887
|
</div>
|
|
3691
3888
|
)}
|
|
3692
3889
|
|
|
3890
|
+
{triggerType() === "git" && (
|
|
3891
|
+
<>
|
|
3892
|
+
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3893
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitBranchesLabel")}</label>
|
|
3894
|
+
<input
|
|
3895
|
+
type="text"
|
|
3896
|
+
value={gitBranch() || ""}
|
|
3897
|
+
onInput={(e) => setGitBranch(e.currentTarget.value)}
|
|
3898
|
+
placeholder="main, release/*"
|
|
3899
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3900
|
+
/>
|
|
3901
|
+
</div>
|
|
3902
|
+
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3903
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitPathsLabel")}</label>
|
|
3904
|
+
<textarea
|
|
3905
|
+
value={gitPaths() || ""}
|
|
3906
|
+
onInput={(e) => setGitPaths(e.currentTarget.value)}
|
|
3907
|
+
rows={3}
|
|
3908
|
+
placeholder={"src/**\n**/*.md"}
|
|
3909
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
|
|
3910
|
+
/>
|
|
3911
|
+
</div>
|
|
3912
|
+
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3913
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitIgnoreLabel")}</label>
|
|
3914
|
+
<textarea
|
|
3915
|
+
value={gitIgnore() || ""}
|
|
3916
|
+
onInput={(e) => setGitIgnore(e.currentTarget.value)}
|
|
3917
|
+
rows={2}
|
|
3918
|
+
placeholder={"docs/**\n*.lock"}
|
|
3919
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
|
|
3920
|
+
/>
|
|
3921
|
+
</div>
|
|
3922
|
+
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3923
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitPollLabel")}</label>
|
|
3924
|
+
<input
|
|
3925
|
+
type="number"
|
|
3926
|
+
min="5"
|
|
3927
|
+
value={gitPollSeconds() || ""}
|
|
3928
|
+
onInput={(e) => setGitPollSeconds(e.currentTarget.value)}
|
|
3929
|
+
placeholder="60"
|
|
3930
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3931
|
+
/>
|
|
3932
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.gitPollHint")}</div>
|
|
3933
|
+
</div>
|
|
3934
|
+
</>
|
|
3935
|
+
)}
|
|
3936
|
+
|
|
3693
3937
|
{triggerType() === "mcp-event" && (
|
|
3694
3938
|
<>
|
|
3695
3939
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3696
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">
|
|
3940
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpSourceLabel")}</label>
|
|
3697
3941
|
<input
|
|
3698
3942
|
type="text"
|
|
3699
3943
|
value={mcpServer() || ""}
|
|
3700
3944
|
onInput={(e) => setMcpServer(e.currentTarget.value)}
|
|
3701
|
-
placeholder="
|
|
3945
|
+
placeholder={gt("gui.mcpSourcePlaceholder")}
|
|
3702
3946
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3703
3947
|
/>
|
|
3704
3948
|
</div>
|
|
3705
3949
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3706
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3950
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpEventLabel")}</label>
|
|
3707
3951
|
<input
|
|
3708
3952
|
type="text"
|
|
3709
3953
|
value={mcpEventName() || ""}
|
|
3710
3954
|
onInput={(e) => setMcpEventName(e.currentTarget.value)}
|
|
3711
|
-
placeholder="
|
|
3955
|
+
placeholder={gt("gui.mcpEventPlaceholder")}
|
|
3712
3956
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3713
3957
|
/>
|
|
3714
3958
|
</div>
|
|
3715
3959
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3716
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3960
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpFilterLabel")}</label>
|
|
3717
3961
|
<input
|
|
3718
3962
|
type="text"
|
|
3719
3963
|
value={mcpFilter() || ""}
|
|
3720
3964
|
onInput={(e) => setMcpFilter(e.currentTarget.value)}
|
|
3721
|
-
placeholder=
|
|
3965
|
+
placeholder={gt("gui.mcpFilterPlaceholder")}
|
|
3722
3966
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3723
3967
|
/>
|
|
3724
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px">
|
|
3968
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.mcpFilterHint")}</div>
|
|
3725
3969
|
</div>
|
|
3726
3970
|
</>
|
|
3727
3971
|
)}
|
|
3728
3972
|
|
|
3729
3973
|
{triggerType() === "once" && (
|
|
3730
3974
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3731
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3975
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.oneShotTimeLabel")}</label>
|
|
3732
3976
|
<input
|
|
3733
3977
|
type="text"
|
|
3734
3978
|
value={runAt() || ""}
|
|
3735
3979
|
onInput={(e) => setRunAt(e.currentTarget.value)}
|
|
3736
|
-
placeholder="
|
|
3980
|
+
placeholder={gt("gui.oneShotTimePlaceholder")}
|
|
3737
3981
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3738
3982
|
/>
|
|
3739
|
-
<div style="font-size:11px;color:#8e8e93;margin:6px 0"
|
|
3983
|
+
<div style="font-size:11px;color:#8e8e93;margin:6px 0">{gt("gui.oneShotDelayHint")}</div>
|
|
3740
3984
|
<input
|
|
3741
3985
|
type="number"
|
|
3742
3986
|
min="1"
|
|
3743
3987
|
value={delaySeconds() || ""}
|
|
3744
3988
|
onInput={(e) => setDelaySeconds(e.currentTarget.value)}
|
|
3745
|
-
placeholder="
|
|
3989
|
+
placeholder={gt("gui.oneShotDelayPlaceholder")}
|
|
3746
3990
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3747
3991
|
/>
|
|
3748
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
3992
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.oneShotHint")}</div>
|
|
3749
3993
|
</div>
|
|
3750
3994
|
)}
|
|
3751
3995
|
|
|
3752
3996
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3753
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
3997
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.sessionLabel")}</label>
|
|
3754
3998
|
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
|
3755
3999
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3756
4000
|
<input
|
|
@@ -3760,7 +4004,7 @@ export default Plugin.define({
|
|
|
3760
4004
|
onChange={() => setSession("new")}
|
|
3761
4005
|
style="accent-color:#007acc"
|
|
3762
4006
|
/>
|
|
3763
|
-
|
|
4007
|
+
{gt("gui.sessionNew")}
|
|
3764
4008
|
</label>
|
|
3765
4009
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3766
4010
|
<input
|
|
@@ -3770,7 +4014,7 @@ export default Plugin.define({
|
|
|
3770
4014
|
onChange={() => setSession("reuse")}
|
|
3771
4015
|
style="accent-color:#007acc"
|
|
3772
4016
|
/>
|
|
3773
|
-
|
|
4017
|
+
{gt("gui.sessionReuse")}
|
|
3774
4018
|
</label>
|
|
3775
4019
|
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
|
|
3776
4020
|
<input
|
|
@@ -3780,25 +4024,53 @@ export default Plugin.define({
|
|
|
3780
4024
|
onChange={() => setSession("last")}
|
|
3781
4025
|
style="accent-color:#007acc"
|
|
3782
4026
|
/>
|
|
3783
|
-
|
|
4027
|
+
{gt("gui.sessionContinue")}
|
|
3784
4028
|
</label>
|
|
3785
4029
|
</div>
|
|
3786
4030
|
{session() === "reuse" && (
|
|
3787
4031
|
<div style="margin-top:8px">
|
|
3788
|
-
<label style="display:block;margin-bottom:6px;font-size:11px;color:#8e8e93"
|
|
4032
|
+
<label style="display:block;margin-bottom:6px;font-size:11px;color:#8e8e93">{gt("gui.sessionMaxRunsLabel")}</label>
|
|
3789
4033
|
<input
|
|
3790
4034
|
type="number"
|
|
3791
4035
|
min="1"
|
|
3792
4036
|
value={sessionMaxRuns() || ""}
|
|
3793
4037
|
onInput={(e) => setSessionMaxRuns(e.currentTarget.value)}
|
|
3794
|
-
placeholder="
|
|
4038
|
+
placeholder={gt("gui.unboundedPlaceholder")}
|
|
3795
4039
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3796
4040
|
/>
|
|
3797
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px">
|
|
4041
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.sessionMaxRunsHint")}</div>
|
|
3798
4042
|
</div>
|
|
3799
4043
|
)}
|
|
3800
4044
|
</div>
|
|
3801
4045
|
|
|
4046
|
+
{schedulerPlatform() === "win32" && (
|
|
4047
|
+
<div style="display:block;width:100%;margin-bottom:12px">
|
|
4048
|
+
<label style="display:flex;align-items:flex-start;gap:8px;cursor:pointer">
|
|
4049
|
+
<input
|
|
4050
|
+
type="checkbox"
|
|
4051
|
+
checked={runWhenLoggedOff()}
|
|
4052
|
+
onChange={(e) => setRunWhenLoggedOff(e.currentTarget.checked)}
|
|
4053
|
+
style="accent-color:#007acc;margin-top:3px"
|
|
4054
|
+
/>
|
|
4055
|
+
<span>
|
|
4056
|
+
<span style="display:block;font-size:12px;color:#b0b0b0;font-weight:500">
|
|
4057
|
+
{gt("gui.runWhenLoggedOffLabel")}
|
|
4058
|
+
</span>
|
|
4059
|
+
<span
|
|
4060
|
+
style={{
|
|
4061
|
+
display: "block",
|
|
4062
|
+
"font-size": "11px",
|
|
4063
|
+
"margin-top": "4px",
|
|
4064
|
+
color: runWhenLoggedOff() ? "#ffd60a" : "#8e8e93",
|
|
4065
|
+
}}
|
|
4066
|
+
>
|
|
4067
|
+
{gt("gui.runWhenLoggedOffHint")}
|
|
4068
|
+
</span>
|
|
4069
|
+
</span>
|
|
4070
|
+
</label>
|
|
4071
|
+
</div>
|
|
4072
|
+
)}
|
|
4073
|
+
|
|
3802
4074
|
<div
|
|
3803
4075
|
style={{
|
|
3804
4076
|
display: triggerType() !== "cron" ? "none" : "block",
|
|
@@ -3806,7 +4078,7 @@ export default Plugin.define({
|
|
|
3806
4078
|
marginBottom: "12px",
|
|
3807
4079
|
}}
|
|
3808
4080
|
>
|
|
3809
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4081
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.scheduleLabel")}</label>
|
|
3810
4082
|
<select
|
|
3811
4083
|
value={cronPreset()}
|
|
3812
4084
|
onChange={(e) => {
|
|
@@ -3816,13 +4088,13 @@ export default Plugin.define({
|
|
|
3816
4088
|
}}
|
|
3817
4089
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3818
4090
|
>
|
|
3819
|
-
{
|
|
4091
|
+
{cronPresets().map((p) => (
|
|
3820
4092
|
<option key={p.value} value={p.value}>{p.label}</option>
|
|
3821
4093
|
))}
|
|
3822
4094
|
</select>
|
|
3823
4095
|
{showCustomCron && (
|
|
3824
4096
|
<div style="display:block;width:100%;margin-top:8px">
|
|
3825
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">
|
|
4097
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.cronExprLabel")}</label>
|
|
3826
4098
|
<input
|
|
3827
4099
|
type="text"
|
|
3828
4100
|
value={schedule() || ""}
|
|
@@ -3836,13 +4108,13 @@ export default Plugin.define({
|
|
|
3836
4108
|
<div style="display:block;max-height:80px;overflow-y:auto;margin-top:8px;padding:8px;background:#2a1113;border:1px solid #5a1d21;border-radius:6px;font-size:11px;line-height:1.4;color:#ff6b6b;white-space:pre-wrap;word-break:break-word">{cronError()}</div>
|
|
3837
4109
|
)}
|
|
3838
4110
|
<div style="display:block;width:100%;margin-top:12px">
|
|
3839
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4111
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.timezoneLabel")}</label>
|
|
3840
4112
|
<input
|
|
3841
4113
|
type="text"
|
|
3842
4114
|
list="iana-timezones"
|
|
3843
4115
|
value={timezone() || ""}
|
|
3844
4116
|
onInput={(e) => setTimezone(e.currentTarget.value)}
|
|
3845
|
-
placeholder="
|
|
4117
|
+
placeholder={gt("gui.timezonePlaceholder")}
|
|
3846
4118
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3847
4119
|
/>
|
|
3848
4120
|
<datalist id="iana-timezones">
|
|
@@ -3856,17 +4128,17 @@ export default Plugin.define({
|
|
|
3856
4128
|
<option value="UTC" />
|
|
3857
4129
|
</datalist>
|
|
3858
4130
|
<div style="display:block;margin-top:6px;font-size:11px;color:#808080">
|
|
3859
|
-
|
|
4131
|
+
{gt("gui.timezoneHint")}
|
|
3860
4132
|
</div>
|
|
3861
4133
|
</div>
|
|
3862
4134
|
<div style="display:block;width:100%;margin-top:12px">
|
|
3863
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4135
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.windowLabel")}</label>
|
|
3864
4136
|
<div style="display:flex;gap:8px;align-items:center">
|
|
3865
4137
|
<input
|
|
3866
4138
|
type="time"
|
|
3867
4139
|
value={notBefore() || ""}
|
|
3868
4140
|
onInput={(e) => setNotBefore(e.currentTarget.value)}
|
|
3869
|
-
title="
|
|
4141
|
+
title={gt("gui.windowStartTitle")}
|
|
3870
4142
|
style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3871
4143
|
/>
|
|
3872
4144
|
<span style="color:#808080;font-size:12px">—</span>
|
|
@@ -3874,35 +4146,79 @@ export default Plugin.define({
|
|
|
3874
4146
|
type="time"
|
|
3875
4147
|
value={notAfter() || ""}
|
|
3876
4148
|
onInput={(e) => setNotAfter(e.currentTarget.value)}
|
|
3877
|
-
title="
|
|
4149
|
+
title={gt("gui.windowEndTitle")}
|
|
3878
4150
|
style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3879
4151
|
/>
|
|
3880
4152
|
</div>
|
|
3881
4153
|
<div style="display:block;margin-top:6px;font-size:11px;color:#808080">
|
|
3882
|
-
|
|
4154
|
+
{gt("gui.windowHint")}
|
|
4155
|
+
</div>
|
|
4156
|
+
<div style="display:block;margin-top:12px">
|
|
4157
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.weekdaysLabel")}</label>
|
|
4158
|
+
<div style="display:flex;gap:10px;flex-wrap:wrap">
|
|
4159
|
+
{[
|
|
4160
|
+
{ value: 1, day: "gui.weekday.1" },
|
|
4161
|
+
{ value: 2, day: "gui.weekday.2" },
|
|
4162
|
+
{ value: 3, day: "gui.weekday.3" },
|
|
4163
|
+
{ value: 4, day: "gui.weekday.4" },
|
|
4164
|
+
{ value: 5, day: "gui.weekday.5" },
|
|
4165
|
+
{ value: 6, day: "gui.weekday.6" },
|
|
4166
|
+
{ value: 0, day: "gui.weekday.0" },
|
|
4167
|
+
].map((day) => (
|
|
4168
|
+
<label style="display:flex;align-items:center;gap:5px;cursor:pointer;font-size:12px;color:#d0d0d5">
|
|
4169
|
+
<input
|
|
4170
|
+
type="checkbox"
|
|
4171
|
+
checked={activeDays().includes(day.value)}
|
|
4172
|
+
onChange={(e) => {
|
|
4173
|
+
const next = e.currentTarget.checked
|
|
4174
|
+
? [...activeDays(), day.value]
|
|
4175
|
+
: activeDays().filter((d) => d !== day.value)
|
|
4176
|
+
setActiveDays([...next].sort((a, b) => a - b))
|
|
4177
|
+
}}
|
|
4178
|
+
style="accent-color:#007acc"
|
|
4179
|
+
/>
|
|
4180
|
+
{gt(day.day)}
|
|
4181
|
+
</label>
|
|
4182
|
+
))}
|
|
4183
|
+
</div>
|
|
4184
|
+
</div>
|
|
4185
|
+
<div style="display:block;margin-top:12px">
|
|
4186
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.outsideWindowLabel")}</label>
|
|
4187
|
+
<select
|
|
4188
|
+
value={windowPolicy()}
|
|
4189
|
+
onChange={(e) => setWindowPolicy(e.currentTarget.value as "skip" | "postpone" | "run")}
|
|
4190
|
+
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
4191
|
+
>
|
|
4192
|
+
<option value="postpone">{gt("gui.windowPostpone")}</option>
|
|
4193
|
+
<option value="skip">{gt("gui.windowSkip")}</option>
|
|
4194
|
+
<option value="run">{gt("gui.windowRun")}</option>
|
|
4195
|
+
</select>
|
|
4196
|
+
<div style="display:block;margin-top:6px;font-size:11px;color:#808080">
|
|
4197
|
+
{gt("gui.windowPolicyHint")}
|
|
4198
|
+
</div>
|
|
3883
4199
|
</div>
|
|
3884
4200
|
</div>
|
|
3885
4201
|
</div>
|
|
3886
4202
|
|
|
3887
4203
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3888
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4204
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.promptLabel")}</label>
|
|
3889
4205
|
<textarea
|
|
3890
4206
|
value={prompt() || ""}
|
|
3891
4207
|
onInput={(e) => setPrompt(e.currentTarget.value)}
|
|
3892
|
-
placeholder="
|
|
4208
|
+
placeholder={gt("gui.promptPlaceholder")}
|
|
3893
4209
|
rows={2}
|
|
3894
4210
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical"
|
|
3895
4211
|
/>
|
|
3896
4212
|
</div>
|
|
3897
4213
|
|
|
3898
4214
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3899
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4215
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.promptTemplateLabel")}</label>
|
|
3900
4216
|
<select
|
|
3901
4217
|
value={template()}
|
|
3902
4218
|
onChange={(e) => selectTemplate(e.currentTarget.value)}
|
|
3903
4219
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3904
4220
|
>
|
|
3905
|
-
{
|
|
4221
|
+
{promptTemplates().map((t) => (
|
|
3906
4222
|
<option key={t.value} value={t.value}>{t.label}</option>
|
|
3907
4223
|
))}
|
|
3908
4224
|
{customTemplates().map((t) => (
|
|
@@ -3911,7 +4227,7 @@ export default Plugin.define({
|
|
|
3911
4227
|
</select>
|
|
3912
4228
|
{template().startsWith("custom:") && (
|
|
3913
4229
|
<div style="display:flex;align-items:center;gap:6px;margin-top:8px">
|
|
3914
|
-
<span style="font-size:10px;color:#8e8e93"
|
|
4230
|
+
<span style="font-size:10px;color:#8e8e93">{gt("gui.customTemplate")}</span>
|
|
3915
4231
|
{customTemplates().map((t) => {
|
|
3916
4232
|
if (`custom:${t.id}` !== template()) return null;
|
|
3917
4233
|
return (
|
|
@@ -3925,7 +4241,7 @@ export default Plugin.define({
|
|
|
3925
4241
|
const t = customTemplates().find((x) => `custom:${x.id}` === template());
|
|
3926
4242
|
if (t) handleDeleteTemplate(t);
|
|
3927
4243
|
}}
|
|
3928
|
-
title="
|
|
4244
|
+
title={gt("gui.deleteTemplateTitle")}
|
|
3929
4245
|
style="background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;line-height:1;padding:0"
|
|
3930
4246
|
onMouseEnter={(e) => { e.currentTarget.style.color = "#c92a2a"; }}
|
|
3931
4247
|
onMouseLeave={(e) => { e.currentTarget.style.color = "#ff3b30"; }}
|
|
@@ -3937,13 +4253,13 @@ export default Plugin.define({
|
|
|
3937
4253
|
</div>
|
|
3938
4254
|
|
|
3939
4255
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3940
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4256
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.modelLabel")}</label>
|
|
3941
4257
|
<input
|
|
3942
4258
|
type="text"
|
|
3943
4259
|
list="scheduler-model-presets"
|
|
3944
4260
|
value={model() || ""}
|
|
3945
4261
|
onInput={(e) => setModel(e.currentTarget.value)}
|
|
3946
|
-
placeholder="
|
|
4262
|
+
placeholder={gt("gui.modelPlaceholder")}
|
|
3947
4263
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3948
4264
|
/>
|
|
3949
4265
|
<datalist id="scheduler-model-presets">
|
|
@@ -3953,28 +4269,28 @@ export default Plugin.define({
|
|
|
3953
4269
|
<option value="google/gemini-2.5-pro" />
|
|
3954
4270
|
<option value="openai/gpt-4o-mini" />
|
|
3955
4271
|
</datalist>
|
|
3956
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4272
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.modelHint")}</div>
|
|
3957
4273
|
</div>
|
|
3958
4274
|
|
|
3959
4275
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3960
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4276
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.priorityLabel")}</label>
|
|
3961
4277
|
<select
|
|
3962
4278
|
value={String(priority())}
|
|
3963
4279
|
onChange={(e) => setPriority(Number(e.currentTarget.value) || DEFAULT_PRIORITY)}
|
|
3964
4280
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
3965
4281
|
>
|
|
3966
|
-
{
|
|
4282
|
+
{priorityOptions().map((p) => (
|
|
3967
4283
|
<option key={p.value} value={String(p.value)}>{p.label}</option>
|
|
3968
4284
|
))}
|
|
3969
|
-
{!
|
|
3970
|
-
<option value={String(priority())}
|
|
4285
|
+
{!priorityOptions().some((p) => p.value === priority()) && (
|
|
4286
|
+
<option value={String(priority())}>{gt("gui.otherPriorityOption", { priority: priority() })}</option>
|
|
3971
4287
|
)}
|
|
3972
4288
|
</select>
|
|
3973
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4289
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.priorityHint")}</div>
|
|
3974
4290
|
</div>
|
|
3975
4291
|
|
|
3976
4292
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3977
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4293
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.maxRetriesLabel")}</label>
|
|
3978
4294
|
<input
|
|
3979
4295
|
type="number"
|
|
3980
4296
|
min="0"
|
|
@@ -3986,7 +4302,7 @@ export default Plugin.define({
|
|
|
3986
4302
|
</div>
|
|
3987
4303
|
|
|
3988
4304
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
3989
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4305
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.retryDelayLabel")}</label>
|
|
3990
4306
|
<input
|
|
3991
4307
|
type="number"
|
|
3992
4308
|
min="1"
|
|
@@ -3998,46 +4314,46 @@ export default Plugin.define({
|
|
|
3998
4314
|
</div>
|
|
3999
4315
|
|
|
4000
4316
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
4001
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4317
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.qualityGateLabel")}</label>
|
|
4002
4318
|
<input
|
|
4003
4319
|
type="text"
|
|
4004
4320
|
value={qualityGate() || ""}
|
|
4005
4321
|
onInput={(e) => setQualityGate(e.currentTarget.value)}
|
|
4006
|
-
placeholder="
|
|
4322
|
+
placeholder={gt("gui.qualityGatePlaceholder")}
|
|
4007
4323
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
4008
4324
|
/>
|
|
4009
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4325
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.qualityGateHint")}</div>
|
|
4010
4326
|
</div>
|
|
4011
4327
|
|
|
4012
4328
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
4013
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4329
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.preflightLabel")}</label>
|
|
4014
4330
|
<input
|
|
4015
4331
|
type="text"
|
|
4016
4332
|
value={beforeScript() || ""}
|
|
4017
4333
|
onInput={(e) => setBeforeScript(e.currentTarget.value)}
|
|
4018
|
-
placeholder="
|
|
4334
|
+
placeholder={gt("gui.preflightPlaceholder")}
|
|
4019
4335
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
4020
4336
|
/>
|
|
4021
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4337
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.preflightHint")}</div>
|
|
4022
4338
|
</div>
|
|
4023
4339
|
|
|
4024
4340
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
4025
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4341
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.postflightLabel")}</label>
|
|
4026
4342
|
<input
|
|
4027
4343
|
type="text"
|
|
4028
4344
|
value={afterScript() || ""}
|
|
4029
4345
|
onInput={(e) => setAfterScript(e.currentTarget.value)}
|
|
4030
|
-
placeholder="
|
|
4346
|
+
placeholder={gt("gui.postflightPlaceholder")}
|
|
4031
4347
|
style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
|
|
4032
4348
|
/>
|
|
4033
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4349
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.postflightHint")}</div>
|
|
4034
4350
|
</div>
|
|
4035
4351
|
|
|
4036
4352
|
<div style="display:block;width:100%;margin-bottom:12px">
|
|
4037
|
-
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500"
|
|
4353
|
+
<label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.dependsOnLabel")}</label>
|
|
4038
4354
|
<div style="display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;min-height:38px;box-sizing:border-box">
|
|
4039
4355
|
{dependencyCandidates().length === 0 ? (
|
|
4040
|
-
<span style="font-size:12px;color:#8e8e93"
|
|
4356
|
+
<span style="font-size:12px;color:#8e8e93">{gt("gui.noOtherTasks")}</span>
|
|
4041
4357
|
) : (
|
|
4042
4358
|
dependencyCandidates().map((candidate) => (
|
|
4043
4359
|
<label style={`display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:14px;border:1px solid ${dependsOn().includes(candidate) ? "#5ac8fa" : "#333"};background:${dependsOn().includes(candidate) ? "rgba(90,200,250,0.12)" : "transparent"};color:${dependsOn().includes(candidate) ? "#5ac8fa" : "#cfcfd2"};font-size:12px;cursor:pointer;user-select:none`}>
|
|
@@ -4052,13 +4368,13 @@ export default Plugin.define({
|
|
|
4052
4368
|
))
|
|
4053
4369
|
)}
|
|
4054
4370
|
</div>
|
|
4055
|
-
<div style="font-size:11px;color:#8e8e93;margin-top:6px"
|
|
4371
|
+
<div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.dependsOnHint")}</div>
|
|
4056
4372
|
</div>
|
|
4057
4373
|
|
|
4058
4374
|
{/* Role-scoped tools (Спринт 14): metadata-only, denied имеет приоритет */}
|
|
4059
4375
|
<details style="display:block;width:100%;margin-bottom:12px">
|
|
4060
4376
|
<summary style="cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:8px;user-select:none">
|
|
4061
|
-
|
|
4377
|
+
{gt("gui.toolLimitsHeading")}
|
|
4062
4378
|
{(allowedTools().length > 0 || deniedTools().length > 0) && (
|
|
4063
4379
|
<span style="color:#5ac8fa;font-size:11px;margin-left:6px">
|
|
4064
4380
|
({allowedTools().length} allowed · {deniedTools().length} denied)
|
|
@@ -4067,10 +4383,10 @@ export default Plugin.define({
|
|
|
4067
4383
|
</summary>
|
|
4068
4384
|
<div style="display:block;width:100%;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px;box-sizing:border-box">
|
|
4069
4385
|
<div style="font-size:11px;color:#8e8e93;margin-bottom:8px">
|
|
4070
|
-
|
|
4071
|
-
|
|
4386
|
+
{gt("gui.toolLimitsNote")}
|
|
4387
|
+
{gt("gui.toolLimitsDenied")}
|
|
4072
4388
|
</div>
|
|
4073
|
-
<div style="font-size:11px;color:#b0b0b0;margin-bottom:4px"
|
|
4389
|
+
<div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">{gt("gui.allowedToolsLabel")}</div>
|
|
4074
4390
|
<div style="display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px">
|
|
4075
4391
|
{POPULAR_TOOLS.map((tool) => (
|
|
4076
4392
|
<label style={`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${allowedTools().includes(tool) ? "#34c759" : "#333"};background:${allowedTools().includes(tool) ? "rgba(52,199,89,0.12)" : "transparent"};color:${allowedTools().includes(tool) ? "#34c759" : "#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`}>
|
|
@@ -4084,7 +4400,7 @@ export default Plugin.define({
|
|
|
4084
4400
|
</label>
|
|
4085
4401
|
))}
|
|
4086
4402
|
</div>
|
|
4087
|
-
<div style="font-size:11px;color:#b0b0b0;margin-bottom:4px"
|
|
4403
|
+
<div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">{gt("gui.deniedToolsLabel")}</div>
|
|
4088
4404
|
<div style="display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px">
|
|
4089
4405
|
{POPULAR_TOOLS.map((tool) => (
|
|
4090
4406
|
<label style={`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${deniedTools().includes(tool) ? "#ff3b30" : "#333"};background:${deniedTools().includes(tool) ? "rgba(255,59,48,0.12)" : "transparent"};color:${deniedTools().includes(tool) ? "#ff3b30" : "#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`}>
|
|
@@ -4103,7 +4419,7 @@ export default Plugin.define({
|
|
|
4103
4419
|
type="text"
|
|
4104
4420
|
value={customTool()}
|
|
4105
4421
|
onInput={(e) => setCustomTool(e.currentTarget.value)}
|
|
4106
|
-
placeholder="
|
|
4422
|
+
placeholder={gt("gui.toolPlaceholder")}
|
|
4107
4423
|
style="flex:1;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
|
|
4108
4424
|
/>
|
|
4109
4425
|
<button onClick={() => addCustomTool("allowed")} style="padding:6px 10px;background:transparent;border:1px solid #34c759;color:#34c759;border-radius:6px;cursor:pointer;font-size:12px">+ allowed</button>
|
|
@@ -4121,7 +4437,7 @@ export default Plugin.define({
|
|
|
4121
4437
|
<div style="display:block;width:100%;margin-top:8px">
|
|
4122
4438
|
<button
|
|
4123
4439
|
onClick={() => {
|
|
4124
|
-
setDryRunName(
|
|
4440
|
+
setDryRunName(DRYRUN_FORM_MARKER)
|
|
4125
4441
|
const baseTask = {
|
|
4126
4442
|
order: 0,
|
|
4127
4443
|
trigger: "manual",
|
|
@@ -4142,7 +4458,7 @@ export default Plugin.define({
|
|
|
4142
4458
|
name: matrixClonePreviewName(name(), w.name),
|
|
4143
4459
|
order: index,
|
|
4144
4460
|
cwd: w.path,
|
|
4145
|
-
matrixParent: name() || "
|
|
4461
|
+
matrixParent: name() || gt("gui.noNameFallback"),
|
|
4146
4462
|
}))
|
|
4147
4463
|
setDryRunReport({
|
|
4148
4464
|
tasks: matrixMode()
|
|
@@ -4150,29 +4466,29 @@ export default Plugin.define({
|
|
|
4150
4466
|
: [
|
|
4151
4467
|
{
|
|
4152
4468
|
...baseTask,
|
|
4153
|
-
name: name() || "
|
|
4469
|
+
name: name() || gt("gui.noNameFallback"),
|
|
4154
4470
|
cwd:
|
|
4155
4471
|
selectedWorkspace()?.path ||
|
|
4156
4472
|
(workingDirectory() || "").trim() ||
|
|
4157
|
-
"
|
|
4473
|
+
gt("gui.projectFolderFallback"),
|
|
4158
4474
|
},
|
|
4159
4475
|
],
|
|
4160
4476
|
totals: {},
|
|
4161
4477
|
warnings: [
|
|
4162
|
-
...(!name().trim() ? ["
|
|
4478
|
+
...(!name().trim() ? [gt("gui.dryRunNoNameWarning")] : []),
|
|
4163
4479
|
...(matrixMode()
|
|
4164
4480
|
? [
|
|
4165
|
-
|
|
4481
|
+
gt("gui.dryRunMatrixPreview", { count: matrixTasks.length }),
|
|
4166
4482
|
]
|
|
4167
4483
|
: []),
|
|
4168
4484
|
],
|
|
4169
4485
|
})
|
|
4170
4486
|
setDryRunOpen(true)
|
|
4171
4487
|
}}
|
|
4172
|
-
title="
|
|
4488
|
+
title={gt("gui.dryRunPreviewTitle")}
|
|
4173
4489
|
style="display:block;width:100%;padding:8px;margin-top:4px;background:transparent;border:1px solid #333;border-radius:6px;color:#d4e6ff;cursor:pointer;font-size:12px"
|
|
4174
4490
|
>
|
|
4175
|
-
|
|
4491
|
+
{gt("gui.dryRunButton")}
|
|
4176
4492
|
</button>
|
|
4177
4493
|
<button
|
|
4178
4494
|
onClick={handleCreate}
|
|
@@ -4180,22 +4496,22 @@ export default Plugin.define({
|
|
|
4180
4496
|
title={!canSubmit() ? validationError() : undefined}
|
|
4181
4497
|
style={`display:block;width:100%;padding:10px;margin-top:8px;background:${busy() ? "#666" : "#007acc"};color:white;border-radius:6px;border:none;cursor:${busy() || !canSubmit() ? "not-allowed" : "pointer"};font-size:13px;font-weight:500;opacity:${busy() || !canSubmit() ? 0.6 : 1}`}
|
|
4182
4498
|
>
|
|
4183
|
-
{busy() ? "
|
|
4499
|
+
{busy() ? gt("gui.creating") : isEditing ? gt("gui.save") : gt("gui.createTaskSubmit")}
|
|
4184
4500
|
</button>
|
|
4185
4501
|
{isEditing && (
|
|
4186
4502
|
<button
|
|
4187
|
-
onClick={() => { setEditingJob(null); setName(""); setSchedule("* * * * *"); setPrompt(""); setModel(""); setPriority(DEFAULT_PRIORITY); setRetryCount(0); setRetryDelay(60); setQualityGate(""); setDependsOn([]); setBeforeScript(""); setAfterScript(""); setTriggerType("cron"); setWatchPath(""); setRunAt(""); setDelaySeconds(""); setSession("new"); setSessionMaxRuns(""); setTimezone(""); setNotBefore(""); setNotAfter(""); setMcpServer(""); setMcpEventName(""); setMcpFilter(""); setWorkingDirectory(""); setWorkspaceId(""); setAllowedTools([]); setDeniedTools([]); resetMatrixForm(); setCronPreset("* * * * *"); setCronError("") }}
|
|
4503
|
+
onClick={() => { setEditingJob(null); setName(""); setSchedule("* * * * *"); setPrompt(""); setModel(""); setPriority(DEFAULT_PRIORITY); setRetryCount(0); setRetryDelay(60); setQualityGate(""); setDependsOn([]); setBeforeScript(""); setAfterScript(""); setTriggerType("cron"); setWatchPath(""); setRunAt(""); setDelaySeconds(""); setSession("new"); setSessionMaxRuns(""); setRunWhenLoggedOff(false); setTimezone(""); setNotBefore(""); setNotAfter(""); setMcpServer(""); setMcpEventName(""); setMcpFilter(""); setWorkingDirectory(""); setWorkspaceId(""); setAllowedTools([]); setDeniedTools([]); resetMatrixForm(); setCronPreset("* * * * *"); setCronError("") }}
|
|
4188
4504
|
style="background:transparent;border:1px solid #333;border-radius:6px;padding:8px 16px;color:#ff3b30;cursor:pointer;font-size:13px;width:100%"
|
|
4189
4505
|
>
|
|
4190
|
-
|
|
4191
|
-
|
|
4506
|
+
{gt("gui.cancel")}
|
|
4507
|
+
</button>
|
|
4192
4508
|
)}
|
|
4193
4509
|
</div>
|
|
4194
4510
|
|
|
4195
|
-
{dryRunOpen() && dryRunName() ===
|
|
4511
|
+
{dryRunOpen() && dryRunName() === DRYRUN_FORM_MARKER && (
|
|
4196
4512
|
<div style="display:block;width:100%;margin-top:8px;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px">
|
|
4197
4513
|
<div style="font-size:12px;font-weight:600;color:#ffffff;display:flex;justify-content:space-between;align-items:center">
|
|
4198
|
-
|
|
4514
|
+
{gt("gui.dryRunLocalTitle")}
|
|
4199
4515
|
<button onClick={() => closeDryRun()} style="background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0">✕</button>
|
|
4200
4516
|
</div>
|
|
4201
4517
|
{(() => {
|
|
@@ -4227,10 +4543,10 @@ export default Plugin.define({
|
|
|
4227
4543
|
|
|
4228
4544
|
{/* Список задач */}
|
|
4229
4545
|
<div style="display:block;width:100%;margin-top:24px">
|
|
4230
|
-
<h3 style="margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff"
|
|
4546
|
+
<h3 style="margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff">{gt("gui.tasksHeading")}</h3>
|
|
4231
4547
|
{workspaceFilter() !== "all" && (
|
|
4232
4548
|
<div style="font-size:11px;color:#8e8e93;margin-bottom:8px">
|
|
4233
|
-
|
|
4549
|
+
{gt("gui.filterSummary", { scope: workspaceFilter() === "none" ? gt("gui.workspaceNone") : `📦 ${workspaces().find((w) => w.id === workspaceFilter())?.name ?? "workspace"}`, visible: visibleJobs().length, total: jobsArr().length })}
|
|
4234
4550
|
</div>
|
|
4235
4551
|
)}
|
|
4236
4552
|
{visibleJobs().length === 0 ?
|
|
@@ -4238,8 +4554,8 @@ export default Plugin.define({
|
|
|
4238
4554
|
<span style="font-size:40px;line-height:1">{winterMode() ? "🎄" : "📅"}</span>
|
|
4239
4555
|
<span style="max-width:380px;line-height:1.5">
|
|
4240
4556
|
{winterMode()
|
|
4241
|
-
? "
|
|
4242
|
-
: "
|
|
4557
|
+
? gt("gui.emptyWinter")
|
|
4558
|
+
: gt("gui.emptyNormal")}
|
|
4243
4559
|
</span>
|
|
4244
4560
|
</div>
|
|
4245
4561
|
:
|
|
@@ -4297,17 +4613,17 @@ export default Plugin.define({
|
|
|
4297
4613
|
onClick={() => answerPrompt(null)}
|
|
4298
4614
|
style="padding:6px 14px;border-radius:6px;border:1px solid #3a3a3a;background:#262626;color:#e0e0e0;font-size:12px;cursor:pointer"
|
|
4299
4615
|
>
|
|
4300
|
-
|
|
4616
|
+
{gt("gui.cancel")}
|
|
4301
4617
|
</button>
|
|
4302
4618
|
<button
|
|
4303
4619
|
onClick={() => answerPrompt(promptValue())}
|
|
4304
4620
|
style="padding:6px 14px;border-radius:6px;border:1px solid #0a84ff;background:#0a84ff;color:#fff;font-size:12px;font-weight:600;cursor:pointer"
|
|
4305
4621
|
>
|
|
4306
|
-
|
|
4622
|
+
{gt("gui.ok")}
|
|
4307
4623
|
</button>
|
|
4308
4624
|
</div>
|
|
4309
4625
|
{promptTitle().includes("KEY=VALUE") && (
|
|
4310
|
-
<div style="font-size:11px;color:#8e8e93">
|
|
4626
|
+
<div style="font-size:11px;color:#8e8e93">{gt("gui.modalShortcutHint")}</div>
|
|
4311
4627
|
)}
|
|
4312
4628
|
</div>
|
|
4313
4629
|
</div>
|
|
@@ -4318,7 +4634,7 @@ export default Plugin.define({
|
|
|
4318
4634
|
<div style="position:fixed;bottom:16px;left:16px;right:16px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:0;max-height:300px;overflow:hidden;display:flex;flex-direction:column;z-index:1000">
|
|
4319
4635
|
<div style="display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #333;background:#252526;border-radius:8px 8px 0 0">
|
|
4320
4636
|
<div style="display:flex;align-items:center;gap:8px">
|
|
4321
|
-
<span style="font-size:13px;font-weight:600;color:#ffffff"
|
|
4637
|
+
<span style="font-size:13px;font-weight:600;color:#ffffff">{gt("gui.logsHeading")}</span>
|
|
4322
4638
|
<span style="font-size:11px;color:#8e8e93">{logsTask()}</span>
|
|
4323
4639
|
</div>
|
|
4324
4640
|
<button
|
|
@@ -4347,18 +4663,18 @@ export default Plugin.define({
|
|
|
4347
4663
|
return ctx.add(Panel, {
|
|
4348
4664
|
id: "scheduler-jobs",
|
|
4349
4665
|
region: "side",
|
|
4350
|
-
list: () => [{ id: "jobs", title: "
|
|
4666
|
+
list: () => [{ id: "jobs", title: gt("gui.jobsTitle"), pinned: true }],
|
|
4351
4667
|
render: () => (
|
|
4352
4668
|
<ErrorBoundary fallback={(err: any) => (
|
|
4353
4669
|
<div style="padding:16px;color:#ff3b30;font-size:13px">
|
|
4354
|
-
|
|
4670
|
+
{gt("gui.uiError", { message: err.message })}
|
|
4355
4671
|
</div>
|
|
4356
4672
|
)}>
|
|
4357
4673
|
<div style="padding:16px;display:flex;flex-direction:column;gap:16px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;background:#0f0f0f">
|
|
4358
4674
|
<h2 style="margin:0;font-size:22px;font-weight:800;color:#ffffff">{schedulerTitle()}</h2>
|
|
4359
4675
|
<div style="margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93">Local AI CI/CD Orchestrator</div>
|
|
4360
4676
|
<div style="background:#2a1a1a;border:1px solid #ff3b30;border-radius:8px;padding:16px;color:#ff3b30">
|
|
4361
|
-
|
|
4677
|
+
{gt("gui.errorBoundaryDetail")}
|
|
4362
4678
|
</div>
|
|
4363
4679
|
</div>
|
|
4364
4680
|
</ErrorBoundary>
|