From 37e56888425db6b4743b79805aabc24670de26aa Mon Sep 17 00:00:00 2001 From: zontreck Date: Fri, 16 May 2025 02:21:25 -0700 Subject: [PATCH] Add ability to tap to copy the session ID --- latest-releases.json | 2 +- lib/consts.dart | 2 +- lib/pages/HomePage.dart | 12 +++++++++--- pubspec.yaml | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/latest-releases.json b/latest-releases.json index db193d0..59e46f8 100644 --- a/latest-releases.json +++ b/latest-releases.json @@ -1,4 +1,4 @@ { "alpha": "1.0.0-dev.10", - "beta": "1.0.0-beta.1" + "beta": "1.0.0-beta.2" } diff --git a/lib/consts.dart b/lib/consts.dart index f3b09c9..51df1d6 100644 --- a/lib/consts.dart +++ b/lib/consts.dart @@ -9,7 +9,7 @@ class TTConsts { static get SESSION_SERVER => "https://api.zontreck.com/timetrack/${UPDATE_CHANNEL}/timetrack.php"; - static const VERSION = "1.0.0-beta.1"; + static const VERSION = "1.0.0-beta.2"; static bool UPDATE_AVAILABLE = false; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.alpha; diff --git a/lib/pages/HomePage.dart b/lib/pages/HomePage.dart index c1b8e18..9d9b7b9 100644 --- a/lib/pages/HomePage.dart +++ b/lib/pages/HomePage.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:libacflutter/Constants.dart'; import 'package:libacflutter/Prompt.dart'; import 'package:timetrack/consts.dart'; @@ -119,9 +120,14 @@ class _HomePageState extends State { ), if (SessionData.LastSessionID.isNotEmpty) - Text( - "Session ID Code: ${SessionData.LastSessionID}", - style: TextStyle(fontSize: 18), + ListTile( + title: Text("Session ID"), + subtitle: Text("${SessionData.LastSessionID} - Tap to copy"), + onTap: () { + Clipboard.setData( + ClipboardData(text: SessionData.LastSessionID), + ); + }, ), if (!SessionData.IsOnTheClock) Center( diff --git a/pubspec.yaml b/pubspec.yaml index b42f1a3..0781771 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 # 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. -version: 1.0.0-beta.1 +version: 1.0.0-beta.2 environment: sdk: ^3.7.2