Skip to content

Commit

Permalink
add info about share links, add register button
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputerElite committed Jan 30, 2025
1 parent a28ddd5 commit 4d38bfb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/screens/share_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,23 @@ class ShareLinksScreenState extends State<ShareLinksScreen> {
if(shareEntries.isEmpty) {
shareEntries.add(Center(child: Text("No share links created yet",
style: t.textTheme.headlineSmall)));

}
return initialLoading
shareEntries.insert(0, IconButton(onPressed: () {
showDialog(context: context, builder: (context) {
return AlertDialog(
title: Text("What are share links?"),
content: Text("Share links are a way to share your shockers with people who do not have an OpenShock account and don't want to create one (or for giving a group access to your shockers). Share links have limits just like normal shares. However people can just use any name they want to access the share link. Their actions will also be shown in the shockers log."),
actions: [
TextButton(onPressed: () {
Navigator.of(context).pop();
}, child: Text("Ok"))
],
);
});
}, icon: Icon(Icons.info)));
return
initialLoading
? Center(child: CircularProgressIndicator())
: DesktopMobileRefreshIndicator(
onRefresh: loadShares,
Expand Down
6 changes: 6 additions & 0 deletions lib/screens/tokens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class TokenScreenState extends State<TokenScreen> {
},
child: Text("Cancel")
),
TextButton(child: Text("Register"), onPressed: () {
launchUrl(Uri.parse("https://openshock.app/#/account/signup"));
},),
TextButton(
onPressed: () async {
showDialog(context: context, builder: (context) => LoadingDialog(title: "Logging in"));
Expand Down Expand Up @@ -167,6 +170,9 @@ class TokenScreenState extends State<TokenScreen> {
},
child: Text("Cancel")
),
TextButton(child: Text("Register"), onPressed: () {
launchUrl(Uri.parse("https://openshock.app/#/account/signup"));
},),
TextButton(
onPressed: () async {
showDialog(context: context, builder: (context) => LoadingDialog(title: "Logging in"));
Expand Down

0 comments on commit 4d38bfb

Please sign in to comment.