Update LibAC version, add two new portfolio entries.
This commit is contained in:
parent
043b06dedc
commit
6c066564b9
8 changed files with 45 additions and 29 deletions
|
@ -1,7 +1,7 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:libac_flutter/utils/Hashing.dart';
|
||||
import 'package:libac_flutter/utils/uuid/UUID.dart';
|
||||
import 'package:libac_dart/utils/Hashing.dart';
|
||||
import 'package:libac_dart/utils/uuid/UUID.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/pages/OpenSim.dart';
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:libac_flutter/nbt/NbtUtils.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_flutter/utils/Hashing.dart';
|
||||
import 'package:libac_dart/nbt/NbtUtils.dart';
|
||||
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_dart/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_dart/utils/Hashing.dart';
|
||||
import 'package:zontreck/Packets.dart';
|
||||
import 'package:zontreck/pages/OpenSim.dart';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:libac_flutter/nbt/NbtIo.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_flutter/utils/Hashing.dart';
|
||||
import 'package:libac_dart/nbt/NbtIo.dart';
|
||||
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_dart/utils/Hashing.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/Packets.dart';
|
||||
|
|
|
@ -3,12 +3,12 @@ import 'dart:convert';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:footer/footer.dart';
|
||||
import 'package:footer/footer_view.dart';
|
||||
import 'package:libac_flutter/nbt/NbtIo.dart';
|
||||
import 'package:libac_flutter/nbt/NbtUtils.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/IntTag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_flutter/utils/uuid/UUID.dart';
|
||||
import 'package:libac_dart/nbt/NbtIo.dart';
|
||||
import 'package:libac_dart/nbt/NbtUtils.dart';
|
||||
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_dart/nbt/impl/IntTag.dart';
|
||||
import 'package:libac_dart/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_dart/utils/uuid/UUID.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/Packets.dart';
|
||||
|
@ -58,26 +58,26 @@ class User {
|
|||
|
||||
CompoundTag save() {
|
||||
CompoundTag tag = CompoundTag();
|
||||
NbtUtils.writeUUID(tag, "id", ID);
|
||||
tag.put("id", StringTag.valueOf(ID.toString()));
|
||||
tag.put("first", StringTag.valueOf(FirstName));
|
||||
tag.put("last", StringTag.valueOf(LastName));
|
||||
tag.put("rez", IntTag.valueOf(createdAt));
|
||||
tag.put("title", StringTag.valueOf(userTitle));
|
||||
NbtUtils.writeBoolean(tag, "active", active);
|
||||
NbtUtils.writeUUID(tag, "token", loginToken);
|
||||
tag.put("token", StringTag.valueOf(loginToken.toString()));
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
static User load(CompoundTag tag) {
|
||||
return User(
|
||||
ID: NbtUtils.readUUID(tag, "id"),
|
||||
ID: UUID.parse(tag.get("id")!.asString()),
|
||||
FirstName: tag.get("first")!.asString(),
|
||||
LastName: tag.get("last")!.asString(),
|
||||
createdAt: tag.get("rez")!.asInt(),
|
||||
userTitle: tag.get("title")!.asString(),
|
||||
active: NbtUtils.readBoolean(tag, "active"),
|
||||
loginToken: NbtUtils.readUUID(tag, "token"));
|
||||
loginToken: UUID.parse(tag.get("token")!.asString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
if (prefs.containsKey("settings")) {
|
||||
String encoded = prefs.getString("settings")!;
|
||||
CompoundTag tag = await NbtIo.readBase64String(encoded);
|
||||
if (tag.contains("user")) {
|
||||
if (tag.containsKey("user")) {
|
||||
settings.currentUser = User.load(tag.get("user") as CompoundTag);
|
||||
settings.loggedIn = true;
|
||||
}
|
||||
|
@ -256,7 +256,8 @@ class OpenSimPageState extends State<OpenSimPage> {
|
|||
context, "/opensim/register");
|
||||
didChangeDependencies();
|
||||
},
|
||||
child: const Text("Register Account"))
|
||||
child:
|
||||
const Text("Register Account"))
|
||||
],
|
||||
))
|
||||
],
|
||||
|
|
|
@ -26,7 +26,8 @@ class PortfolioPage extends StatelessWidget {
|
|||
child: Row(
|
||||
children: [
|
||||
PortfolioEntry(
|
||||
title: const ListTile(title: Text("Cards of Utter Nonsense")),
|
||||
title: const ListTile(
|
||||
title: Text("Cards of Utter Nonsense")),
|
||||
body: const Text(
|
||||
"A product I created for Second Life, but may port to the mobile phone at some point"),
|
||||
onTap: () {
|
||||
|
@ -42,6 +43,16 @@ class PortfolioPage extends StatelessWidget {
|
|||
title: const Text("Minecraft Modding"),
|
||||
body: const Text(
|
||||
"These mods are all written in Java. The various mods I currently maintain, previously maintained, or have contributed to are: Thresholds, Aria's Essentials, LibZontreck, Let's Do Beachparty, WatchMyDurability"),
|
||||
onTap: () {}),
|
||||
PortfolioEntry(
|
||||
title: const Text("Lib AC"),
|
||||
body: const Text(
|
||||
("Aria's Creations CommonCode Library. Oh hey, this website uses that! This is written in pure Dart, with no Flutter dependencies. The library is meant to be compatible with any dart project I work on")),
|
||||
onTap: () {}),
|
||||
PortfolioEntry(
|
||||
title: const Text("NBT Editor"),
|
||||
body: const Text(
|
||||
"This utilizes the NBT implementation in LibAC. It's a Named Binary Tag editor written entirely in dart or flutter."),
|
||||
onTap: () {})
|
||||
],
|
||||
),
|
||||
|
@ -57,7 +68,10 @@ class PortfolioEntry extends StatelessWidget {
|
|||
final Function() onTap;
|
||||
|
||||
const PortfolioEntry(
|
||||
{super.key, required this.title, required this.body, required this.onTap});
|
||||
{super.key,
|
||||
required this.title,
|
||||
required this.body,
|
||||
required this.onTap});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:footer/footer.dart';
|
||||
import 'package:footer/footer_view.dart';
|
||||
import 'package:libac_flutter/utils/Hashing.dart';
|
||||
import 'package:libac_dart/utils/Hashing.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/Packets.dart';
|
||||
import 'package:zontreck/Settings.dart';
|
||||
|
@ -98,7 +98,8 @@ class RegisterAccountState extends State<RegisterAccountPage> {
|
|||
children: [
|
||||
settings.hasNoUsers
|
||||
? ListTile(
|
||||
title: const Text("There are no users on this grid."),
|
||||
title: const Text(
|
||||
"There are no users on this grid."),
|
||||
tileColor: Constants.TITLEBAR_COLOR,
|
||||
subtitle: Text(
|
||||
"This account will be granted Level 240, and the User Title : ${UserTitles.OPERATOR.title}"),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:libac_flutter/utils/uuid/UUID.dart';
|
||||
import 'package:libac_dart/utils/uuid/UUID.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/Packets.dart';
|
||||
import 'package:zontreck/Settings.dart';
|
||||
|
|
|
@ -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+1
|
||||
version: 1.1.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=3.3.4 <4.0.0'
|
||||
|
@ -35,9 +35,9 @@ dependencies:
|
|||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.6
|
||||
libac_flutter:
|
||||
libac_dart:
|
||||
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
|
||||
version: 1.0.5
|
||||
version: 1.0.33
|
||||
dio: ^5.4.3+1
|
||||
shared_preferences: ^2.2.3
|
||||
footer: ^0.0.4
|
||||
|
|
Loading…
Reference in a new issue