Skip to content

Commit 0bd3eab

Browse files
committed
feat: add support for login page image via cm
1 parent 4c18929 commit 0bd3eab

File tree

7 files changed

+78
-51
lines changed

7 files changed

+78
-51
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ FEATURE_APPLICATION_TEMPLATES_ENABLE=true
6464
FEATURE_CODE_MIRROR_ENABLE=false
6565
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6666
GATEKEEPER_URL=https://license.devtron.ai/dashboard
67+
LOGIN_PAGE_IMAGE=

config.md

Lines changed: 50 additions & 45 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.11.2",
7+
"@devtron-labs/devtron-fe-common-lib": "1.11.2-patch-1",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/components/login/Login.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
SSOProviderIcon,
3333
Icon,
3434
LoginBanner,
35+
SnowConfetti,
3536
} from '@devtron-labs/devtron-fe-common-lib'
3637
import { importComponentFromFELibrary } from '@Components/common'
3738
import { URLS, TOKEN_COOKIE_NAME } from '../../config'
@@ -177,7 +178,18 @@ const Login = () => {
177178
return (
178179
<div className="full-height-width login dc__grid-half bg__secondary">
179180
<div className="flexbox p-12">
180-
<LoginBanner />
181+
{window._env_.LOGIN_PAGE_IMAGE ? (
182+
<div
183+
style={{
184+
backgroundImage: `url(${window._env_.LOGIN_PAGE_IMAGE})`,
185+
}}
186+
className="login-image-container flex br-12 border__primary bg__primary h-100 w-100 dc__overflow-hidden"
187+
>
188+
<SnowConfetti />
189+
</div>
190+
) : (
191+
<LoginBanner />
192+
)}
181193
</div>
182194
<div className="flex">
183195
<div className="login-card__wrapper dc__overflow-hidden br-12 mw-420 bg__primary dc__border">

src/components/login/login.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
color: var(--N900)
2727
}
2828
}
29+
30+
.login-image-container {
31+
background-position: center;
32+
background-repeat: no-repeat;
33+
background-size: cover;
34+
height: 100%;
35+
width: 100%;
36+
}
2937
}
3038

3139
// SSO login & GitOps configuration css

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ if (!window || !window._env_) {
168168
FEATURE_CODE_MIRROR_ENABLE: true,
169169
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE: false,
170170
GATEKEEPER_URL: 'https://license.devtron.ai/dashboard',
171+
LOGIN_PAGE_IMAGE: '',
171172
}
172173
}
173174

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,10 +1126,10 @@
11261126
dependencies:
11271127
"@jridgewell/trace-mapping" "0.3.9"
11281128

1129-
"@devtron-labs/[email protected]":
1130-
version "1.11.2"
1131-
resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-1.11.2.tgz#ab78ddcb27798f9b617f92b009b99375b5b9696d"
1132-
integrity sha512-iNO9NeNde3SkAslEgWSppj7g7KHGUcC2hayH3M5i9aOIabd9Qqyx9+LWNZ4g69mfUmYgFawiMVsMsyb9ntlFdQ==
1129+
"@devtron-labs/[email protected]-patch-1":
1130+
version "1.11.2-patch-1"
1131+
resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-1.11.2-patch-1.tgz#b009ccb9600f03c4bf5d21bdd0f9ce8325a61684"
1132+
integrity sha512-lG1XnL7ih9r+2AO7UHweIJqOyhsVWXL963j5hVyU1b5/b6TbNP3/yzr5hnk9cuzBpvmQp0BcL8twEce8l78f+w==
11331133
dependencies:
11341134
"@codemirror/lang-json" "6.0.1"
11351135
"@codemirror/lang-yaml" "6.1.2"

0 commit comments

Comments
 (0)