-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring Sync by structuring the files
- Loading branch information
Showing
16 changed files
with
67 additions
and
61 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
File renamed without changes.
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 @@ | ||
export { default as LoadingSpinner } from './LoadingSpinner'; |
File renamed without changes.
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 @@ | ||
export { default as ProgressCircle } from './ProgressCircle'; |
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 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,56 @@ | ||
import React from 'react'; | ||
import { classNames } from '@/util/classNames'; | ||
import moment from 'moment'; | ||
import FolderIcon from '@/icons/folder.svg'; | ||
|
||
function GridRow({ | ||
title, | ||
lastSync, | ||
selected, | ||
isUpload, | ||
uploadPercentage = 0, | ||
}) { | ||
return ( | ||
<> | ||
<div className="flex gap-2 justify-between items-center px-5 py-4 border-b border-gray-100 cursor-pointer"> | ||
<span | ||
className={classNames( | ||
selected ? 'text-primary' : 'text-gray-800', | ||
'capitalize w-full flex items-center gap-5', | ||
)} | ||
> | ||
<FolderIcon className="w-4 h-4" /> | ||
{title} | ||
</span> | ||
|
||
<span | ||
title={ | ||
lastSync && lastSync !== null ? lastSync.username : '' | ||
} | ||
className={classNames( | ||
selected ? 'text-primary' : '', | ||
'text-xs font-semibold text-right w-40', | ||
)} | ||
> | ||
{lastSync && lastSync !== null | ||
? moment | ||
.utc(lastSync.lastSynced) | ||
.local() | ||
.startOf('seconds') | ||
.fromNow() | ||
: '-'} | ||
</span> | ||
</div> | ||
{isUpload && ( | ||
<div className="w-full bg-gray-200 h-1"> | ||
<div | ||
className="bg-primary h-1" | ||
style={{ width: `${uploadPercentage}%` }} | ||
/> | ||
</div> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default GridRow; |
File renamed without changes.
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.
2 changes: 1 addition & 1 deletion
2
...rc/components/Sync/SyncContextProvider.js → ...rer/src/components/context/SyncContext.js
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