From 4d38bfbb4fb38155ab894a65119c45ac3bd70d23 Mon Sep 17 00:00:00 2001 From: ComputerElite <71177995+ComputerElite@users.noreply.github.com> Date: Thu, 30 Jan 2025 22:30:30 +0100 Subject: [PATCH] add info about share links, add register button --- lib/screens/share_links.dart | 17 ++++++++++++++++- lib/screens/tokens.dart | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/screens/share_links.dart b/lib/screens/share_links.dart index 8073505..2554f31 100644 --- a/lib/screens/share_links.dart +++ b/lib/screens/share_links.dart @@ -179,8 +179,23 @@ class ShareLinksScreenState extends State { 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, diff --git a/lib/screens/tokens.dart b/lib/screens/tokens.dart index 242b6ac..28352db 100644 --- a/lib/screens/tokens.dart +++ b/lib/screens/tokens.dart @@ -95,6 +95,9 @@ class TokenScreenState extends State { }, 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")); @@ -167,6 +170,9 @@ class TokenScreenState extends State { }, 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"));