Skip to content

Commit

Permalink
Merge pull request #216 from Muska-Ami/dev
Browse files Browse the repository at this point in the history
Update to GUI v0.2.4+3
  • Loading branch information
Muska-Ami authored Nov 28, 2024
2 parents efb08cd + f3cd0c2 commit ed8f81f
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 35 deletions.
10 changes: 5 additions & 5 deletions RELEASE_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

### GUI

- 修复浅色模式自定义颜色种子开启覆盖已生效主题问题
- 浅色模式自定义颜色种子改为Material颜色取色板
- 优化了一些逻辑
- 添加了关闭控制台提示的功能

### CLI

-/-

### 其他

-/-
#### NyaLCF Core

- 添加了一个配置项目

## 版本信息

- nyalcf_gui: 0.2.4
- nyalcf_cli: 0.0.3
- nyalcf_env: 1.0.2
- nyalcf_core,nyalcf_inject: 1.2.5
- nyalcf_core,nyalcf_inject: 1.2.6

<!-- Some change log here -->
4 changes: 2 additions & 2 deletions nyalcf_cli/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ packages:
path: "../nyalcf_core"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_env:
dependency: "direct main"
description:
Expand All @@ -266,7 +266,7 @@ packages:
path: "../nyalcf_inject"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
package_config:
dependency: transitive
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class LauncherConfigurationStorage extends JsonConfiguration {
'enable': false,
'value': '66ccff',
},
}
},
},
'console': {
'kind_tip': true
},
'auto_sign': false,
};
Expand Down Expand Up @@ -76,6 +79,13 @@ class LauncherConfigurationStorage extends JsonConfiguration {
void setThemeLightSeedValue(String value) =>
cfg.setString('theme.light.seed.value', value);

/// 获取是否开启控制台提示
bool getConsoleKindTip() => cfg.getBool('console.kind_tip', defConfig['console']['kind_tip']);

/// 设置是否开启控制台提示
/// [value] 是否开启控制台提示
void setConsoleKindTip(bool value) => cfg.setBool('console.kind_tip', value);

/// 获取是否启用自动签到
bool getAutoSign() => cfg.getBool('auto_sign', defConfig['auto_sign']);

Expand Down
2 changes: 1 addition & 1 deletion nyalcf_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_core
description: 'Nya LoCyanFrp! core module.'
version: 1.2.5
version: 1.2.6
homepage: https://nyalcf.1l1.icu
publish_to: none
# repository: https://github.com/my_org/my_repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ class FrpcProcessManager {
'cannot connect to local service - Frpc 无法连接到本地服务,请检查本地服务状态及本地服务端口',
},
];
for (Map<String, String> error in errorList) {
if (str.contains(error['key']!)) {
_cCtr.appendSystemInfoLog('提示:${error['info']}');

if (_cCtr.kindTip) {
for (Map<String, String> error in errorList) {
if (str.contains(error['key']!)) {
_cCtr.appendSystemInfoLog('提示:${error['info']}');
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions nyalcf_gui/nyalcf_core_extend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ packages:
path: "../../nyalcf_core"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_env:
dependency: "direct main"
description:
Expand All @@ -428,21 +428,21 @@ packages:
path: "../../nyalcf_inject"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_inject_extend:
dependency: "direct main"
description:
path: "../nyalcf_inject_extend"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_ui:
dependency: "direct main"
description:
path: "../nyalcf_ui"
relative: true
source: path
version: "1.2.2"
version: "1.2.3"
open_filex:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/nyalcf_core_extend/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_core_extend
description: "Nya LoCyanFrp! core extend module."
version: 1.2.5
version: 1.2.6
homepage: https://nyalcf.1l1.icu
publish_to: none

Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/nyalcf_inject_extend/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_inject_extend
description: "Nya LoCyanFrp! communication injector extend module."
version: 1.2.5
version: 1.2.6
homepage: https://nyalcf.1l1.icu
publish_to: none

Expand Down
10 changes: 8 additions & 2 deletions nyalcf_gui/nyalcf_ui/lib/controllers/console_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,28 @@ import 'package:flutter/material.dart';
// Package imports:
import 'package:get/get.dart';
import 'package:nyalcf_core/models/process_model.dart';
import 'package:nyalcf_core/storages/configurations/launcher_configuration_storage.dart';
import 'package:nyalcf_core_extend/utils/frpc/process_manager.dart';

// Project imports:
import 'package:nyalcf_ui/controllers/frpc_controller.dart';

/// 控制台 GetX 状态控制器
class ConsoleController extends GetxController {
final _lcs = LauncherConfigurationStorage();

/// UI组件列表
var widgets = <DataRow>[].obs;

/// {Rx}进程列表
/// <Rx>进程列表
static var processListWidget = <Widget>[].obs;

/// {Rx}控制台自动滚动
/// <Rx>控制台自动滚动
var autoScroll = true.obs;

/// 输出提示开关
bool get kindTip => _lcs.getConsoleKindTip();

/// 过滤后的输出文本
RxList<SelectableText> processOut = <SelectableText>[
const SelectableText(
Expand Down
14 changes: 7 additions & 7 deletions nyalcf_gui/nyalcf_ui/lib/controllers/frpc_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class FrpcController extends GetxController {
final _fss = FrpcStorage();
final FrpcConfigurationStorage _fcs = FrpcConfigurationStorage();

/// 是否存在的标志
RxBool exist = false.obs;
// /// 是否存在的标志
// RxBool exists = false.obs;

/// 版本号
RxString version = ''.obs;
Expand All @@ -22,10 +22,10 @@ class FrpcController extends GetxController {

// String? get customPath => Platform.environment['NYA_LCF_FRPC_PATH'];

/// 加载方法
load() async {
exist.value = await ((await file)?.exists()) ?? false;
}
// /// 加载方法
// load() async {
// exists.value = await ((await file)?.exists()) ?? false;
// }

/// 获取Frpc文件对象
get file => _fss.getFile();
Expand Down Expand Up @@ -56,7 +56,7 @@ class FrpcController extends GetxController {
void clearProcess() {
processList.clear();
processList.refresh();
load();
// load();
PanelConsole.buildProcessListWidget();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class LauncherSettingLauncherController extends GetxController {
/// <Rx>切换是否启用深色模式的组件
var switchThemeDarkOption = false.obs;

/// <Rx>是否启用错误帮助提示
var consoleKindTip = false.obs;

/// <Rx>是否启用 DEBUG 模式
var debugMode = false.obs;

Expand All @@ -52,6 +55,7 @@ class LauncherSettingLauncherController extends GetxController {
themeAuto.value = _lcs.getThemeAuto();
themeMonet.value = _lcs.getThemeMonet();
themeDark.value = _lcs.getThemeDarkEnable();
consoleKindTip.value = _lcs.getConsoleKindTip();
debugMode.value = _lcs.getDebug();
loadx();
}
Expand Down
41 changes: 41 additions & 0 deletions nyalcf_gui/nyalcf_ui/lib/views/setting/launcher_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,47 @@ class LauncherSetting {
],
),
),
Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const ListTile(
leading: Icon(Icons.control_camera),
title: Text('控制台'),
),
Container(
margin: const EdgeInsets.only(
left: 20.0, right: 20.0, bottom: 20.0),
padding: const EdgeInsets.only(left: 30.0, right: 50.0),
child: Obx(
() => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
const Expanded(
child: ListTile(
leading: Icon(Icons.error_outline),
title: Text('错误检测及提示'),
),
),
Switch(
value: _lsCtr.consoleKindTip.value,
onChanged: (value) async {
_lcs.setConsoleKindTip(value);
_lcs.save();
_lsCtr.consoleKindTip.value = value;
},
),
],
),
],
),
),
)
],
),
),
Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/nyalcf_ui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_ui
description: "Nya LoCyanFrp! user interface module."
version: 1.2.2
version: 1.2.3
homepage: https://nyalcf.1l1.icu
publish_to: none

Expand Down
10 changes: 5 additions & 5 deletions nyalcf_gui/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -462,14 +462,14 @@ packages:
path: "../nyalcf_core"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_core_extend:
dependency: "direct main"
description:
path: nyalcf_core_extend
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_env:
dependency: "direct main"
description:
Expand All @@ -483,21 +483,21 @@ packages:
path: "../nyalcf_inject"
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_inject_extend:
dependency: transitive
description:
path: nyalcf_inject_extend
relative: true
source: path
version: "1.2.5"
version: "1.2.6"
nyalcf_ui:
dependency: "direct main"
description:
path: nyalcf_ui
relative: true
source: path
version: "1.2.2"
version: "1.2.3"
open_filex:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf
description: "[GUI]The next generation of LoCyanFrp launcher."
version: 0.2.4+2
version: 0.2.4+3
homepage: https://nyalcf.1l1.icu
publish_to: 'none'

Expand Down
2 changes: 1 addition & 1 deletion nyalcf_inject/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_inject
description: "Nya LoCyanFrp! communication injector module."
version: 1.2.5
version: 1.2.6
homepage: https://nyalcf.1l1.icu
publish_to: 'none'

Expand Down

0 comments on commit ed8f81f

Please sign in to comment.