This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File sync viz on shared photo (#1232)
* Move file-sync feature inside group feature, augment feed data with sync state Signed-off-by: Aaron Sutula <[email protected]> * Add lib for progress indicator Signed-off-by: Aaron Sutula <[email protected]> * wip Signed-off-by: Aaron Sutula <[email protected]> * Add total size logic Signed-off-by: Aaron Sutula <[email protected]> * Lint fixes Signed-off-by: Aaron Sutula <[email protected]> * fix tsc errors around GroupStatus Signed-off-by: Aaron Sutula <[email protected]> * Better progress indicator lib Signed-off-by: Aaron Sutula <[email protected]> * Display file sync error on shared photo Signed-off-by: Aaron Sutula <[email protected]>
- Loading branch information
Showing
22 changed files
with
301 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { createAction } from 'typesafe-actions' | ||
|
||
export const syncUpdate = createAction( | ||
'group/file-sync/SYNC_UPDATE', | ||
resolve => { | ||
return ( | ||
groupId: string, | ||
numberComplete: number, | ||
numberTotal: number, | ||
sizeComplete: number, | ||
sizeTotal: number | ||
) => | ||
resolve({ groupId, numberComplete, numberTotal, sizeComplete, sizeTotal }) | ||
} | ||
) | ||
|
||
export const syncComplete = createAction( | ||
'group/file-sync/SYNC_COMPLETE', | ||
resolve => { | ||
return (groupId: string) => resolve({ groupId }) | ||
} | ||
) | ||
|
||
export const syncFailed = createAction( | ||
'group/file-sync/SYNC_FAILED', | ||
resolve => { | ||
return (groupId: string, errorId: string, reason: string) => | ||
resolve({ groupId, errorId, reason }) | ||
} | ||
) | ||
|
||
export const clearStatus = createAction( | ||
'group/file-sync/CLEAR_STATUS', | ||
resolve => { | ||
return (groupId: string) => resolve({ groupId }) | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as fileSyncActions from './actions' | ||
import fileSyncReducer, { FileSyncState, FileSyncAction } from './reducer' | ||
import * as fileSyncSelectors from './selectors' | ||
|
||
export { | ||
fileSyncActions, | ||
fileSyncReducer, | ||
fileSyncSelectors, | ||
FileSyncState, | ||
FileSyncAction | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export interface GroupStatus { | ||
numberComplete: number | ||
numberTotal: number | ||
sizeComplete: number | ||
sizeTotal: number | ||
error?: { | ||
id: string | ||
reason: string | ||
} | ||
} |
Oops, something went wrong.