mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat: queue extractions (#1227)
This commit is contained in:
1 parent
de0afb1481
commit
24db9bb58b
35 files changed
+1047
-159
No files matched your search
@@ -2,12 +2,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:window_manager/window_manager.dart'; // Import the required packages
|
||||
import 'package:window_manager/window_manager.dart'; // Import the required packages
|
||||
|
||||
import '../../../../i18n/message.dart';
|
||||
import '../../../../theme/theme.dart';
|
||||
import '../../../../util/locale_manager.dart';
|
||||
import '../../../../util/util.dart'; // Import the required packages
|
||||
import '../../../../util/util.dart'; // Import the required packages
|
||||
import '../../../routes/app_pages.dart';
|
||||
import '../controllers/app_controller.dart';
|
||||
|
||||
@@ -38,7 +38,7 @@ class AppView extends GetView<AppController> {
|
||||
// Add listening to theme changes, set the title bar color according to the current system theme.
|
||||
builder: (context, child) {
|
||||
// if platform is desktop
|
||||
if (Util.isDesktop()){
|
||||
if (Util.isDesktop()) {
|
||||
// actual brightness of the UI
|
||||
Brightness brightness = Theme.of(context).brightness;
|
||||
// Set the title bar to use the actual brightness of the UI
|
||||
@@ -46,7 +46,6 @@ class AppView extends GetView<AppController> {
|
||||
}
|
||||
return child!;
|
||||
},
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -626,10 +626,11 @@ class CreateView extends GetView<CreateController> {
|
||||
child: CompactCheckbox(
|
||||
label: 'autoExtract'.tr,
|
||||
value: _autoExtractController
|
||||
.value ?? false,
|
||||
.value ??
|
||||
false,
|
||||
onChanged: (bool? value) {
|
||||
_autoExtractController
|
||||
.value = value ?? false;
|
||||
_autoExtractController.value =
|
||||
value ?? false;
|
||||
},
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.grey,
|
||||
@@ -638,33 +639,49 @@ class CreateView extends GetView<CreateController> {
|
||||
),
|
||||
Obx(
|
||||
() => Visibility(
|
||||
visible: _autoExtractController.value ?? false,
|
||||
visible: _autoExtractController
|
||||
.value ??
|
||||
false,
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 10),
|
||||
const EdgeInsets.only(
|
||||
top: 10),
|
||||
child: TextFormField(
|
||||
controller: _archivePasswordController,
|
||||
controller:
|
||||
_archivePasswordController,
|
||||
obscureText: true,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'archivePassword'.tr,
|
||||
hintText: 'archivePasswordHint'.tr,
|
||||
decoration:
|
||||
InputDecoration(
|
||||
labelText:
|
||||
'archivePassword'
|
||||
.tr,
|
||||
hintText:
|
||||
'archivePasswordHint'
|
||||
.tr,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 10),
|
||||
const EdgeInsets.only(
|
||||
top: 10),
|
||||
child: CompactCheckbox(
|
||||
label: 'deleteAfterExtract'.tr,
|
||||
value: _deleteAfterExtractController
|
||||
.value ?? false,
|
||||
label:
|
||||
'deleteAfterExtract'
|
||||
.tr,
|
||||
value:
|
||||
_deleteAfterExtractController
|
||||
.value ??
|
||||
false,
|
||||
onChanged: (bool? value) {
|
||||
_deleteAfterExtractController
|
||||
.value = value ?? false;
|
||||
.value =
|
||||
value ?? false;
|
||||
},
|
||||
textStyle: const TextStyle(
|
||||
textStyle:
|
||||
const TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
@@ -1031,7 +1048,8 @@ class CreateView extends GetView<CreateController> {
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
_pathController.text = renderPathPlaceholders(category.path);
|
||||
_pathController.text =
|
||||
renderPathPlaceholders(category.path);
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
||||
@@ -179,7 +179,8 @@ class SettingView extends GetView<SettingController> {
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Switch(
|
||||
value: appController.downloaderConfig.value.archive.deleteAfterExtract,
|
||||
value:
|
||||
appController.downloaderConfig.value.archive.deleteAfterExtract,
|
||||
onChanged: (bool value) async {
|
||||
appController.downloaderConfig.update((val) {
|
||||
val!.archive.deleteAfterExtract = value;
|
||||
|
||||
Reference in new issue
Block a user