Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billing credit card flow #1788

Merged
merged 43 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8f1f850
plans page progress
tanmoyAtb Nov 29, 2021
71048ce
subscribe modal
tanmoyAtb Nov 29, 2021
ff9f82c
payment method page
tanmoyAtb Nov 30, 2021
8cc8847
payment method page
tanmoyAtb Nov 30, 2021
b74d6ba
confirm plan in progress
tanmoyAtb Dec 1, 2021
262cfd7
confirm plan ready
tanmoyAtb Dec 1, 2021
3afa830
dark mode and colors ok
tanmoyAtb Dec 2, 2021
877a791
UI ready
tanmoyAtb Dec 2, 2021
e233a88
before success page
tanmoyAtb Dec 3, 2021
49ca414
all pages complete
tanmoyAtb Dec 3, 2021
ee2e7ed
success and failed API handle
tanmoyAtb Dec 3, 2021
0c3984a
check on reanslations
tanmoyAtb Dec 3, 2021
b80aa0f
compile trans
tanmoyAtb Dec 3, 2021
004b692
merged default card changes
tanmoyAtb Dec 3, 2021
805c901
client updates
tanmoyAtb Dec 3, 2021
54ba7c6
API updates
tanmoyAtb Dec 3, 2021
e346d92
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
9d57fa4
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
38d536e
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
910a530
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
dabf9bc
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
610c254
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
e305b6a
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
51927e8
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
f75bf66
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
0270244
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
3dbd082
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
f8b9500
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
c61f494
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
cad6e96
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
347faa3
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
66d4a16
Update packages/files-ui/src/Components/Modules/Settings/Subscription…
tanmoyAtb Dec 3, 2021
325ae93
apply feedbacks
tanmoyAtb Dec 3, 2021
579e15e
resolved feedbacks
tanmoyAtb Dec 3, 2021
d6c3072
Merge branch 'epic/files-billing' into feat/credit-card-flow-1757
FSM1 Dec 7, 2021
17b65f4
fix loader
FSM1 Dec 7, 2021
77c1683
go back change
tanmoyAtb Dec 8, 2021
36a8db0
Merge branch 'feat/credit-card-flow-1757' of github.com:ChainSafe/ui-…
tanmoyAtb Dec 8, 2021
27ac2e8
merge upstream
Tbaut Dec 8, 2021
7d1a24c
apply lint --fix
Tbaut Dec 8, 2021
4d5ba5c
nits and translation
Tbaut Dec 8, 2021
2f3798d
some more nits
Tbaut Dec 8, 2021
29b1d66
anchor not Link for external links
Tbaut Dec 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions packages/common-components/src/Breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type Crumb = {
export type BreadcrumbProps = {
crumbs?: Crumb[]
homeOnClick?: () => void
hideHome?: boolean
className?: string
showDropDown?: boolean
}
Expand Down Expand Up @@ -60,7 +61,7 @@ const useStyles = makeStyles(
"&.clickable": {
cursor: "pointer"
},
maxWidth: 100,
maxWidth: 120,
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
Expand Down Expand Up @@ -94,6 +95,7 @@ const useStyles = makeStyles(
const Breadcrumb: React.FC<BreadcrumbProps> = ({
crumbs = [],
homeOnClick,
hideHome,
className,
showDropDown
}: BreadcrumbProps) => {
Expand All @@ -102,7 +104,6 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({
const generateFullCrumbs = (crumbs: Crumb[]) => {
return crumbs.map((item: Crumb, index: number) => (
<Fragment key={`crumb-${index}`}>
<div className={clsx(classes.separator)} />
<div>
<Typography
onClick={() => (item.onClick ? item.onClick() : null)}
Expand All @@ -112,6 +113,7 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({
{item.text}
</Typography>
</div>
{index < (crumbs.length - 1) && <div className={clsx(classes.separator)} />}
</Fragment>
))
}
Expand All @@ -120,7 +122,7 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({
return (
<MenuDropdown
title={crumbs[0].text}
anchor="bottom-center"
anchor="bottom-left"
animation="rotate"
classNames={{
item: classes.menuItem,
Expand All @@ -146,11 +148,10 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({
if (crumbs.length < 3 || !showDropDown) {
return generateFullCrumbs(crumbs)
} else {
const dropdownCrumbs = crumbs.slice(0, length - 1)
const dropdownCrumbs = crumbs.slice(0, crumbs.length - 1)
const lastCrumb = crumbs[crumbs.length - 1]
return (
<>
<div className={clsx(classes.separator)} />
{generateDropdownCrumb(dropdownCrumbs)}
<div className={clsx(classes.separator)} />
<div>
Expand All @@ -169,10 +170,14 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({

return (
<div className={clsx(classes.root, className)}>
<HomeIcon
className={clsx(classes.home, homeOnClick && "clickable")}
onClick={() => (homeOnClick ? homeOnClick() : null)}
/>
{!hideHome && <>
<HomeIcon
className={clsx(classes.home, homeOnClick && "clickable")}
onClick={() => (homeOnClick ? homeOnClick() : null)}
/>
<div className={clsx(classes.separator)} />
</>
}
{generateCrumbs()}
</div>
)
Expand Down
7 changes: 4 additions & 3 deletions packages/common-components/src/RadioInput/RadioInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const useStyles = makeStyles(
cursor: "pointer",
paddingLeft: constants.generalUnit * 3,
paddingRight: constants.generalUnit * 3,
margin: `${constants.generalUnit}px 0`,
...overrides?.RadioInput?.radioContainer
},
radioInput: {
Expand All @@ -27,7 +26,7 @@ const useStyles = makeStyles(
width: constants.generalUnit * 2,
height: constants.generalUnit * 2,
left: 0,
top: 0,
top: "auto",
borderRadius: "50%",
transition: `all ${animation.transform}ms ease`,
...overrides?.RadioInput?.radio?.root,
Expand Down Expand Up @@ -83,6 +82,7 @@ const useStyles = makeStyles(

export interface IRadioInputProps extends React.HTMLProps<HTMLInputElement> {
className?: string
labelClassName?: string
value: string
label?: string
name?: string
Expand All @@ -94,6 +94,7 @@ export interface IRadioInputProps extends React.HTMLProps<HTMLInputElement> {

const RadioInput: React.FC<IRadioInputProps> = ({
className,
labelClassName,
value,
name,
label,
Expand Down Expand Up @@ -130,7 +131,7 @@ const RadioInput: React.FC<IRadioInputProps> = ({
})}
/>
{label && (
<Typography className={clsx(classes.label)}>{label}</Typography>
<Typography className={clsx(classes.label, labelClassName)}>{label}</Typography>
)}
{error && <div className={classes.error}>{error}</div>}
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const BreadcrumbStory = (): React.ReactNode => {
homeOnClick={() => actionsData.homeClicked()}
showDropDown={boolean("show dropdown", true)}
crumbs={crumbs}
hideHome={boolean("hide home", false)}
/>
</>
)}
2 changes: 1 addition & 1 deletion packages/files-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.0.0",
"@chainsafe/browser-storage-hooks": "^1.0.1",
"@chainsafe/files-api-client": "^1.18.20",
"@chainsafe/files-api-client": "^1.18.22",
"@chainsafe/web3-context": "1.1.4",
"@emeraldpay/hashicon-react": "^0.5.1",
"@lingui/core": "^3.7.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/files-ui/src/Components/FilesRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ import LinkSharingLanding from "./Pages/LinkSharingLanding"

export const SETTINGS_BASE = "/settings"
export const LINK_SHARING_BASE = "/link-sharing"
const CHAINSAFE_LANDING = "https://chainsafe.io/"

export const ROUTE_LINKS = {
Landing: "/",
PrivacyPolicy: "https://files.chainsafe.io/privacy-policy",
Terms: "https://files.chainsafe.io/terms-of-service",
ChainSafe: "https://chainsafe.io/",
ChainSafe: CHAINSAFE_LANDING,
ProductPlans: `${CHAINSAFE_LANDING}`,
Drive: (rawCurrentPath: string) => `/drive${rawCurrentPath}`,
Bin: (rawBinPath: string) => `/bin${rawBinPath}`,
Search: (rawSearchTerm: string) => `/search/${rawSearchTerm}`,
Expand Down

This file was deleted.

Loading