Release 9.2.3

This commit is contained in:
Alessandro Autiero
2024-07-10 15:11:49 +02:00
parent a2505011d9
commit cd8c8e6dd9
11 changed files with 114 additions and 63 deletions

View File

@@ -41,8 +41,7 @@ class GameController extends GetxController {
password = TextEditingController(text: _storage?.read("password") ?? "");
password.addListener(() => _storage?.write("password", password.text));
customLaunchArgs = TextEditingController(text: _storage?.read("custom_launch_args") ?? "");
customLaunchArgs.addListener(() =>
_storage?.write("custom_launch_args", customLaunchArgs.text));
customLaunchArgs.addListener(() => _storage?.write("custom_launch_args", customLaunchArgs.text));
started = RxBool(false);
instance = Rxn();
consoleKey = Rx(_readConsoleKey());

View File

@@ -28,6 +28,7 @@ class HostingController extends GetxController {
late final RxBool published;
late final Rxn<GameInstance> instance;
late final Rxn<Set<FortniteServer>> servers;
late final TextEditingController customLaunchArgs;
late final Semaphore _semaphore;
HostingController() {
@@ -62,6 +63,8 @@ class HostingController extends GetxController {
servers.value = event;
published.value = event.any((element) => element.id == uuid);
});
customLaunchArgs = TextEditingController(text: _storage?.read("custom_launch_args") ?? "");
customLaunchArgs.addListener(() => _storage?.write("custom_launch_args", customLaunchArgs.text));
_semaphore = Semaphore();
}

View File

@@ -1,3 +1,4 @@
import 'package:email_validator/email_validator.dart';
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/material.dart' show Icons;
import 'package:get/get.dart';
@@ -23,6 +24,17 @@ Future<bool> showProfileForm(BuildContext context) async{
label: translations.usernameOrEmail,
child: TextFormBox(
placeholder: translations.usernameOrEmailPlaceholder,
validator: (text) {
if(_gameController.password.text.isEmpty) {
return null;
}
if(EmailValidator.validate(_gameController.username.text)) {
return null;
}
return translations.invalidEmail;
},
controller: _gameController.username,
autovalidateMode: AutovalidateMode.always,
enableSuggestions: true,

View File

@@ -199,6 +199,17 @@ class _HostingPageState extends RebootPageState<HostPage> {
title: Text(translations.settingsServerOptionsName),
subtitle: Text(translations.settingsServerOptionsSubtitle),
children: [
SettingTile(
icon: Icon(
FluentIcons.options_24_regular
),
title: Text(translations.settingsClientArgsName),
subtitle: Text(translations.settingsClientArgsDescription),
content: TextFormBox(
placeholder: translations.settingsClientArgsPlaceholder,
controller: _hostingController.customLaunchArgs,
)
),
SettingTile(
icon: Icon(
FluentIcons.window_console_20_regular
@@ -253,7 +264,7 @@ class _HostingPageState extends RebootPageState<HostPage> {
FilteringTextInputFormatter.digitsOnly
]
)
),
)
],
);

View File

@@ -251,7 +251,7 @@ class _LaunchButtonState extends State<LaunchButton> {
host,
hostType,
false,
""
host ? _hostingController.customLaunchArgs.text : _gameController.customLaunchArgs.text
);
log("[${host ? 'HOST' : 'GAME'}] Generated game args: ${gameArgs.join(" ")}");
final gameProcess = await startProcess(