web: add check compile test to prevent compile errors/warnings

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2023-01-01 23:32:05 +01:00
parent 93e20bce2e
commit 964fdf171b
13 changed files with 52 additions and 4 deletions

View File

@ -27,8 +27,9 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
import { OAuthSource, ProviderTypeEnum, SourcesApi } from "@goauthentik/api";
export function ProviderToLabel(provider?: ProviderTypeEnum): string {
if (!provider) return "";
switch (provider) {
case undefined:
return "";
case ProviderTypeEnum.Apple:
return "Apple";
case ProviderTypeEnum.Azuread:
@ -51,6 +52,10 @@ export function ProviderToLabel(provider?: ProviderTypeEnum): string {
return "Reddit";
case ProviderTypeEnum.Twitter:
return "Twitter";
case ProviderTypeEnum.Twitch:
return "Twitch";
case ProviderTypeEnum.UnknownDefaultOpenApi:
return t`Unknown provider type`;
}
}

View File

@ -15,5 +15,7 @@ export function UserMatchingModeToLabel(mode?: UserMatchingModeEnum): string {
return t`Link to a user with identical username. Can have security implications when a username is used with another source`;
case UserMatchingModeEnum.UsernameDeny:
return t`Use the user's username, but deny enrollment when the username already exists`;
case UserMatchingModeEnum.UnknownDefaultOpenApi:
return t`Unknown user matching mode`;
}
}