+
+
+
+ = 0
+ ? `branch-option-${branchActiveIndex}`
+ : undefined
+ }
+ aria-autocomplete="list"
+ aria-controls="branch-search-list"
+ aria-expanded={branchSearch.open}
+ aria-haspopup="listbox"
+ aria-label="分支名"
+ role="combobox"
+ id="branch-input"
+ autoComplete="off"
+ disabled={submitting}
+ maxLength={200}
+ placeholder="master"
+ value={branch}
+ onChange={(event) => {
+ setBranchSearchEnabled(true);
+ setBranch(event.target.value);
+ if (commitHash) {
+ setCommitHash('');
+ setCommitSearchEnabled(false);
+ }
+ }}
+ onFocus={() => {
+ setBranchSearchEnabled(true);
+ setBranchSearch((current) => ({ ...current, open: true }));
+ }}
+ onKeyDown={(event) => {
+ handleSearchKeyDown(
+ event,
+ branchSearch,
+ branchActiveIndex,
+ (index) => setBranchActiveIndex(index),
+ (item) => {
+ setBranch(item.name);
+ setCommitHash('');
+ setBranchSearchEnabled(false);
+ setCommitSearchEnabled(false);
+ setBranchSearch((current) => ({
+ ...current,
+ open: false,
+ }));
+ },
+ () =>
+ setBranchSearch((current) => ({
+ ...current,
+ open: false,
+ })),
+ );
+ }}
+ onBlur={() =>
+ window.setTimeout(
+ () =>
+ setBranchSearch((current) => ({
+ ...current,
+ open: false,
+ })),
+ 120,
+ )
+ }
+ />
+
+
{
+ setBranch(item.name);
+ setCommitHash('');
+ setBranchSearchEnabled(false);
+ setCommitSearchEnabled(false);
+ setBranchSearch((current) => ({ ...current, open: false }));
+ }}
+ activeIndex={branchActiveIndex}
+ />
+
+
+
+
+
+ = 0
+ ? `commit-option-${commitActiveIndex}`
+ : undefined
+ }
+ aria-autocomplete="list"
+ aria-controls="commit-search-list"
+ aria-expanded={commitSearch.open}
+ aria-haspopup="listbox"
+ aria-label="Commit Hash"
+ role="combobox"
+ id="commit-input"
+ autoComplete="off"
+ disabled={submitting}
+ maxLength={40}
+ placeholder="留空则构建分支最新提交"
+ value={commitHash}
+ onChange={(event) => {
+ setCommitSearchEnabled(true);
+ setCommitHash(event.target.value);
+ }}
+ onFocus={() => {
+ setCommitSearchEnabled(true);
+ setCommitSearch((current) => ({ ...current, open: true }));
+ }}
+ onKeyDown={(event) => {
+ handleSearchKeyDown(
+ event,
+ commitSearch,
+ commitActiveIndex,
+ (index) => setCommitActiveIndex(index),
+ (item) => {
+ setCommitHash(item.commitHash);
+ setCommitSearchEnabled(false);
+ setCommitSearch((current) => ({
+ ...current,
+ open: false,
+ }));
+ },
+ () =>
+ setCommitSearch((current) => ({
+ ...current,
+ open: false,
+ })),
+ );
+ }}
+ onBlur={() =>
+ window.setTimeout(
+ () =>
+ setCommitSearch((current) => ({
+ ...current,
+ open: false,
+ })),
+ 120,
+ )
+ }
+ />
+
+
{
+ setCommitHash(item.commitHash);
+ setCommitSearchEnabled(false);
+ setCommitSearch((current) => ({ ...current, open: false }));
+ }}
+ activeIndex={commitActiveIndex}
+ />
+
+