diff --git a/src/locales/ar.json b/src/locales/ar.json index 9ae67cd32b..00c00a4df8 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -21,7 +21,6 @@ "more": "المزيد" }, "toolbar": { - "item_upload": "تحميل", "item_more": "المزيد", "menu_select": "تحديد العناصر", "menu_download_folder": "مُجلّد التنزيل", diff --git a/src/locales/de.json b/src/locales/de.json index 3ee5b7776a..2ebd5f78ad 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -33,7 +33,6 @@ "more": "Mehr" }, "toolbar": { - "item_upload": "Hochladen", "menu_upload": "Dateien hochladen", "item_more": "Mehr", "menu_new_folder": "Ordner", @@ -45,7 +44,6 @@ "add_to_mine": "Meinem Cozy hinzufügen", "menu_download_folder": "Ordner herunterladen", "menu_download_file": "Diese Datei herunterladen", - "menu_open_cozy": "In meinem Cozy öffnen", "menu_create_note": "Notizen", "menu_create_shortcut": "Abkürzung", "empty_trash": "Papierkorb leeren", diff --git a/src/locales/en.json b/src/locales/en.json index 5c49ab3010..ec878cfb49 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -41,7 +41,6 @@ "more": "More" }, "toolbar": { - "item_upload": "Upload", "menu_upload": "Upload files", "item_more": "More", "menu_new_folder": "Folder", @@ -53,7 +52,6 @@ "add_to_mine": "Add to my Cozy", "menu_download_folder": "Download folder", "menu_download_file": "Download this file", - "menu_open_cozy": "Open in my Cozy", "menu_create_note": "Note", "menu_create_shortcut": "Shortcut", "share": "Share", diff --git a/src/locales/es.json b/src/locales/es.json index b7dae07fb3..47479250fb 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -33,7 +33,6 @@ "more": "Más" }, "toolbar": { - "item_upload": "Subir", "menu_upload": "Cargar archivos", "item_more": "Más", "menu_new_folder": "Carpeta", @@ -44,7 +43,6 @@ "add_to_mine": "Añadir a mi Cozy", "menu_download_folder": "Descargar carpeta", "menu_download_file": "Descargar este archivo", - "menu_open_cozy": "Abrir en mi Cozy", "menu_create_note": "Nota", "empty_trash": "Vaciar la papelera", "share": "Compartir", diff --git a/src/locales/fr.json b/src/locales/fr.json index 59b5a9c861..1534e24ab1 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -41,7 +41,6 @@ "more": "Plus" }, "toolbar": { - "item_upload": "Importer des fichiers", "menu_upload": "Importer des fichiers", "item_more": "Plus", "menu_new_folder": "Dossier", @@ -53,7 +52,6 @@ "add_to_mine": "Ajouter à mon Cozy", "menu_download_folder": "Télécharger le dossier", "menu_download_file": "Télécharger ce fichier", - "menu_open_cozy": "Ouvrir dans mon Cozy", "menu_create_note": "Note", "menu_create_shortcut": "Raccourci", "share": "Partager", diff --git a/src/locales/it.json b/src/locales/it.json index 43edef1e1b..ef0202f62d 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -34,7 +34,6 @@ "more": "Altro" }, "toolbar": { - "item_upload": "Carica", "menu_upload": "Carica files", "item_more": "Altro", "menu_new_folder": "Cartella", @@ -46,7 +45,6 @@ "add_to_mine": "Aggiungi al mio Cozy", "menu_download_folder": "Cartella download", "menu_download_file": "Scarica questo file", - "menu_open_cozy": "Apri nel mio Cozy", "menu_create_note": "Nota", "menu_create_shortcut": "Collegamento", "empty_trash": "Svuota cestino", diff --git a/src/locales/ja.json b/src/locales/ja.json index 7262522243..f6fadafac0 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -33,13 +33,11 @@ "more": "さらに" }, "toolbar": { - "item_upload": "アップロード", "item_more": "さらに", "menu_select": "アイテムを選択", "menu_share_folder": "フォルダーを共有", "menu_download_folder": "ダウンロードフォルダー", "menu_download_file": "このファイルをダウンロード", - "menu_open_cozy": "自分の Cozy で開く", "empty_trash": "ゴミ箱を空にする", "share": "共有", "trash": "削除", diff --git a/src/locales/nl.json b/src/locales/nl.json index b2542b8ac7..89ecdd8016 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -7,7 +7,6 @@ "title_trash": "Prullenbak" }, "toolbar": { - "item_upload": "Upload", "menu_select": "Selecteer items", "empty_trash": "Leeg de prullenbak" }, diff --git a/src/locales/nl_NL.json b/src/locales/nl_NL.json index e7124f6412..6a6b980631 100644 --- a/src/locales/nl_NL.json +++ b/src/locales/nl_NL.json @@ -34,7 +34,6 @@ "more": "Meer" }, "toolbar": { - "item_upload": "Uploaden", "menu_upload": "Bestanden uploaden", "item_more": "Meer", "menu_new_folder": "Map", @@ -46,7 +45,6 @@ "add_to_mine": "Toevoegen aan mijn Cozy", "menu_download_folder": "Map downloaden", "menu_download_file": "Download dit bestand", - "menu_open_cozy": "Openen in mijn Cozy", "menu_create_note": "Notitie", "menu_create_shortcut": "Snelkoppeling", "empty_trash": "Prullenbak legen", diff --git a/src/locales/pl.json b/src/locales/pl.json index ae3036753e..21dfc84fa9 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -24,7 +24,6 @@ "more": "Więcej" }, "toolbar": { - "item_upload": "Prześlij", "item_more": "Więcej", "menu_select": "Wybierz elementy", "menu_download_folder": "Pobierz folder", diff --git a/src/locales/ru.json b/src/locales/ru.json index 310b5fc23f..514ab2ac18 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -28,11 +28,9 @@ "more": "Еще" }, "toolbar": { - "item_upload": "Загрузить", "item_more": "Еще", "menu_select": "Выбранное", "menu_download_folder": "Скачать каталог", - "menu_open_cozy": "Открыть в моем Cozy", "empty_trash": "Очистить корзину", "share": "Поделится", "trash": "Удалить", diff --git a/src/locales/zh_CN.json b/src/locales/zh_CN.json index a22a69eebd..6903522059 100644 --- a/src/locales/zh_CN.json +++ b/src/locales/zh_CN.json @@ -28,7 +28,6 @@ "more": "更多" }, "toolbar": { - "item_upload": "上传", "menu_upload": "上传文件", "item_more": "更多", "menu_new_folder": "文件夹", @@ -40,7 +39,6 @@ "add_to_mine": "添加到我的 Cozy", "menu_download_folder": "下载文件夹", "menu_download_file": "下载这个文件", - "menu_open_cozy": "在我的Cozy中打开", "menu_create_note": "便签", "empty_trash": "清空垃圾桶", "share": "分享", diff --git a/src/locales/zh_TW.json b/src/locales/zh_TW.json index 4ab04fa3ac..52cf4b0237 100644 --- a/src/locales/zh_TW.json +++ b/src/locales/zh_TW.json @@ -26,12 +26,10 @@ "more": "更多" }, "toolbar": { - "item_upload": "上傳", "item_more": "更多", "menu_select": "選擇項目", "menu_download_folder": "下載資料夾", "menu_download_file": "下載這個檔案", - "menu_open_cozy": "在我的 Cozy 開啟", "empty_trash": "清空垃圾桶", "share": "分享", "trash": "移除", diff --git a/src/modules/drive/Toolbar/components/PortaledQueue.jsx b/src/modules/drive/Toolbar/components/PortaledQueue.jsx deleted file mode 100644 index b82fb18e37..0000000000 --- a/src/modules/drive/Toolbar/components/PortaledQueue.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import React, { Component } from 'react' -import ReactDOM from 'react-dom' - -import { translate } from 'cozy-ui/transpiled/react/providers/I18n' - -import { DumbUploadQueue as UploadQueue } from 'modules/upload/UploadQueue' - -class PortaledQueue extends Component { - render() { - const { file, doneCount, successCount, t, onClear } = this.props - - return ReactDOM.createPortal( - , - document.querySelector('[role=application]') - ) - } -} - -export default translate()(PortaledQueue) diff --git a/src/modules/drive/Toolbar/components/UploadButtonItem.jsx b/src/modules/drive/Toolbar/components/UploadButtonItem.jsx deleted file mode 100644 index 39b46ad093..0000000000 --- a/src/modules/drive/Toolbar/components/UploadButtonItem.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import classNames from 'classnames' -import { useDisplayedFolder } from 'hooks' -import React from 'react' -import { compose } from 'redux' - -import { translate } from 'cozy-ui/transpiled/react/providers/I18n' - -import UploadButton from 'modules/upload/UploadButton' - -import styles from 'styles/toolbar.styl' - -const UploadButtonItem = ({ t, isDisabled, onUploaded }) => { - const { displayedFolder } = useDisplayedFolder() - - return ( - - ) -} - -export default compose(translate())(UploadButtonItem) diff --git a/src/modules/navigation/ScrollToTop.jsx b/src/modules/navigation/ScrollToTop.jsx deleted file mode 100644 index cf125e55e6..0000000000 --- a/src/modules/navigation/ScrollToTop.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react' - -class ScrollToTop extends React.Component { - componentDidMount() { - window.scrollTo(0, 0) - } - - render() { - return null - } -} - -export default ScrollToTop diff --git a/src/modules/public/OpenInCozyButton.jsx b/src/modules/public/OpenInCozyButton.jsx deleted file mode 100644 index c76871441a..0000000000 --- a/src/modules/public/OpenInCozyButton.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' - -import { ButtonLink } from 'cozy-ui/transpiled/react' -import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' - -const OpenInCozyButton = ({ size = 'normal', href = '' }) => { - const { t } = useI18n() - return ( - - ) -} - -export default OpenInCozyButton diff --git a/src/modules/views/OnlyOffice/Toolbar/ReadOnly.jsx b/src/modules/views/OnlyOffice/Toolbar/ReadOnly.jsx deleted file mode 100644 index ced0a8ad6e..0000000000 --- a/src/modules/views/OnlyOffice/Toolbar/ReadOnly.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react' - -import Icon from 'cozy-ui/transpiled/react/Icon' -import LockIcon from 'cozy-ui/transpiled/react/Icons/Lock' -import Tooltip from 'cozy-ui/transpiled/react/Tooltip' -import Typography from 'cozy-ui/transpiled/react/Typography' -import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints' -import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' - -const ReadOnly = () => { - const { t } = useI18n() - const { isMobile } = useBreakpoints() - - if (isMobile) - return ( -
- -
- ) - - return ( - - - - - {t('OnlyOffice.readOnly.title')} - - - - ) -} - -export default ReadOnly diff --git a/src/modules/views/Public/PublicNoteRedirectView.tsx b/src/modules/views/Public/PublicNoteRedirectView.tsx deleted file mode 100644 index fac84e2662..0000000000 --- a/src/modules/views/Public/PublicNoteRedirectView.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import React, { FC, useEffect, useState } from 'react' -import { useParams } from 'react-router-dom' - -import { useClient } from 'cozy-client' -import { fetchURL } from 'cozy-client/dist/models/note' -import Empty from 'cozy-ui/transpiled/react/Empty' -import Sprite from 'cozy-ui/transpiled/react/Icon/Sprite' -import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' - -import EmptyIcon from 'assets/icons/icon-folder-broken.svg' -import { joinPath } from 'lib/path' - -const PublicNoteRedirectView: FC = () => { - const { t } = useI18n() - const { fileId } = useParams() - const client = useClient() - - const [noteUrl, setNoteUrl] = useState(null) - const [fetchStatus, setFetchStatus] = useState< - 'failed' | 'loading' | 'pending' | 'loaded' - >('pending') - - useEffect(() => { - const fetchNoteUrl = async (fileId: string): Promise => { - setFetchStatus('loading') - try { - const url = await fetchURL( - client, - { - id: fileId - }, - { - pathname: joinPath(location.pathname, '') - } - ) - setNoteUrl(url) - setFetchStatus('loaded') - } catch (error) { - setFetchStatus('failed') - } - } - - if (fileId) { - void fetchNoteUrl(fileId) - } - }, [fileId, client]) - - if (noteUrl) { - window.location.href = noteUrl - } - - return ( - <> - - {fetchStatus === 'failed' && ( - - )} - {fetchStatus !== 'failed' && ( - - )} - - ) -} - -export { PublicNoteRedirectView } diff --git a/src/modules/views/Upload/UploaderComponent.styles.ts b/src/modules/views/Upload/UploaderComponent.styles.ts deleted file mode 100644 index 873d725dc1..0000000000 --- a/src/modules/views/Upload/UploaderComponent.styles.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Theme } from '@material-ui/core' - -export const styles = (theme: Theme): Record => ({ - paper: { - height: '100%', - '& .MuiDialogContent-root': { - padding: '0' - }, - '& .MuiDialogTitle-root': { - padding: '0', - [theme.breakpoints.down('sm')]: { - width: '100%', - overflow: 'visible', - // back button - '& .MuiButtonBase-root': { - display: 'none' - } - } - } - } -}) diff --git a/src/styles/toolbar.styl b/src/styles/toolbar.styl index b745f8518d..9743ba2ec5 100644 --- a/src/styles/toolbar.styl +++ b/src/styles/toolbar.styl @@ -3,22 +3,6 @@ @require 'settings/z-index.styl' @require 'utilities/display.styl' -.c-btn - @extend $button - -.c-btn--regular - @extend $button--regular - -.c-btn--secondary - @extend $button--secondary - -.c-btn--danger - @extend $button--danger - -.c-btn--danger-outline - @extend $button--danger-outline - - .fil-toolbar-files .fil-toolbar-trash margin-left auto