Repository navigation
Add Garmin dump imports and progress on iOS #1603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
60ed18a
feat(import): add iOS Garmin dump progress
Asherlc 5f19496
Fix Garmin import review feedback
Asherlc e8dc8a5
Show Apple Health import progress
Asherlc d8cd1b2
Prioritize Apple Health import progress
Asherlc 09ce4d1
Add shared mobile file import picker
Asherlc b25d87d
Use shared file import provider card
Asherlc 6aaee1b
Use shared web file import card
Asherlc 96bbd35
Unify file import uploads
Asherlc 9d8dd44
Harden upload temp file paths
Asherlc 6342130
Simplify chunk directory creation
Asherlc 680f293
Address file import review feedback
Asherlc 4650166
Add upload state Redis spellcheck words
Asherlc 7d4c27b
test: expect provider stats total records
Asherlc 4b84656
fix: use server provider stats total
Asherlc d3a32ca
style: format provider stats breakdown import
Asherlc 91b582f
fix: refresh upload chunk byte ttl
Asherlc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,45 @@ | ||
| import type { ImportProviderId } from "../../lib/share-import"; | ||
|
|
||
| type FileImportProviderConfig = { | ||
| providerId: ImportProviderId; | ||
| documentTypes: string[]; | ||
| selectionErrorMessage: string; | ||
| }; | ||
|
|
||
| const csvDocumentTypes = [ | ||
| "text/csv", | ||
| "text/comma-separated-values", | ||
| "application/csv", | ||
| "text/plain", | ||
| ]; | ||
|
|
||
| const fileImportProviderConfigs = { | ||
| "strong-csv": { | ||
| providerId: "strong-csv", | ||
| documentTypes: csvDocumentTypes, | ||
| selectionErrorMessage: "Unable to select Strong export", | ||
| }, | ||
| "cronometer-csv": { | ||
| providerId: "cronometer-csv", | ||
| documentTypes: csvDocumentTypes, | ||
| selectionErrorMessage: "Unable to select Cronometer export", | ||
| }, | ||
| "garmin-dump": { | ||
| providerId: "garmin-dump", | ||
| documentTypes: ["application/zip", "application/x-zip-compressed"], | ||
| selectionErrorMessage: "Unable to select Garmin export", | ||
| }, | ||
| } satisfies Partial<Record<ImportProviderId, FileImportProviderConfig>>; | ||
|
|
||
| export function getFileImportProviderConfig( | ||
| providerId: string, | ||
| ): FileImportProviderConfig | undefined { | ||
| switch (providerId) { | ||
| case "strong-csv": | ||
| case "cronometer-csv": | ||
| case "garmin-dump": | ||
| return fileImportProviderConfigs[providerId]; | ||
| default: | ||
| return undefined; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.