Skip to content

Commit

Permalink
merge dev (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Sep 8, 2021
1 parent a440bda commit 44458cb
Show file tree
Hide file tree
Showing 22 changed files with 745 additions and 71 deletions.
7 changes: 7 additions & 0 deletions packages/common-components/src/Icons/icons/Document.icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from "react"
import createSvgIcon from "../createSvgIcon"
import { ReactComponent as DocumentSvg } from "../svgs/document.svg"

export { DocumentSvg }

export default createSvgIcon(<DocumentSvg />)
1 change: 1 addition & 0 deletions packages/common-components/src/Icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export { default as DinersclubCardIcon, DinersclubCardSvg } from "./icons/Diners
export { default as DirectionalDownIcon, DirectionalDownSvg } from "./icons/DirectionalDown.icon"
export { default as DirectionalRightIcon, DirectionalRightSvg } from "./icons/DirectionalRight.icon"
export { default as DiscoverCardIcon, DiscoverCardSvg } from "./icons/DiscoverCard.icon"
export { default as DocumentIcon, DocumentSvg } from "./icons/Document.icon"
export { default as DownloadIcon, DownloadSvg } from "./icons/Download.icon"
export { default as EditIcon, EditSvg } from "./icons/Edit.icon"
export { default as EthereumLogoIcon, EthereumLogoSvg } from "./icons/EthereumLogo.icon"
Expand Down
3 changes: 3 additions & 0 deletions packages/common-components/src/Icons/svgs/document.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions 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.1",
"@chainsafe/files-api-client": "^1.18.5",
"@chainsafe/web3-context": "1.1.4",
"@lingui/core": "^3.7.2",
"@lingui/react": "^3.7.2",
Expand All @@ -17,7 +17,7 @@
"@tkey/web-storage": "3.12.0",
"@toruslabs/torus-direct-web-sdk": "4.10.0",
"@types/uuid": "^8.3.0",
"axios": "0.21.1",
"axios": "0.21.4",
"babel-loader": "8.1.0",
"babel-plugin-macros": "^2.8.0",
"babel-preset-env": "^1.7.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/Components/FilesRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export const ROUTE_LINKS = {
SettingsDefault: `${SETTINGS_BASE}`,
SettingsPath: (settingsPath: SettingsPath) => `${SETTINGS_BASE}/${settingsPath}`,
PurchasePlan: "/purchase",
UserSurvey: "https://shrl.ink/Efyc",
Plans: "/plans",
UserSurvey: "https://shrl.ink/kmAL",
GeneralFeedbackForm: "https://shrl.ink/gvVJ",
SharedFolders: "/shared-overview",
SharedFolderBrowserRoot: "/shared",
SharedFolderExplorer: (bucketId: string, rawCurrentPath: string) => {
// bucketId should not have a / at the end
// rawCurrentPath can be empty, or /
const adjustedRawCurrentPath = !rawCurrentPath ? "/" : rawCurrentPath
return `/shared/${bucketId}${adjustedRawCurrentPath}`
}
},
DiscordInvite: "https://discord.gg/zAEY37fNb2"
}

export const SETTINGS_PATHS = ["profile", "security", "plan"] as const
Expand Down
15 changes: 8 additions & 7 deletions packages/files-ui/src/Components/Layouts/AppNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ const useStyles = makeStyles(
},
betaCaption: {
marginBottom: constants.generalUnit * 0.5
},
supportButton: {
margin: "auto"
}
})
}
Expand Down Expand Up @@ -234,7 +237,7 @@ const AppNav: React.FC<IAppNav> = ({ navOpen, setNavOpen }: IAppNav) => {
}, [desktop, navOpen, setNavOpen])

const collectFeedback = () => {
window.open(ROUTE_LINKS.GeneralFeedbackForm, "_blank")
window.open(ROUTE_LINKS.DiscordInvite, "_blank")
}

