@linxin666/dsh-client-ui-task-board 0.3.5 → 0.3.6
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/lib/client.js +260 -289
- package/lib/client.js.map +1 -1
- package/lib/index.js +29 -5
- package/lib/types/client/board/TaskForm.d.ts +28 -0
- package/lib/types/host-runner.d.ts +7 -0
- package/package.json +1 -1
- package/src/client/board/EditTaskModal.tsx +19 -55
- package/src/client/board/NewTaskModal.tsx +19 -54
- package/src/client/board/TaskForm.tsx +111 -0
- package/src/client/board-mount.tsx +7 -1
- package/src/core/controller.ts +1 -6
- package/src/host-runner.ts +28 -2
package/lib/client.js
CHANGED
|
@@ -615,7 +615,6 @@ window.__ModuleLoader__.load({
|
|
|
615
615
|
this.notify();
|
|
616
616
|
}
|
|
617
617
|
closeBoard() {
|
|
618
|
-
if (!this.boardOpen) return;
|
|
619
618
|
this.boardOpen = false;
|
|
620
619
|
this.notify();
|
|
621
620
|
}
|
|
@@ -803,6 +802,7 @@ window.__ModuleLoader__.load({
|
|
|
803
802
|
* @param sessionId - the execution session to open.
|
|
804
803
|
*/
|
|
805
804
|
openSession(sessionId) {
|
|
805
|
+
this.closeBoard();
|
|
806
806
|
this.deps.sessions.open(sessionId);
|
|
807
807
|
}
|
|
808
808
|
/**
|
|
@@ -1498,6 +1498,95 @@ window.__ModuleLoader__.load({
|
|
|
1498
1498
|
}
|
|
1499
1499
|
];
|
|
1500
1500
|
//#endregion
|
|
1501
|
+
//#region src/client/board/TaskForm.tsx
|
|
1502
|
+
/** Modal overlay: closes on backdrop press, submits through the form. */
|
|
1503
|
+
function ModalShell({ ariaLabel, title, error, pending, submitLabel, onSubmit, onClose, children }) {
|
|
1504
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1505
|
+
className: board_module_css_default.modalBackdrop,
|
|
1506
|
+
onMouseDown: (event) => {
|
|
1507
|
+
if (event.target === event.currentTarget) onClose();
|
|
1508
|
+
},
|
|
1509
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
|
|
1510
|
+
className: board_module_css_default.modal,
|
|
1511
|
+
role: "dialog",
|
|
1512
|
+
"aria-label": ariaLabel,
|
|
1513
|
+
onSubmit: (event) => {
|
|
1514
|
+
event.preventDefault();
|
|
1515
|
+
onSubmit();
|
|
1516
|
+
},
|
|
1517
|
+
children: [
|
|
1518
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
1519
|
+
className: board_module_css_default.modalTitle,
|
|
1520
|
+
children: title
|
|
1521
|
+
}),
|
|
1522
|
+
children,
|
|
1523
|
+
error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1524
|
+
className: board_module_css_default.formError,
|
|
1525
|
+
children: error
|
|
1526
|
+
}),
|
|
1527
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
|
|
1528
|
+
className: board_module_css_default.modalFooter,
|
|
1529
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1530
|
+
type: "button",
|
|
1531
|
+
className: board_module_css_default.ghostButton,
|
|
1532
|
+
onClick: onClose,
|
|
1533
|
+
children: t("new.cancel")
|
|
1534
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1535
|
+
type: "submit",
|
|
1536
|
+
className: board_module_css_default.primaryButton,
|
|
1537
|
+
disabled: pending,
|
|
1538
|
+
children: submitLabel
|
|
1539
|
+
})]
|
|
1540
|
+
})
|
|
1541
|
+
]
|
|
1542
|
+
})
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
/** Title + description + prompt fields shared by the new and edit task forms. */
|
|
1546
|
+
function TaskContentFields({ title, description, prompt, onTitleChange, onDescriptionChange, onPromptChange }) {
|
|
1547
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1548
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1549
|
+
className: board_module_css_default.field,
|
|
1550
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1551
|
+
className: board_module_css_default.fieldLabel,
|
|
1552
|
+
children: t("new.title")
|
|
1553
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1554
|
+
className: board_module_css_default.input,
|
|
1555
|
+
value: title,
|
|
1556
|
+
autoFocus: true,
|
|
1557
|
+
placeholder: t("new.titlePlaceholder"),
|
|
1558
|
+
onChange: (event) => onTitleChange(event.target.value)
|
|
1559
|
+
})]
|
|
1560
|
+
}),
|
|
1561
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1562
|
+
className: board_module_css_default.field,
|
|
1563
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1564
|
+
className: board_module_css_default.fieldLabel,
|
|
1565
|
+
children: t("new.description")
|
|
1566
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
1567
|
+
className: board_module_css_default.input,
|
|
1568
|
+
rows: 3,
|
|
1569
|
+
value: description,
|
|
1570
|
+
placeholder: t("new.descriptionPlaceholder"),
|
|
1571
|
+
onChange: (event) => onDescriptionChange(event.target.value)
|
|
1572
|
+
})]
|
|
1573
|
+
}),
|
|
1574
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1575
|
+
className: board_module_css_default.field,
|
|
1576
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1577
|
+
className: board_module_css_default.fieldLabel,
|
|
1578
|
+
children: t("new.prompt")
|
|
1579
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
1580
|
+
className: board_module_css_default.input,
|
|
1581
|
+
rows: 4,
|
|
1582
|
+
value: prompt,
|
|
1583
|
+
placeholder: t("new.promptPlaceholder"),
|
|
1584
|
+
onChange: (event) => onPromptChange(event.target.value)
|
|
1585
|
+
})]
|
|
1586
|
+
})
|
|
1587
|
+
] });
|
|
1588
|
+
}
|
|
1589
|
+
//#endregion
|
|
1501
1590
|
//#region src/client/board/NewTaskModal.tsx
|
|
1502
1591
|
/**
|
|
1503
1592
|
* New-task modal: title + description + the prompt that execution will send.
|
|
@@ -1547,216 +1636,155 @@ window.__ModuleLoader__.load({
|
|
|
1547
1636
|
};
|
|
1548
1637
|
/** Next-run preview for a valid armed cron (creation-time only). */
|
|
1549
1638
|
const scheduleNextRun = scheduleEnabled && scheduleCron.trim() !== "" && isValidCron(scheduleCron) ? nextRunAtMs(scheduleCron, Date.now()) : void 0;
|
|
1550
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1639
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ModalShell, {
|
|
1640
|
+
ariaLabel: t("board.new"),
|
|
1641
|
+
title: t("board.new"),
|
|
1642
|
+
error,
|
|
1643
|
+
pending,
|
|
1644
|
+
submitLabel: t("new.submit"),
|
|
1645
|
+
onSubmit: () => {
|
|
1646
|
+
submit();
|
|
1554
1647
|
},
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
})
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
children: [
|
|
1652
|
-
preset.name ?? preset.id,
|
|
1653
|
-
preset.isDefault ? t("exec.mode.defaultSuffix") : "",
|
|
1654
|
-
preset.broken !== void 0 ? t("exec.mode.brokenSuffix") : ""
|
|
1655
|
-
]
|
|
1656
|
-
}, preset.id))]
|
|
1657
|
-
})]
|
|
1658
|
-
}),
|
|
1659
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1660
|
-
className: board_module_css_default.field,
|
|
1661
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1662
|
-
className: board_module_css_default.fieldLabel,
|
|
1663
|
-
children: t("new.permission")
|
|
1664
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1665
|
-
className: board_module_css_default.select,
|
|
1666
|
-
value: permission,
|
|
1667
|
-
onChange: (event) => {
|
|
1668
|
-
setPermission(event.target.value);
|
|
1669
|
-
},
|
|
1670
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1671
|
-
value: "",
|
|
1672
|
-
children: t("exec.permission.default")
|
|
1673
|
-
}), TASK_PERMISSIONS.map((id) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1674
|
-
value: id,
|
|
1675
|
-
children: t(`exec.permission.${id}`)
|
|
1676
|
-
}, id))]
|
|
1677
|
-
})]
|
|
1678
|
-
}),
|
|
1679
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1680
|
-
className: board_module_css_default.detailSection,
|
|
1681
|
-
children: [
|
|
1682
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { children: t("detail.schedule") }),
|
|
1683
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1684
|
-
className: board_module_css_default.scheduleToggle,
|
|
1648
|
+
onClose,
|
|
1649
|
+
children: [
|
|
1650
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskContentFields, {
|
|
1651
|
+
title,
|
|
1652
|
+
description,
|
|
1653
|
+
prompt,
|
|
1654
|
+
onTitleChange: (value) => {
|
|
1655
|
+
setTitle(value);
|
|
1656
|
+
setError(void 0);
|
|
1657
|
+
},
|
|
1658
|
+
onDescriptionChange: setDescription,
|
|
1659
|
+
onPromptChange: setPrompt
|
|
1660
|
+
}),
|
|
1661
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1662
|
+
className: board_module_css_default.field,
|
|
1663
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1664
|
+
className: board_module_css_default.fieldLabel,
|
|
1665
|
+
children: t("new.workspace")
|
|
1666
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1667
|
+
className: board_module_css_default.select,
|
|
1668
|
+
value: workspaceId,
|
|
1669
|
+
onChange: (event) => {
|
|
1670
|
+
setWorkspaceId(event.target.value);
|
|
1671
|
+
},
|
|
1672
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1673
|
+
value: "",
|
|
1674
|
+
children: t("exec.workspace.recent")
|
|
1675
|
+
}), options.workspaces.map((workspace) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1676
|
+
value: workspace.workspaceId,
|
|
1677
|
+
children: workspace.title
|
|
1678
|
+
}, workspace.workspaceId))]
|
|
1679
|
+
})]
|
|
1680
|
+
}),
|
|
1681
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1682
|
+
className: board_module_css_default.field,
|
|
1683
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1684
|
+
className: board_module_css_default.fieldLabel,
|
|
1685
|
+
children: t("new.mode")
|
|
1686
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1687
|
+
className: board_module_css_default.select,
|
|
1688
|
+
value: mode,
|
|
1689
|
+
onChange: (event) => {
|
|
1690
|
+
setMode(event.target.value);
|
|
1691
|
+
},
|
|
1692
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1693
|
+
value: "",
|
|
1694
|
+
children: t("exec.mode.default")
|
|
1695
|
+
}), options.presets.map((preset) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
1696
|
+
value: preset.id,
|
|
1697
|
+
disabled: preset.broken !== void 0,
|
|
1698
|
+
children: [
|
|
1699
|
+
preset.name ?? preset.id,
|
|
1700
|
+
preset.isDefault ? t("exec.mode.defaultSuffix") : "",
|
|
1701
|
+
preset.broken !== void 0 ? t("exec.mode.brokenSuffix") : ""
|
|
1702
|
+
]
|
|
1703
|
+
}, preset.id))]
|
|
1704
|
+
})]
|
|
1705
|
+
}),
|
|
1706
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1707
|
+
className: board_module_css_default.field,
|
|
1708
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1709
|
+
className: board_module_css_default.fieldLabel,
|
|
1710
|
+
children: t("new.permission")
|
|
1711
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1712
|
+
className: board_module_css_default.select,
|
|
1713
|
+
value: permission,
|
|
1714
|
+
onChange: (event) => {
|
|
1715
|
+
setPermission(event.target.value);
|
|
1716
|
+
},
|
|
1717
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1718
|
+
value: "",
|
|
1719
|
+
children: t("exec.permission.default")
|
|
1720
|
+
}), TASK_PERMISSIONS.map((id) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1721
|
+
value: id,
|
|
1722
|
+
children: t(`exec.permission.${id}`)
|
|
1723
|
+
}, id))]
|
|
1724
|
+
})]
|
|
1725
|
+
}),
|
|
1726
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1727
|
+
className: board_module_css_default.detailSection,
|
|
1728
|
+
children: [
|
|
1729
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { children: t("detail.schedule") }),
|
|
1730
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1731
|
+
className: board_module_css_default.scheduleToggle,
|
|
1732
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1733
|
+
type: "checkbox",
|
|
1734
|
+
checked: scheduleEnabled,
|
|
1735
|
+
onChange: (event) => {
|
|
1736
|
+
setScheduleEnabled(event.target.checked);
|
|
1737
|
+
if (!event.target.checked) setScheduleError(void 0);
|
|
1738
|
+
}
|
|
1739
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("detail.schedule.enable") })]
|
|
1740
|
+
}),
|
|
1741
|
+
scheduleEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1742
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1743
|
+
className: board_module_css_default.scheduleRow,
|
|
1685
1744
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1686
|
-
|
|
1687
|
-
|
|
1745
|
+
className: `${board_module_css_default.input} ${board_module_css_default.scheduleInput}${scheduleError !== void 0 ? ` ${board_module_css_default.scheduleInputInvalid}` : ""}`,
|
|
1746
|
+
value: scheduleCron,
|
|
1747
|
+
placeholder: "0 9 * * *",
|
|
1748
|
+
spellCheck: false,
|
|
1749
|
+
"aria-label": t("detail.schedule.cron"),
|
|
1688
1750
|
onChange: (event) => {
|
|
1689
|
-
|
|
1690
|
-
|
|
1751
|
+
setScheduleCron(event.target.value);
|
|
1752
|
+
setScheduleError(void 0);
|
|
1691
1753
|
}
|
|
1692
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
"aria-label": t("detail.schedule.cron"),
|
|
1703
|
-
onChange: (event) => {
|
|
1704
|
-
setScheduleCron(event.target.value);
|
|
1705
|
-
setScheduleError(void 0);
|
|
1706
|
-
}
|
|
1707
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1708
|
-
className: board_module_css_default.schedulePreset,
|
|
1754
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1755
|
+
className: board_module_css_default.schedulePreset,
|
|
1756
|
+
value: "",
|
|
1757
|
+
"aria-label": t("detail.schedule.presets"),
|
|
1758
|
+
onChange: (event) => {
|
|
1759
|
+
if (event.target.value === "") return;
|
|
1760
|
+
setScheduleCron(event.target.value);
|
|
1761
|
+
setScheduleError(void 0);
|
|
1762
|
+
},
|
|
1763
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
1709
1764
|
value: "",
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
" ",
|
|
1734
|
-
new Date(scheduleNextRun).toLocaleString()
|
|
1735
|
-
]
|
|
1736
|
-
})
|
|
1737
|
-
] })
|
|
1738
|
-
]
|
|
1739
|
-
}),
|
|
1740
|
-
error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1741
|
-
className: board_module_css_default.formError,
|
|
1742
|
-
children: error
|
|
1743
|
-
}),
|
|
1744
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
|
|
1745
|
-
className: board_module_css_default.modalFooter,
|
|
1746
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1747
|
-
type: "button",
|
|
1748
|
-
className: board_module_css_default.ghostButton,
|
|
1749
|
-
onClick: onClose,
|
|
1750
|
-
children: t("new.cancel")
|
|
1751
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1752
|
-
type: "submit",
|
|
1753
|
-
className: board_module_css_default.primaryButton,
|
|
1754
|
-
disabled: pending,
|
|
1755
|
-
children: t("new.submit")
|
|
1756
|
-
})]
|
|
1757
|
-
})
|
|
1758
|
-
]
|
|
1759
|
-
})
|
|
1765
|
+
children: [t("detail.schedule.presets"), "…"]
|
|
1766
|
+
}), SCHEDULE_PRESETS.map((preset) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1767
|
+
value: preset.cron,
|
|
1768
|
+
children: t(preset.label)
|
|
1769
|
+
}, preset.cron))]
|
|
1770
|
+
})]
|
|
1771
|
+
}),
|
|
1772
|
+
scheduleError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1773
|
+
className: board_module_css_default.formError,
|
|
1774
|
+
children: scheduleError
|
|
1775
|
+
}),
|
|
1776
|
+
scheduleError === void 0 && scheduleNextRun !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
1777
|
+
className: board_module_css_default.scheduleMeta,
|
|
1778
|
+
children: [
|
|
1779
|
+
t("detail.schedule.nextRun"),
|
|
1780
|
+
" ",
|
|
1781
|
+
new Date(scheduleNextRun).toLocaleString()
|
|
1782
|
+
]
|
|
1783
|
+
})
|
|
1784
|
+
] })
|
|
1785
|
+
]
|
|
1786
|
+
})
|
|
1787
|
+
]
|
|
1760
1788
|
});
|
|
1761
1789
|
}
|
|
1762
1790
|
//#endregion
|
|
@@ -1953,89 +1981,26 @@ window.__ModuleLoader__.load({
|
|
|
1953
1981
|
setPending(false);
|
|
1954
1982
|
setError(controller.getSnapshot().transportError ?? t("new.required"));
|
|
1955
1983
|
};
|
|
1956
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1984
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalShell, {
|
|
1985
|
+
ariaLabel: t("edit.title"),
|
|
1986
|
+
title: t("edit.title"),
|
|
1987
|
+
error,
|
|
1988
|
+
pending,
|
|
1989
|
+
submitLabel: t("edit.save"),
|
|
1990
|
+
onSubmit: () => {
|
|
1991
|
+
submit();
|
|
1960
1992
|
},
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1993
|
+
onClose,
|
|
1994
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskContentFields, {
|
|
1995
|
+
title,
|
|
1996
|
+
description,
|
|
1997
|
+
prompt,
|
|
1998
|
+
onTitleChange: (value) => {
|
|
1999
|
+
setTitle(value);
|
|
2000
|
+
setError(void 0);
|
|
1968
2001
|
},
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
className: board_module_css_default.modalTitle,
|
|
1972
|
-
children: t("edit.title")
|
|
1973
|
-
}),
|
|
1974
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1975
|
-
className: board_module_css_default.field,
|
|
1976
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1977
|
-
className: board_module_css_default.fieldLabel,
|
|
1978
|
-
children: t("new.title")
|
|
1979
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1980
|
-
className: board_module_css_default.input,
|
|
1981
|
-
value: title,
|
|
1982
|
-
autoFocus: true,
|
|
1983
|
-
placeholder: t("new.titlePlaceholder"),
|
|
1984
|
-
onChange: (event) => {
|
|
1985
|
-
setTitle(event.target.value);
|
|
1986
|
-
setError(void 0);
|
|
1987
|
-
}
|
|
1988
|
-
})]
|
|
1989
|
-
}),
|
|
1990
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1991
|
-
className: board_module_css_default.field,
|
|
1992
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1993
|
-
className: board_module_css_default.fieldLabel,
|
|
1994
|
-
children: t("new.description")
|
|
1995
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
1996
|
-
className: board_module_css_default.input,
|
|
1997
|
-
rows: 3,
|
|
1998
|
-
value: description,
|
|
1999
|
-
placeholder: t("new.descriptionPlaceholder"),
|
|
2000
|
-
onChange: (event) => {
|
|
2001
|
-
setDescription(event.target.value);
|
|
2002
|
-
}
|
|
2003
|
-
})]
|
|
2004
|
-
}),
|
|
2005
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2006
|
-
className: board_module_css_default.field,
|
|
2007
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2008
|
-
className: board_module_css_default.fieldLabel,
|
|
2009
|
-
children: t("new.prompt")
|
|
2010
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
2011
|
-
className: board_module_css_default.input,
|
|
2012
|
-
rows: 4,
|
|
2013
|
-
value: prompt,
|
|
2014
|
-
placeholder: t("new.promptPlaceholder"),
|
|
2015
|
-
onChange: (event) => {
|
|
2016
|
-
setPrompt(event.target.value);
|
|
2017
|
-
}
|
|
2018
|
-
})]
|
|
2019
|
-
}),
|
|
2020
|
-
error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2021
|
-
className: board_module_css_default.formError,
|
|
2022
|
-
children: error
|
|
2023
|
-
}),
|
|
2024
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
|
|
2025
|
-
className: board_module_css_default.modalFooter,
|
|
2026
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2027
|
-
type: "button",
|
|
2028
|
-
className: board_module_css_default.ghostButton,
|
|
2029
|
-
onClick: onClose,
|
|
2030
|
-
children: t("new.cancel")
|
|
2031
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2032
|
-
type: "submit",
|
|
2033
|
-
className: board_module_css_default.primaryButton,
|
|
2034
|
-
disabled: pending,
|
|
2035
|
-
children: t("edit.save")
|
|
2036
|
-
})]
|
|
2037
|
-
})
|
|
2038
|
-
]
|
|
2002
|
+
onDescriptionChange: setDescription,
|
|
2003
|
+
onPromptChange: setPrompt
|
|
2039
2004
|
})
|
|
2040
2005
|
});
|
|
2041
2006
|
}
|
|
@@ -2774,7 +2739,13 @@ window.__ModuleLoader__.load({
|
|
|
2774
2739
|
let root;
|
|
2775
2740
|
let container;
|
|
2776
2741
|
const ensure = () => {
|
|
2777
|
-
if (container !== void 0)
|
|
2742
|
+
if (container !== void 0) {
|
|
2743
|
+
if (container.isConnected) return;
|
|
2744
|
+
root?.unmount();
|
|
2745
|
+
root = void 0;
|
|
2746
|
+
container.remove();
|
|
2747
|
+
container = void 0;
|
|
2748
|
+
}
|
|
2778
2749
|
const column = conversationColumn();
|
|
2779
2750
|
if (column === void 0) return;
|
|
2780
2751
|
container = document.createElement("div");
|
|
@@ -3873,7 +3844,7 @@ window.__ModuleLoader__.load({
|
|
|
3873
3844
|
/** The building package's version, when the bundle carries it. */
|
|
3874
3845
|
function bakedVersion() {
|
|
3875
3846
|
try {
|
|
3876
|
-
return "0.3.
|
|
3847
|
+
return "0.3.6";
|
|
3877
3848
|
} catch {
|
|
3878
3849
|
return;
|
|
3879
3850
|
}
|