Web UI on Ant Design, scrollable factory columns, fix empty page after deleting the open chat
Buttons, fields, drop-downs, check boxes, tabs, dialogs and notices are Ant Design components; their tokens come from the theme variables (web/src/ui). Every factory board column has its own vertical scrollbar. ChatView rendered fewer hooks once its chat was deleted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
90b9ab6670
commit
6b1a1742b2
79 files changed
+2628
-1393
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { Button, Input } from "antd";
|
||||
import { Modal } from "../ui/Modal";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { toast } from "../dialogs";
|
||||
import { useT } from "../i18n";
|
||||
@@ -43,14 +45,13 @@ export function TemplatePicker({ onPick, onClose }: { onPick: (text: string) =>
|
||||
const ph = chosen ? placeholders(chosen.text) : [];
|
||||
|
||||
return (
|
||||
<div className="modal-backdrop" onClick={onClose}>
|
||||
<div className="modal tpl-picker" role="dialog" aria-label={t("templates.title")} onClick={(e) => e.stopPropagation()}>
|
||||
<Modal onClose={onClose} className="tpl-picker" role="dialog" aria-label={t("templates.title")}>
|
||||
{!chosen ? (
|
||||
<>
|
||||
<h3>
|
||||
<Icon name="template" /> {t("templates.title")}
|
||||
</h3>
|
||||
<input
|
||||
<Input
|
||||
autoFocus
|
||||
style={{ width: "100%" }}
|
||||
value={q}
|
||||
@@ -79,11 +80,11 @@ export function TemplatePicker({ onPick, onClose }: { onPick: (text: string) =>
|
||||
))}
|
||||
</div>
|
||||
<div className="row" style={{ marginTop: 12 }}>
|
||||
<button className="ghost small" onClick={() => (onClose(), navigate("/settings/templates"))}>
|
||||
<Button type="text" size="small" onClick={() => (onClose(), navigate("/settings/templates"))}>
|
||||
<Icon name="edit" /> {t("templates.manage")}
|
||||
</button>
|
||||
</Button>
|
||||
<span className="grow" />
|
||||
<button onClick={onClose}>{t("common.cancel")}</button>
|
||||
<Button onClick={onClose}>{t("common.cancel")}</Button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
@@ -108,16 +109,15 @@ export function TemplatePicker({ onPick, onClose }: { onPick: (text: string) =>
|
||||
</label>
|
||||
))}
|
||||
<div className="row" style={{ marginTop: 12, justifyContent: "flex-end" }}>
|
||||
<button type="button" onClick={() => setChosen(undefined)}>
|
||||
<Button onClick={() => setChosen(undefined)}>
|
||||
{t("common.back")}
|
||||
</button>
|
||||
<button type="submit" className="primary">
|
||||
</Button>
|
||||
<Button type="primary" htmlType="submit">
|
||||
{t("templates.insert")}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user