Adjust the clipboard copy function to generate a link to the web viewer.

This commit is contained in:
zontreck 2025-05-17 02:55:31 -07:00
parent de6d767a38
commit 199a3585d7
3 changed files with 8 additions and 4 deletions

View file

@ -9,7 +9,7 @@ class TTConsts {
static get SESSION_SERVER => static get SESSION_SERVER =>
"https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php"; "https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php";
static const VERSION = "1.0.0-beta.7"; static const VERSION = "1.0.0-beta.8";
static bool UPDATE_AVAILABLE = false; static bool UPDATE_AVAILABLE = false;
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;

View file

@ -90,6 +90,7 @@ class _HomePageState extends State<HomePage> {
setState(() {}); setState(() {});
}, },
), ),
/*
ListTile( ListTile(
title: Text("RESET APP SESSION"), title: Text("RESET APP SESSION"),
onTap: () async { onTap: () async {
@ -104,7 +105,7 @@ class _HomePageState extends State<HomePage> {
SessionData.positions = []; SessionData.positions = [];
}); });
}, },
), ),*/
], ],
), ),
), ),
@ -124,7 +125,10 @@ class _HomePageState extends State<HomePage> {
subtitle: Text("${SessionData.LastSessionID} - Tap to copy"), subtitle: Text("${SessionData.LastSessionID} - Tap to copy"),
onTap: () { onTap: () {
Clipboard.setData( Clipboard.setData(
ClipboardData(text: SessionData.LastSessionID), ClipboardData(
text:
"https://timetrack.zontreck.com/?code=${SessionData.LastSessionID}",
),
); );
}, },
), ),

View file

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.0-beta.7 version: 1.0.0-beta.8
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2