-
Notifications
You must be signed in to change notification settings - Fork 2
feat: price widget v61 #542
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
Open
jvsena42
wants to merge
32
commits into
feat/os-widgets
Choose a base branch
from
feat/price-widget-v61
base: feat/os-widgets
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
61db06c
feat: port price widgets related screens to figma V61
jvsena42 28a550f
fix: spacing and alignment
jvsena42 10be29e
feat: hide menu button from nabigation bar
jvsena42 90680fe
fix: padding
jvsena42 4dfd9a8
fix: remove systemLarge widget option
jvsena42 15dc374
fix: collect results in input order instead of completion order
jvsena42 fc2aaa6
Merge remote-tracking branch 'origin/feat/os-widgets' into feat/price…
jvsena42 600b422
fix: pr comments
jvsena42 027da41
fix: pr comments
jvsena42 a172129
refactor: simplify doc
jvsena42 73eba60
refactor: replace onApper with task
jvsena42 d07317f
refactor: replace onChange with task id
jvsena42 8b2ec97
refactor: simplify comments
jvsena42 6586143
refactor: simplyfy comments
jvsena42 fc0dc8e
refactor: simplify comments
jvsena42 d01c196
refactor: simplify comments
jvsena42 770511e
refactor: simplify comments
jvsena42 5f0841f
refactor: remove multi-pair legacy code
jvsena42 51c2f41
fix: fallback to os widget options after remove in-app
jvsena42 afb421a
fix: make chart height adaptable
jvsena42 fdafc5b
Merge branch 'feat/os-widgets' into feat/price-widget-v61
jvsena42 5be6014
feat: set backgroud color Gray7
jvsena42 b0d05be
Merge branch 'feat/price-widget-v61' of github.com:synonymdev/bitkit-…
jvsena42 22dc3e1
Merge branch 'feat/os-widgets' into feat/price-widget-v61
jvsena42 6e3ab90
fix: reuse existing text component and remove scale factor
jvsena42 b2df71f
fix: display white32 checkmark for unselected item
jvsena42 7994460
fix: vertical padding anchored to checkbox image
jvsena42 200d2f8
fix: remove the gray bg and custom bg from Navigation bar
jvsena42 870d5e8
fix: try to fetch real data for preview
jvsena42 d2f4120
refactor: make string keys generic to be reused in the furue implemen…
jvsena42 1c8350a
fix: make prevew frame height adaptable
jvsena42 88843b6
fix: remove app group fallback
jvsena42 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
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
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 |
|---|---|---|
| @@ -1,8 +1,41 @@ | ||
| import Foundation | ||
|
|
||
| /// Options for configuring the in-app and home-screen price widgets (shared via App Group for the extension). | ||
| /// Options for configuring the in-app and home-screen price widgets (shared via App Group). | ||
| /// | ||
| struct PriceWidgetOptions: Codable, Equatable { | ||
| var selectedPairs: [String] = ["BTC/USD"] | ||
| var selectedPair: String = "BTC/USD" | ||
| var selectedPeriod: GraphPeriod = .oneDay | ||
| var showSource: Bool = false | ||
|
|
||
| init(selectedPair: String = "BTC/USD", selectedPeriod: GraphPeriod = .oneDay) { | ||
| self.selectedPair = selectedPair | ||
| self.selectedPeriod = selectedPeriod | ||
| } | ||
|
|
||
| private enum CodingKeys: String, CodingKey { | ||
| case selectedPair | ||
| case selectedPairs // legacy v60 key | ||
| case selectedPeriod | ||
| } | ||
|
|
||
| init(from decoder: Decoder) throws { | ||
| let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
|
||
| if let pair = try container.decodeIfPresent(String.self, forKey: .selectedPair) { | ||
| selectedPair = pair | ||
| } else if let legacyPairs = try container.decodeIfPresent([String].self, forKey: .selectedPairs), | ||
| let first = legacyPairs.first | ||
| { | ||
| selectedPair = first | ||
| } else { | ||
| selectedPair = "BTC/USD" | ||
| } | ||
|
|
||
| selectedPeriod = try container.decodeIfPresent(GraphPeriod.self, forKey: .selectedPeriod) ?? .oneDay | ||
| } | ||
|
|
||
| func encode(to encoder: Encoder) throws { | ||
| var container = encoder.container(keyedBy: CodingKeys.self) | ||
| try container.encode(selectedPair, forKey: .selectedPair) | ||
| try container.encode(selectedPeriod, forKey: .selectedPeriod) | ||
| } | ||
| } |
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.