diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx index 5034bc939..8c5a3d00f 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx @@ -5,7 +5,7 @@ import { Script } from "@/lib/types"; export default function DefaultPassword({ item }: { item: Script }) { const { username, password } = item.default_credentials; - const hasDefaultLogin = username && password; + const hasDefaultLogin = username || password; if (!hasDefaultLogin) return null; @@ -23,14 +23,17 @@ export default function DefaultPassword({ item }: { item: Script }) {

You can use the following credentials to login to the {item.name} {item.type}.

- {["username", "password"].map((type) => ( -
- {type.charAt(0).toUpperCase() + type.slice(1)}:{" "} - -
- ))} + {["username", "password"].map((type) => { + const value = item.default_credentials[type as "username" | "password"]; + return value && value.trim() !== "" ? ( +
+ {type.charAt(0).toUpperCase() + type.slice(1)}:{" "} + +
+ ) : null; + })} );