-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9914 from brave/vpn_webui
Added select location ui on brave vpn w/o service logic
- Loading branch information
Showing
22 changed files
with
415 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
components/brave_vpn/resources/panel/assets/svg-icons/waves-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 0 additions & 33 deletions
33
components/brave_vpn/resources/panel/components/main/index.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
components/brave_vpn/resources/panel/components/main/style.ts
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
components/brave_vpn/resources/panel/components/panel-box/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react' | ||
import * as S from './style' | ||
|
||
interface Props { | ||
children: React.ReactNode | ||
} | ||
|
||
function PanelBox (props: Props) { | ||
return ( | ||
<S.Box> | ||
{props.children} | ||
<S.Waves /> | ||
</S.Box> | ||
) | ||
} | ||
|
||
export default PanelBox |
24 changes: 24 additions & 0 deletions
24
components/brave_vpn/resources/panel/components/panel-box/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import styled from 'styled-components' | ||
import wavesLightUrl from '../../assets/svg-icons/waves-light.svg' | ||
|
||
export const Box = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
max-height: 450px; | ||
background: ${(p) => p.theme.color.panelBackground}; | ||
position: relative; | ||
overflow: hidden; | ||
` | ||
export const Waves = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
background-image: url(${wavesLightUrl}); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: top; | ||
position: absolute; | ||
bottom: 0; | ||
z-index: 1; | ||
user-select: none; | ||
pointer-events: none; | ||
` |
26 changes: 26 additions & 0 deletions
26
components/brave_vpn/resources/panel/components/region-selector-button/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from 'react' | ||
import * as S from './style' | ||
import { CaratStrongRightIcon } from 'brave-ui/components/icons' | ||
|
||
interface Props { | ||
region: string | ||
onClick: Function | ||
} | ||
|
||
function RegionSelectorButton (props: Props) { | ||
const handleOnClick = () => { | ||
props.onClick() | ||
} | ||
|
||
return ( | ||
<S.Box | ||
type='button' | ||
onClick={handleOnClick} | ||
> | ||
<S.RegionLabel>{props.region}</S.RegionLabel> | ||
<CaratStrongRightIcon /> | ||
</S.Box> | ||
) | ||
} | ||
|
||
export default RegionSelectorButton |
44 changes: 44 additions & 0 deletions
44
components/brave_vpn/resources/panel/components/region-selector-button/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Box = styled.button` | ||
--region-label-color: ${(p) => p.theme.color.text01}; | ||
--svg-color: ${(p) => p.theme.color.text01}; | ||
--border-color: transparent; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
min-width: 260px; | ||
height: 48px; | ||
border-radius: 38px; | ||
border: 4px solid var(--border-color); | ||
box-shadow: 0px 0px 16px rgba(99, 105, 110, 0.18); | ||
background-color: ${(p) => p.theme.color.background02}; | ||
padding: 0 16px; | ||
svg { | ||
width: 18px; | ||
height: 18px; | ||
} | ||
svg>path { | ||
fill: var(--svg-color); | ||
} | ||
&:hover { | ||
--region-label-color: ${(p) => p.theme.color.interactive05}; | ||
--svg-color: ${(p) => p.theme.color.interactive05}; | ||
} | ||
&:focus { | ||
--border-color: #A0A5EB; | ||
} | ||
` | ||
|
||
export const RegionLabel = styled.span` | ||
font-family: Poppins; | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 20px; | ||
color: var(--region-label-color); | ||
letter-spacing: 0.04em; | ||
` |
Oops, something went wrong.