feat: add browser extension link (#433)

This commit is contained in:
Levi authored and GitHub committed 2024-03-30 09:12:24 +08:00
1 parent 56ef25065e
commit 207c287c97
10 files changed
+67 -5

No files matched your search

@@ -15,6 +15,7 @@ import '../../../../util/package_info.dart';
import '../../../../util/util.dart'; import '../../../../util/util.dart';
import '../../../views/check_list_view.dart'; import '../../../views/check_list_view.dart';
import '../../../views/directory_selector.dart'; import '../../../views/directory_selector.dart';
import '../../../views/open_in_new.dart';
import '../../../views/outlined_button_loading.dart'; import '../../../views/outlined_button_loading.dart';
import '../../app/controllers/app_controller.dart'; import '../../app/controllers/app_controller.dart';
import '../controllers/setting_controller.dart'; import '../controllers/setting_controller.dart';
@@ -93,6 +94,15 @@ class SettingView extends GetView<SettingController> {
], ],
); );
}); });
buildBrowserExtension() {
return ListTile(
title: Text('browserExtension'.tr),
subtitle: const OpenInNew(
text: "Chrome",
url:
"https://chromewebstore.google.com/detail/gopeed/mijpgljlfcapndmchhjffkpckknofcnd",
));
}
// http config items start // http config items start
final httpConfig = downloaderCfg.value.protocolConfig.http; final httpConfig = downloaderCfg.value.protocolConfig.http;
@@ -687,8 +697,11 @@ class SettingView extends GetView<SettingController> {
Text('general'.tr), Text('general'.tr),
Card( Card(
child: Column( child: Column(
children: _addDivider( children: _addDivider([
[buildDownloadDir(), buildMaxRunning()]), buildDownloadDir(),
buildMaxRunning(),
buildBrowserExtension()
]),
)), )),
const Text('HTTP'), const Text('HTTP'),
Card( Card(
+39
View File
@@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:url_launcher/url_launcher.dart';
class OpenInNew extends StatelessWidget {
final String text;
final String url;
const OpenInNew({super.key, required this.text, required this.url});
@override
Widget build(BuildContext context) {
return Stack(
children: [
ElevatedButton(
onPressed: () {
launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
},
style: ElevatedButton.styleFrom(
backgroundColor: Get.theme.colorScheme.background,
),
child: Row(
mainAxisSize: MainAxisSize
.min, // Set the row's size to be as small as possible
children: <Widget>[
Text(text),
const SizedBox(
width: 4), // Add some space between the text and the icon
const Icon(
Icons.open_in_new,
size: 14,
), // The icon is after the text
],
),
)
],
);
}
}
+1
View File
@@ -88,5 +88,6 @@ const enUS = {
'thanks': 'Thanks', 'thanks': 'Thanks',
'thanksDesc': 'thanksDesc':
'Thanks to all the contributors who have helped build and develop the Gopeed community!', 'Thanks to all the contributors who have helped build and develop the Gopeed community!',
'browserExtension': 'Browser Extension',
}, },
}; };
+1
View File
@@ -60,5 +60,6 @@ const faIR = {
'thanks': 'تشکر', 'thanks': 'تشکر',
'thanksDesc': 'thanksDesc':
'از تمامی افرادی که در ساخت و توسعه‌ی جامعه‌ی Gopeed مشارکت کرده‌اند، سپاسگزاری می‌کنیم!', 'از تمامی افرادی که در ساخت و توسعه‌ی جامعه‌ی Gopeed مشارکت کرده‌اند، سپاسگزاری می‌کنیم!',
'browserExtension': 'فایل های دانلود شده را نگه دارد',
} }
}; };
+1
View File
@@ -61,5 +61,6 @@ const jaJP = {
'newVersionLater': '後で', 'newVersionLater': '後で',
'thanks': '感謝', 'thanks': '感謝',
'thanksDesc': 'Gopeedコミュニティの建設に協力してくださったすべての貢献者の方々に感謝します!', 'thanksDesc': 'Gopeedコミュニティの建設に協力してくださったすべての貢献者の方々に感謝します!',
'browserExtension': 'ブラウザ拡張機能',
} }
}; };
+1
View File
@@ -76,5 +76,6 @@ const ruRU = {
'thanks': 'Благодарности', 'thanks': 'Благодарности',
'thanksDesc': 'thanksDesc':
'Благодарим всех участников за их вклад в строительство и развитие сообщества Gopeed!', 'Благодарим всех участников за их вклад в строительство и развитие сообщества Gopeed!',
'browserExtension': 'Расширение браузера',
} }
}; };
+5 -2
View File
@@ -21,7 +21,8 @@ const trTR = {
'downloadLinkValid': 'Lütfen indirme bağlantısını girin', 'downloadLinkValid': 'Lütfen indirme bağlantısını girin',
'downloadLinkHit': 'downloadLinkHit':
'Lütfen indirme bağlantısını girin, HTTP/HTTPS/MAGNET supported@append', 'Lütfen indirme bağlantısını girin, HTTP/HTTPS/MAGNET supported@append',
'downloadLinkHitDesktop': ', veya torrent dosyasını doğrudan buraya sürükleyin', 'downloadLinkHitDesktop':
', veya torrent dosyasını doğrudan buraya sürükleyin',
'download': 'İndir', 'download': 'İndir',
'noFileSelected': 'Devam etmek için lütfen en az bir dosya seçin.', 'noFileSelected': 'Devam etmek için lütfen en az bir dosya seçin.',
'noStoragePermission': 'Depolama izni gerekli', 'noStoragePermission': 'Depolama izni gerekli',
@@ -43,7 +44,8 @@ const trTR = {
'updateDaily': 'Günlük güncelleme', 'updateDaily': 'Günlük güncelleme',
'lastUpdate': 'Son güncelleme: @time', 'lastUpdate': 'Son güncelleme: @time',
'addTracker': 'İzleyici ekle', 'addTracker': 'İzleyici ekle',
'addTrackerHit': 'Lütfen her satıra bir tane olmak üzere izleyici sunucusu bağlantısını girin', 'addTrackerHit':
'Lütfen her satıra bir tane olmak üzere izleyici sunucusu bağlantısını girin',
'ui': 'UI', 'ui': 'UI',
'theme': 'Tema', 'theme': 'Tema',
'themeSystem': 'Sistem', 'themeSystem': 'Sistem',
@@ -88,5 +90,6 @@ const trTR = {
'thanks': 'Teşekkürler', 'thanks': 'Teşekkürler',
'thanksDesc': 'thanksDesc':
'Gopeed topluluğunun oluşmasına ve gelişmesine yardımcı olan tüm katılımcılara teşekkürler!', 'Gopeed topluluğunun oluşmasına ve gelişmesine yardımcı olan tüm katılımcılara teşekkürler!',
'browserExtension': 'Tarayıcı Uzantısı',
}, },
}; };
+1
View File
@@ -88,5 +88,6 @@ const viVN = {
'thanks': 'Cảm ơn', 'thanks': 'Cảm ơn',
'thanksDesc': 'thanksDesc':
'Cảm ơn tất cả những người đóng góp đã giúp xây dựng và phát triển cộng đồng Gopeed!', 'Cảm ơn tất cả những người đóng góp đã giúp xây dựng và phát triển cộng đồng Gopeed!',
'browserExtension': 'Tiện ích mở rộng trình duyệt',
}, },
}; };
+1
View File
@@ -85,5 +85,6 @@ const zhCN = {
'password': '密码', 'password': '密码',
'thanks': '鸣谢', 'thanks': '鸣谢',
'thanksDesc': '感谢所有为 Gopeed 社区建设添砖加瓦的贡献者们!', 'thanksDesc': '感谢所有为 Gopeed 社区建设添砖加瓦的贡献者们!',
'browserExtension': '浏览器扩展',
} }
}; };
+2 -1
View File
@@ -84,6 +84,7 @@ const zhTW = {
'username': '名稱', 'username': '名稱',
'password': '密碼', 'password': '密碼',
'thanks': '感謝', 'thanks': '感謝',
'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!' 'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!',
'browserExtension': '瀏覽器擴充程式',
} }
}; };