From f04ad028aee78d05163b6cc29a8e559c6a8ed2e2 Mon Sep 17 00:00:00 2001 From: zontreck Date: Wed, 15 May 2024 04:17:50 -0700 Subject: [PATCH] Adds some various php files --- lib/Settings.dart | 23 +++++++++++++ lib/pages/OpenSim.dart | 8 +++++ macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ php/Common.php | 32 +++++++++++++++++++ php/Database.php | 8 +++++ php/Login.php | 16 ++++++++++ php/README.md | 4 +++ php/SetupCheck.php | 17 ++++++++++ pubspec.yaml | 2 ++ 9 files changed, 112 insertions(+) create mode 100644 lib/Settings.dart create mode 100644 php/Common.php create mode 100644 php/Database.php create mode 100644 php/Login.php create mode 100644 php/README.md create mode 100644 php/SetupCheck.php diff --git a/lib/Settings.dart b/lib/Settings.dart new file mode 100644 index 0000000..576fcc6 --- /dev/null +++ b/lib/Settings.dart @@ -0,0 +1,23 @@ +import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; + +class Settings { + static Settings? _inst = null; + Settings._() {} + + factory Settings() { + if (Settings._inst != null) + return Settings._inst!; + else { + Settings._inst = Settings._(); + return Settings._inst!; + } + } + + static void Load(CompoundTag tag) {} + + static CompoundTag save() { + CompoundTag tag = CompoundTag(); + + return tag; + } +} diff --git a/lib/pages/OpenSim.dart b/lib/pages/OpenSim.dart index a232145..1ce4474 100644 --- a/lib/pages/OpenSim.dart +++ b/lib/pages/OpenSim.dart @@ -16,6 +16,14 @@ class OpenSimPageState extends State { backgroundColor: Constants.TITLEBAR_COLOR, title: Text("Zontreck.com - OpenSim Manager"), ), + body: Padding( + padding: EdgeInsets.all(8), + child: SingleChildScrollView( + child: Column( + children: [], + ), + ), + ), ); } } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..724bb2a 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,8 @@ import FlutterMacOS import Foundation +import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/php/Common.php b/php/Common.php new file mode 100644 index 0000000..954fa3d --- /dev/null +++ b/php/Common.php @@ -0,0 +1,32 @@ +"; + + file_put_contents("Database.php", $ptl); +} + +require("Database.php"); + +session_start(); +?> \ No newline at end of file diff --git a/php/Database.php b/php/Database.php new file mode 100644 index 0000000..cddb380 --- /dev/null +++ b/php/Database.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/php/Login.php b/php/Login.php new file mode 100644 index 0000000..5a3e2fe --- /dev/null +++ b/php/Login.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/php/README.md b/php/README.md new file mode 100644 index 0000000..c69cd4c --- /dev/null +++ b/php/README.md @@ -0,0 +1,4 @@ +About +====== + +These files get copied to the API subdomain by default. This setup is intended to permit for multiple hosts. \ No newline at end of file diff --git a/php/SetupCheck.php b/php/SetupCheck.php new file mode 100644 index 0000000..68460ce --- /dev/null +++ b/php/SetupCheck.php @@ -0,0 +1,17 @@ + false + ); + header("X-Zontreck-Setup-Completed", "FALSE"); + die(json_encode($ret)); +}else { + $ret = array ( + "done" => true + ); + header("X-Zontreck-Setup-Completed", "TRUE"); + die(json_encode($ret)); +} + +?> \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 44657f0..de3d1f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,8 @@ dependencies: libac_flutter: hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/ version: 1.0.1 + dio: ^5.4.3+1 + shared_preferences: ^2.2.3 dev_dependencies: flutter_test: