Skip to content

Commit

Permalink
[#8] added navbar for ad+k option
Browse files Browse the repository at this point in the history
  • Loading branch information
Eriikah committed Jun 25, 2024
1 parent dc466e6 commit f46975f
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions src/dashboards/SimpleAuthParams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export function SimpleAuthParams() {
passwordDB,
]);

const [ADKoptionSelected, setADKOptionSelected] = useState("AD");
try {
return (
<div>
Expand Down Expand Up @@ -244,11 +245,41 @@ export function SimpleAuthParams() {
{optionSelected === "adv" && (
<div>Use the Advanced Panel to manage your configuration.</div>
)}
{(optionSelected === "LDAP" || optionSelected === "AD+K") && (
<LDAPSimpleView />
{optionSelected === "LDAP" && <LDAPSimpleView />}
{optionSelected === "AD+K" && (
<>
<div className="optionNavbar">
<span
className={`option ${
ADKoptionSelected === "AD" ? "selected" : ""
}`}
onClick={() => setADKOptionSelected("AD")}
>
{t("AD")}
</span>
<span
className={`option ${
ADKoptionSelected === "Kerberos" ? "selected" : ""
}`}
onClick={() => setADKOptionSelected("Kerberos")}
>
{t("Kerberos")}
</span>
<span
className={`option ${
ADKoptionSelected === "LDAP" ? "selected" : ""
}`}
onClick={() => setADKOptionSelected("LDAP")}
>
{t("LDAP")}
</span>
</div>
{ADKoptionSelected === "AD" && <ADSimpleView />}
{ADKoptionSelected === "Kerberos" && <KerberosSimpleView />}
{ADKoptionSelected === "LDAP" && <LDAPSimpleView />}
</>
)}
{optionSelected === "AD+K" && <ADSimpleView />}
{optionSelected === "AD+K" && <KerberosSimpleView />}

{optionSelected === "Demo" && (
<div className="appDesc">
<span className="title2">{t("demoParams")}</span>
Expand Down

0 comments on commit f46975f

Please sign in to comment.