diff --git a/Dockerfile b/Dockerfile index 323b938..0e18055 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,6 @@ RUN chown -R bugvault:bugvault /data USER bugvault:bugvault ENV HOME=/data +VOLUME [ "/data" ] + ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index 8fcd37e..d055b8c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Open Source GPL3 bug tracker. This bug tracker prioritizes ease of use. +**NOTE**: Bug Vault is hardcoded to interact with the instance of `bugvaultd` running at `localhost:7400`. If you want to change this, you will need to change the `host` and `port` values located in `lib/dart/bugvault.dart`. + # Compilation ## Linux diff --git a/lib/Constants.dart b/lib/Constants.dart index 5d69932..15167db 100644 --- a/lib/Constants.dart +++ b/lib/Constants.dart @@ -1,4 +1,4 @@ class Constants { - static const VERSION = "1.0.031525+0227"; + static const VERSION = "1.0.062525+2043"; static const APP_NAME = "BugVault"; } diff --git a/lib/dart/bugvault.dart b/lib/dart/bugvault.dart new file mode 100644 index 0000000..a783997 --- /dev/null +++ b/lib/dart/bugvault.dart @@ -0,0 +1,4 @@ +class ServerCommunicatorConstants { + static const String host = "localhost"; + static const int port = 7400; +} diff --git a/lib/flutter/BugVaultMain.dart b/lib/flutter/BugVaultMain.dart index 02c67e1..3d89825 100644 --- a/lib/flutter/BugVaultMain.dart +++ b/lib/flutter/BugVaultMain.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:bugvault/FlutterConstants.dart'; import 'package:bugvault/SessionData.dart'; +import 'package:bugvault/dart/bugvault.dart'; import 'package:flutter/material.dart'; import 'package:libac_dart/nbt/NbtIo.dart'; import 'package:libac_dart/nbt/impl/CompoundTag.dart'; @@ -56,9 +57,11 @@ class BugVaultLoadPageState extends State { TextEditingController USERNAME_CONTROLLER = TextEditingController(); TextEditingController URL_CONTROLLER = TextEditingController( - text: "bugs.zontreck.com", + text: "${ServerCommunicatorConstants.host}", + ); + TextEditingController PORT_CONTROLLER = TextEditingController( + text: "${ServerCommunicatorConstants.port}", ); - TextEditingController PORT_CONTROLLER = TextEditingController(text: "8372"); @override void didChangeDependencies() { diff --git a/lib/server/main.dart b/lib/server/main.dart index 684e51e..0a7067c 100644 --- a/lib/server/main.dart +++ b/lib/server/main.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:bugvault/dart/bugvault.dart'; import 'package:bugvault/server/packets.dart'; import 'package:bugvault/users/User.dart'; import 'package:libac_dart/nbt/NbtIo.dart'; @@ -9,12 +10,11 @@ import 'package:libac_dart/nbt/impl/ListTag.dart'; import 'package:libac_dart/packets/packets.dart'; class BugVaultServer { - static int g_iPortNumber = 8372; + static int get g_iPortNumber => ServerCommunicatorConstants.port; static bool g_bAllowAnonymousLogin = true; static List UserDB = List.empty(); static Future InstantiateSettings(CompoundTag ct) async { - g_iPortNumber = ct.get("port")?.asInt() ?? 8372; if (ct.containsKey("anonymous")) { g_bAllowAnonymousLogin = NbtUtils.readBoolean(ct, "anonymous"); } diff --git a/pubspec.yaml b/pubspec.yaml index 3b87209..998e900 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: bugvault -description: "A new Flutter project." +description: "The Aria's Creations Bug Tracker" # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: "none" # Remove this line if you wish to publish to pub.dev @@ -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.031525+0227 +version: 1.0.062525+2043 environment: sdk: ^3.7.0 @@ -36,10 +36,10 @@ dependencies: cupertino_icons: ^1.0.8 libacflutter: hosted: https://git.zontreck.com/api/packages/Packages/pub/ - version: 1.0.031525+0222 + version: 1.0.052725+1354 libac_dart: hosted: https://git.zontreck.com/api/packages/Packages/pub/ - version: 1.4.20325+1215 + version: 1.4.052725+1339 base32: ^2.1.3 totp: ^0.1.0 hotp: ^0.1.0 @@ -54,7 +54,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec