Adds a logout button and script
This commit is contained in:
parent
0982ffb504
commit
a4ec368d4a
5 changed files with 33 additions and 21 deletions
|
@ -8,7 +8,7 @@ class Constants {
|
|||
static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97);
|
||||
static const PORTFOLIO_CARD_COLOR = Color.fromARGB(255, 0, 71, 97);
|
||||
|
||||
static const VERSION = "Version 1.0.051624.0201";
|
||||
static const VERSION = "Version 1.0.051624.0352";
|
||||
static const COPYRIGHT = "Copyright 2024 - Tara Piccari. All rights Reserved";
|
||||
static const CLIENTPSK =
|
||||
"f5c6caf3efe1ec5aa4b7c572f92aa14782b7be34b4c7844fa9c6d47fdf94246";
|
||||
|
|
|
@ -11,6 +11,7 @@ enum APIEndpoint {
|
|||
Ping(script: "Ping.php", path: "/ac/home/supports/"),
|
||||
Setup(script: "Setup.php", path: "/ac/home/supports/"),
|
||||
Register(script: "Register.php", path: "/ac/home/supports/"),
|
||||
Logout(script: "Logout.php", path: "/ac/home/supports/"),
|
||||
Login(script: "Login.php", path: "/ac/home/supports/");
|
||||
|
||||
final String script;
|
||||
|
|
|
@ -113,12 +113,24 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(settings.loggedIn
|
||||
? "Welcome, ${settings.displayName}"
|
||||
: "You are not currently logged in"),
|
||||
title: Text(
|
||||
settings.loggedIn
|
||||
? "Welcome, ${settings.displayName}"
|
||||
: "You are not currently logged in",
|
||||
),
|
||||
),
|
||||
settings.loggedIn
|
||||
? SizedBox()
|
||||
? Column(
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
settings.loggedIn = false;
|
||||
await settings.sendPacketToEndpoint(
|
||||
APIEndpoint.Logout, NullPacket());
|
||||
},
|
||||
child: Text("LOGOUT"))
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Row(
|
||||
children: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue