Move site Build number to footer

This commit is contained in:
zontreck 2024-05-15 13:54:44 -07:00
parent 72c525f364
commit d47906e10f
4 changed files with 111 additions and 93 deletions

View file

@ -7,6 +7,9 @@ class Constants {
static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0);
static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97);
static const VERSION = "1.0.051524.1345";
static const COPYRIGHT = "Copyright 2024 - Tara Piccari. All rights Reserved";
static const SERVICES_JSON =
"https://raw.githubusercontent.com/AriasCreations/AriasCreations/main/services.json";

View file

@ -1,4 +1,6 @@
import 'package:flutter/material.dart';
import 'package:footer/footer.dart';
import 'package:footer/footer_view.dart';
import 'package:zontreck/Constants.dart';
import 'package:zontreck/pages/OpenSim.dart';
@ -30,25 +32,27 @@ class HomePageState extends State<HomePage> {
backgroundColor: Constants.TITLEBAR_COLOR,
title: Text("Zontreck.com"),
),
body: Column(
body: FooterView(
children: [
Center(
child: ListTile(
Column(
children: [
Center(
child: ListTile(
title: Text(
"Zontreck.com is owned by, and operated by, Tara Piccari")),
),
ListTile(
title: Text(
"Zontreck.com is owned by, and operated by, Tara Piccari")),
"This site acts as both my portfolio, and as a portal to various different parts of my server"),
),
Text("Thank you for visiting"),
],
),
ListTile(
title: Text(
"This site acts as both my portfolio, and as a portal to various different parts of my server"),
),
Text("Thank you for visiting"),
SizedBox(
height: 80,
),
ListTile(
title: Text("Site build: 1.0.051524.0338"),
)
],
footer: Footer(
alignment: Alignment.center,
child: Text("${Constants.COPYRIGHT}\n${Constants.VERSION}"),
backgroundColor: ThemeData.dark().focusColor),
),
drawer: Drawer(
elevation: 8,

View file

@ -1,6 +1,8 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:footer/footer.dart';
import 'package:footer/footer_view.dart';
import 'package:zontreck/Constants.dart';
import 'package:zontreck/Settings.dart';
@ -38,84 +40,92 @@ class OpenSimPageState extends State<OpenSimPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Constants.TITLEBAR_COLOR,
title: Text("Zontreck.com - OpenSim Manager"),
),
body: Padding(
padding: EdgeInsets.all(8),
child: SingleChildScrollView(
child: settings.OpenSimSetupCompleted
? Column(
children: [],
)
: Column(
children: [
ListTile(
title: Text("Initial Setup Required"),
tileColor: Constants.TITLEBAR_COLOR,
),
ListTile(
title: Text("Database Host"),
subtitle: TextField(
controller: databaseHostController,
decoration:
InputDecoration(hintText: "example.com:3306"),
),
),
ListTile(
title: Text("Database Username"),
subtitle: TextField(
controller: databaseUsernameController,
decoration: InputDecoration(hintText: "Username"),
),
),
ListTile(
title: Text("Database Password"),
subtitle: TextField(
decoration:
InputDecoration(hintText: "****", hintMaxLines: 1),
obscureText: true,
obscuringCharacter: "*",
controller: databasePasswordController,
),
),
ListTile(
title: Text("Database Name"),
subtitle: TextField(
decoration:
InputDecoration(hintText: "acwi", hintMaxLines: 1),
controller: databaseNameController,
),
),
ListTile(
title: Text("PreShared Secret"),
subtitle: TextField(
controller: PSKController,
decoration: InputDecoration(
hintText:
"Pre-Shared Key. Long text that gets hashed"),
),
),
ListTile(
title: Text("PSK: ${PSKHash}"),
subtitle: Text("Client: ${clientPSK}"),
),
ElevatedButton(
onPressed: () async {
var PSK = await settings.hashPSK(PSKController.text);
clientPSK = await settings.createClientPSK(PSK);
setState(() {
PSKHash = PSK;
});
},
child: Text("Submit"))
],
),
appBar: AppBar(
backgroundColor: Constants.TITLEBAR_COLOR,
title: Text("Zontreck.com - OpenSim Manager"),
),
),
);
body: FooterView(
footer: Footer(
alignment: Alignment.center,
child: Text("${Constants.COPYRIGHT}\n${Constants.VERSION}"),
backgroundColor: ThemeData.dark().focusColor),
children: [
Padding(
padding: EdgeInsets.all(8),
child: SingleChildScrollView(
child: settings.OpenSimSetupCompleted
? Column(
children: [],
)
: Column(
children: [
ListTile(
title: Text("Initial Setup Required"),
tileColor: Constants.TITLEBAR_COLOR,
),
ListTile(
title: Text("Database Host"),
subtitle: TextField(
controller: databaseHostController,
decoration:
InputDecoration(hintText: "example.com:3306"),
),
),
ListTile(
title: Text("Database Username"),
subtitle: TextField(
controller: databaseUsernameController,
decoration: InputDecoration(hintText: "Username"),
),
),
ListTile(
title: Text("Database Password"),
subtitle: TextField(
decoration: InputDecoration(
hintText: "****", hintMaxLines: 1),
obscureText: true,
obscuringCharacter: "*",
controller: databasePasswordController,
),
),
ListTile(
title: Text("Database Name"),
subtitle: TextField(
decoration: InputDecoration(
hintText: "acwi", hintMaxLines: 1),
controller: databaseNameController,
),
),
ListTile(
title: Text("PreShared Secret"),
subtitle: TextField(
controller: PSKController,
decoration: InputDecoration(
hintText:
"Pre-Shared Key. Long text that gets hashed"),
),
),
ListTile(
title: Text("PSK: ${PSKHash}"),
subtitle: Text("Client: ${clientPSK}"),
),
ElevatedButton(
onPressed: () async {
var PSK =
await settings.hashPSK(PSKController.text);
clientPSK = await settings.createClientPSK(PSK);
setState(() {
PSKHash = PSK;
});
},
child: Text("Submit"))
],
),
),
),
],
));
}
}

View file

@ -40,6 +40,7 @@ dependencies:
version: 1.0.2
dio: ^5.4.3+1
shared_preferences: ^2.2.3
footer: ^0.0.4
dev_dependencies:
flutter_test: