Skip to content

Commit f22b03e

Browse files
authored
Merge pull request #2690 from devtron-labs/feat/login-image-cm
feat: login image cm
2 parents cad30b6 + 59028a3 commit f22b03e

File tree

7 files changed

+73
-55
lines changed

7 files changed

+73
-55
lines changed

.env

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

config.md

Lines changed: 50 additions & 49 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.12.0-pre-6",
7+
"@devtron-labs/devtron-fe-common-lib": "1.12.0-pre-7",
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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,16 @@ const Login = () => {
181181
return (
182182
<div className="full-height-width login dc__grid-half bg__secondary">
183183
<div className="flexbox p-12">
184-
<LoginBanner />
184+
{window._env_.LOGIN_PAGE_IMAGE ? (
185+
<div
186+
style={{
187+
backgroundImage: `url(${window._env_.LOGIN_PAGE_IMAGE})`,
188+
}}
189+
className="login-image-container flex br-12 border__primary bg__primary h-100 w-100"
190+
/>
191+
) : (
192+
<LoginBanner />
193+
)}
185194
</div>
186195
<div className="flex">
187196
<div className="login-card__wrapper dc__overflow-hidden br-12 mw-420 bg__primary dc__border">

src/components/login/login.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
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+
}
2935
}
3036

3137
// 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_DEFAULT_AUTHENTICATED_VIEW_ENABLE: false,
169169
GATEKEEPER_URL: 'https://license.devtron.ai/dashboard',
170170
FEATURE_AI_INTEGRATION_ENABLE: false,
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]6":
1130-
version "1.12.0-pre-6"
1131-
resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-1.12.0-pre-6.tgz#a168abd1d1ebbe4824b5d57ff20edf3f2826a317"
1132-
integrity sha512-98oEJma9bx+ALNjpwOnNrGCm0DIQryEd9QXfrKMDrM017jKz5XG97tOGBGcpF+XFH9oQZQacGepdEXdQ7bRN3Q==
1129+
"@devtron-labs/[email protected]7":
1130+
version "1.12.0-pre-7"
1131+
resolved "https://registry.yarnpkg.com/@devtron-labs/devtron-fe-common-lib/-/devtron-fe-common-lib-1.12.0-pre-7.tgz#50bedcb413f0cd5057618e8168fab31bdf9de2d5"
1132+
integrity sha512-uhe9VMjGHFpfbHJjxaUEVmWL2fugHISVuKVvMLvR3yLboR71hP3rx+uKqLZN+bqhljzEGm6gw2Wjsjbj2q3MFg==
11331133
dependencies:
11341134
"@codemirror/lang-json" "6.0.1"
11351135
"@codemirror/lang-yaml" "6.1.2"

0 commit comments

Comments
 (0)