Skip to content

Commit

Permalink
feat: Remove Viewer
Browse files Browse the repository at this point in the history
BREAKING CHANGE: if you want to use the Viewer, you must import components from `cozy-viewer`. So replace `import Something from 'cozy-ui/transpiled/react/Viewer/...'` by `import Something from 'cozy-viewer/...'`
  • Loading branch information
JF-Cozy committed Oct 24, 2024
1 parent 9471b03 commit 2f93794
Show file tree
Hide file tree
Showing 97 changed files with 4 additions and 6,391 deletions.
3 changes: 1 addition & 2 deletions docs/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ module.exports = {
'../react/SquareAppIcon',
'../react/QualificationGrid',
'../react/QualificationItem',
'../react/UploadQueue',
'../react/Viewer'
'../react/UploadQueue'
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions react/FileImageLoader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'
import { Component } from 'react'

import { withClient } from 'cozy-client'
import { isEncrypted } from 'cozy-client/dist/models/file'
import logger from 'cozy-logger'

const PENDING = 'PENDING'
Expand All @@ -12,8 +13,7 @@ const FAILED = 'FAILED'
const GET_LINK = 'GET_LINK'

import { checkImageSource } from './checkImageSource'
import { isFileEncrypted } from '../Viewer/helpers'
import { EncryptedContext } from '../Viewer/providers/EncryptedProvider'
import { EncryptedContext } from '../providers/EncryptedProvider'

export class FileImageLoader extends Component {
state = {
Expand Down Expand Up @@ -60,7 +60,7 @@ export class FileImageLoader extends Component {

loadNextSrc(lastError = null) {
const { file } = this.props
if (isFileEncrypted(file)) {
if (isEncrypted(file)) {
// No link available for encrypted files
return
}
Expand Down
29 changes: 0 additions & 29 deletions react/Viewer/Footer/BottomSheetContent.jsx

This file was deleted.

67 changes: 0 additions & 67 deletions react/Viewer/Footer/DownloadButton.jsx

This file was deleted.

22 changes: 0 additions & 22 deletions react/Viewer/Footer/FooterActionButtons.jsx

This file was deleted.

30 changes: 0 additions & 30 deletions react/Viewer/Footer/FooterActionButtons.spec.jsx

This file was deleted.

99 changes: 0 additions & 99 deletions react/Viewer/Footer/FooterContent.jsx

This file was deleted.

95 changes: 0 additions & 95 deletions react/Viewer/Footer/ForwardButton.jsx

This file was deleted.

Loading

0 comments on commit 2f93794

Please sign in to comment.