return (
Expand Down Expand Up @@ -368,16 +371,14 @@ const AppNav: React.FC<IAppNav> = ({ navOpen, setNavOpen }: IAppNav) => {
</>
)
}
{/* <Button disabled variant="outline" size="small">
<Trans>UPGRADE</Trans>
</Button> */}
<Button
className={classes.supportButton}
data-cy="send-feedback-nav"
variant="outline"
size="small"
variant="secondary"
size="medium"
onClick={() => collectFeedback()}
>
<Trans>Send Feedback</Trans>
<Trans>Got an issue?</Trans>
</Button>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const BinFileBrowser: React.FC<IFileBrowserModuleProps> = ({ controls = false }:
await filesApiClient.moveBucketObjects(
bucket.id,
{
path: getPathWithFile(currentPath, itemToRestore.name),
paths: [getPathWithFile(currentPath, itemToRestore.name)],
new_path: getPathWithFile(newPath, itemToRestore.name),
destination: buckets.find(b => b.type === "csf")?.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {

try {
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToDelete.name),
paths: [getPathWithFile(currentPath, itemToDelete.name)],
new_path: getPathWithFile("/", itemToDelete.name),
destination: buckets.find(b => b.type === "trash")?.id
})
Expand Down Expand Up @@ -121,7 +121,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!bucket || !itemToRename) return

filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToRename.name),
paths: [getPathWithFile(currentPath, itemToRename.name)],
new_path: getPathWithFile(currentPath, newName) })
.then(() => refreshContents())
.catch(console.error)
Expand All @@ -135,7 +135,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!itemToMove) return
try {
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToMove.name),
paths: [getPathWithFile(currentPath, itemToMove.name)],
new_path: getPathWithFile(newPath, itemToMove.name)
})
const message = `${
Expand Down Expand Up @@ -180,7 +180,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!bucket) return
let hasFolder = false
for (let i = 0; i < files.length; i++) {
if (fileItems[i].webkitGetAsEntry().isDirectory) {
if (fileItems[i].webkitGetAsEntry()?.isDirectory) {
hasFolder = true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const SharedFileBrowser = () => {
if (!bucket || !itemToRename) return

filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToRename.name),
paths: [getPathWithFile(currentPath, itemToRename.name)],
new_path: getPathWithFile(currentPath, newName) }).then(() => refreshContents())
.catch(console.error)
}, [refreshContents, filesApiClient, bucket, currentPath, pathContents])
Expand All @@ -155,7 +155,7 @@ const SharedFileBrowser = () => {
const itemToMove = pathContents.find(i => i.cid === cid)
if (!bucket || !itemToMove) return
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToMove.name),
paths: [getPathWithFile(currentPath, itemToMove.name)],
new_path: getPathWithFile(newPath, itemToMove.name)
})
})).finally(refreshContents)
Expand All @@ -181,7 +181,7 @@ const SharedFileBrowser = () => {
if (!bucket) return
let hasFolder = false
for (let i = 0; i < files.length; i++) {
if (fileItems[i].webkitGetAsEntry().isDirectory) {
if (fileItems[i].webkitGetAsEntry()?.isDirectory) {
hasFolder = true
}
}
Expand Down
7 changes: 6 additions & 1 deletion packages/files-ui/src/Components/Modules/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ const useStyles = makeStyles(({ constants, breakpoints, palette }: ITheme) =>
borderTopLeftRadius: 10,
borderBottomLeftRadius: 10
}
},
profileIcon : {
"& path": {
stroke: palette.additional["gray"][9]
}
}
})
)
Expand Down Expand Up @@ -181,7 +186,7 @@ const Settings: React.FC = () => {
>
<TabPane
className={clsx(classes.tabPane, (!desktop && !path) ? classes.hideTabPane : "")}
icon={<ProfileIcon/>}
icon={<ProfileIcon className={classes.profileIcon}/>}
iconRight={<CaretRightIcon/>}
title={t`Profile and Display`}
tabKey="profile"
Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/Components/SurveyBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import React, { useCallback } from "react"
import { CSFTheme } from "../Themes/types"
import { ROUTE_LINKS } from "./FilesRoutes"

const SURVEY_VERSION = 2
const SURVEY_VERSION = 3
export const DISMISSED_SURVEY_KEY = `csf.dismissedSurveyBannerV${SURVEY_VERSION}`

const useStyles = makeStyles(
({ constants }: CSFTheme) => {
return createStyles({
root: {
background: "linear-gradient(90deg, rgba(81,101,220,1) 0%, rgba(3,150,166,1) 68%, rgba(22,212,96,1) 100%);",
background: "linear-gradient(90deg, rgba(81,101,220,1) 0%, rgba(3,150,166,1) 68%, rgba(255, 167, 51,1) 100%);",
padding: constants.generalUnit,
paddingLeft: constants.generalUnit * 2,
marginTop: constants.generalUnit,
Expand Down Expand Up @@ -77,7 +77,7 @@ const SurveyBanner = ({ onHide }: Props) => {
variant="body1"
className={classes.banner}>
<Trans>
Are we on the right track? Let us know in less than 1 minute.
Help us improve File in less than 1 minute.
</Trans>
<span
className={classes.link}
Expand Down
10 changes: 5 additions & 5 deletions packages/files-ui/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-20 00:28+0200\n"
"PO-Revision-Date: 2021-08-24 01:34+0000\n"
"PO-Revision-Date: 2021-09-06 00:40+0000\n"
"Last-Translator: J. Lavoie <j.lavoie@net-c.ca>\n"
"Language-Team: German <https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/>\n"
"Language: de\n"
Expand Down Expand Up @@ -328,6 +328,9 @@ msgstr ""
msgid "Hello again!"
msgstr "Hallo nochmal!"

msgid "Help us improve File in less than 1 minute."
msgstr ""

msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."
msgstr ""

Expand Down Expand Up @@ -592,9 +595,6 @@ msgstr ""
msgid "Select an existing shared folder"
msgstr ""

msgid "Send Feedback"
msgstr "Kommentare versenden"

msgid "Send another email"
msgstr "Andere E-Mail senden"

Expand Down Expand Up @@ -830,7 +830,7 @@ msgid "You can now create shared folders to share a file."
msgstr ""

msgid "You can't move folders to this path"
msgstr ""
msgstr "Sie können keine Ordner in diesen Pfad verschieben"

msgid "You haven't set a username yet."
msgstr "Sie haben noch keinen Benutzernamen festgelegt."
Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ msgstr "Got it"
msgid "Hello again!"
msgstr "Hello again!"

msgid "Help us improve File in less than 1 minute."
msgstr "Help us improve File in less than 1 minute."

msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."
msgstr "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."

Expand Down Expand Up @@ -595,9 +598,6 @@ msgstr "Select a wallet"
msgid "Select an existing shared folder"
msgstr "Select an existing shared folder"

msgid "Send Feedback"
msgstr "Send Feedback"

msgid "Send another email"
msgstr "Send another email"

Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ msgstr ""
msgid "Hello again!"
msgstr "Hola de nuevo!"

msgid "Help us improve File in less than 1 minute."
msgstr ""

msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."
msgstr "Oye! Solo tiene dos métodos de inicio de sesión. Si lo pierde y solo le queda uno, se le bloqueará su cuenta para siempre."

Expand Down Expand Up @@ -596,9 +599,6 @@ msgstr "Seleccione una billetera"
msgid "Select an existing shared folder"
msgstr ""

msgid "Send Feedback"
msgstr "Enviar comentarios"

msgid "Send another email"
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ msgstr ""
msgid "Hello again!"
msgstr "Ravis de vous revoir !"

msgid "Help us improve File in less than 1 minute."
msgstr "Aidez-nous à améliorer File en moins d'une minute."

msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."
msgstr "Hé ! Vous n’avez que deux méthodes de connexion. Si vous en perdez une et qu’il ne vous en reste qu’une, vous ne pourrez plus jamais vous connecter à votre compte."

Expand Down Expand Up @@ -596,9 +599,6 @@ msgstr "Sélectionner un wallet"
msgid "Select an existing shared folder"
msgstr "Sélectionnez un dossier partagé existant"

msgid "Send Feedback"
msgstr "Donner son avis"

msgid "Send another email"
msgstr "Envoyer un nouveau courriel"

Expand Down
6 changes: 3 additions & 3 deletions packages/files-ui/src/locales/no/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ msgstr ""
msgid "Hello again!"
msgstr "Hei igjen."

msgid "Help us improve File in less than 1 minute."
msgstr ""

msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever."
msgstr ""

Expand Down Expand Up @@ -592,9 +595,6 @@ msgstr ""
msgid "Select an existing shared folder"
msgstr ""

msgid "Send Feedback"
msgstr "Send tilbakemelding"

msgid "Send another email"
msgstr "Send en ny e-post"

Expand Down
2 changes: 1 addition & 1 deletion packages/gaming-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@lingui/react": "^3.7.2",
"@sentry/react": "^5.28.0",
"@toruslabs/torus-direct-web-sdk": "4.10.0",
"axios": "0.21.1",
"axios": "0.21.4",
"babel-loader": "8.1.0",
"babel-plugin-macros": "^2.8.0",
"babel-preset-env": "^1.7.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/storage-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.0.0",
"@chainsafe/browser-storage-hooks": "^1.0.1",
"@chainsafe/files-api-client": "1.17.9",
"@chainsafe/files-api-client": "^1.18.5",
"@chainsafe/web3-context": "1.1.4",
"@lingui/core": "^3.7.2",
"@lingui/react": "^3.7.2",
"@sentry/react": "^5.28.0",
"@toruslabs/torus-direct-web-sdk": "4.10.0",
"axios": "0.21.1",
"axios": "0.21.4",
"babel-loader": "8.1.0",
"babel-plugin-macros": "^2.8.0",
"babel-preset-env": "^1.7.0",
Expand Down
18 changes: 17 additions & 1 deletion packages/storage-ui/src/Components/Layouts/AppNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
formatBytes,
ChainsafeLogo,
FolderSvg,
SettingSvg
SettingSvg,
DocumentSvg
} from "@chainsafe/common-components"
import { ROUTE_LINKS } from "../StorageRoutes"
import { Trans } from "@lingui/macro"
Expand Down Expand Up @@ -292,6 +293,21 @@ const AppNav: React.FC<IAppNav> = ({ navOpen, setNavOpen }: IAppNav) => {
<Trans>Settings</Trans>
</Typography>
</Link>
<a
data-cy="docs-nav"
className={classes.navItem}
href="https://docs.storage.chainsafe.io/"
target="_blank"
rel="noopener noreferrer"
>
<DocumentSvg />
<Typography
variant="h5"
className={classes.navItemText}
>
<Trans>Docs</Trans>
</Typography>
</a>
</nav>
</div>
<section>
Expand Down
Loading

0 comments on commit 44458cb

Please sign in to comment.