mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
feat(desktop): implement native desktop notifications for task completion and errors (#1293)
This commit is contained in:
1 parent
98bd3305b7
commit
bc5c818eae
26 files changed
+285
-4
No files matched your search
@@ -498,6 +498,27 @@ class SettingView extends GetView<SettingController> {
|
||||
);
|
||||
});
|
||||
|
||||
final buildDesktopNotification = !Util.isDesktop()
|
||||
? () => null
|
||||
: _buildConfigItem('desktopNotification', () {
|
||||
return appController.downloaderConfig.value.extra.desktopNotification
|
||||
? 'on'.tr
|
||||
: 'off'.tr;
|
||||
}, (Key key) {
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Switch(
|
||||
value: appController.downloaderConfig.value.extra.desktopNotification,
|
||||
onChanged: (bool value) async {
|
||||
appController.downloaderConfig.update((val) {
|
||||
val!.extra.desktopNotification = value;
|
||||
});
|
||||
await debounceSave();
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
// http config items start
|
||||
final httpConfig = downloaderCfg.value.protocolConfig.http;
|
||||
final buildHttpUa =
|
||||
@@ -1592,6 +1613,7 @@ class SettingView extends GetView<SettingController> {
|
||||
buildBrowserExtension(),
|
||||
buildAutoStartup(),
|
||||
buildMenubarMode(),
|
||||
buildDesktopNotification(),
|
||||
]),
|
||||
)),
|
||||
Text('archives'.tr),
|
||||
|
||||
Reference in new issue
Block a user