Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extension support #78

Merged
merged 55 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0d51918
feat(extension): js xhr polyfill
monkeyWie Feb 9, 2023
95faa71
feat: extension standard
monkeyWie May 3, 2023
1b99ad9
temp
monkeyWie May 4, 2023
6082138
temp(ext)
monkeyWie May 4, 2023
e8cbe76
Merge branch 'main' into feat/extension
monkeyWie May 12, 2023
9dd4222
Merge branch 'main' into feat/extension
monkeyWie Jun 1, 2023
255ad11
temp
monkeyWie Jun 8, 2023
f7f639c
Merge branch 'main' into feat/extension
monkeyWie Jun 13, 2023
a332b35
test: extension onResolve
monkeyWie Jun 16, 2023
115dbd8
Merge branch 'main' into feat/extension
monkeyWie Jun 20, 2023
56d1db3
temp: design extension ui
monkeyWie Jun 24, 2023
2c4bd4b
feat: support install git sub dir
monkeyWie Jul 1, 2023
7b5062d
temp
monkeyWie Jul 3, 2023
a9b6907
Merge branch 'main' into feat/extension
monkeyWie Jul 7, 2023
97ecb92
fix: merge
monkeyWie Jul 7, 2023
d5f2bd0
temp
monkeyWie Jul 12, 2023
4c3e85f
refactor: async resolve and create
monkeyWie Jul 14, 2023
0b33c74
fix: http task pause
monkeyWie Jul 15, 2023
ef02b8d
feat: extension backend full feature
monkeyWie Jul 20, 2023
2821b7a
Merge branch 'main' into feat/extension
monkeyWie Jul 20, 2023
b93a15a
fix: merge
monkeyWie Jul 20, 2023
863d78c
feat: mulit task create
monkeyWie Jul 21, 2023
9673f0a
fix: test
monkeyWie Jul 21, 2023
5e3ef69
test
monkeyWie Jul 21, 2023
7562bc3
fix: test
monkeyWie Jul 21, 2023
76c1ecb
test: extension api
monkeyWie Jul 22, 2023
2048cbb
fix: auto rename
monkeyWie Jul 27, 2023
9733ab4
fix: test
monkeyWie Jul 27, 2023
c89aed8
fix: test
monkeyWie Jul 27, 2023
132f8ec
Merge branch 'main' into feat/extension
monkeyWie Jul 27, 2023
adc3a67
Merge branch 'main' into feat/extension
monkeyWie Aug 4, 2023
5a7ad7a
feat: extension ui integration
monkeyWie Aug 4, 2023
9bd3651
temp
monkeyWie Aug 13, 2023
fcd32f4
Merge branch 'main' into feat/extension
monkeyWie Sep 2, 2023
2a41704
merge main
monkeyWie Sep 2, 2023
b2aa96b
Merge branch 'main' into feat/extension
monkeyWie Sep 5, 2023
2e22177
feat: extension manage list
monkeyWie Sep 20, 2023
c51c5b7
Merge branch 'main' into feat/extension
monkeyWie Sep 20, 2023
64f6b5a
Merge branch 'main' into feat/extension
monkeyWie Sep 22, 2023
ccdb747
feat: extension i18n
monkeyWie Sep 22, 2023
1978573
fix: test
monkeyWie Sep 22, 2023
a495833
Merge branch 'main' into feat/extension
monkeyWie Sep 22, 2023
3879c1b
fix
monkeyWie Sep 22, 2023
661027e
remove batch create
monkeyWie Sep 26, 2023
d8ae28c
adjust extension repository model
monkeyWie Oct 6, 2023
a2db6be
feat: support dev mode
monkeyWie Oct 8, 2023
f77dda3
Merge branch 'main' into feat/extension
monkeyWie Oct 8, 2023
2c2891e
merge main
monkeyWie Oct 8, 2023
cc0f219
feat: web extesion icon acccess
monkeyWie Oct 9, 2023
52acf04
fix: remove debug code
monkeyWie Oct 11, 2023
21d83f9
统一options参数名
monkeyWie Oct 12, 2023
d5e7be1
ci: go version switch to 1.19
monkeyWie Oct 12, 2023
40c4edf
docs: update donate link
monkeyWie Oct 12, 2023
47a144c
docs: update donate link
monkeyWie Oct 12, 2023
b1c5774
update
monkeyWie Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into feat/extension
# Conflicts:
#	ui/flutter/lib/api/model/options.dart
#	ui/flutter/lib/api/model/options.g.dart
#	ui/flutter/lib/api/model/request.g.dart
#	ui/flutter/lib/app/modules/create/views/create_view.dart
#	ui/flutter/lib/app/views/buid_task_list_view.dart
  • Loading branch information
monkeyWie committed Jul 20, 2023
commit 2821b7a635c94ad504495ed92d1a00a7b79a34b8
7 changes: 4 additions & 3 deletions ui/flutter/lib/api/model/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Options {
Object? extra;

Options({
this.name = "",
this.path = "",
this.selectFiles = const [],
required this.name,
required this.path,
required this.selectFiles,
this.extra,
});

factory Options.fromJson(Map<String, dynamic> json) =>
Expand Down
13 changes: 6 additions & 7 deletions ui/flutter/lib/api/model/options.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/flutter/lib/api/model/request.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 12 additions & 42 deletions ui/flutter/lib/app/modules/create/views/create_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -329,48 +329,18 @@ class CreateView extends GetView<CreateController> {
return;
}
if (createFormKey.currentState!.validate()) {
// if (Util.isAndroid()) {
// if (!await Permission.storage.request().isGranted) {
// Get.snackbar('error'.tr,
// 'noStoragePermission'.tr);
// return;
// }
// }

final reqFiles = rr.res.files
.where((e) => e.req != null)
.toList();
if (reqFiles.isNotEmpty) {
// if the resource is a multi-task resource, call the batch download api
final selectReqs =
controller.selectedIndexes.map((i) {
final file = reqFiles[i];
final optReq = file.req!;
// fill the file path into the download request
optReq.res = Resource(
name: file.name,
size: file.size,
range: rr.res.range,
files: [
FileInfo(
name: file.name,
size: file.size,
path: file.path,
)
]);
return optReq;
}).toList();
await createTaskBatch(CreateTaskBatch(
reqs: selectReqs,
opts: Options(path: pathController.text)));
} else {
await createTask(CreateTask(
rid: rr.id,
opts: Options(
path: pathController.text,
selectFiles: controller.selectedIndexes
.cast<int>())));
}
await createTask(CreateTask(
rid: rr.id,
opts: Options(
name: nameController.text,
path: pathController.text,
selectFiles:
controller.selectedIndexes.cast<int>(),
extra: connectionsController.text.isEmpty
? null
: (OptsExtraHttp()
..connections = int.parse(
connectionsController.text)))));
Get.back();
Get.rootDelegate.offNamed(Routes.TASK);
}
Expand Down
8 changes: 4 additions & 4 deletions ui/flutter/lib/app/views/buid_task_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ class BuildTaskListView extends GetView {
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
title: Text(task.meta.res.name),
leading: task.meta.res.name.lastIndexOf('.') == -1
? const Icon(FaIcons.file)
: Icon(FaIcons.allIcons[findIcon(task.meta.res.name)])),
title: Text(fileName(task.meta)),
leading: (task.meta.res.rootDir.isNotEmpty
? const Icon(FaIcons.folder)
: Icon(FaIcons.allIcons[findIcon(fileName(task.meta))])),
Row(
children: [
Expanded(
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.