Added Disable login animation with env variable (#2799)
Set CONSOLE_ANIMATED_LOGIN=off env variable before running Console binary Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -38,6 +38,9 @@ import (
|
||||
// swagger:model loginDetails
|
||||
type LoginDetails struct {
|
||||
|
||||
// animated login
|
||||
AnimatedLogin bool `json:"animatedLogin,omitempty"`
|
||||
|
||||
// is direct p v
|
||||
IsDirectPV bool `json:"isDirectPV,omitempty"`
|
||||
|
||||
|
||||
@@ -468,6 +468,7 @@ export interface LoginDetails {
|
||||
redirectRules?: RedirectRule[];
|
||||
isDirectPV?: boolean;
|
||||
isK8S?: boolean;
|
||||
animatedLogin?: boolean;
|
||||
}
|
||||
|
||||
export interface LoginOauth2AuthRequest {
|
||||
|
||||
@@ -266,6 +266,10 @@ const Login = () => {
|
||||
|
||||
const isK8S = useSelector((state: AppState) => state.login.isK8S);
|
||||
|
||||
const backgroundAnimation = useSelector(
|
||||
(state: AppState) => state.login.backgroundAnimation
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (navigateTo !== "") {
|
||||
dispatch(resetForm());
|
||||
@@ -393,6 +397,7 @@ const Login = () => {
|
||||
.
|
||||
</span>
|
||||
}
|
||||
backgroundAnimation={backgroundAnimation}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
@@ -27,6 +27,7 @@ export interface LoginState {
|
||||
secretKey: string;
|
||||
sts: string;
|
||||
useSTS: boolean;
|
||||
backgroundAnimation: boolean;
|
||||
|
||||
loginStrategy: ILoginDetails;
|
||||
|
||||
@@ -56,6 +57,7 @@ const initialState: LoginState = {
|
||||
loadingVersion: true,
|
||||
isDirectPV: false,
|
||||
isK8S: false,
|
||||
backgroundAnimation: false,
|
||||
|
||||
navigateTo: "",
|
||||
};
|
||||
@@ -107,6 +109,7 @@ export const loginSlice = createSlice({
|
||||
state.loginStrategy = action.payload;
|
||||
state.isDirectPV = !!action.payload.isDirectPV;
|
||||
state.isK8S = !!action.payload.isK8S;
|
||||
state.backgroundAnimation = !!action.payload.animatedLogin;
|
||||
}
|
||||
})
|
||||
.addCase(doLoginAsync.pending, (state, action) => {
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface ILoginDetails {
|
||||
redirectRules: redirectRule[];
|
||||
isDirectPV?: boolean;
|
||||
isK8S?: boolean;
|
||||
animatedLogin?: boolean;
|
||||
}
|
||||
|
||||
export interface redirectRule {
|
||||
|
||||
@@ -276,3 +276,7 @@ func getMaxConcurrentDownloadsLimit() int64 {
|
||||
func getConsoleDevMode() bool {
|
||||
return strings.ToLower(env.Get(ConsoleDevMode, "off")) == "on"
|
||||
}
|
||||
|
||||
func getConsoleAnimatedLogin() bool {
|
||||
return strings.ToLower(env.Get(ConsoleAnimatedLogin, "on")) == "on"
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ const (
|
||||
ConsoleMaxConcurrentUploads = "CONSOLE_MAX_CONCURRENT_UPLOADS"
|
||||
ConsoleMaxConcurrentDownloads = "CONSOLE_MAX_CONCURRENT_DOWNLOADS"
|
||||
ConsoleDevMode = "CONSOLE_DEV_MODE"
|
||||
ConsoleAnimatedLogin = "CONSOLE_ANIMATED_LOGIN"
|
||||
LogSearchQueryAuthToken = "LOGSEARCH_QUERY_AUTH_TOKEN"
|
||||
SlashSeparator = "/"
|
||||
)
|
||||
|
||||
@@ -7026,6 +7026,9 @@ func init() {
|
||||
"loginDetails": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"animatedLogin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -16157,6 +16160,9 @@ func init() {
|
||||
"loginDetails": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"animatedLogin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
@@ -216,6 +216,7 @@ func getLoginDetailsResponse(params authApi.LoginDetailParams, openIDProviders o
|
||||
LoginStrategy: loginStrategy,
|
||||
RedirectRules: redirectRules,
|
||||
IsK8S: isKubernetes(),
|
||||
AnimatedLogin: getConsoleAnimatedLogin(),
|
||||
}
|
||||
return loginDetails, nil
|
||||
}
|
||||
|
||||
@@ -4355,6 +4355,8 @@ definitions:
|
||||
type: boolean
|
||||
isK8S:
|
||||
type: boolean
|
||||
animatedLogin:
|
||||
type: boolean
|
||||
loginOauth2AuthRequest:
|
||||
type: object
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user