diff --git a/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js b/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js index 9f5bbc82..2a3e400d 100644 --- a/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js +++ b/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import { useUser } from "../../contexts/user"; -import { SimpleUploadIcon } from "../Icons"; +// import { SimpleUploadIcon } from "../Icons"; const AVATAR_PLACEHOLDER = "/images/avatar-placeholder.svg"; @@ -20,6 +20,7 @@ export const AvatarUploader = (props) => { > + {/* TODO: uncomment when avatar uploads work
- {/* TODO: actual uploading */}
+ */} ); }; diff --git a/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js b/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js index f8a5cf9e..fac41363 100644 --- a/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js +++ b/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js @@ -1,5 +1,6 @@ import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; +import prettyBytes from "pretty-bytes"; import { useUser } from "../../contexts/user"; import useActivePlan from "../../hooks/useActivePlan"; @@ -28,17 +29,20 @@ const CurrentPlan = () => { } return ( -
+

{activePlan.name}

-
- {activePlan.price === 0 &&

100GB without paying a dime! 🎉

} +
+ {activePlan.price === 0 && activePlan.limits && ( +

{prettyBytes(activePlan.limits.storageLimit)} without paying a dime! 🎉

+ )} {activePlan.price !== 0 && (user.subscriptionCancelAtPeriodEnd ? (

Your subscription expires {dayjs(user.subscribedUntil).fromNow()}

) : (

{dayjs(user.subscribedUntil).fromNow(true)} until the next payment

))} - + + {user.subscriptionStatus && }
diff --git a/packages/dashboard-v2/src/components/Footer/Footer.js b/packages/dashboard-v2/src/components/Footer/Footer.js index 501d502d..8096337a 100644 --- a/packages/dashboard-v2/src/components/Footer/Footer.js +++ b/packages/dashboard-v2/src/components/Footer/Footer.js @@ -1,8 +1,19 @@ import * as React from "react"; +import styled from "styled-components"; + import { PageContainer } from "../PageContainer"; +const FooterLink = styled.a.attrs({ + className: "text-palette-400 underline decoration-dotted decoration-offset-4 decoration-1", + rel: "noreferrer", + target: "_blank", +})``; + export const Footer = () => ( -

© Skynet Labs Inc. All rights reserved.

+

+ Made by Skynet Labs. Open-sourced{" "} + on Github. +

); diff --git a/packages/dashboard-v2/src/components/Uploader/Uploader.js b/packages/dashboard-v2/src/components/Uploader/Uploader.js index ab26d6c6..7b9a15df 100644 --- a/packages/dashboard-v2/src/components/Uploader/Uploader.js +++ b/packages/dashboard-v2/src/components/Uploader/Uploader.js @@ -118,7 +118,7 @@ const Uploader = ({ mode }) => {
{uploads.length > 0 && ( -
+
{uploads.map((upload) => ( ))} diff --git a/packages/dashboard-v2/src/components/forms/AccountRemovalForm.js b/packages/dashboard-v2/src/components/forms/AccountRemovalForm.js index bdd7196e..02e465fe 100644 --- a/packages/dashboard-v2/src/components/forms/AccountRemovalForm.js +++ b/packages/dashboard-v2/src/components/forms/AccountRemovalForm.js @@ -34,8 +34,9 @@ export const AccountRemovalForm = ({ abort, onSuccess }) => {

Delete account

+

This will completely delete your account.

- This will completely delete your account. This process can't be undone. + This process cannot be undone.

diff --git a/packages/dashboard-v2/src/pages/settings/export.js b/packages/dashboard-v2/src/pages/settings/export.js index 7a75bc0c..437f2b2f 100644 --- a/packages/dashboard-v2/src/pages/settings/export.js +++ b/packages/dashboard-v2/src/pages/settings/export.js @@ -38,8 +38,8 @@ const ExportPage = () => {

Export

- Et quidem exercitus quid ex eo delectu rerum, quem modo ista sis aequitate. Probabo, inquit, modo dixi, - constituto. + Select the items you want to export. You can use this data to migrate your account to another Skynet + portal.


diff --git a/packages/dashboard-v2/src/pages/settings/index.js b/packages/dashboard-v2/src/pages/settings/index.js index 23a815e2..f8449cdc 100644 --- a/packages/dashboard-v2/src/pages/settings/index.js +++ b/packages/dashboard-v2/src/pages/settings/index.js @@ -8,6 +8,10 @@ import { Modal } from "../../components/Modal/Modal"; import { AccountRemovalForm } from "../../components/forms/AccountRemovalForm"; import { Alert } from "../../components/Alert"; import { Metadata } from "../../components/Metadata"; +import HighlightedLink from "../../components/HighlightedLink"; +import { AvatarUploader } from "../../components/AvatarUploader/AvatarUploader"; +import { useMedia } from "react-use"; +import theme from "../../lib/theme"; const State = { Pure: "PURE", @@ -19,10 +23,16 @@ const AccountPage = () => { const { user, mutate: reloadUser } = useUser(); const [state, setState] = useState(State.Pure); const [removalInitiated, setRemovalInitiated] = useState(false); + const isLargeScreen = useMedia(`(min-width: ${theme.screens.xl})`); const prompt = () => setRemovalInitiated(true); const abort = () => setRemovalInitiated(false); + const onAccountRemoved = useCallback(async () => { + await reloadUser(null); + await navigate("/auth/login"); + }, [reloadUser]); + const onSettingsUpdated = useCallback( async (updatedState) => { try { @@ -45,14 +55,7 @@ const AccountPage = () => {
-
-

Account

-

- Tum dicere exorsus est laborum et quasi involuta aperiri, altera prompta et expedita. Primum igitur, - inquit, modo ista sis aequitate. -

-
-
+

Account

{state === State.Failure && ( There was an error processing your request. Please try again later. @@ -63,7 +66,23 @@ const AccountPage = () => {
Delete account
-

This will completely delete your account. This process can't be undone.

+
+

+ This action will delete your account and cannot be undone. +

+

+ Your uploaded files will remain accessible while any portal continues to{" "} + + pin + {" "} + them to Skynet. +

+
+
+ {isLargeScreen && } +
{removalInitiated && ( - navigate("/auth/login")} /> + )}
diff --git a/packages/dashboard-v2/src/pages/settings/notifications.js b/packages/dashboard-v2/src/pages/settings/notifications.js index 447e40c8..fc109d5c 100644 --- a/packages/dashboard-v2/src/pages/settings/notifications.js +++ b/packages/dashboard-v2/src/pages/settings/notifications.js @@ -18,18 +18,13 @@ const NotificationsPage = () => {
{/* TODO: saves on change */} - I agreee to get the latest news, updates and special offers delivered to my email inbox. + I agree to receive emails of the latest news, updates and offers.

Statistics
- {/* TODO: proper content :) */} -

- Si sine causa, nollem me tamen laudandis maioribus meis corrupisti nec in malis. Si sine causa, mox - videro. -

- +

Check below to be notified by email when your usage approaches your plan's limits.

  • {/* TODO: saves on change */} @@ -37,7 +32,7 @@ const NotificationsPage = () => {
  • {/* TODO: saves on change */} - File limit + Files limit