This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cmd/gui): construct synchronize skeleton
- Loading branch information
Showing
6 changed files
with
380 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const modeMapping = { | ||
"upload": 1, | ||
"download": 2, | ||
} | ||
|
||
const containsKey = (optional, key) => { | ||
if (optional || !(optional instanceof Array)) { | ||
return false | ||
} | ||
|
||
return optional.indexOf(key) !== -1 | ||
} | ||
|
||
const synchronize = (scope) => { | ||
if (window.go && window.go.backend && window.go.backend.App && window.go.backend.App.Synchronize) { | ||
return window.go.backend.App.Synchronize(scope); | ||
} | ||
|
||
return Promise.reject("No go.backend.App.Synchronize loaded"); | ||
} | ||
|
||
export { modeMapping, containsKey, synchronize } |
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
Oops, something went wrong.