mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 09:30:27 +00:00
feat(ui): unify child surfaces and show web task creation in a modal (#1633)
This commit is contained in:
30 files changed
+618
-85
No files matched your search
@@ -3,6 +3,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:gopeed/api/model/create_task.dart';
|
||||
import 'package:gopeed/api/model/request.dart';
|
||||
import 'package:gopeed/core/window/app_window_launcher.dart';
|
||||
import 'package:gopeed/core/window/app_window_payload.dart';
|
||||
import 'package:gopeed/core/window/window_capability_transport.dart';
|
||||
|
||||
void main() {
|
||||
@@ -34,8 +35,10 @@ void main() {
|
||||
return null;
|
||||
});
|
||||
|
||||
final opened = await AppWindowLauncher.openCreateTaskWindow(
|
||||
createTask: CreateTask(req: Request(url: 'https://example.com/file.zip')),
|
||||
final opened = await AppWindowLauncher.open(
|
||||
AppWindowPayload.createTask(
|
||||
createTask: CreateTask(req: Request(url: 'https://example.com/file.zip')).toJson(),
|
||||
),
|
||||
);
|
||||
|
||||
expect(opened, isTrue);
|
||||
@@ -56,6 +59,6 @@ void main() {
|
||||
return null;
|
||||
});
|
||||
|
||||
expect(await AppWindowLauncher.openCreateTaskWindow(), isFalse);
|
||||
expect(await AppWindowLauncher.open(AppWindowPayload.createTask()), isFalse);
|
||||
});
|
||||
}
|
||||
@@ -9,9 +9,9 @@ void main() {
|
||||
test('create-task child window has a localized native title', () {
|
||||
expect(
|
||||
AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('en')),
|
||||
'Gopeed-Create Task',
|
||||
'Gopeed - Create Task',
|
||||
);
|
||||
expect(AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('zh')), 'Gopeed-创建任务');
|
||||
expect(AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('zh')), 'Gopeed - 创建任务');
|
||||
});
|
||||
|
||||
test('create-task payload only carries initial task data', () {
|
||||
|
||||
Reference in new issue
Block a user