Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cozy/cozy-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ead81b16f392bad7db4904fd9608fda151caf4f7
Choose a base ref
..
head repository: cozy/cozy-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 01a1411dfaf9e727f85555f1be3b61a2889a9c0e
Choose a head ref
Showing with 64 additions and 8 deletions.
  1. +14 −0 CHANGELOG.md
  2. +1 −0 assets/icons/illus/cloud-sync2.svg
  3. +2 −0 react/Icon/Readme.md
  4. +23 −0 react/Icons/CloudSync2.jsx
  5. +10 −8 react/Viewer/ViewersByFile/ImageViewer.jsx
  6. +14 −0 react/__snapshots__/examples.spec.jsx.snap
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [81.2.1](https://github.com/cozy/cozy-ui/compare/v81.2.0...v81.2.1) (2023-02-22)


### Bug Fixes

* ImageViewer crashes when render are too fast ([c9e7698](https://github.com/cozy/cozy-ui/commit/c9e7698))

# [81.2.0](https://github.com/cozy/cozy-ui/compare/v81.1.0...v81.2.0) (2023-02-20)


### Features

* add new icon cloud sync ([9af423e](https://github.com/cozy/cozy-ui/commit/9af423e))

# [81.1.0](https://github.com/cozy/cozy-ui/compare/v81.0.0...v81.1.0) (2023-02-14)


1 change: 1 addition & 0 deletions assets/icons/illus/cloud-sync2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions react/Icon/Readme.md
Original file line number Diff line number Diff line change
@@ -550,6 +550,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'

import CozyIcon from 'cozy-ui/transpiled/react/Icons/Cozy'
import CloudBrokenIcon from 'cozy-ui/transpiled/react/Icons/CloudBroken'
import CloudSync2 from 'cozy-ui/transpiled/react/Icons/CloudSync2'
import CozyLogoIcon from 'cozy-ui/transpiled/react/Icons/CozyLogo'
import DeviceLaptopIcon from 'cozy-ui/transpiled/react/Icons/DeviceLaptop'
import DevicePhoneIcon from 'cozy-ui/transpiled/react/Icons/DevicePhone'
@@ -583,6 +584,7 @@ import KeychainIcon from 'cozy-ui/transpiled/react/Icons/Keychain'
const icons = [
CozyIcon,
CloudBrokenIcon,
CloudSync2,
CozyLogoIcon,
DeviceLaptopIcon,
DevicePhoneIcon,
23 changes: 23 additions & 0 deletions react/Icons/CloudSync2.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/illus/cloud-sync-2.svg` to regenerate;
import React from 'react'

function SvgCloudSync2(props) {
return (
<svg viewBox="0 0 96 96" fill="none" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M26.667 83.676C11.939 83.676 0 71.737 0 57.01c0-13.06 9.387-23.926 21.781-26.22C24.075 18.395 34.941 9.01 48 9.01c13.059 0 23.925 9.386 26.22 21.78C86.613 33.085 96 43.95 96 57.01c0 14.464-11.516 26.239-25.88 26.655l-.787.011H26.667z"
fill="#B2D3FF"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M66.156 57.51a2.668 2.668 0 011.214 3.57c-3.603 7.304-11.12 12.096-19.371 12.096-6.307 0-12.117-2.885-16.117-7.413-.275 1.181-1.283 2.08-2.55 2.08a2.668 2.668 0 01-2.666-2.667V54.51c0-.168.042-.318.069-.475.016-.072.013-.144.032-.213a2.58 2.58 0 01.395-.854c.02-.026.048-.048.066-.072.168-.218.37-.402.595-.557a2.648 2.648 0 012.043-.424c.072.016.14.035.21.053.23.067.446.171.659.307.072.045.144.077.213.128.03.024.064.035.094.059l8 6.666a2.665 2.665 0 01.338 3.755 2.629 2.629 0 01-1.917.939c2.877 2.496 6.592 4.021 10.536 4.021 6.195 0 11.875-3.619 14.587-9.12a2.665 2.665 0 013.57-1.213zm3.094-7.766c-.01.053-.008.107-.022.157a2.568 2.568 0 01-.415.843c-.032.045-.07.075-.105.115a2.546 2.546 0 01-.57.514c-.067.046-.128.091-.2.128a2.76 2.76 0 01-.886.31.037.037 0 00-.02.008c-.025.002-.046-.008-.07-.006a2.625 2.625 0 01-1.086-.109 2.552 2.552 0 01-.674-.33c-.061-.04-.126-.067-.181-.113-.02-.016-.043-.018-.062-.037l-8-6.667a2.665 2.665 0 01-.341-3.754c.55-.659 1.346-.942 2.139-.915a16.33 16.33 0 00-10.758-4.045c-6.31 0-12.021 3.64-14.666 9.184a2.667 2.667 0 01-4.813-2.296C32.043 35.34 39.625 30.509 48 30.509c6.38 0 12.183 2.79 16.154 7.238.33-1.094 1.31-1.904 2.512-1.904a2.668 2.668 0 012.666 2.666v10.667c0 .203-.042.384-.082.568z"
fill="#297EF1"
/>
</svg>
)
}

export default SvgCloudSync2
18 changes: 10 additions & 8 deletions react/Viewer/ViewersByFile/ImageViewer.jsx
Original file line number Diff line number Diff line change
@@ -85,14 +85,16 @@ class ImageViewer extends Component {
}

tearDownGestures() {
this.gestures.off('swipe')
this.gestures.on('swipe', this.props.onSwipe)
this.gestures.off('panstart')
this.gestures.off('pinchstart')
this.gestures.off('pinchend')
this.gestures.off('pan')
this.gestures.off('pinch')
this.gestures.off('panend')
if (this.gestures) {
this.gestures.off('swipe')
this.gestures.on('swipe', this.props.onSwipe)
this.gestures.off('panstart')
this.gestures.off('pinchstart')
this.gestures.off('pinchend')
this.gestures.off('pan')
this.gestures.off('pinch')
this.gestures.off('panend')
}
}

onSwipe = e => {
14 changes: 14 additions & 0 deletions react/__snapshots__/examples.spec.jsx.snap
Original file line number Diff line number Diff line change
@@ -4230,6 +4230,12 @@ exports[`Icon should render examples: Icon 2`] = `
</svg>
<p class=\\"MuiTypography-root u-mt-half MuiTypography-body1 MuiTypography-colorTextPrimary\\">CloudBroken</p>
</div>
<div class=\\"u-ta-center u-mb-1\\"><svg viewBox=\\"0 0 96 96\\" fill=\\"none\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\">
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M26.667 83.676C11.939 83.676 0 71.737 0 57.01c0-13.06 9.387-23.926 21.781-26.22C24.075 18.395 34.941 9.01 48 9.01c13.059 0 23.925 9.386 26.22 21.78C86.613 33.085 96 43.95 96 57.01c0 14.464-11.516 26.239-25.88 26.655l-.787.011H26.667z\\" fill=\\"#B2D3FF\\"></path>
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M66.156 57.51a2.668 2.668 0 011.214 3.57c-3.603 7.304-11.12 12.096-19.371 12.096-6.307 0-12.117-2.885-16.117-7.413-.275 1.181-1.283 2.08-2.55 2.08a2.668 2.668 0 01-2.666-2.667V54.51c0-.168.042-.318.069-.475.016-.072.013-.144.032-.213a2.58 2.58 0 01.395-.854c.02-.026.048-.048.066-.072.168-.218.37-.402.595-.557a2.648 2.648 0 012.043-.424c.072.016.14.035.21.053.23.067.446.171.659.307.072.045.144.077.213.128.03.024.064.035.094.059l8 6.666a2.665 2.665 0 01.338 3.755 2.629 2.629 0 01-1.917.939c2.877 2.496 6.592 4.021 10.536 4.021 6.195 0 11.875-3.619 14.587-9.12a2.665 2.665 0 013.57-1.213zm3.094-7.766c-.01.053-.008.107-.022.157a2.568 2.568 0 01-.415.843c-.032.045-.07.075-.105.115a2.546 2.546 0 01-.57.514c-.067.046-.128.091-.2.128a2.76 2.76 0 01-.886.31.037.037 0 00-.02.008c-.025.002-.046-.008-.07-.006a2.625 2.625 0 01-1.086-.109 2.552 2.552 0 01-.674-.33c-.061-.04-.126-.067-.181-.113-.02-.016-.043-.018-.062-.037l-8-6.667a2.665 2.665 0 01-.341-3.754c.55-.659 1.346-.942 2.139-.915a16.33 16.33 0 00-10.758-4.045c-6.31 0-12.021 3.64-14.666 9.184a2.667 2.667 0 01-4.813-2.296C32.043 35.34 39.625 30.509 48 30.509c6.38 0 12.183 2.79 16.154 7.238.33-1.094 1.31-1.904 2.512-1.904a2.668 2.668 0 012.666 2.666v10.667c0 .203-.042.384-.082.568z\\" fill=\\"#297EF1\\"></path>
</svg>
<p class=\\"MuiTypography-root u-mt-half MuiTypography-body1 MuiTypography-colorTextPrimary\\">CloudSync2</p>
</div>
<div class=\\"u-ta-center u-mb-1\\"><svg viewBox=\\"0 0 101 30\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\">
<g fill=\\"none\\" fill-rule=\\"evenodd\\">
<path d=\\"M0-5h101v40H0z\\"></path>
@@ -4497,6 +4503,10 @@ exports[`Icon should render examples: Icon 3`] = `
<path stroke=\\"#297EF1\\" stroke-linecap=\\"round\\" stroke-width=\\"8\\" d=\\"M50 156L110 4\\"></path>
</g>
</symbol>
<symbol id=\\"cloud-sync2\\" viewBox=\\"0 0 96 96\\">
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M26.667 83.676C11.939 83.676 0 71.737 0 57.01c0-13.06 9.387-23.926 21.781-26.22C24.075 18.395 34.941 9.01 48 9.01c13.059 0 23.925 9.386 26.22 21.78C86.613 33.085 96 43.95 96 57.01c0 14.464-11.516 26.239-25.88 26.655l-.787.011H26.667Z\\" fill=\\"#B2D3FF\\"></path>
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M66.156 57.51a2.668 2.668 0 0 1 1.214 3.57c-3.603 7.304-11.12 12.096-19.371 12.096-6.307 0-12.117-2.885-16.117-7.413-.275 1.181-1.283 2.08-2.55 2.08a2.668 2.668 0 0 1-2.666-2.667V54.51c0-.168.042-.318.069-.475.016-.072.013-.144.032-.213a2.58 2.58 0 0 1 .395-.854c.02-.026.048-.048.066-.072.168-.218.37-.402.595-.557a2.648 2.648 0 0 1 2.043-.424c.072.016.14.035.21.053.23.067.446.171.659.307.072.045.144.077.213.128.03.024.064.035.094.059l8 6.666a2.665 2.665 0 0 1 .338 3.755 2.629 2.629 0 0 1-1.917.939c2.877 2.496 6.592 4.021 10.536 4.021 6.195 0 11.875-3.619 14.587-9.12a2.665 2.665 0 0 1 3.57-1.213Zm3.094-7.766c-.01.053-.008.107-.022.157a2.568 2.568 0 0 1-.415.843c-.032.045-.07.075-.105.115a2.546 2.546 0 0 1-.57.514c-.067.046-.128.091-.2.128a2.76 2.76 0 0 1-.886.31c-.008 0-.016.005-.02.008-.025.002-.046-.008-.07-.006a2.625 2.625 0 0 1-1.086-.109 2.552 2.552 0 0 1-.674-.33c-.061-.04-.126-.067-.181-.113-.02-.016-.043-.018-.062-.037l-8-6.667a2.665 2.665 0 0 1-.341-3.754c.55-.659 1.346-.942 2.139-.915a16.33 16.33 0 0 0-10.758-4.045c-6.31 0-12.021 3.64-14.666 9.184a2.667 2.667 0 0 1-4.813-2.296C32.043 35.34 39.625 30.509 48 30.509c6.38 0 12.183 2.79 16.154 7.238.33-1.094 1.31-1.904 2.512-1.904a2.668 2.668 0 0 1 2.666 2.666v10.667c0 .203-.042.384-.082.568Z\\" fill=\\"#297EF1\\"></path>
</symbol>
<symbol id=\\"cloud-sync\\" viewBox=\\"0 0 32 32\\">
<g fill=\\"none\\" fill-rule=\\"evenodd\\">
<g>
@@ -6113,6 +6123,10 @@ exports[`Icon should render examples: Icon 7`] = `
<path stroke=\\"#297EF1\\" stroke-linecap=\\"round\\" stroke-width=\\"8\\" d=\\"M50 156L110 4\\"></path>
</g>
</symbol>
<symbol id=\\"cloud-sync2\\" viewBox=\\"0 0 96 96\\">
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M26.667 83.676C11.939 83.676 0 71.737 0 57.01c0-13.06 9.387-23.926 21.781-26.22C24.075 18.395 34.941 9.01 48 9.01c13.059 0 23.925 9.386 26.22 21.78C86.613 33.085 96 43.95 96 57.01c0 14.464-11.516 26.239-25.88 26.655l-.787.011H26.667Z\\" fill=\\"#B2D3FF\\"></path>
<path fill-rule=\\"evenodd\\" clip-rule=\\"evenodd\\" d=\\"M66.156 57.51a2.668 2.668 0 0 1 1.214 3.57c-3.603 7.304-11.12 12.096-19.371 12.096-6.307 0-12.117-2.885-16.117-7.413-.275 1.181-1.283 2.08-2.55 2.08a2.668 2.668 0 0 1-2.666-2.667V54.51c0-.168.042-.318.069-.475.016-.072.013-.144.032-.213a2.58 2.58 0 0 1 .395-.854c.02-.026.048-.048.066-.072.168-.218.37-.402.595-.557a2.648 2.648 0 0 1 2.043-.424c.072.016.14.035.21.053.23.067.446.171.659.307.072.045.144.077.213.128.03.024.064.035.094.059l8 6.666a2.665 2.665 0 0 1 .338 3.755 2.629 2.629 0 0 1-1.917.939c2.877 2.496 6.592 4.021 10.536 4.021 6.195 0 11.875-3.619 14.587-9.12a2.665 2.665 0 0 1 3.57-1.213Zm3.094-7.766c-.01.053-.008.107-.022.157a2.568 2.568 0 0 1-.415.843c-.032.045-.07.075-.105.115a2.546 2.546 0 0 1-.57.514c-.067.046-.128.091-.2.128a2.76 2.76 0 0 1-.886.31c-.008 0-.016.005-.02.008-.025.002-.046-.008-.07-.006a2.625 2.625 0 0 1-1.086-.109 2.552 2.552 0 0 1-.674-.33c-.061-.04-.126-.067-.181-.113-.02-.016-.043-.018-.062-.037l-8-6.667a2.665 2.665 0 0 1-.341-3.754c.55-.659 1.346-.942 2.139-.915a16.33 16.33 0 0 0-10.758-4.045c-6.31 0-12.021 3.64-14.666 9.184a2.667 2.667 0 0 1-4.813-2.296C32.043 35.34 39.625 30.509 48 30.509c6.38 0 12.183 2.79 16.154 7.238.33-1.094 1.31-1.904 2.512-1.904a2.668 2.668 0 0 1 2.666 2.666v10.667c0 .203-.042.384-.082.568Z\\" fill=\\"#297EF1\\"></path>
</symbol>
<symbol id=\\"cloud-sync\\" viewBox=\\"0 0 32 32\\">
<g fill=\\"none\\" fill-rule=\\"evenodd\\">
<g>