Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
10 changes: 10 additions & 0 deletions frontend/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
import {
Collapsible,
Expand Down Expand Up @@ -63,10 +64,12 @@ export default function BiomodelSearchPage() {

const [results, setResults] = useState<BiomodelResult[]>([]);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const [isAdvancedSearchOpen, setIsAdvancedSearchOpen] = useState(false);

const handleSearch = async () => {
setIsLoading(true);
setError(null);
try {
// Build query params from filters, omitting empty bmName
const params = new URLSearchParams();
Expand Down Expand Up @@ -103,6 +106,7 @@ export default function BiomodelSearchPage() {
);
setResults(mappedResults);
} catch (err) {
setError("Failed to search biomodels. Please try again.");
setResults([]);
} finally {
setIsLoading(false);
Expand Down Expand Up @@ -382,6 +386,12 @@ export default function BiomodelSearchPage() {
</CardContent>
</Card>

{error && (
<Alert className="mb-8 border-red-200 bg-red-50">
<AlertDescription className="text-red-700">{error}</AlertDescription>
</Alert>
)}

{/* Results Section */}
{results.length > 0 && (
<div className="mb-8">
Expand Down
1 change: 1 addition & 0 deletions frontend/app/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default function SignInPage() {
type="button"
onClick={() => setShowPassword(!showPassword)}
className="absolute right-3 top-3 text-gray-400 hover:text-gray-600"
aria-label={showPassword ? "Hide password" : "Show password"}
>
{showPassword ? (
<EyeOff className="h-4 w-4" />
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export default function SignUpPage() {
type="button"
onClick={() => setShowPassword(!showPassword)}
className="absolute right-3 top-3 text-gray-400 hover:text-gray-600"
aria-label={showPassword ? "Hide password" : "Show password"}
>
{showPassword ? (
<EyeOff className="h-4 w-4" />
Expand Down Expand Up @@ -230,6 +231,7 @@ export default function SignUpPage() {
type="button"
onClick={() => setShowConfirmPassword(!showConfirmPassword)}
className="absolute right-3 top-3 text-gray-400 hover:text-gray-600"
aria-label={showConfirmPassword ? "Hide password" : "Show password"}
>
{showConfirmPassword ? (
<EyeOff className="h-4 w-4" />
Expand Down