Skip to content

Commit

Permalink
Add link to sharing to bring directly to personal statistics page (#727)
Browse files Browse the repository at this point in the history
* Add link to sharing to bring directly to personal statistics page, with
token

* remove general statistics url in favor of user statistics

this put their token into a session on the statistic server, so that any
page that can make use of it ( full list / sigmoid list ) will show their
entry, but the long term goal for that landing page is to be able to
allow users to view settings ( ie. to print / save ), and eventually,
provide a more complete settings editor then nightscout provided ...
  • Loading branch information
scrappy authored Jun 9, 2024
1 parent 191e2b1 commit 86e2adf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions FreeAPS/Sources/Modules/Sharing/View/SharingRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ extension Sharing {

Section {}
footer: {
Text("https://open-iaps.app/statistics")
.frame(maxWidth: .infinity, alignment: .center)
let statisticsLink = URL(string: "https://open-iaps.app/user/" + state.identfier)!

Button("View Personal Statistics") {
UIApplication.shared.open(statisticsLink, options: [:], completionHandler: nil)
}
.frame(maxWidth: .infinity, alignment: .center)
.font(.system(size: 15))
}
}
.dynamicTypeSize(...DynamicTypeSize.xxLarge)
Expand Down

0 comments on commit 86e2adf

Please sign in to comment.