Skip to content

Commit 6dff4f3

Browse files
committed
chore: icon updated
1 parent 9b55581 commit 6dff4f3

File tree

10 files changed

+132
-0
lines changed

10 files changed

+132
-0
lines changed

src/Assets/IconV2/ic-google.svg

Lines changed: 6 additions & 0 deletions
Loading

src/Assets/IconV2/ic-ldap.svg

Lines changed: 3 additions & 0 deletions
Loading

src/Assets/IconV2/ic-microsoft.svg

Lines changed: 6 additions & 0 deletions
Loading

src/Assets/IconV2/ic-oidc.svg

Lines changed: 4 additions & 0 deletions
Loading

src/Assets/IconV2/ic-openshift.svg

Lines changed: 10 additions & 0 deletions
Loading

src/Common/Constants.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,3 +435,16 @@ export const UNCHANGED_ARRAY_ELEMENT_SYMBOL = Symbol(
435435
`The element at this index remains unchanged from the original object.
436436
This symbol is used by @buildObjectFromPath & later consumed by @recursivelyRemoveSymbolFromArraysInObject`,
437437
)
438+
439+
/**
440+
* Authorization config types for SSO Login
441+
*/
442+
export enum SSOProvider {
443+
google = 'google',
444+
github = 'github',
445+
gitlab = 'gitlab',
446+
microsoft = 'microsoft',
447+
ldap = 'ldap',
448+
oidc = 'oidc',
449+
openshift = 'openshift',
450+
}

src/Shared/Components/Icon/Icon.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { ReactComponent as ICGithub } from '@IconsV2/ic-github.svg'
2727
import { ReactComponent as ICGitlab } from '@IconsV2/ic-gitlab.svg'
2828
import { ReactComponent as ICGoogleArtifactRegistry } from '@IconsV2/ic-google-artifact-registry.svg'
2929
import { ReactComponent as ICGoogleContainerRegistry } from '@IconsV2/ic-google-container-registry.svg'
30+
import { ReactComponent as ICGoogle } from '@IconsV2/ic-google.svg'
3031
import { ReactComponent as ICGridView } from '@IconsV2/ic-grid-view.svg'
3132
import { ReactComponent as ICHeartGreen } from '@IconsV2/ic-heart-green.svg'
3233
import { ReactComponent as ICHeartRedAnimated } from '@IconsV2/ic-heart-red-animated.svg'
@@ -39,11 +40,15 @@ import { ReactComponent as ICInfoFilled } from '@IconsV2/ic-info-filled.svg'
3940
import { ReactComponent as ICInfoOutline } from '@IconsV2/ic-info-outline.svg'
4041
import { ReactComponent as ICJobColor } from '@IconsV2/ic-job-color.svg'
4142
import { ReactComponent as ICK8sJob } from '@IconsV2/ic-k8s-job.svg'
43+
import { ReactComponent as ICLdap } from '@IconsV2/ic-ldap.svg'
44+
import { ReactComponent as ICMicrosoft } from '@IconsV2/ic-microsoft.svg'
4245
import { ReactComponent as ICMissing } from '@IconsV2/ic-missing.svg'
4346
import { ReactComponent as ICMonitoring } from '@IconsV2/ic-monitoring.svg'
4447
import { ReactComponent as ICNodeScript } from '@IconsV2/ic-node-script.svg'
48+
import { ReactComponent as ICOidc } from '@IconsV2/ic-oidc.svg'
4549
import { ReactComponent as ICOpenBox } from '@IconsV2/ic-open-box.svg'
4650
import { ReactComponent as ICOpenInNew } from '@IconsV2/ic-open-in-new.svg'
51+
import { ReactComponent as ICOpenshift } from '@IconsV2/ic-openshift.svg'
4752
import { ReactComponent as ICOutOfSync } from '@IconsV2/ic-out-of-sync.svg'
4853
import { ReactComponent as ICPaperPlaneColor } from '@IconsV2/ic-paper-plane-color.svg'
4954
import { ReactComponent as ICQuay } from '@IconsV2/ic-quay.svg'
@@ -87,6 +92,7 @@ export const iconMap = {
8792
'ic-gitlab': ICGitlab,
8893
'ic-google-artifact-registry': ICGoogleArtifactRegistry,
8994
'ic-google-container-registry': ICGoogleContainerRegistry,
95+
'ic-google': ICGoogle,
9096
'ic-grid-view': ICGridView,
9197
'ic-heart-green': ICHeartGreen,
9298
'ic-heart-red-animated': ICHeartRedAnimated,
@@ -99,11 +105,15 @@ export const iconMap = {
99105
'ic-info-outline': ICInfoOutline,
100106
'ic-job-color': ICJobColor,
101107
'ic-k8s-job': ICK8sJob,
108+
'ic-ldap': ICLdap,
109+
'ic-microsoft': ICMicrosoft,
102110
'ic-missing': ICMissing,
103111
'ic-monitoring': ICMonitoring,
104112
'ic-node-script': ICNodeScript,
113+
'ic-oidc': ICOidc,
105114
'ic-open-box': ICOpenBox,
106115
'ic-open-in-new': ICOpenInNew,
116+
'ic-openshift': ICOpenshift,
107117
'ic-out-of-sync': ICOutOfSync,
108118
'ic-paper-plane-color': ICPaperPlaneColor,
109119
'ic-quay': ICQuay,
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { SSOProvider } from '@Common/Constants'
18+
import { SSOProviderIconProps } from './types'
19+
20+
import { Icon, IconName } from '../Icon'
21+
22+
const ssoProviderIconMap: Record<SSOProvider, IconName> = {
23+
[SSOProvider.google]: 'ic-google',
24+
[SSOProvider.github]: 'ic-github',
25+
[SSOProvider.gitlab]: 'ic-gitlab',
26+
[SSOProvider.ldap]: 'ic-ldap',
27+
[SSOProvider.microsoft]: 'ic-microsoft',
28+
[SSOProvider.oidc]: 'ic-oidc',
29+
[SSOProvider.openshift]: 'ic-openshift',
30+
}
31+
32+
export const SSOProviderIcon = ({ ssoProvider, size = 20 }: SSOProviderIconProps) => (
33+
<Icon name={ssoProviderIconMap[ssoProvider]} size={size} color={null} />
34+
)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
export * from './SSOProviderIcon'
18+
export * from './types'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { SSOProvider } from '@Common/Constants'
18+
19+
import { IconsProps } from '../Icon'
20+
21+
export interface SSOProviderIconProps {
22+
ssoProvider: SSOProvider
23+
/**
24+
* The size of the icon in pixels.
25+
* @default 20
26+
*/
27+
size?: IconsProps['size']
28+
}

0 commit comments

Comments
 (0)