Skip to content

Commit 3a6e50e

Browse files
committed
add new login splash
1 parent 3380a33 commit 3a6e50e

File tree

6 files changed

+92
-55
lines changed

6 files changed

+92
-55
lines changed

www/public/login-bg-img.webp

501 KB
Loading

www/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
polyfilledHonorableThemeLight,
3333
polyfilledStyledThemeDark,
3434
polyfilledStyledThemeLight,
35-
} from 'styles'
35+
} from './styles'
3636
import { OverlayContextProvider } from './components/layout/Overlay'
3737
import { CursorPositionProvider } from './components/utils/CursorPosition'
3838
import { INTERCOM_APP_ID } from './constants'

www/src/components/overview/clusters/ClusterListEmptyState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function ClusterListEmptyState() {
7070
const GridWrapSC = styled.div(({ theme }) => ({
7171
display: 'grid',
7272
gridTemplateColumns: '1fr 1fr',
73-
gridTemplateRows: 'auto',
73+
gridTemplateRows: '300px auto',
7474
gap: `${theme.spacing.xlarge}px ${theme.spacing.large}px`,
7575
}))
7676

www/src/components/overview/clusters/Clusters.tsx

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const CLUSTERS_OVERVIEW_BREADCRUMBS = [
5050
]
5151

5252
export function Clusters(): ReactElement | null {
53-
const { spacing } = useTheme()
53+
const { spacing, mode } = useTheme()
5454
const [showSupportToast, setShowSupportToast] = useState(false)
5555
const [showPluralCloudToast, setShowPluralCloudToast] = useState(false)
5656

@@ -133,17 +133,25 @@ export function Clusters(): ReactElement | null {
133133
)}
134134
</Flex>
135135
<CopilotCardSC>
136-
<AgentChipSC>
137-
<CaptionP
138-
$color="text-light"
139-
css={{ fontWeight: 300 }}
140-
>
141-
Copilot Agent
142-
</CaptionP>
143-
<PaperplaneIcon />
144-
</AgentChipSC>
136+
<Button
137+
small
138+
as={Link}
139+
to="https://docs.plural.sh/plural-features/plural-ai"
140+
style={{
141+
padding: `0 9px`,
142+
borderRadius: 6,
143+
borderColor:
144+
mode === 'light'
145+
? 'rgba(0, 0, 0, 0.10)'
146+
: 'rgba(255, 255, 255, 0.10)',
147+
}}
148+
secondary
149+
endIcon={<PaperplaneIcon />}
150+
>
151+
<AgentButtonTextSC>Plural AI</AgentButtonTextSC>
152+
</Button>
145153
<Body2P $color="text-xlight">
146-
Access Plural AI within your instance of the Plural Console.
154+
Access Plural AI within your Plural Console.
147155
</Body2P>
148156
</CopilotCardSC>
149157
</Flex>
@@ -229,26 +237,12 @@ const CopilotCardSC = styled(Card)(({ theme }) => ({
229237
display: 'flex',
230238
flexDirection: 'column',
231239
alignItems: 'flex-start',
232-
width: 280,
240+
width: 380,
233241
gap: theme.spacing.small,
234242
padding: `${theme.spacing.medium}px ${theme.spacing.large}px`,
235243
backgroundColor: theme.colors['fill-zero'],
236244
}))
237245

238-
const AgentChipSC = styled.div(({ theme }) => ({
239-
display: 'flex',
240-
alignItems: 'center',
241-
justifyContent: 'center',
242-
padding: `${theme.spacing.xxsmall}px ${theme.spacing.xsmall}px`,
243-
gap: theme.spacing.xxsmall,
244-
borderRadius: theme.borderRadiuses.large,
245-
border: '1px solid',
246-
borderColor:
247-
theme.mode === 'light'
248-
? 'rgba(0, 0, 0, 0.10)'
249-
: 'rgba(255, 255, 255, 0.10)',
250-
}))
251-
252246
const PaperplaneIcon = () => (
253247
<svg
254248
xmlns="http://www.w3.org/2000/svg"
@@ -273,3 +267,12 @@ const PaperplaneIcon = () => (
273267
/>
274268
</svg>
275269
)
270+
271+
const AgentButtonTextSC = styled.p(({ theme }) => ({
272+
margin: 0,
273+
color: theme.colors['text-light'],
274+
fontFamily: theme.fontFamilies.sans,
275+
fontSize: 12.8,
276+
fontWeight: 300,
277+
letterSpacing: '0.128px',
278+
}))
Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,74 @@
1-
import { styledTheme } from '@pluralsh/design-system'
1+
import { Flex, styledTheme } from '@pluralsh/design-system'
22

33
import { Footer, FooterBalancer } from './LoginFooter'
4+
import styled, { useTheme } from 'styled-components'
5+
import { themProviderPropTypes } from 'honorable'
46

57
export const RIGHT_CONTENT_MAX_WIDTH = 512
68
export const RIGHT_CONTENT_PAD = styledTheme.spacing.xxlarge
79
export const LOGIN_BREAKPOINT = `@media screen and (min-width: ${
810
RIGHT_CONTENT_MAX_WIDTH + RIGHT_CONTENT_PAD * 2
911
}px)`
1012

13+
const HERO_IMAGE_URL = '/login-bg-img.webp'
14+
1115
export function LoginPortal({ children }: any) {
16+
const { colors } = useTheme()
1217
return (
13-
<div
14-
css={{
15-
display: 'flex',
16-
flexDirection: 'column',
17-
flexGrow: 1,
18-
flexShrink: 1,
19-
height: '100vh',
20-
overflow: 'auto',
21-
paddingLeft: RIGHT_CONTENT_PAD,
22-
paddingRight: RIGHT_CONTENT_PAD,
23-
}}
24-
>
25-
<FooterBalancer />
26-
<div
27-
css={{
28-
margin: 'auto',
29-
maxWidth: RIGHT_CONTENT_MAX_WIDTH,
30-
width: '100%',
31-
}}
18+
<WrapperSC>
19+
<Flex
20+
direction="column"
21+
flex={1}
22+
height="100vh"
23+
overflow="auto"
24+
paddingLeft={RIGHT_CONTENT_PAD}
25+
paddingRight={RIGHT_CONTENT_PAD}
3226
>
33-
{children}
34-
</div>
35-
<Footer />
36-
</div>
27+
<FooterBalancer />
28+
<div
29+
css={{
30+
margin: 'auto',
31+
maxWidth: RIGHT_CONTENT_MAX_WIDTH,
32+
width: '100%',
33+
}}
34+
>
35+
{children}
36+
</div>
37+
<Footer />
38+
</Flex>
39+
<HeroSC />
40+
</WrapperSC>
3741
)
3842
}
43+
44+
const WrapperSC = styled.div({
45+
display: 'grid',
46+
gridTemplateColumns: '50% 50%',
47+
gridTemplateRows: '1fr',
48+
height: '100vh',
49+
width: '100vw',
50+
overflow: 'hidden',
51+
})
52+
const HeroSC = styled.div(({ theme }) => ({
53+
background: theme.colors['fill-accent'],
54+
position: 'relative',
55+
'&::before': {
56+
content: '""',
57+
position: 'absolute',
58+
inset: 40,
59+
backgroundImage:
60+
'radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px)',
61+
backgroundSize: '20px 20px',
62+
zIndex: 1,
63+
},
64+
'&::after': {
65+
content: '""',
66+
position: 'absolute',
67+
inset: 0,
68+
backgroundImage: `url(${HERO_IMAGE_URL})`,
69+
backgroundSize: '80%',
70+
backgroundPosition: 'center',
71+
backgroundRepeat: 'no-repeat',
72+
zIndex: 2,
73+
},
74+
}))

www/src/components/users/MagicLogin.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,7 @@ function OAuthOption({ url: { authorizeUrl, provider }, ...props }: any) {
587587
_hover={{ textDecoration: 'none' }}
588588
href={authorizeUrl}
589589
startIcon={
590-
<Icon filter="grayscale(1)">
591-
{createElement(icon, { size: 20, fullColor: true })}
592-
</Icon>
590+
<Icon>{createElement(icon, { size: 20, fullColor: true })}</Icon>
593591
}
594592
{...props}
595593
>

0 commit comments

Comments
 (0)