Configure board deployment and backend proxy
Build, Push and Deploy / build (push) Failing after 1s
Build, Push and Deploy / deploy (push) Skipped

This commit is contained in:
2026-09-13 16:09:59 +08:00
commit 02f5bf14ba
91 changed files with 12401 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
import styles from './SearchResultState.module.css';
interface SearchResultStateProps {
query: string;
targetCount: number;
selectedTargetIndex: number;
onReset: () => void;
onSelectTarget: (targetIndex: number) => void;
}
export function SearchResultState({
query,
targetCount,
selectedTargetIndex,
onReset,
onSelectTarget,
}: SearchResultStateProps) {
const hasMultipleTargets = targetCount > 1;
return (
<div className={styles.result} aria-live="polite">
<strong> · {query}</strong>
<small>{hasMultipleTargets ? `找到 ${targetCount}` : '你在这里'}</small>
<div className={styles.resultRow}>
<button
type="button"
className={styles.ghostButton}
onClick={onReset}
>
</button>
{hasMultipleTargets ? (
<>
<button
type="button"
className={styles.ghostButton}
onClick={() => onSelectTarget(Math.max(0, selectedTargetIndex - 1))}
disabled={selectedTargetIndex === 0}
>
</button>
<button
type="button"
className={styles.ghostButton}
onClick={() => onSelectTarget(Math.min(targetCount - 1, selectedTargetIndex + 1))}
disabled={selectedTargetIndex === targetCount - 1}
>
</button>
<small className={styles.count}>
{selectedTargetIndex + 1} / {targetCount}
</small>
</>
) : null}
</div>
</div>
);
}