Skip to content

Commit

Permalink
Merge pull request #1415 from cozy/background-mobile-upload-queue
Browse files Browse the repository at this point in the history
Fix background color UploadQueue on mobile
  • Loading branch information
ptbrowne authored Mar 27, 2020
2 parents c0c5e2a + a129e76 commit f41e7e2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
38 changes: 28 additions & 10 deletions react/UploadQueue/Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
Dumb component to display a list of files being uploaded.

On mobile, the list of files being displayed is not shown, only
a small banner is shown.

The popover attribute should be used to automatically layout
the upload queue:

- in a fixed bottom-right position on desktop
- underneath the top-bar on mobile

```
const state = {
const initialState = {
popover: false
}
const data = {
queue: [{
file: { name: 'Photo.jpg' },
status: 'created'
Expand All @@ -18,13 +33,16 @@ const state = {
successCount: 1
};
<UploadQueue
lang='fr'
app='Cozy Drive'
getMimeTypeIcon={() => 'file'}
queue={state.queue}
doneCount={state.doneCount}
successCount={state.successCount}
popover={false}
/>
<>
popover: <input type="checkbox" value={state.popover} onChange={() => setState({ popover: !state.popover })} />
<UploadQueue
lang='fr'
app='Cozy Drive'
getMimeTypeIcon={() => 'file'}
queue={data.queue}
doneCount={data.doneCount}
successCount={data.successCount}
popover={state.popover}
/>
</>
```
5 changes: 1 addition & 4 deletions react/UploadQueue/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ progress.upload-queue-progress::-moz-progress-bar
content ''
background var(--white)

.upload-queue--visible
max-height 30%

.upload-queue--visible
&.upload-queue--visible
max-height 30%

.upload-queue-content
Expand Down

0 comments on commit f41e7e2

Please sign in to comment.