Skip to content

Commit

Permalink
Downgrade path (#1804)
Browse files Browse the repository at this point in the history
* Settings plan page UI (#1182)

* plan page ready

* plans data

* plans page

* ready and responsive

* lingui extract

* use npm regisry

* pull from npm

* use new api client

* lingui extract

* update api client

* lingui extract

* initial stab

* lingui extract

* create barebones gaming app

* lingui extract

* update readme

* lingui extract

* Apply suggestions from code review

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* lingui extract

* rename

* merge latest gaming

* lingui extract

* wire up basic products list and Product info

* lingui extract

* improve text formatting

* remove unused imports

* remove unused imports

* remove billing from files for now

* fix navigation and remove settings

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* billing - Add card (#1446)

* plan page ready

* plans data

* plans page

* ready and responsive

* lingui extract

* use npm regisry

* pull from npm

* use new api client

* lingui extract

* update api client

* lingui extract

* initial stab

* lingui extract

* create barebones gaming app

* lingui extract

* update readme

* lingui extract

* Apply suggestions from code review

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* lingui extract

* rename

* merge latest gaming

* lingui extract

* wire up basic products list and Product info

* lingui extract

* improve text formatting

* remove unused imports

* remove unused imports

* remove billing from files for now

* fix navigation and remove settings

* lingui extract

* lingui extract

* format bytes

* removed conflicts

* lingui extract

* reshuffle files

* modal added

* card inputs

* UI ready

* billing add card

* lingui extract

* xs sizes

* formatter

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/index.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/index.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* paths on back to settings

* messages

* resolve reviews

* fiddle with generics and Tabkeys

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* wait for 10min

* Current card: billing (#1463)

* plan page ready

* plans data

* plans page

* ready and responsive

* lingui extract

* use npm regisry

* pull from npm

* use new api client

* lingui extract

* update api client

* lingui extract

* initial stab

* lingui extract

* create barebones gaming app

* lingui extract

* update readme

* lingui extract

* Apply suggestions from code review

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* lingui extract

* rename

* merge latest gaming

* lingui extract

* wire up basic products list and Product info

* lingui extract

* improve text formatting

* remove unused imports

* remove unused imports

* remove billing from files for now

* fix navigation and remove settings

* lingui extract

* lingui extract

* format bytes

* removed conflicts

* lingui extract

* reshuffle files

* modal added

* card inputs

* UI ready

* billing add card

* lingui extract

* xs sizes

* formatter

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/index.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/index.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* paths on back to settings

* messages

* resolve reviews

* current card added

* add card modal updates

* login and new api client

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/AddCardModal.tsx

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionPlan/CurrentCard.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* icon credit card

* Cherry pick cypress retry from dev

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>

* [FILES] Subscription tab update (#1476)

* Update copy and fix layout

* lingui extract

* make eslint :D

Co-authored-by: GitHub Actions <actions@github.com>

* Merge dev into epic/files-billing (#1491)

* [Storage] Copy cid functionality (#1437)

* Copy features added, overflow issue still present

* Swapped to button

* lingui extract

* Updated button

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fixed size

* lingui extract

* minmax

* lingui extract

* revert unrelated changes

* lingui extract

* Apply suggestions from code review

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* [STORAGE] Rename file in bucket (#1471)

* formik submit not firing

* fix mobile

* lingui extract

* Update packages/storage-ui/src/Components/Modules/FileSystemItem/FileSystemTableItem.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make eslint :)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* 10min timeout for everyone (#1472)

* Translated using Weblate (French) (#1478)

Currently translated at 100.0% (262 of 262 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* add ui tests for search (#1479)

* bump cypress to v8.3.1 (#1480)

* Sharing feature explainer (#1477)

* refactor modal

* steps logic

* image centered

* lingui extract

* lingui extract

* typo

* refactor with hook, change icon, ad to share menu

* nits

* fix storage building

Co-authored-by: GitHub Actions <actions@github.com>

* Adding multi selects on mobile view with long press (#1470)

* using long press

* dragg preview problems

* typos

* events almost ready

* resets

* long press options

* long press updates

* formats

* dark mode colors

* added hover with breakpoints

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* curly spacing

* borders

* clicks proper placement

* reverted linting

* removed preview on mobile

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* merge dev (#1502)

* Merge dev to epic/files-billing (#1525)

* [Storage] Copy cid functionality (#1437)

* Copy features added, overflow issue still present

* Swapped to button

* lingui extract

* Updated button

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fixed size

* lingui extract

* minmax

* lingui extract

* revert unrelated changes

* lingui extract

* Apply suggestions from code review

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* [STORAGE] Rename file in bucket (#1471)

* formik submit not firing

* fix mobile

* lingui extract

* Update packages/storage-ui/src/Components/Modules/FileSystemItem/FileSystemTableItem.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make eslint :)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* 10min timeout for everyone (#1472)

* Translated using Weblate (French) (#1478)

Currently translated at 100.0% (262 of 262 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* add ui tests for search (#1479)

* bump cypress to v8.3.1 (#1480)

* Sharing feature explainer (#1477)

* refactor modal

* steps logic

* image centered

* lingui extract

* lingui extract

* typo

* refactor with hook, change icon, ad to share menu

* nits

* fix storage building

Co-authored-by: GitHub Actions <actions@github.com>

* Adding multi selects on mobile view with long press (#1470)

* using long press

* dragg preview problems

* typos

* events almost ready

* resets

* long press options

* long press updates

* formats

* dark mode colors

* added hover with breakpoints

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* curly spacing

* borders

* clicks proper placement

* reverted linting

* removed preview on mobile

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* bump to 1.18.5 (#1493)

* [Files] - New survey - Discord link and tiny fix (#1487)

* a nice mix of things

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* Translations update from Weblate (#1496)

* Translated using Weblate (French)

Currently translated at 100.0% (266 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 73.3% (195 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* update axios (#1498)

* Added docs link (#1497)

* Added doc link

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* upgrade (#1501)

* Published (#1503)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Add ui tests for file preview (#1489)

* Toasts refactor (#1495)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* update element identifier for toast

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/App.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* storybooks update

* using usref (#1513)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Progress cancellations (#1500)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* uploads ready

* uploads ready

* lingui extract

* update element identifier for toast

* cancel source tokens

* toasts added

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* resolved errors and lints

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* added closabble states

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* survey banner on safari fix (#1512)

* banner fix

* Update packages/files-ui/src/Components/SurveyBanner.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix what I broke (#1518)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Change the survey to a call for a user interview (#1517)

* change fore a user interview call

* lingui extract

* Apply suggestions from code review

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* bump cypress to v8.4 (#1521)

* Translations update from Weblate (#1522)

* Translated using Weblate (French)

Currently translated at 100.0% (271 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 71.9% (195 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Adjusting login screen sizes. (#1519)

* login screen sizes

* check for instanceof Error

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* merge dev and fix conflicts

* Revert "merge dev and fix conflicts"

This reverts commit 6d7c91c9f2f87d5fdb8a9e8e27e913967716b114.

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>

* merge latest 'origin/dev' into 'epic/files-billing' (#1588)

* Release latest to Stage (#988)

* Add French translation and set the language selection (#978)

* should be almost set

* dropdown styling

* done with translation

* nits here and there

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* missing translations

* add locale with dayjs

* lingui extract

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Fix design nits (#987)

* setup warning

* colors

* icon

* buttons

* dropdown menu 14

* images

* nits

* title too big and switch buttons order

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* update link closes #849

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* fix link (#1025)

* create buckets for new users

* remove depraecated files call

* [Storage] Copy cid functionality (#1437)

* Copy features added, overflow issue still present

* Swapped to button

* lingui extract

* Updated button

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fixed size

* lingui extract

* minmax

* lingui extract

* revert unrelated changes

* lingui extract

* Apply suggestions from code review

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* [STORAGE] Rename file in bucket (#1471)

* formik submit not firing

* fix mobile

* lingui extract

* Update packages/storage-ui/src/Components/Modules/FileSystemItem/FileSystemTableItem.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make eslint :)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* 10min timeout for everyone (#1472)

* Translated using Weblate (French) (#1478)

Currently translated at 100.0% (262 of 262 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* add ui tests for search (#1479)

* bump cypress to v8.3.1 (#1480)

* Sharing feature explainer (#1477)

* refactor modal

* steps logic

* image centered

* lingui extract

* lingui extract

* typo

* refactor with hook, change icon, ad to share menu

* nits

* fix storage building

Co-authored-by: GitHub Actions <actions@github.com>

* Adding multi selects on mobile view with long press (#1470)

* using long press

* dragg preview problems

* typos

* events almost ready

* resets

* long press options

* long press updates

* formats

* dark mode colors

* added hover with breakpoints

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* curly spacing

* borders

* clicks proper placement

* reverted linting

* removed preview on mobile

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* bump to 1.18.5 (#1493)

* [Files] - New survey - Discord link and tiny fix (#1487)

* a nice mix of things

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* Translations update from Weblate (#1496)

* Translated using Weblate (French)

Currently translated at 100.0% (266 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 73.3% (195 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* update axios (#1498)

* Added docs link (#1497)

* Added doc link

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* upgrade (#1501)

* Published (#1503)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Add ui tests for file preview (#1489)

* Toasts refactor (#1495)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* update element identifier for toast

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/App.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* storybooks update

* using usref (#1513)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Progress cancellations (#1500)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* uploads ready

* uploads ready

* lingui extract

* update element identifier for toast

* cancel source tokens

* toasts added

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* resolved errors and lints

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* added closabble states

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* survey banner on safari fix (#1512)

* banner fix

* Update packages/files-ui/src/Components/SurveyBanner.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix what I broke (#1518)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Change the survey to a call for a user interview (#1517)

* change fore a user interview call

* lingui extract

* Apply suggestions from code review

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* bump cypress to v8.4 (#1521)

* Translations update from Weblate (#1522)

* Translated using Weblate (French)

Currently translated at 100.0% (271 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 71.9% (195 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Adjusting login screen sizes. (#1519)

* login screen sizes

* check for instanceof Error

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* Gaming Dashboard overhaul (#1504)

* Updating the dashboard api

* Reflected functionality

* lingui extract

* CS favicon

* Update packages/gaming-ui/src/Components/Modules/ApiKeys.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/gaming-ui/src/Components/Pages/LoginPage.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* bulk recover operation (#1526)

* recovers working

* removed consoles

* Add new ui tests for illogical folder and file move errors (#1520)

* Add tests for illogical folder move attempts

* Add new check to spec file

* Finalize changes to spec file

* Removed string checking following PR feedback

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Posthog Analytics Integration (#1514)

* added posthog integration

* Banner logic working correctly

* handle uninitialized posthog

* fix lint

* extract messages

* lingui extract

* resolve warning

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Translated using Weblate (French) (#1528)

Currently translated at 100.0% (272 of 272 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* [Files] - Share to home or other shared folder (#1527)

* share to home or other shared folder

* small changes for a better UX

* lingui extract

* lingui extract

* Update packages/files-ui/src/Components/Modules/FileBrowsers/ShareModal.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix console warnings

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Folder uploads  (#1515)

* add basic folder upload

* wire up folder uploads for modal

* Rename Modal

* fix types

* remove types

* lingui extract

* fix lint

* add source attribution

* lingui extract

* incorporate feedback

* lingui extract

* fix lint

* Fix casing

* Rename component for consistency

* lingui extract

* clean up types

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* Translated using Weblate (French) (#1532)

Currently translated at 100.0% (276 of 276 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Don't track before opt-in (#1531)

* dont track users before they opt-in

* nits and remove log, calls are still fires

* default to not track

* lingui extract

* with init check

* Update packages/files-ui/src/Contexts/PosthogContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* [Files] - Show current bucket decryption key (#1534)

* show current bucket decryption key

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* [Files] - Get admin public key from the api (#1485)

* bump

* use api client

* merge dev

* lingui extract

* support several keys

* wih scroll because pub/decryption key are long

Co-authored-by: GitHub Actions <actions@github.com>

* Add lint rules for test debug commands (#1535)

* prevent double opening (#1538)

* Add test coverage for storage summary adjustments (#1536)

* Translated using Weblate (French) (#1540)

Currently translated at 100.0% (278 of 278 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Better colors for dark mode select and tagsinput components (#1550)

* better colors for dark mode

* lingui extract

* fix typo

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Filter out current bucket (#1548)

* filter out current bucket

* Update packages/files-ui/src/Components/Modules/FileBrowsers/ShareModal.tsx

* fix color (#1555)

* Fix user lookup spamming the api, and throwing (#1553)

* oh yeaah

* lingui extract

* lingui extract

* Apply suggestions from code review

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Upgrade Torus dependencies (#1549)

* [wip] update dependencies

* Revert "[wip] update dependencies"

This reverts commit 04b593bbbe5f8c4c5d6e220c744aae88c2cd95e4.

* update torus dependencies

* fix storage test

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* reset fields for shared folders (#1577)

* reset forms and fix a couple error types (#1578)

* Translations update from Weblate (#1557)

* Translated using Weblate (French)

Currently translated at 100.0% (281 of 281 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 69.7% (196 of 281 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* hide when ther's no menu item (#1576)

* Add "maintenance" label to weblate PRs automatically (#1581)

* Upgrade api client and fix issue with shared folder renaming (#1582)

* upgrade api client and fix issue

* Update packages/files-ui/src/Contexts/FilesContext.tsx

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* revert bad merge

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Shiva <82167447+RamidiShiva@users.noreply.github.com>
Co-authored-by: Cindy Chau <47398578+sweetpea22@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Priom Chowdhury <priom@chainsafe.io>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>

* Account Restricted (#1589)

* Add flag to context

(cherry picked from commit eaf6f0dc0fef35f7cdf5ea2ef1264d536c4d2e6c)

* restrict functions when api returns restricted flag

(cherry picked from commit a7ab5673c44709a23da6a611716e40ac25266623)

* fix share modal when restricted

(cherry picked from commit 65a5be8ea1b1ca5af94d5d220b14281ece7141f9)

* add banner

(cherry picked from commit e01a13518c85dda378570a4177390ec50d921df1)

* lingui

* move banner to fileList and shared folder overview

* use padding instead of margin

* remove unused class

* fix linting

* remove unnecessary css

* use constants and left

* remove stray comma

* Update packages/files-ui/src/Components/Layouts/AppWrapper.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesList.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make font larger on desktop

* fix lint

* Update packages/files-ui/src/Components/Elements/RestrictedModeBanner.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix spelling

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Payments add card update with setup intent (#1584)

* adding setup intents

* cards add and setup intent

* styling add card

* recreating coloors

* styling ready

* lint

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionTab/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionTab/AddCardModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/SubscriptionTab/AddCardModal.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/BillingContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fixed imports, event types and extra code

* error and loading states

* updated eerror handling system

* handling addition

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* default card API added (#1623)

* Current Product Widget (#1482)

* Release latest to Stage (#988)

* Add French translation and set the language selection (#978)

* should be almost set

* dropdown styling

* done with translation

* nits here and there

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* missing translations

* add locale with dayjs

* lingui extract

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Fix design nits (#987)

* setup warning

* colors

* icon

* buttons

* dropdown menu 14

* images

* nits

* title too big and switch buttons order

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* update link closes #849

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* fix link (#1025)

* create buckets for new users

* remove depraecated files call

* Roughly done

* Debugging

* [Storage] Copy cid functionality (#1437)

* Copy features added, overflow issue still present

* Swapped to button

* lingui extract

* Updated button

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fixed size

* lingui extract

* minmax

* lingui extract

* revert unrelated changes

* lingui extract

* Apply suggestions from code review

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* [STORAGE] Rename file in bucket (#1471)

* formik submit not firing

* fix mobile

* lingui extract

* Update packages/storage-ui/src/Components/Modules/FileSystemItem/FileSystemTableItem.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make eslint :)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* 10min timeout for everyone (#1472)

* Translated using Weblate (French) (#1478)

Currently translated at 100.0% (262 of 262 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* lingui extract

* add ui tests for search (#1479)

* bump cypress to v8.3.1 (#1480)

* Sharing feature explainer (#1477)

* refactor modal

* steps logic

* image centered

* lingui extract

* lingui extract

* typo

* refactor with hook, change icon, ad to share menu

* nits

* fix storage building

Co-authored-by: GitHub Actions <actions@github.com>

* Adding multi selects on mobile view with long press (#1470)

* using long press

* dragg preview problems

* typos

* events almost ready

* resets

* long press options

* long press updates

* formats

* dark mode colors

* added hover with breakpoints

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* curly spacing

* borders

* clicks proper placement

* reverted linting

* removed preview on mobile

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* bump to 1.18.5 (#1493)

* [Files] - New survey - Discord link and tiny fix (#1487)

* a nice mix of things

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* Translations update from Weblate (#1496)

* Translated using Weblate (French)

Currently translated at 100.0% (266 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 73.3% (195 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* update axios (#1498)

* Added docs link (#1497)

* Added doc link

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* Compiling

* upgrade (#1501)

* Published (#1503)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Add ui tests for file preview (#1489)

* Toasts refactor (#1495)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* update element identifier for toast

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/App.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* storybooks update

* using usref (#1513)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Progress cancellations (#1500)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* uploads ready

* uploads ready

* lingui extract

* update element identifier for toast

* cancel source tokens

* toasts added

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* resolved errors and lints

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* added closabble states

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* survey banner on safari fix (#1512)

* banner fix

* Update packages/files-ui/src/Components/SurveyBanner.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix what I broke (#1518)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Change the survey to a call for a user interview (#1517)

* change fore a user interview call

* lingui extract

* Apply suggestions from code review

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* bump cypress to v8.4 (#1521)

* Translations update from Weblate (#1522)

* Translated using Weblate (French)

Currently translated at 100.0% (271 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 71.9% (195 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Adjusting login screen sizes. (#1519)

* login screen sizes

* check for instanceof Error

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* Gaming Dashboard overhaul (#1504)

* Updating the dashboard api

* Reflected functionality

* lingui extract

* CS favicon

* Update packages/gaming-ui/src/Components/Modules/ApiKeys.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/gaming-ui/src/Components/Pages/LoginPage.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* bulk recover operation (#1526)

* recovers working

* removed consoles

* Add new ui tests for illogical folder and file move errors (#1520)

* Add tests for illogical folder move attempts

* Add new check to spec file

* Finalize changes to spec file

* Removed string checking following PR feedback

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Posthog Analytics Integration (#1514)

* added posthog integration

* Banner logic working correctly

* handle uninitialized posthog

* fix lint

* extract messages

* lingui extract

* resolve warning

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Translated using Weblate (French) (#1528)

Currently translated at 100.0% (272 of 272 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* [Files] - Share to home or other shared folder (#1527)

* share to home or other shared folder

* small changes for a better UX

* lingui extract

* lingui extract

* Update packages/files-ui/src/Components/Modules/FileBrowsers/ShareModal.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix console warnings

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Folder uploads  (#1515)

* add basic folder upload

* wire up folder uploads for modal

* Rename Modal

* fix types

* remove types

* lingui extract

* fix lint

* add source attribution

* lingui extract

* incorporate feedback

* lingui extract

* fix lint

* Fix casing

* Rename component for consistency

* lingui extract

* clean up types

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* Translated using Weblate (French) (#1532)

Currently translated at 100.0% (276 of 276 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

…
  • Loading branch information
18 people committed Dec 13, 2021
1 parent 41acd86 commit 4d2c826
Show file tree
Hide file tree
Showing 14 changed files with 554 additions and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const SharedFileBrowser = () => {
if (!bucket) return

const pathsToDelete = getAbsolutePathsFromCids(cids, currentPath, pathContents)

filesApiClient.removeBucketObject(bucket.id, { paths: pathsToDelete })
.then(() => {
addToast({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react"
import React, { useEffect, useMemo, useState } from "react"
import { makeStyles, createStyles } from "@chainsafe/common-theme"
import { CSFTheme } from "../../../../../Themes/types"
import { Modal } from "@chainsafe/common-components"
Expand All @@ -7,8 +7,9 @@ import PlanDetails from "./PlanDetails"
import PaymentMethod from "./PaymentMethod"
import ConfirmPlan from "./ConfirmPlan"
import { useBilling } from "../../../../../Contexts/BillingContext"
import { Product, ProductPrice } from "@chainsafe/files-api-client"
import { Product, ProductPrice, ProductPriceRecurringInterval } from "@chainsafe/files-api-client"
import PlanSuccess from "./PlanSuccess"
import DowngradeDetails from "./DowngradeDetails"

const useStyles = makeStyles(({ constants, breakpoints }: CSFTheme) =>
createStyles({
Expand All @@ -33,29 +34,35 @@ type ChangeModalSlides = "select" |
"planDetails" |
"paymentMethod" |
"confirmPlan" |
"planSuccess"
"planSuccess" |
"downgradeDetails"

const getPrice = (plan: Product, recurrence?: ProductPriceRecurringInterval) => {
return plan.prices.find(price => price?.recurring?.interval === recurrence)?.unit_amount || 0
}

interface IChangeProductModal {
onClose: () => void
}

const ChangeProductModal = ({ onClose }: IChangeProductModal) => {
const classes = useStyles()
const { getAvailablePlans, changeSubscription } = useBilling()
const { getAvailablePlans, changeSubscription, currentSubscription } = useBilling()
const [selectedPlan, setSelectedPlan] = useState<Product | undefined>()
const [selectedPrice, setSelectedPrice] = useState<ProductPrice | undefined>()
const [slide, setSlide] = useState<ChangeModalSlides>("select")
const [plans, setPlans] = useState<Product[] | undefined>()
const [isLoadingChangeSubscription, setIsLoadingChangeSubscription] = useState(false)
const [isSubscriptionError, setIsSubscriptionError] = useState(false)
const didSelectFreePlan = useMemo(() => !!selectedPlan && getPrice(selectedPlan, "month") === 0, [selectedPlan])

useEffect(() => {
if(!plans) {
getAvailablePlans()
.then((plans) => setPlans(plans))
.catch(console.error)
}
})
}, [getAvailablePlans, plans])

const handleChangeSubscription = () => {
if (selectedPrice) {
Expand All @@ -82,65 +89,85 @@ const ChangeProductModal = ({ onClose }: IChangeProductModal) => {
}}
testId="change-product"
>
{
slide === "select" && <SelectPlan
{slide === "select" && (
<SelectPlan
onClose={onClose}
onSelectPlan={(plan: Product) => {
setSelectedPlan(plan)
setSlide("planDetails")
const currentPrice = currentSubscription?.product?.price?.unit_amount
const currentRecurrence = currentSubscription?.product.price.recurring.interval
const newPrice = getPrice(plan, currentRecurrence)
const isDowngrade = (currentPrice || 0) > newPrice

isDowngrade
? setSlide("downgradeDetails")
: setSlide("planDetails")
}}
plans={plans}
/>
}
{slide === "planDetails" && selectedPlan && <PlanDetails
plan={selectedPlan}
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
onSelectPlanPrice={(planPrice: ProductPrice) => {
setSelectedPrice(planPrice)
setSlide("paymentMethod")
}}
/>
}
{slide === "paymentMethod" && <PaymentMethod
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
goToPlanDetails={() => {
setSlide("planDetails")
}}
onSelectPaymentMethod={() => {
setSlide("confirmPlan")
}}
/>
}
{slide === "confirmPlan" && selectedPlan && selectedPrice && <ConfirmPlan
plan={selectedPlan}
planPrice={selectedPrice}
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
goToPlanDetails={() => {
setSlide("planDetails")
}}
goToPaymentMethod={() => {
setSlide("paymentMethod")
}}
loadingChangeSubscription={isLoadingChangeSubscription}
onChangeSubscription={handleChangeSubscription}
isSubscriptionError={isSubscriptionError}
/>
}
{slide === "planSuccess" && selectedPlan && selectedPrice && <PlanSuccess
onClose={onClose}
plan={selectedPlan}
planPrice={selectedPrice}
/>
}
)}
{ slide === "downgradeDetails" && selectedPlan && (
<DowngradeDetails
goBack={() => {setSlide("select")}}
goToPlanDetails={() => setSlide("planDetails")}
shouldCancelPlan={didSelectFreePlan}
plan={selectedPlan}
onClose={onClose}
/>
)}
{slide === "planDetails" && selectedPlan && (
<PlanDetails
plan={selectedPlan}
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
onSelectPlanPrice={(planPrice: ProductPrice) => {
setSelectedPrice(planPrice)
setSlide("paymentMethod")
}}
/>
)}
{slide === "paymentMethod" && (
<PaymentMethod
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
goToPlanDetails={() => {
setSlide("planDetails")
}}
onSelectPaymentMethod={() => {
setSlide("confirmPlan")
}}
/>
)}
{slide === "confirmPlan" && selectedPlan && selectedPrice && (
<ConfirmPlan
plan={selectedPlan}
planPrice={selectedPrice}
onClose={onClose}
goToSelectPlan={() => {
setSlide("select")
}}
goToPlanDetails={() => {
setSlide("planDetails")
}}
goToPaymentMethod={() => {
setSlide("paymentMethod")
}}
loadingChangeSubscription={isLoadingChangeSubscription}
onChangeSubscription={handleChangeSubscription}
isSubscriptionError={isSubscriptionError}
/>
)}
{slide === "planSuccess" && selectedPlan && selectedPrice && (
<PlanSuccess
onClose={onClose}
plan={selectedPlan}
planPrice={selectedPrice}
/>
)}
</Modal>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react"
import React, { useMemo } from "react"
import { makeStyles, createStyles } from "@chainsafe/common-theme"
import { CSFTheme } from "../../../../../Themes/types"
import { Product, ProductPrice } from "@chainsafe/files-api-client"
Expand Down Expand Up @@ -114,7 +114,13 @@ const ConfirmPlan = ({
}: IConfirmPlan) => {
const classes = useStyles()
const { defaultCard } = useBilling()
const currentPlanStorage = formatBytes(Number(planPrice?.metadata?.storage_size_bytes), 2)
const { currentSubscription } = useBilling()
const newPlanStorage = formatBytes(Number(planPrice?.metadata?.storage_size_bytes), 2)
const isDowngrade = useMemo(() => {
const currentPrice = currentSubscription?.product?.price?.unit_amount
return currentPrice && currentPrice > planPrice.unit_amount
}, [currentSubscription, planPrice]
)

return (
<article className={classes.root}>
Expand All @@ -139,7 +145,11 @@ const ConfirmPlan = ({
component="h4"
className={classes.heading}
>
<Trans>Confirm plan change</Trans>
{
isDowngrade
? <Trans>Confirm plan downgrade</Trans>
: <Trans>Confirm plan change</Trans>
}
</Typography>
<Divider className={classes.divider} />
<div className={classes.rowBox}>
Expand Down Expand Up @@ -173,15 +183,7 @@ const ConfirmPlan = ({
variant="body1"
className={classes.featureSeparator}
>
{planPrice?.metadata?.storage_size_bytes
? <Trans>{currentPlanStorage} of storage</Trans>
: plan.description
}
</Typography>
<Typography
component="p"
variant="body1">
{plan.description}
<Trans>{newPlanStorage} of storage</Trans>
</Typography>
</div>
</div>
Expand Down

0 comments on commit 4d2c826

Please sign in to comment.