mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
9.0.4
This commit is contained in:
@@ -1,164 +0,0 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluentUi show FluentIcons;
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/src/controller/authenticator_controller.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/server_start_button.dart';
|
||||
import 'package:reboot_launcher/src/widget/server_type_selector.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../dialog/implementation/data.dart';
|
||||
|
||||
class AuthenticatorPage extends RebootPage {
|
||||
const AuthenticatorPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
String get name => translations.authenticatorName;
|
||||
|
||||
@override
|
||||
String get iconAsset => "assets/images/authenticator.png";
|
||||
|
||||
@override
|
||||
RebootPageType get type => RebootPageType.authenticator;
|
||||
|
||||
@override
|
||||
bool hasButton(String? pageName) => pageName == null;
|
||||
|
||||
@override
|
||||
RebootPageState<AuthenticatorPage> createState() => _AuthenticatorPageState();
|
||||
}
|
||||
|
||||
class _AuthenticatorPageState extends RebootPageState<AuthenticatorPage> {
|
||||
final AuthenticatorController _authenticatorController = Get.find<AuthenticatorController>();
|
||||
|
||||
@override
|
||||
List<Widget> get settings => [
|
||||
_type,
|
||||
_hostName,
|
||||
_port,
|
||||
_detached,
|
||||
_installationDirectory,
|
||||
_resetDefaults
|
||||
];
|
||||
|
||||
Widget get _hostName => Obx(() {
|
||||
if(_authenticatorController.type.value != ServerType.remote) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.globe_24_regular
|
||||
),
|
||||
title: Text(translations.authenticatorConfigurationHostName),
|
||||
subtitle: Text(translations.authenticatorConfigurationHostDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.authenticatorConfigurationHostName,
|
||||
controller: _authenticatorController.host
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _port => Obx(() {
|
||||
if(_authenticatorController.type.value == ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
fluentUi.FluentIcons.number_field
|
||||
),
|
||||
title: Text(translations.authenticatorConfigurationPortName),
|
||||
subtitle: Text(translations.authenticatorConfigurationPortDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.authenticatorConfigurationPortName,
|
||||
controller: _authenticatorController.port,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly
|
||||
]
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _detached => Obx(() {
|
||||
if(_authenticatorController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.developer_board_24_regular
|
||||
),
|
||||
title: Text(translations.authenticatorConfigurationDetachedName),
|
||||
subtitle: Text(translations.authenticatorConfigurationDetachedDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_authenticatorController.detached.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _authenticatorController.detached(),
|
||||
onChanged: (value) => _authenticatorController.detached.value = value
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
SettingTile get _resetDefaults => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.arrow_reset_24_regular
|
||||
),
|
||||
title: Text(translations.authenticatorResetDefaultsName),
|
||||
subtitle: Text(translations.authenticatorResetDefaultsDescription),
|
||||
content: Button(
|
||||
onPressed: () => showResetDialog(_authenticatorController.reset),
|
||||
child: Text(translations.authenticatorResetDefaultsContent),
|
||||
)
|
||||
);
|
||||
|
||||
Widget get _installationDirectory => Obx(() {
|
||||
if(_authenticatorController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.folder_24_regular
|
||||
),
|
||||
title: Text(translations.authenticatorInstallationDirectoryName),
|
||||
subtitle: Text(translations.authenticatorInstallationDirectoryDescription),
|
||||
content: Button(
|
||||
onPressed: () => launchUrl(authenticatorDirectory.uri),
|
||||
child: Text(translations.authenticatorInstallationDirectoryContent)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _type => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.password_24_regular
|
||||
),
|
||||
title: Text(translations.authenticatorTypeName),
|
||||
subtitle: Text(translations.authenticatorTypeDescription),
|
||||
content: const ServerTypeSelector(
|
||||
authenticator: true
|
||||
)
|
||||
);
|
||||
|
||||
@override
|
||||
Widget get button => const ServerButton(
|
||||
authenticator: true
|
||||
);
|
||||
}
|
||||
214
gui/lib/src/page/implementation/backend_page.dart
Normal file
214
gui/lib/src/page/implementation/backend_page.dart
Normal file
@@ -0,0 +1,214 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluentUi show FluentIcons;
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/src/controller/backend_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/game_controller.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/page/pages.dart';
|
||||
import 'package:reboot_launcher/src/util/keyboard.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/server_start_button.dart';
|
||||
import 'package:reboot_launcher/src/widget/server_type_selector.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../dialog/implementation/data.dart';
|
||||
|
||||
class BackendPage extends RebootPage {
|
||||
const BackendPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
String get name => translations.backendName;
|
||||
|
||||
@override
|
||||
String get iconAsset => "assets/images/backend.png";
|
||||
|
||||
@override
|
||||
RebootPageType get type => RebootPageType.backend;
|
||||
|
||||
@override
|
||||
bool hasButton(String? pageName) => pageName == null;
|
||||
|
||||
@override
|
||||
RebootPageState<BackendPage> createState() => _BackendPageState();
|
||||
}
|
||||
|
||||
class _BackendPageState extends RebootPageState<BackendPage> {
|
||||
final GameController _gameController = Get.find<GameController>();
|
||||
final BackendController _backendController = Get.find<BackendController>();
|
||||
|
||||
InfoBarEntry? _infoBarEntry;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
ServicesBinding.instance.keyboard.addHandler((keyEvent) {
|
||||
if(_infoBarEntry == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(keyEvent.physicalKey.isUnrealEngineKey) {
|
||||
_gameController.consoleKey.value = keyEvent.physicalKey;
|
||||
}
|
||||
|
||||
_infoBarEntry?.close();
|
||||
_infoBarEntry = null;
|
||||
return true;
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
List<Widget> get settings => [
|
||||
_type,
|
||||
_hostName,
|
||||
_port,
|
||||
_detached,
|
||||
_unrealEngineConsoleKey,
|
||||
_installationDirectory,
|
||||
_resetDefaults
|
||||
];
|
||||
|
||||
Widget get _hostName => Obx(() {
|
||||
if(_backendController.type.value != ServerType.remote) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.globe_24_regular
|
||||
),
|
||||
title: Text(translations.backendConfigurationHostName),
|
||||
subtitle: Text(translations.backendConfigurationHostDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.backendConfigurationHostName,
|
||||
controller: _backendController.host
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _port => Obx(() {
|
||||
if(_backendController.type.value == ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
fluentUi.FluentIcons.number_field
|
||||
),
|
||||
title: Text(translations.backendConfigurationPortName),
|
||||
subtitle: Text(translations.backendConfigurationPortDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.backendConfigurationPortName,
|
||||
controller: _backendController.port,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly
|
||||
]
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _detached => Obx(() {
|
||||
if(_backendController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.developer_board_24_regular
|
||||
),
|
||||
title: Text(translations.backendConfigurationDetachedName),
|
||||
subtitle: Text(translations.backendConfigurationDetachedDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_backendController.detached.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _backendController.detached(),
|
||||
onChanged: (value) => _backendController.detached.value = value
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _unrealEngineConsoleKey => Obx(() {
|
||||
if(_backendController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.key_24_regular
|
||||
),
|
||||
title: Text(translations.settingsClientConsoleKeyName),
|
||||
subtitle: Text(translations.settingsClientConsoleKeyDescription),
|
||||
contentWidth: null,
|
||||
content: Button(
|
||||
onPressed: () {
|
||||
_infoBarEntry = showInfoBar(
|
||||
translations.clickKey,
|
||||
loading: true
|
||||
);
|
||||
},
|
||||
child: Text(_gameController.consoleKey.value.unrealEnginePrettyName ?? ""),
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
SettingTile get _resetDefaults => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.arrow_reset_24_regular
|
||||
),
|
||||
title: Text(translations.backendResetDefaultsName),
|
||||
subtitle: Text(translations.backendResetDefaultsDescription),
|
||||
content: Button(
|
||||
onPressed: () => showResetDialog(_backendController.reset),
|
||||
child: Text(translations.backendResetDefaultsContent),
|
||||
)
|
||||
);
|
||||
|
||||
Widget get _installationDirectory => Obx(() {
|
||||
if(_backendController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.folder_24_regular
|
||||
),
|
||||
title: Text(translations.backendInstallationDirectoryName),
|
||||
subtitle: Text(translations.backendInstallationDirectoryDescription),
|
||||
content: Button(
|
||||
onPressed: () => launchUrl(backendDirectory.uri),
|
||||
child: Text(translations.backendInstallationDirectoryContent)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _type => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.password_24_regular
|
||||
),
|
||||
title: Text(translations.backendTypeName),
|
||||
subtitle: Text(translations.backendTypeDescription),
|
||||
content: const ServerTypeSelector(
|
||||
backend: true
|
||||
)
|
||||
);
|
||||
|
||||
@override
|
||||
Widget get button => const ServerButton(
|
||||
backend: true
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||
@@ -10,7 +11,6 @@ import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/src/controller/settings_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/update_controller.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/dialog.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart';
|
||||
import 'package:reboot_launcher/src/dialog/implementation/dll.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_suggestion.dart';
|
||||
@@ -18,6 +18,7 @@ import 'package:reboot_launcher/src/page/pages.dart';
|
||||
import 'package:reboot_launcher/src/util/dll.dart';
|
||||
import 'package:reboot_launcher/src/util/os.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/info_bar_area.dart';
|
||||
import 'package:reboot_launcher/src/widget/profile_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/title_bar.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
@@ -45,13 +46,6 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
|
||||
@override
|
||||
void initState() {
|
||||
windowManager.addListener(this);
|
||||
var lastValue = pageIndex.value;
|
||||
pageIndex.listen((value) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
restoreMessage(value, lastValue);
|
||||
lastValue = value;
|
||||
});
|
||||
});
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_updateController.update();
|
||||
watchDlls().listen((filePath) => showDllDeletedDialog(() {
|
||||
@@ -61,6 +55,11 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowClose() {
|
||||
exit(0); // Force closing
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_searchFocusNode.dispose();
|
||||
@@ -80,6 +79,46 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
|
||||
_focused.value = false;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowDocked() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowMaximize() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowMinimize() {
|
||||
_focused.value = false;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowResize() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowMove() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowRestore() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowUndocked() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowUnmaximize() {
|
||||
_focused.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
void onWindowResized() {
|
||||
_settingsController.saveWindowSize(appWindow.size);
|
||||
@@ -140,7 +179,7 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
|
||||
menuButton: const SizedBox(),
|
||||
displayMode: PaneDisplayMode.open,
|
||||
items: _items,
|
||||
customPane: _CustomPane(),
|
||||
customPane: _CustomPane(_settingsController),
|
||||
header: const ProfileWidget(),
|
||||
autoSuggestBox: _autoSuggestBox,
|
||||
indicator: const StickyNavigationIndicator(
|
||||
@@ -190,43 +229,47 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
|
||||
onVerticalDragStart: (_) => appWindow.startDragging()
|
||||
);
|
||||
|
||||
Widget get _autoSuggestBox => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0
|
||||
),
|
||||
child: AutoSuggestBox<PageSuggestion>(
|
||||
key: _searchKey,
|
||||
controller: _searchController,
|
||||
placeholder: translations.find,
|
||||
focusNode: _searchFocusNode,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
itemBuilder: (context, item) => ListTile(
|
||||
onPressed: () {
|
||||
pageIndex.value = item.value.pageIndex;
|
||||
_searchController.clear();
|
||||
_searchFocusNode.unfocus();
|
||||
},
|
||||
leading: item.child,
|
||||
title: Text(
|
||||
item.value.name,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1
|
||||
)
|
||||
Widget get _autoSuggestBox => Obx(() {
|
||||
final firstRun = _settingsController.firstRun.value;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0
|
||||
),
|
||||
items: _suggestedItems,
|
||||
autofocus: true,
|
||||
trailingIcon: IgnorePointer(
|
||||
child: IconButton(
|
||||
onPressed: () {},
|
||||
icon: Transform.flip(
|
||||
flipX: true,
|
||||
child: const Icon(FluentIcons.search)
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
child: AutoSuggestBox<PageSuggestion>(
|
||||
key: _searchKey,
|
||||
controller: _searchController,
|
||||
enabled: !firstRun,
|
||||
placeholder: translations.find,
|
||||
focusNode: _searchFocusNode,
|
||||
selectionHeightStyle: BoxHeightStyle.max,
|
||||
itemBuilder: (context, item) => ListTile(
|
||||
onPressed: () {
|
||||
pageIndex.value = item.value.pageIndex;
|
||||
_searchController.clear();
|
||||
_searchFocusNode.unfocus();
|
||||
},
|
||||
leading: item.child,
|
||||
title: Text(
|
||||
item.value.name,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1
|
||||
)
|
||||
),
|
||||
items: _suggestedItems,
|
||||
autofocus: true,
|
||||
trailingIcon: IgnorePointer(
|
||||
child: IconButton(
|
||||
onPressed: () {},
|
||||
icon: Transform.flip(
|
||||
flipX: true,
|
||||
child: const Icon(FluentIcons.search)
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
List<AutoSuggestBoxItem<PageSuggestion>> get _suggestedItems => pages.mapMany((page) {
|
||||
final pageIcon = SizedBox.square(
|
||||
@@ -369,32 +412,40 @@ class _PaneBodyState extends State<_PaneBody> with AutomaticKeepAliveClientMixin
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
Expanded(
|
||||
child: PageView.builder(
|
||||
controller: _pageController,
|
||||
itemBuilder: (context, index) => Navigator(
|
||||
onPopPage: (page, data) => true,
|
||||
observers: [
|
||||
_NestedPageObserver(
|
||||
onChanged: (routeName) {
|
||||
if(routeName != null) {
|
||||
pageIndex.refresh();
|
||||
addSubPageToStack(routeName);
|
||||
widget.controller.add(null);
|
||||
}
|
||||
}
|
||||
)
|
||||
],
|
||||
pages: [
|
||||
MaterialPage(
|
||||
child: KeyedSubtree(
|
||||
key: getPageKeyByIndex(index),
|
||||
child: widget.body ?? const SizedBox.shrink()
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
itemCount: pages.length
|
||||
),
|
||||
child: Stack(
|
||||
fit: StackFit.loose,
|
||||
children: [
|
||||
PageView.builder(
|
||||
controller: _pageController,
|
||||
itemBuilder: (context, index) => Navigator(
|
||||
onPopPage: (page, data) => true,
|
||||
observers: [
|
||||
_NestedPageObserver(
|
||||
onChanged: (routeName) {
|
||||
if(routeName != null) {
|
||||
pageIndex.refresh();
|
||||
addSubPageToStack(routeName);
|
||||
widget.controller.add(null);
|
||||
}
|
||||
}
|
||||
)
|
||||
],
|
||||
pages: [
|
||||
MaterialPage(
|
||||
child: KeyedSubtree(
|
||||
key: getPageKeyByIndex(index),
|
||||
child: widget.body ?? const SizedBox.shrink()
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
itemCount: pages.length
|
||||
),
|
||||
InfoBarArea(
|
||||
key: infoBarAreaKey
|
||||
)
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -408,6 +459,9 @@ class _PaneBodyState extends State<_PaneBody> with AutomaticKeepAliveClientMixin
|
||||
}
|
||||
|
||||
class _CustomPane extends NavigationPaneWidget {
|
||||
final SettingsController settingsController;
|
||||
_CustomPane(this.settingsController);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, NavigationPaneWidgetData data) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -444,33 +498,36 @@ class _CustomPane extends NavigationPaneWidget {
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final item = data.pane.items[index] as PaneItem;
|
||||
return HoverButton(
|
||||
onPressed: () => data.pane.onChanged?.call(index),
|
||||
builder: (context, states) => Container(
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: ButtonThemeData.uncheckedInputColor(
|
||||
FluentTheme.of(context),
|
||||
item == data.pane.selectedItem ? {ButtonStates.hovering} : states,
|
||||
transparentWhenNone: true,
|
||||
return Obx(() {
|
||||
final firstRun = settingsController.firstRun.value;
|
||||
return HoverButton(
|
||||
onPressed: firstRun ? null : () => data.pane.onChanged?.call(index),
|
||||
builder: (context, states) => Container(
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: ButtonThemeData.uncheckedInputColor(
|
||||
FluentTheme.of(context),
|
||||
item == data.pane.selectedItem ? {ButtonStates.hovering} : states,
|
||||
transparentWhenNone: true,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.0))
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.0
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
data.pane.indicator ?? const SizedBox.shrink(),
|
||||
item.icon,
|
||||
const SizedBox(width: 12.0),
|
||||
item.title ?? const SizedBox.shrink()
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.0))
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.0
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
data.pane.indicator ?? const SizedBox.shrink(),
|
||||
item.icon,
|
||||
const SizedBox(width: 12.0),
|
||||
item.title ?? const SizedBox.shrink()
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_launcher/src/controller/settings_controller.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/page/pages.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/util/tutorial.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/info_tile.dart';
|
||||
|
||||
class InfoPage extends RebootPage {
|
||||
const InfoPage({Key? key}) : super(key: key);
|
||||
@@ -27,62 +29,193 @@ class InfoPage extends RebootPage {
|
||||
}
|
||||
|
||||
class _InfoPageState extends RebootPageState<InfoPage> {
|
||||
@override
|
||||
List<SettingTile> get settings => [
|
||||
_documentation,
|
||||
_discord,
|
||||
_youtubeTutorial,
|
||||
_reportBug
|
||||
final SettingsController _settingsController = Get.find<SettingsController>();
|
||||
RxInt _counter = RxInt(180);
|
||||
|
||||
static final List<InfoTile> _infoTiles = [
|
||||
InfoTile(
|
||||
title: Text("What is Project Reboot?"),
|
||||
content: Text(
|
||||
"Project Reboot is a game server for Fortnite that aims to support as many seasons as possible.\n"
|
||||
"The project was started on Discord by Milxnor, while the launcher is developed by Auties00.\n"
|
||||
"Both are open source on GitHub, anyone can easily contribute or audit the code!"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("What is a Fortnite game server?"),
|
||||
content: Text(
|
||||
"If you have ever played Minecraft multiplayer, you might know that the servers you join are hosted on a computer running a program, called Minecraft Game Server.\n"
|
||||
"While the Minecraft Game server is written by the creators of Minecraft, Mojang, Epic Games doesn't provide an equivalent for Fortnite.\n"
|
||||
"By exploiting the Fortnite internals, though, it's possible to create a game server just like in Minecraft: this is in easy terms what Project Reboot does.\n"
|
||||
"Some Fortnite versions support running this game server in the background without rendering the game(\"headless\"), while others still require the full game to be open.\n"
|
||||
"Just like in Minecraft, you need a game client to play the game and one to host the server.\n"
|
||||
"By default, a game server is automatically started on your PC when you start a Fortnite version from the \"Play\" section in the launcher.\n"
|
||||
"If you want to play in another way, for example by joining a server hosted by one of your friends instead of running one yourself, you can checkout the \"Multiplayer\" section in the \"Play\" tab of the launcher."
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("Types of Fortnite game server"),
|
||||
content: Text(
|
||||
"Some Fortnite versions support running this game server in the background without rendering the game: this type of server is called \"headless\" as the game is running, but you can't see it on your screen.\n"
|
||||
"If headless is not supported by the Fortnite version you want to play, or if you disabled it manually from the \"Configuration\" section in the \"Host\" tab of the launcher, you will see an instance of Fortnite open on your screen.\n"
|
||||
"For convenience, this window will be opened on a new Virtual Desktop, if your Windows version supports it. This feature can be disabled as well from from the \"Configuration\" section in the \"Host\" tab of the launcher."
|
||||
"Just like in Minecraft, you need a game client to play the game and one to host the server."
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("How can others join my game server?"),
|
||||
content: Text(
|
||||
"For others to join your game server, port 7777 must be accessible on your PC.\n"
|
||||
"One option is to use a private VPN service like Hamachi or Radmin, but all of the players will need to download this software.\n"
|
||||
"The best solution is to use port forwarding:\n"
|
||||
"1. Set a static IP\n"
|
||||
" If you don't have already a static IP set, set one by following any tutorial on Google\n"
|
||||
"2. Log into your router's admin panel\n"
|
||||
" Usually this can be accessed on any web browser by going to http://192.168.1.1/\n"
|
||||
" You might need a username and a password to log in: refer to your router's manual for precise instructions\n"
|
||||
"3. Find the port forwarding section\n"
|
||||
" Once logged in into the admin panel, navigate to the port forwarding section of your router's settings\n"
|
||||
" This location may vary from router to router, but it's typically labelled as \"Port Forwarding,\" \"Port Mapping\" or \"Virtual Server\"\n"
|
||||
" Refer to your router's manual for precise instructions\n"
|
||||
"4. Add a port forwarding rule\n"
|
||||
" Now, you'll need to create a new port forwarding rule. Here's what you'll typically need to specify:\n"
|
||||
" - Service Name: Choose a name for your port forwarding rule (e.g., \"Fortnite Game Server\")\n"
|
||||
" - Port Number: Enter 7777 for both the external and internal ports\n"
|
||||
" - Protocol: Select the UDP protocol\n"
|
||||
" - Internal IP Address: Enter the static IP address you set earlier\n"
|
||||
" - Enable: Make sure the port forwarding rule is enabled\n"
|
||||
"5. Save and apply the changes\n"
|
||||
" After configuring the port forwarding rule, save your changes and apply them\n"
|
||||
" This step may involve clicking a \"Save\" or \"Apply\" button on your router's web interface"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("What is a backend?"),
|
||||
content: Text(
|
||||
"A backend is a piece of software that emulates the Epic Games server responsible for authentication and related features.\n"
|
||||
"By default, the Reboot Launcher ships with a slightly customized version of LawinV1, an open source implementation available on Github.\n"
|
||||
"If you are having any problems with the built in backend, enable the \"Detached\" option in the \"Backend\" tab of the Reboot Laucher to troubleshoot the issue."
|
||||
"LawinV1 was chosen to allow users to log into Fortnite and join games easily, but keep in mind that if you want to use features such as parties, voice chat or skins, you will need to use a custom backend.\n"
|
||||
"Other popular options are LawinV2 and Momentum, both available on Github, but it's not recommended to use them if you are not an advanced user.\n"
|
||||
"You can run these alternatives either either on your PC or on a server by selecting respectively \"Local\" or \"Remote\" from the \"Type\" section in the \"Backend\" tab of the Reboot Launcher."
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("What is the Unreal Engine console?"),
|
||||
content: Text(
|
||||
"Many Fortnite versions don't support entering in game by clicking the \"Play\" button.\n"
|
||||
"Instead, you need to click the key assigned to the Unreal Engine console, by default F8 or the tilde(the button above tab), and type open 127.0.0.1\n"
|
||||
"Keep in mind that the Unreal Engine console key is controlled by the backend, so this is true only if you are using the embedded backend: custom backends might use different keys.\n"
|
||||
"When using the embedded backend, you can customize the key used to open the console in the \"Backend\" tab of the Reboot Launcher."
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("What is a matchmaker?"),
|
||||
content: Text(
|
||||
"A matchmaker is a piece of software that emulates the Epic Games server responsible for putting you in game when you click the \"Play\" button in Fortnite.\n"
|
||||
"By default, the Reboot Launcher ships with a slightly customized version of Lawin's FortMatchmaker, an open source implementation available on Github.\n"
|
||||
"If you are having any problems with the built in matchmaker, enable the \"Detached\" option in the \"Matchmaker\" tab of the Reboot Launcher to troubleshoot the issue.\n"
|
||||
"Lawin's FortMatchmaker is an extremely basic implementation of a matchmaker: it takes the IP you configured in the \"Matchmaker\" tab, by default 127.0.0.1(your local machine) of the Reboot Launcher and send you with no wait to that game server.\n"
|
||||
"Unfortunately right now the play button still doesn't work on many Fortnite versions, you so might need to use the Unreal Engine console.\n"
|
||||
"Just like a backend, you can run a custom matchmaker, either on your PC or on a server with the appropriate configuration."
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("The backend is not working correctly"),
|
||||
content: Text(
|
||||
"To resolve this issue:\n"
|
||||
"- Check that your backend is working correctly from the \"Backend\" tab\n"
|
||||
"- If you are using a custom backend, try to use the embedded one\n"
|
||||
"- Try to run the backend as detached by enabling the \"Detached\" option in the \"Backend\" tab"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("The matchmaker is not working correctly"),
|
||||
content: Text(
|
||||
"To resolve this issue:\n"
|
||||
"- Check that your matchmaker is working correctly from the \"Matchmaker\" tab\n"
|
||||
"- If you are using a custom matchmaker, try to use the embedded one\n"
|
||||
"- Try to run the matchmaker as detached by enabling the \"Detached\" option in the \"Matchmaker\" tab"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("Why do I see two Fortnite versions opened on my PC?"),
|
||||
content: Text(
|
||||
"As explained in the \"What is a Fortnite game server?\" section, one instance of Fortnite is used to host the game server, while the other is used to let you play.\n"
|
||||
"The Fortnite instance used up by the game server is usually frozen, so it should be hard to use the wrong one to try to play.\n"
|
||||
"If you do not want to host a game server yourself, you can:\n"
|
||||
"1. Set a custom IP in the \"Matchmaker\" tab\n"
|
||||
"2. Set a custom matchmaker in the \"Matchmaker\" tab\n"
|
||||
"3. Disable the automatic game server from the \"Configuration\" section in the \"Host\" tab\n"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("I cannot open Fortnite because of an authentication error"),
|
||||
content: Text(
|
||||
"To resolve this issue:\n"
|
||||
"- Check that your backend is working correctly from the \"Backend\" tab\n"
|
||||
"- If you are using a custom backend, try to use the embedded one\n"
|
||||
"- Try to run the backend as detached by enabling the \"Detached\" option in the \"Backend\" tab"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("I cannot enter in a match when I'm in Fortnite"),
|
||||
content: Text(
|
||||
"As explained in the \"What is the Unreal Engine console?\" section, the \"Play\" button doesn't work in many Fortnite versions.\n"
|
||||
"Instead, you need to click the key assigned to the Unreal Engine console, by default F8 or the tilde(the button above tab), and type open 127.0.0.1"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("An error occurred while downloading a build (DioException)"),
|
||||
content: Text(
|
||||
"Unfortunately the servers that host the Fortnite builds are not reliable all the time so it might take a few tries, or downloading another version, to get started"
|
||||
)
|
||||
),
|
||||
InfoTile(
|
||||
title: Text("Failed to open descriptor file / Fortnite crash Reporter / Unreal Engine crash reporter"),
|
||||
content: Text(
|
||||
"Your version of Fortnite is corrupted, download it again from the launcher or use another build."
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
SettingTile get _reportBug => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.bug_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsBugReportName),
|
||||
subtitle: Text(translations.settingsUtilsBugReportSubtitle) ,
|
||||
content: Button(
|
||||
onPressed: openBugReport,
|
||||
child: Text(translations.settingsUtilsBugReportContent),
|
||||
)
|
||||
);
|
||||
|
||||
SettingTile get _youtubeTutorial => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.video_24_regular
|
||||
),
|
||||
title: Text(translations.infoVideoName),
|
||||
subtitle: Text(translations.infoVideoDescription),
|
||||
content: Button(
|
||||
onPressed: openYoutubeTutorial,
|
||||
child: Text(translations.infoVideoContent)
|
||||
)
|
||||
);
|
||||
|
||||
SettingTile get _discord => SettingTile(
|
||||
icon: Icon(
|
||||
Icons.discord_outlined
|
||||
),
|
||||
title: Text(translations.infoDiscordName),
|
||||
subtitle: Text(translations.infoDiscordDescription),
|
||||
content: Button(
|
||||
onPressed: openDiscordServer,
|
||||
child: Text(translations.infoDiscordContent)
|
||||
)
|
||||
);
|
||||
|
||||
SettingTile get _documentation => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.document_24_regular
|
||||
),
|
||||
title: Text(translations.infoDocumentationName),
|
||||
subtitle: Text(translations.infoDocumentationDescription),
|
||||
content: Button(
|
||||
onPressed: openTutorials,
|
||||
child: Text(translations.infoDocumentationContent)
|
||||
)
|
||||
);
|
||||
@override
|
||||
void initState() {
|
||||
if(_settingsController.firstRun.value) {
|
||||
Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
if (_counter.value <= 0) {
|
||||
_settingsController.firstRun.value = false;
|
||||
timer.cancel();
|
||||
} else {
|
||||
_counter.value = _counter.value - 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget? get button => null;
|
||||
List<Widget> get settings => _infoTiles;
|
||||
|
||||
@override
|
||||
Widget? get button => Obx(() {
|
||||
if(!_settingsController.firstRun.value) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
final totalSecondsLeft = _counter.value;
|
||||
final minutesLeft = totalSecondsLeft ~/ 60;
|
||||
final secondsLeft = totalSecondsLeft % 60;
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: 48,
|
||||
child: Button(
|
||||
onPressed: totalSecondsLeft <= 0 ? () => pageIndex.value = RebootPageType.play.index : null,
|
||||
child: Text(
|
||||
totalSecondsLeft <= 0 ? "I have read the instructions"
|
||||
: "Read the instructions for at least ${secondsLeft == 0 ? '$minutesLeft minute${minutesLeft > 1 ? 's' : ''}' : minutesLeft == 0 ? '$secondsLeft second${secondsLeft > 1 ? 's' : ''}' : '$minutesLeft minute${minutesLeft > 1 ? 's' : ''} and $secondsLeft second${secondsLeft > 1 ? 's' : ''}'}"
|
||||
),
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class _MatchmakerPageState extends RebootPageState<MatchmakerPage> {
|
||||
|
||||
@override
|
||||
Widget? get button => const ServerButton(
|
||||
authenticator: false
|
||||
backend: false
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -47,40 +47,10 @@ class _MatchmakerPageState extends RebootPageState<MatchmakerPage> {
|
||||
_hostName,
|
||||
_port,
|
||||
_gameServerAddress,
|
||||
_detached,
|
||||
_installationDirectory,
|
||||
_resetDefaults
|
||||
];
|
||||
|
||||
Widget get _detached => Obx(() {
|
||||
if(_matchmakerController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.developer_board_24_regular
|
||||
),
|
||||
title: Text(translations.matchmakerConfigurationDetachedName),
|
||||
subtitle: Text(translations.matchmakerConfigurationDetachedDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_matchmakerController.detached.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _matchmakerController.detached.value,
|
||||
onChanged: (value) => _matchmakerController.detached.value = value
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Widget get _gameServerAddress => Obx(() {
|
||||
if(_matchmakerController.type.value != ServerType.embedded) {
|
||||
return const SizedBox.shrink();
|
||||
@@ -123,7 +93,7 @@ class _MatchmakerPageState extends RebootPageState<MatchmakerPage> {
|
||||
});
|
||||
|
||||
Widget get _hostName => Obx(() {
|
||||
if(_matchmakerController.type.value == ServerType.remote) {
|
||||
if(_matchmakerController.type.value != ServerType.remote) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
@@ -147,7 +117,7 @@ class _MatchmakerPageState extends RebootPageState<MatchmakerPage> {
|
||||
title: Text(translations.matchmakerTypeName),
|
||||
subtitle: Text(translations.matchmakerTypeDescription),
|
||||
content: const ServerTypeSelector(
|
||||
authenticator: false
|
||||
backend: false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/src/controller/game_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/hosting_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/matchmaker_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/settings_controller.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/page/pages.dart';
|
||||
import 'package:reboot_launcher/src/util/keyboard.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/file_setting_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/game_start_button.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/version_selector_tile.dart';
|
||||
@@ -34,20 +40,9 @@ class PlayPage extends RebootPage {
|
||||
|
||||
class _PlayPageState extends RebootPageState<PlayPage> {
|
||||
final MatchmakerController _matchmakerController = Get.find<MatchmakerController>();
|
||||
final HostingController _hostingController = Get.find<HostingController>();
|
||||
late final RxBool _selfServer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_selfServer = RxBool(_isLocalPlay);
|
||||
_matchmakerController.gameServerAddress.addListener(() => _selfServer.value = _isLocalPlay);
|
||||
_hostingController.started.listen((_) => _selfServer.value = _isLocalPlay);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
bool get _isLocalPlay => isLocalHost(_matchmakerController.gameServerAddress.text)
|
||||
&& !_hostingController.started.value;
|
||||
|
||||
final SettingsController _settingsController = Get.find<SettingsController>();
|
||||
final GameController _gameController = Get.find<GameController>();
|
||||
|
||||
@override
|
||||
Widget? get button => LaunchButton(
|
||||
startLabel: translations.launchFortnite,
|
||||
@@ -57,12 +52,60 @@ class _PlayPageState extends RebootPageState<PlayPage> {
|
||||
|
||||
@override
|
||||
List<SettingTile> get settings => [
|
||||
_clientSettings,
|
||||
versionSelectSettingTile,
|
||||
_hostSettingTile,
|
||||
_browseServerTile,
|
||||
_matchmakerTile
|
||||
_multiplayer
|
||||
];
|
||||
|
||||
SettingTile get _multiplayer => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.people_24_regular
|
||||
),
|
||||
title: Text(translations.playGameServerName),
|
||||
subtitle: Text(translations.playGameServerDescription),
|
||||
children: [
|
||||
_hostSettingTile,
|
||||
_browseServerTile,
|
||||
_matchmakerTile,
|
||||
],
|
||||
);
|
||||
|
||||
SettingTile get _clientSettings => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.archive_settings_24_regular
|
||||
),
|
||||
title: Text(translations.settingsClientName),
|
||||
subtitle: Text(translations.settingsClientDescription),
|
||||
children: [
|
||||
createFileSetting(
|
||||
title: translations.settingsClientConsoleName,
|
||||
description: translations.settingsClientConsoleDescription,
|
||||
controller: _settingsController.unrealEngineConsoleDll
|
||||
),
|
||||
createFileSetting(
|
||||
title: translations.settingsClientAuthName,
|
||||
description: translations.settingsClientAuthDescription,
|
||||
controller: _settingsController.backendDll
|
||||
),
|
||||
createFileSetting(
|
||||
title: translations.settingsClientMemoryName,
|
||||
description: translations.settingsClientMemoryDescription,
|
||||
controller: _settingsController.memoryLeakDll
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.options_24_regular
|
||||
),
|
||||
title: Text(translations.settingsClientArgsName),
|
||||
subtitle: Text(translations.settingsClientArgsDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsClientArgsPlaceholder,
|
||||
controller: _gameController.customLaunchArgs,
|
||||
)
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
SettingTile get _matchmakerTile => SettingTile(
|
||||
onPressed: () {
|
||||
pageIndex.value = RebootPageType.matchmaker.index;
|
||||
|
||||
@@ -87,14 +87,8 @@ class _BrowsePageState extends RebootPageState<BrowsePage> {
|
||||
);
|
||||
|
||||
Widget _buildPopulatedListBody(Set<Map<String, dynamic>> items) => ListView.builder(
|
||||
itemCount: items.length * 2,
|
||||
itemCount: items.length,
|
||||
itemBuilder: (context, index) {
|
||||
if(index % 2 != 0) {
|
||||
return const SizedBox(
|
||||
height: 8.0
|
||||
);
|
||||
}
|
||||
|
||||
var entry = items.elementAt(index ~/ 2);
|
||||
var hasPassword = entry["password"] != null;
|
||||
return SettingTile(
|
||||
|
||||
@@ -2,19 +2,27 @@ import 'package:clipboard/clipboard.dart';
|
||||
import 'package:dart_ipify/dart_ipify.dart';
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/main.dart';
|
||||
import 'package:reboot_launcher/src/controller/game_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/hosting_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/settings_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/update_controller.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart';
|
||||
import 'package:reboot_launcher/src/dialog/implementation/data.dart';
|
||||
import 'package:reboot_launcher/src/dialog/implementation/server.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/file_setting_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/game_start_button.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:reboot_launcher/src/widget/version_selector_tile.dart';
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluentUi show FluentIcons;
|
||||
|
||||
import '../../util/checks.dart';
|
||||
|
||||
class HostPage extends RebootPage {
|
||||
const HostPage({Key? key}) : super(key: key);
|
||||
@@ -38,6 +46,8 @@ class HostPage extends RebootPage {
|
||||
class _HostingPageState extends RebootPageState<HostPage> {
|
||||
final GameController _gameController = Get.find<GameController>();
|
||||
final HostingController _hostingController = Get.find<HostingController>();
|
||||
final UpdateController _updateController = Get.find<UpdateController>();
|
||||
final SettingsController _settingsController = Get.find<SettingsController>();
|
||||
|
||||
late final RxBool _showPasswordTrailing = RxBool(_hostingController.password.text.isNotEmpty);
|
||||
|
||||
@@ -61,9 +71,9 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
|
||||
@override
|
||||
List<Widget> get settings => [
|
||||
_gameServer,
|
||||
_information,
|
||||
_configuration,
|
||||
versionSelectSettingTile,
|
||||
_headless,
|
||||
_share,
|
||||
_resetDefaults
|
||||
];
|
||||
@@ -80,7 +90,7 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
)
|
||||
);
|
||||
|
||||
SettingTile get _gameServer => SettingTile(
|
||||
SettingTile get _information => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.info_24_regular
|
||||
),
|
||||
@@ -169,28 +179,108 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
]
|
||||
);
|
||||
|
||||
Widget get _headless => Obx(() => SettingTile(
|
||||
SettingTile get _configuration => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.window_console_20_regular
|
||||
FluentIcons.archive_settings_24_regular
|
||||
),
|
||||
title: Text(translations.hostHeadlessName),
|
||||
subtitle: Text(translations.hostHeadlessDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_hostingController.headless.value ? translations.on : translations.off
|
||||
title: Text(translations.settingsServerName),
|
||||
subtitle: Text(translations.settingsServerSubtitle),
|
||||
children: [
|
||||
createFileSetting(
|
||||
title: translations.settingsServerFileName,
|
||||
description: translations.settingsServerFileDescription,
|
||||
controller: _settingsController.gameServerDll
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
fluentUi.FluentIcons.number_field
|
||||
),
|
||||
title: Text(translations.settingsServerPortName),
|
||||
subtitle: Text(translations.settingsServerPortDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsServerPortName,
|
||||
controller: _settingsController.gameServerPort,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly
|
||||
]
|
||||
)
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.globe_24_regular
|
||||
),
|
||||
title: Text(translations.settingsServerMirrorName),
|
||||
subtitle: Text(translations.settingsServerMirrorDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsServerMirrorPlaceholder,
|
||||
controller: _updateController.url,
|
||||
validator: checkUpdateUrl
|
||||
)
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.timer_24_regular
|
||||
),
|
||||
title: Text(translations.settingsServerTimerName),
|
||||
subtitle: Text(translations.settingsServerTimerSubtitle),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_updateController.timer.value.text),
|
||||
items: UpdateTimer.values.map((entry) => MenuFlyoutItem(
|
||||
text: Text(entry.text),
|
||||
onPressed: () {
|
||||
_updateController.timer.value = entry;
|
||||
_updateController.infoBarEntry?.close();
|
||||
_updateController.update(true);
|
||||
}
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
Obx(() => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.window_console_20_regular
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
title: Text(translations.hostHeadlessName),
|
||||
subtitle: Text(translations.hostHeadlessDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_hostingController.headless.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _hostingController.headless.value,
|
||||
onChanged: (value) => _hostingController.headless.value = value
|
||||
),
|
||||
],
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _hostingController.headless.value,
|
||||
onChanged: (value) => _hostingController.headless.value = value
|
||||
)),
|
||||
Obx(() => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.desktop_edit_24_regular
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
title: Text(translations.hostVirtualDesktopName),
|
||||
subtitle: Text(translations.hostVirtualDesktopDescription),
|
||||
contentWidth: null,
|
||||
content: Row(
|
||||
children: [
|
||||
Text(
|
||||
_hostingController.virtualDesktop.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _hostingController.virtualDesktop.value,
|
||||
onChanged: (value) => _hostingController.virtualDesktop.value = value
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
],
|
||||
);
|
||||
|
||||
SettingTile get _share => SettingTile(
|
||||
@@ -222,12 +312,15 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
subtitle: Text(translations.hostShareIpDescription),
|
||||
content: Button(
|
||||
onPressed: () async {
|
||||
InfoBarEntry? entry;
|
||||
try {
|
||||
_showCopyingIp();
|
||||
var ip = await Ipify.ipv4();
|
||||
entry = _showCopyingIp();
|
||||
final ip = await Ipify.ipv4();
|
||||
entry.close();
|
||||
FlutterClipboard.controlC(ip);
|
||||
_showCopiedIp();
|
||||
}catch(error) {
|
||||
entry?.close();
|
||||
_showCannotCopyIp(error);
|
||||
}
|
||||
},
|
||||
@@ -257,7 +350,7 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
severity: InfoBarSeverity.success
|
||||
);
|
||||
|
||||
void _showCopyingIp() => showInfoBar(
|
||||
InfoBarEntry _showCopyingIp() => showInfoBar(
|
||||
translations.hostShareIpMessageLoading,
|
||||
loading: true,
|
||||
duration: null
|
||||
@@ -279,4 +372,14 @@ class _HostingPageState extends RebootPageState<HostPage> {
|
||||
severity: InfoBarSeverity.success,
|
||||
duration: infoBarLongDuration
|
||||
);
|
||||
}
|
||||
|
||||
extension _UpdateTimerExtension on UpdateTimer {
|
||||
String get text {
|
||||
if (this == UpdateTimer.never) {
|
||||
return translations.updateGameServerDllNever;
|
||||
}
|
||||
|
||||
return translations.updateGameServerDllEvery(name);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,20 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluentUi show FluentIcons;
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:archive/archive_io.dart';
|
||||
import 'package:fluent_ui/fluent_ui.dart' hide FluentIcons;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_gen/gen_l10n/reboot_localizations.dart';
|
||||
import 'package:flutter_localized_locales/flutter_localized_locales.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_launcher/src/controller/game_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/hosting_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/settings_controller.dart';
|
||||
import 'package:reboot_launcher/src/controller/update_controller.dart';
|
||||
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart';
|
||||
import 'package:reboot_launcher/src/dialog/implementation/data.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page.dart';
|
||||
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
|
||||
import 'package:reboot_launcher/src/util/checks.dart';
|
||||
import 'package:reboot_launcher/src/util/picker.dart';
|
||||
import 'package:reboot_launcher/src/util/translations.dart';
|
||||
import 'package:reboot_launcher/src/widget/file_selector.dart';
|
||||
import 'package:reboot_launcher/src/widget/setting_tile.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
@@ -40,19 +38,52 @@ class SettingsPage extends RebootPage {
|
||||
}
|
||||
|
||||
class _SettingsPageState extends RebootPageState<SettingsPage> {
|
||||
final GameController _gameController = Get.find<GameController>();
|
||||
final HostingController _hostingController = Get.find<HostingController>();
|
||||
final SettingsController _settingsController = Get.find<SettingsController>();
|
||||
final UpdateController _updateController = Get.find<UpdateController>();
|
||||
|
||||
@override
|
||||
Widget? get button => null;
|
||||
|
||||
@override
|
||||
List<Widget> get settings => [
|
||||
_clientSettings,
|
||||
_gameServerSettings,
|
||||
_launcherSettings,
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.local_language_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsLanguageName),
|
||||
subtitle: Text(translations.settingsUtilsLanguageDescription),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_getLocaleName(_settingsController.language.value)),
|
||||
items: AppLocalizations.supportedLocales.map((locale) => MenuFlyoutItem(
|
||||
text: Text(_getLocaleName(locale.languageCode)),
|
||||
onPressed: () => _settingsController.language.value = locale.languageCode
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.dark_theme_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsThemeName),
|
||||
subtitle: Text(translations.settingsUtilsThemeDescription),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_settingsController.themeMode.value.title),
|
||||
items: ThemeMode.values.map((themeMode) => MenuFlyoutItem(
|
||||
text: Text(themeMode.title),
|
||||
onPressed: () => _settingsController.themeMode.value = themeMode
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.arrow_reset_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsResetDefaultsName),
|
||||
subtitle: Text(translations.settingsUtilsResetDefaultsSubtitle),
|
||||
content: Button(
|
||||
onPressed: () => showResetDialog(_settingsController.reset),
|
||||
child: Text(translations.settingsUtilsResetDefaultsContent),
|
||||
)
|
||||
),
|
||||
_installationDirectory
|
||||
];
|
||||
|
||||
@@ -68,173 +99,6 @@ class _SettingsPageState extends RebootPageState<SettingsPage> {
|
||||
)
|
||||
);
|
||||
|
||||
SettingTile get _clientSettings => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.desktop_24_regular
|
||||
),
|
||||
title: Text(translations.settingsClientName),
|
||||
subtitle: Text(translations.settingsClientDescription),
|
||||
children: [
|
||||
_createFileSetting(
|
||||
title: translations.settingsClientConsoleName,
|
||||
description: translations.settingsClientConsoleDescription,
|
||||
controller: _settingsController.unrealEngineConsoleDll
|
||||
),
|
||||
_createFileSetting(
|
||||
title: translations.settingsClientAuthName,
|
||||
description: translations.settingsClientAuthDescription,
|
||||
controller: _settingsController.authenticatorDll
|
||||
),
|
||||
_createFileSetting(
|
||||
title: translations.settingsClientMemoryName,
|
||||
description: translations.settingsClientMemoryDescription,
|
||||
controller: _settingsController.memoryLeakDll
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.text_box_settings_24_regular
|
||||
),
|
||||
title: Text(translations.settingsClientArgsName),
|
||||
subtitle: Text(translations.settingsClientArgsDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsClientArgsPlaceholder,
|
||||
controller: _gameController.customLaunchArgs,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
SettingTile get _gameServerSettings => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.server_24_regular
|
||||
),
|
||||
title: Text(translations.settingsServerName),
|
||||
subtitle: Text(translations.settingsServerSubtitle),
|
||||
children: [
|
||||
_createFileSetting(
|
||||
title: translations.settingsServerFileName,
|
||||
description: translations.settingsServerFileDescription,
|
||||
controller: _settingsController.gameServerDll
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
fluentUi.FluentIcons.number_field
|
||||
),
|
||||
title: Text(translations.settingsServerPortName),
|
||||
subtitle: Text(translations.settingsServerPortDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsServerPortName,
|
||||
controller: _settingsController.gameServerPort,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly
|
||||
]
|
||||
)
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.globe_24_regular
|
||||
),
|
||||
title: Text(translations.settingsServerMirrorName),
|
||||
subtitle: Text(translations.settingsServerMirrorDescription),
|
||||
content: TextFormBox(
|
||||
placeholder: translations.settingsServerMirrorPlaceholder,
|
||||
controller: _updateController.url,
|
||||
validator: checkUpdateUrl
|
||||
)
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.timer_24_regular
|
||||
),
|
||||
title: Text(translations.settingsServerTimerName),
|
||||
subtitle: Text(translations.settingsServerTimerSubtitle),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_updateController.timer.value.text),
|
||||
items: UpdateTimer.values.map((entry) => MenuFlyoutItem(
|
||||
text: Text(entry.text),
|
||||
onPressed: () {
|
||||
_updateController.timer.value = entry;
|
||||
removeMessageByPage(6);
|
||||
_updateController.update(true);
|
||||
}
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.developer_board_24_regular
|
||||
),
|
||||
title: Text(translations.playAutomaticServerName),
|
||||
subtitle: Text(translations.playAutomaticServerDescription),
|
||||
contentWidth: null,
|
||||
content: Obx(() => Row(
|
||||
children: [
|
||||
Text(
|
||||
_hostingController.automaticServer.value ? translations.on : translations.off
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0
|
||||
),
|
||||
ToggleSwitch(
|
||||
checked: _hostingController.automaticServer.value,
|
||||
onChanged: (value) => _hostingController.automaticServer.value = value
|
||||
),
|
||||
],
|
||||
)),
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
SettingTile get _launcherSettings => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.play_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsName),
|
||||
subtitle: Text(translations.settingsUtilsSubtitle),
|
||||
children: [
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.local_language_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsLanguageName),
|
||||
subtitle: Text(translations.settingsUtilsLanguageDescription),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_getLocaleName(_settingsController.language.value)),
|
||||
items: AppLocalizations.supportedLocales.map((locale) => MenuFlyoutItem(
|
||||
text: Text(_getLocaleName(locale.languageCode)),
|
||||
onPressed: () => _settingsController.language.value = locale.languageCode
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.dark_theme_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsThemeName),
|
||||
subtitle: Text(translations.settingsUtilsThemeDescription),
|
||||
content: Obx(() => DropDownButton(
|
||||
leading: Text(_settingsController.themeMode.value.title),
|
||||
items: ThemeMode.values.map((themeMode) => MenuFlyoutItem(
|
||||
text: Text(themeMode.title),
|
||||
onPressed: () => _settingsController.themeMode.value = themeMode
|
||||
)).toList()
|
||||
))
|
||||
),
|
||||
SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.arrow_reset_24_regular
|
||||
),
|
||||
title: Text(translations.settingsUtilsResetDefaultsName),
|
||||
subtitle: Text(translations.settingsUtilsResetDefaultsSubtitle),
|
||||
content: Button(
|
||||
onPressed: () => showResetDialog(_settingsController.reset),
|
||||
child: Text(translations.settingsUtilsResetDefaultsContent),
|
||||
)
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
String _getLocaleName(String locale) {
|
||||
var result = LocaleNames.of(context)!.nameOf(locale);
|
||||
if(result != null) {
|
||||
@@ -243,32 +107,6 @@ class _SettingsPageState extends RebootPageState<SettingsPage> {
|
||||
|
||||
return locale;
|
||||
}
|
||||
|
||||
SettingTile _createFileSetting({required String title, required String description, required TextEditingController controller}) => SettingTile(
|
||||
icon: Icon(
|
||||
FluentIcons.document_24_regular
|
||||
),
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
content: FileSelector(
|
||||
placeholder: translations.selectPathPlaceholder,
|
||||
windowTitle: translations.selectPathWindowTitle,
|
||||
controller: controller,
|
||||
validator: checkDll,
|
||||
extension: "dll",
|
||||
folder: false
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
extension _UpdateTimerExtension on UpdateTimer {
|
||||
String get text {
|
||||
if (this == UpdateTimer.never) {
|
||||
return translations.updateGameServerDllNever;
|
||||
}
|
||||
|
||||
return translations.updateGameServerDllEvery(name);
|
||||
}
|
||||
}
|
||||
|
||||
extension _ThemeModeExtension on ThemeMode {
|
||||
|
||||
Reference in New Issue
Block a user