* bump python deps Signed-off-by: Jens Langhammer <jens@goauthentik.io> * vendor pickle serializer for now Signed-off-by: Jens Langhammer <jens@goauthentik.io> #7761 * cleanup some things and re-build api scheme Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix web and go Signed-off-by: Jens Langhammer <jens@goauthentik.io> * actually fix go...? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * better annotate json fields Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use jsondictfield wherever Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove all virtualenvs? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * ? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * final version bump Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import { msg } from "@lit/localize";
|
|
|
|
import { Flow, FlowDesignationEnum, FlowLayoutEnum } from "@goauthentik/api";
|
|
|
|
export function RenderFlowOption(flow: Flow): string {
|
|
return `${flow.slug} (${flow.name})`;
|
|
}
|
|
|
|
export function DesignationToLabel(designation: FlowDesignationEnum): string {
|
|
switch (designation) {
|
|
case FlowDesignationEnum.Authentication:
|
|
return msg("Authentication");
|
|
case FlowDesignationEnum.Authorization:
|
|
return msg("Authorization");
|
|
case FlowDesignationEnum.Enrollment:
|
|
return msg("Enrollment");
|
|
case FlowDesignationEnum.Invalidation:
|
|
return msg("Invalidation");
|
|
case FlowDesignationEnum.Recovery:
|
|
return msg("Recovery");
|
|
case FlowDesignationEnum.StageConfiguration:
|
|
return msg("Stage Configuration");
|
|
case FlowDesignationEnum.Unenrollment:
|
|
return msg("Unenrollment");
|
|
case FlowDesignationEnum.UnknownDefaultOpenApi:
|
|
return msg("Unknown designation");
|
|
}
|
|
}
|
|
|
|
export function LayoutToLabel(layout: FlowLayoutEnum): string {
|
|
switch (layout) {
|
|
case FlowLayoutEnum.Stacked:
|
|
return msg("Stacked");
|
|
case FlowLayoutEnum.ContentLeft:
|
|
return msg("Content left");
|
|
case FlowLayoutEnum.ContentRight:
|
|
return msg("Content right");
|
|
case FlowLayoutEnum.SidebarLeft:
|
|
return msg("Sidebar left");
|
|
case FlowLayoutEnum.SidebarRight:
|
|
return msg("Sidebar right");
|
|
case FlowLayoutEnum.UnknownDefaultOpenApi:
|
|
return msg("Unknown layout");
|
|
}
|
|
}
|