diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1645ba3f..6bed4b3f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -40,23 +40,25 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # releaseWin:
- # name: Release windows
- # runs-on: windows-latest
- # steps:
- # - name: Checkout
- # uses: actions/checkout@v4
- # - name: Install Flutter
- # uses: subosito/flutter-action@v2
- # - name: Build
- # run: dart run fl_build -p windows
- # - name: Create Release
- # uses: softprops/action-gh-release@v1
- # with:
- # files: |
- # ${{ env.APP_NAME }}_amd64_windows.zip
- # env:
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ releaseWin:
+ name: Release windows
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: '0'
+ - name: Install Flutter
+ uses: subosito/flutter-action@v2
+ - name: Build
+ run: dart run fl_build -p windows
+ - name: Create Release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ ${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_windows_amd64.zip
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# releaseApple:
# name: Release ios and macos
diff --git a/README.md b/README.md
index 91b60d53..aa9984a3 100644
--- a/README.md
+++ b/README.md
@@ -15,8 +15,9 @@ Especially thanks to dartss
## ⬇️ Download
-[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://cdn.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703): Full support with my own certificate
-[Linux](https://cdn.lolli.tech/serverbox/latest.AppImage) / [Windows](https://cdn.lolli.tech/serverbox/latest.win.zip): Basically tested, with debug certificate
+🎉 **The `Android / Linux / Windows` version are now built via GitHub Actions**
+
+[iOS & macOS](https://apps.apple.com/app/id6476033062) / [Android & Linux & Windows](https://github.com/lollipopkit/flutter_gpt_box/releases)
## 🔖 Feature
diff --git a/README_zh.md b/README_zh.md
index 70b45d62..2397eb2f 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -16,8 +16,9 @@
## ⬇️ Download
-[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://cdn.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703): 经过测试,使用自签名证书
-[Linux](https://cdn.lolli.tech/serverbox/latest.AppImage) / [Windows](https://cdn.lolli.tech/serverbox/latest.win.zip): 经过不完全测试,使用调试证书
+🎉 **现在 `Android / Linux / Windows` 版本使用 GitHub Actions 构建**。
+
+[iOS & macOS](https://apps.apple.com/app/id1586449703) / [Android & Linux & Windows](https://github.com/lollipopkit/flutter_gpt_box/releases)
## 🔖 特点
diff --git a/lib/view/page/setting/entry.dart b/lib/view/page/setting/entry.dart
index 27984af9..0ed0b931 100644
--- a/lib/view/page/setting/entry.dart
+++ b/lib/view/page/setting/entry.dart
@@ -1175,7 +1175,7 @@ class _SettingPageState extends State {
autoFocus: true,
hint: 'https://example.com/logo.png',
icon: Icons.link,
- maxLines: 3,
+ maxLines: 2,
onSubmitted: onSave,
),
ListTile(
diff --git a/lib/view/page/storage/sftp.dart b/lib/view/page/storage/sftp.dart
index 0465859a..974d0a49 100644
--- a/lib/view/page/storage/sftp.dart
+++ b/lib/view/page/storage/sftp.dart
@@ -494,19 +494,22 @@ class _SftpPageState extends State with AfterLayoutMixin {
onPressed: () async {
context.pop();
try {
- await context.showLoadingDialog(fn: () async {
- final remotePath = _getRemotePath(file);
- if (useRmr) {
- await _client!.run('rm -r "$remotePath"');
- } else if (file.attr.isDirectory) {
- await _status.client!.rmdir(remotePath);
- } else {
- await _status.client!.remove(remotePath);
- }
- });
+ await context.showLoadingDialog(
+ fn: () async {
+ final remotePath = _getRemotePath(file);
+ if (useRmr) {
+ await _client!.run('rm -r "$remotePath"');
+ } else if (file.attr.isDirectory) {
+ await _status.client!.rmdir(remotePath);
+ } else {
+ await _status.client!.remove(remotePath);
+ }
+ },
+ onErr: (e, s) {},
+ );
_listDir();
} catch (e, s) {
- _showErrDialog(context, e, 'Delete', s);
+ context.showErrDialog(e: e, s: s, operation: l10n.delete);
}
},
child: Text(l10n.delete, style: UIs.textRed),
@@ -547,13 +550,16 @@ class _SftpPageState extends State with AfterLayoutMixin {
}
context.pop();
try {
- await context.showLoadingDialog(fn: () async {
- final dir = '${_status.path!.path}/${textController.text}';
- await _status.client!.mkdir(dir);
- });
+ await context.showLoadingDialog(
+ fn: () async {
+ final dir = '${_status.path!.path}/${textController.text}';
+ await _status.client!.mkdir(dir);
+ },
+ onErr: (e, s) {},
+ );
_listDir();
} catch (e, s) {
- _showErrDialog(context, e, 'Create folder', s);
+ context.showErrDialog(e: e, s: s, operation: l10n.createFolder);
}
},
child: Text(l10n.ok, style: UIs.textRed),
@@ -591,13 +597,16 @@ class _SftpPageState extends State with AfterLayoutMixin {
}
context.pop();
try {
- await context.showLoadingDialog(fn: () async {
- final path = '${_status.path!.path}/${textController.text}';
- await _client!.run('touch "$path"');
- });
+ await context.showLoadingDialog(
+ fn: () async {
+ final path = '${_status.path!.path}/${textController.text}';
+ await _client!.run('touch "$path"');
+ },
+ onErr: (e, s) {},
+ );
_listDir();
} catch (e, s) {
- _showErrDialog(context, e, 'Create file', s);
+ context.showErrDialog(e: e, s: s, operation: l10n.createFile);
}
},
child: Text(l10n.ok, style: UIs.textRed),
@@ -636,13 +645,16 @@ class _SftpPageState extends State with AfterLayoutMixin {
}
context.pop();
try {
- await context.showLoadingDialog(fn: () async {
- final newName = textController.text;
- await _status.client?.rename(file.filename, newName);
- });
+ await context.showLoadingDialog(
+ fn: () async {
+ final newName = textController.text;
+ await _status.client?.rename(file.filename, newName);
+ },
+ onErr: (e, s) {},
+ );
_listDir();
} catch (e, s) {
- _showErrDialog(context, e, 'Rename', s);
+ context.showErrDialog(e: e, s: s, operation: l10n.rename);
}
},
child: Text(l10n.rename, style: UIs.textRed),
@@ -672,29 +684,6 @@ class _SftpPageState extends State with AfterLayoutMixin {
_listDir();
}
- Future _showErrDialog(
- BuildContext ctx, Object e, String op, StackTrace s) async {
- Loggers.app.warning('$op failed', e, s);
- return ctx.showRoundDialog(
- title: l10n.error,
- child: SingleChildScrollView(
- child: Column(
- children: [
- Text(e.toString()),
- const SizedBox(height: 7),
- SimpleMarkdown(data: s.toString()),
- ],
- ),
- ),
- actions: [
- TextButton(
- onPressed: () => ctx.pop(),
- child: Text(l10n.ok),
- ),
- ],
- );
- }
-
String _getRemotePath(SftpName name) {
final prePath = _status.path!.path;
// Only support Linux as remote now, so the seperator is '/'
diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc
index 412a5437..965f5cf6 100644
--- a/linux/flutter/generated_plugin_registrant.cc
+++ b/linux/flutter/generated_plugin_registrant.cc
@@ -7,7 +7,6 @@
#include "generated_plugin_registrant.h"
#include
-#include
#include
#include
#include
@@ -16,9 +15,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
- g_autoptr(FlPluginRegistrar) gtk_registrar =
- fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
- gtk_plugin_register_with_registrar(gtk_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake
index eb9e8cbb..dacf00d7 100644
--- a/linux/flutter/generated_plugins.cmake
+++ b/linux/flutter/generated_plugins.cmake
@@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
- gtk
screen_retriever
url_launcher_linux
window_manager
diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift
index 87f22952..c6be844b 100644
--- a/macos/Flutter/GeneratedPluginRegistrant.swift
+++ b/macos/Flutter/GeneratedPluginRegistrant.swift
@@ -5,7 +5,6 @@
import FlutterMacOS
import Foundation
-import app_links
import device_info_plus
import dynamic_color
import icloud_storage
@@ -19,7 +18,6 @@ import wakelock_plus
import window_manager
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
- AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
IcloudStoragePlugin.register(with: registry.registrar(forPlugin: "IcloudStoragePlugin"))
diff --git a/pubspec.lock b/pubspec.lock
index b21cbae0..a996e547 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -33,14 +33,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
- app_links:
- dependency: transitive
- description:
- name: app_links
- sha256: "96e677810b83707ff5e10fac11e4839daa0ea4e0123c35864c092699165eb3db"
- url: "https://pub.dev"
- source: hosted
- version: "6.1.1"
archive:
dependency: transitive
description:
@@ -392,8 +384,8 @@ packages:
dependency: "direct dev"
description:
path: "."
- ref: "v1.0.11"
- resolved-ref: ead58f6e985600c03cd27fb6563c10b6afa2d640
+ ref: "v1.0.13"
+ resolved-ref: baded8103bd046806929b8d6547d5bce38060b06
url: "https://github.com/lppcg/fl_build.git"
source: git
version: "1.0.0"
@@ -409,8 +401,8 @@ packages:
dependency: "direct main"
description:
path: "."
- ref: "v1.0.27"
- resolved-ref: "7f329a63eff761bbb2013d4865515a4aeaecf3e8"
+ ref: "v1.0.29"
+ resolved-ref: "674d5b3fccd1ae29c2739f119e34719874186587"
url: "https://github.com/lppcg/fl_lib"
source: git
version: "0.0.1"
@@ -570,14 +562,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
- gtk:
- dependency: transitive
- description:
- name: gtk
- sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c
- url: "https://pub.dev"
- source: hosted
- version: "2.1.0"
highlight:
dependency: "direct main"
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 72c9cd85..00a04a40 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -53,7 +53,7 @@ dependencies:
fl_lib:
git:
url: https://github.com/lppcg/fl_lib
- ref: v1.0.27
+ ref: v1.0.29
dependency_overrides:
# dartssh2:
@@ -74,7 +74,7 @@ dev_dependencies:
# path: ../fl_build
git:
url: https://github.com/lppcg/fl_build.git
- ref: v1.0.11
+ ref: v1.0.13
flutter:
generate: true
diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc
index 3541e497..28c6f2d7 100644
--- a/windows/flutter/generated_plugin_registrant.cc
+++ b/windows/flutter/generated_plugin_registrant.cc
@@ -6,7 +6,6 @@
#include "generated_plugin_registrant.h"
-#include
#include
#include
#include
@@ -16,8 +15,6 @@
#include
void RegisterPlugins(flutter::PluginRegistry* registry) {
- AppLinksPluginCApiRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
DynamicColorPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
LocalAuthPluginRegisterWithRegistrar(
diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake
index f47b060b..2e41e0f1 100644
--- a/windows/flutter/generated_plugins.cmake
+++ b/windows/flutter/generated_plugins.cmake
@@ -3,7 +3,6 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
- app_links
dynamic_color
local_auth_windows
permission_handler_windows