feat(react): add hlep page to branch prefix

This commit is contained in:
Elian Doran 2025-08-03 19:48:44 +03:00
parent 5d9bd0f6d3
commit f8b563704f
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,7 @@ function BranchPrefixDialogComponent({ branch }: BranchPrefixDialogProps) {
size="lg"
onShown={() => branchInput.current?.focus()}
onSubmit={onSubmit}
helpPageId="TBwsyfadTA18"
footer={<button class="btn btn-primary btn-sm">{t("branch_prefix.save")}</button>}
>
<div class="form-group">

View File

@ -14,9 +14,10 @@ interface ModalProps {
*/
onSubmit?: () => void;
onShown?: () => void;
helpPageId?: string;
}
export default function Modal({ children, className, size, title, footer, onShown, onSubmit }: ModalProps) {
export default function Modal({ children, className, size, title, footer, onShown, onSubmit, helpPageId }: ModalProps) {
const modalRef = useRef<HTMLDivElement>(null);
if (onShown) {
@ -34,6 +35,9 @@ export default function Modal({ children, className, size, title, footer, onShow
<div className="modal-content">
<div className="modal-header">
<h5 className="modal-title">{title}</h5>
{helpPageId && (
<button className="help-button" type="button" data-in-app-help={helpPageId} title={t("branch_prefix.help_on_tree_prefix")}>?</button>
)}
<button type="button" className="btn-close" data-bs-dismiss="modal" aria-label={t("modal.close")}></button>
</div>