diff --git a/ui/flutter/lib/app/modules/setting/views/setting_view.dart b/ui/flutter/lib/app/modules/setting/views/setting_view.dart index fc245a3b..0340da0e 100644 --- a/ui/flutter/lib/app/modules/setting/views/setting_view.dart +++ b/ui/flutter/lib/app/modules/setting/views/setting_view.dart @@ -15,6 +15,7 @@ import '../../../../util/package_info.dart'; import '../../../../util/util.dart'; import '../../../views/check_list_view.dart'; import '../../../views/directory_selector.dart'; +import '../../../views/open_in_new.dart'; import '../../../views/outlined_button_loading.dart'; import '../../app/controllers/app_controller.dart'; import '../controllers/setting_controller.dart'; @@ -93,6 +94,15 @@ class SettingView extends GetView { ], ); }); + buildBrowserExtension() { + return ListTile( + title: Text('browserExtension'.tr), + subtitle: const OpenInNew( + text: "Chrome", + url: + "https://chromewebstore.google.com/detail/gopeed/mijpgljlfcapndmchhjffkpckknofcnd", + )); + } // http config items start final httpConfig = downloaderCfg.value.protocolConfig.http; @@ -687,8 +697,11 @@ class SettingView extends GetView { Text('general'.tr), Card( child: Column( - children: _addDivider( - [buildDownloadDir(), buildMaxRunning()]), + children: _addDivider([ + buildDownloadDir(), + buildMaxRunning(), + buildBrowserExtension() + ]), )), const Text('HTTP'), Card( diff --git a/ui/flutter/lib/app/views/open_in_new.dart b/ui/flutter/lib/app/views/open_in_new.dart new file mode 100644 index 00000000..a0624f5f --- /dev/null +++ b/ui/flutter/lib/app/views/open_in_new.dart @@ -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: [ + 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 + ], + ), + ) + ], + ); + } +} diff --git a/ui/flutter/lib/i18n/langs/en_us.dart b/ui/flutter/lib/i18n/langs/en_us.dart index 1e957e9b..0c64beb5 100644 --- a/ui/flutter/lib/i18n/langs/en_us.dart +++ b/ui/flutter/lib/i18n/langs/en_us.dart @@ -88,5 +88,6 @@ const enUS = { 'thanks': 'Thanks', 'thanksDesc': 'Thanks to all the contributors who have helped build and develop the Gopeed community!', + 'browserExtension': 'Browser Extension', }, }; diff --git a/ui/flutter/lib/i18n/langs/fa_ir.dart b/ui/flutter/lib/i18n/langs/fa_ir.dart index 81e0281c..e8591e92 100644 --- a/ui/flutter/lib/i18n/langs/fa_ir.dart +++ b/ui/flutter/lib/i18n/langs/fa_ir.dart @@ -60,5 +60,6 @@ const faIR = { 'thanks': 'تشکر', 'thanksDesc': 'از تمامی افرادی که در ساخت و توسعه‌ی جامعه‌ی Gopeed مشارکت کرده‌اند، سپاسگزاری می‌کنیم!', + 'browserExtension': 'فایل های دانلود شده را نگه دارد', } }; diff --git a/ui/flutter/lib/i18n/langs/ja_jp.dart b/ui/flutter/lib/i18n/langs/ja_jp.dart index 6a1325eb..48b03bc4 100644 --- a/ui/flutter/lib/i18n/langs/ja_jp.dart +++ b/ui/flutter/lib/i18n/langs/ja_jp.dart @@ -61,5 +61,6 @@ const jaJP = { 'newVersionLater': '後で', 'thanks': '感謝', 'thanksDesc': 'Gopeedコミュニティの建設に協力してくださったすべての貢献者の方々に感謝します!', + 'browserExtension': 'ブラウザ拡張機能', } }; diff --git a/ui/flutter/lib/i18n/langs/ru_ru.dart b/ui/flutter/lib/i18n/langs/ru_ru.dart index 7b302ab7..949ee886 100644 --- a/ui/flutter/lib/i18n/langs/ru_ru.dart +++ b/ui/flutter/lib/i18n/langs/ru_ru.dart @@ -76,5 +76,6 @@ const ruRU = { 'thanks': 'Благодарности', 'thanksDesc': 'Благодарим всех участников за их вклад в строительство и развитие сообщества Gopeed!', + 'browserExtension': 'Расширение браузера', } }; diff --git a/ui/flutter/lib/i18n/langs/tr_tr.dart b/ui/flutter/lib/i18n/langs/tr_tr.dart index afb21d82..539471c8 100644 --- a/ui/flutter/lib/i18n/langs/tr_tr.dart +++ b/ui/flutter/lib/i18n/langs/tr_tr.dart @@ -21,7 +21,8 @@ const trTR = { 'downloadLinkValid': 'Lütfen indirme bağlantısını girin', 'downloadLinkHit': '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', 'noFileSelected': 'Devam etmek için lütfen en az bir dosya seçin.', 'noStoragePermission': 'Depolama izni gerekli', @@ -43,7 +44,8 @@ const trTR = { 'updateDaily': 'Günlük güncelleme', 'lastUpdate': 'Son güncelleme: @time', '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', 'theme': 'Tema', 'themeSystem': 'Sistem', @@ -88,5 +90,6 @@ const trTR = { 'thanks': 'Teşekkürler', 'thanksDesc': '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ı', }, }; diff --git a/ui/flutter/lib/i18n/langs/vi_vn.dart b/ui/flutter/lib/i18n/langs/vi_vn.dart index 1d0f2e7d..ea12dba5 100644 --- a/ui/flutter/lib/i18n/langs/vi_vn.dart +++ b/ui/flutter/lib/i18n/langs/vi_vn.dart @@ -1,92 +1,93 @@ const viVN = { - 'vi_VN': { - 'label': 'Tiếng Việt', - 'error': 'Lỗi', - 'tip': 'Mẹo', - 'confirm': 'Xác nhận', - 'cancel': 'Hủy', - 'on': 'Bật', - 'off': 'Tắt', - 'selectAll': 'Chọn tất cả', - 'task': 'Nhiệm vụ', - 'downloading': 'đang tải', - 'downloaded': 'đã tải', - 'setting': 'Cài đặt', - 'donate': 'Ủng hộ', - 'exit': 'Thoát', - 'create': 'Tạo nhiệm vụ', - 'directDownload': 'Tải trực tiếp', - 'advancedOptions': 'Tùy chọn nâng cao', - 'downloadLink': 'Liên kết tải về', - 'downloadLinkValid': 'Vui lòng nhập liên kết tải về', - 'downloadLinkHit': - 'Vui lòng nhập liên kết tải về, hỗ trợ HTTP/HTTPS/MAGNET@append', - 'downloadLinkHitDesktop': ', hoặc kéo tệp torrent vào đây trực tiếp', - 'download': 'Tải về', - 'noFileSelected': 'Vui lòng chọn ít nhất một tệp để tiếp tục.', - 'noStoragePermission': 'Yêu cầu quyền lưu trữ', - 'selectFile': 'Chọn tệp', - 'rename': 'Đổi tên', - 'basic': 'Cơ bản', - 'advanced': 'Nâng cao', - 'general': 'Chung', - 'downloadDir': 'Thư mục tải về', - 'downloadDirValid': 'Vui lòng chọn thư mục tải về', - 'connections': 'Kết nối', - 'useServerCtime': 'Sử dụng thời gian máy chủ cho việc tạo tệp', - 'maxRunning': 'Số nhiệm vụ tối đa', - 'items': '@count mục', - 'subscribeTracker': 'Theo dõi Tracker', - 'subscribeFail': - 'Theo dõi thất bại, vui lòng kiểm tra kết nối mạng hoặc thử lại sau', - 'update': 'Cập nhật', - 'updateDaily': 'Cập nhật hàng ngày', - 'lastUpdate': 'Cập nhật lần cuối: @time', - 'addTracker': 'Thêm Tracker', - 'addTrackerHit': 'Vui lòng nhập địa chỉ máy chủ tracker, mỗi dòng một', - 'ui': 'Giao diện', - 'theme': 'Chủ đề', - 'themeSystem': 'Hệ thống', - 'themeLight': 'Sáng', - 'themeDark': 'Tối', - 'locale': 'Ngôn ngữ', - 'about': 'Về chúng tôi', - 'homepage': 'Trang chủ', - 'version': 'Phiên bản', - 'protocol': 'Giao thức', - 'port': 'Cổng', - 'apiToken': 'Mã API', - 'notSet': 'Chưa đặt', - 'set': 'Đặt', - 'effectAfterRestart': 'Hiệu lực sau khi khởi động lại', - 'startAll': 'Bắt đầu tất cả', - 'pauseAll': 'Tạm dừng tất cả', - 'deleteTask': 'Xóa nhiệm vụ', - 'deleteTaskTip': 'Giữ các tệp đã tải về', - 'delete': 'Xóa', - 'newVersionTitle': 'Khám phá phiên bản mới @version', - 'newVersionUpdate': 'Cập nhật ngay', - 'newVersionLater': 'Sau', - 'extensions': 'Tiện ích mở rộng', - 'extensionInstallUrl': 'Liên kết cài đặt', - 'extensionInstallSuccess': 'Cài đặt thành công', - 'extensionUpdateSuccess': 'Cập nhật thành công', - 'extensionDelete': 'Xóa tiện ích mở rộng', - 'extensionAlreadyLatest': 'Đây đã là phiên bản mới nhất', - 'extensionFind': 'Tìm tiện ích mở rộng', - 'extensionDevelop': 'Phát triển tiện ích mở rộng', - 'history': 'Lịch sử', - 'clearHistory': 'Xóa lịch sử', - 'noHistoryFound': 'Không tìm thấy lịch sử', - 'serviceTitle': 'Dịch vụ Tải xuống', - 'serviceText': 'Đang chạy', - 'network': 'Mạng', - 'proxy': 'Proxy', - 'server': 'Máy chủ', - 'username': 'Tên đăng nhập', - 'password': 'Mật khẩu', - 'thanks': 'Cảm ơn', - '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!', - }, + 'vi_VN': { + 'label': 'Tiếng Việt', + 'error': 'Lỗi', + 'tip': 'Mẹo', + 'confirm': 'Xác nhận', + 'cancel': 'Hủy', + 'on': 'Bật', + 'off': 'Tắt', + 'selectAll': 'Chọn tất cả', + 'task': 'Nhiệm vụ', + 'downloading': 'đang tải', + 'downloaded': 'đã tải', + 'setting': 'Cài đặt', + 'donate': 'Ủng hộ', + 'exit': 'Thoát', + 'create': 'Tạo nhiệm vụ', + 'directDownload': 'Tải trực tiếp', + 'advancedOptions': 'Tùy chọn nâng cao', + 'downloadLink': 'Liên kết tải về', + 'downloadLinkValid': 'Vui lòng nhập liên kết tải về', + 'downloadLinkHit': + 'Vui lòng nhập liên kết tải về, hỗ trợ HTTP/HTTPS/MAGNET@append', + 'downloadLinkHitDesktop': ', hoặc kéo tệp torrent vào đây trực tiếp', + 'download': 'Tải về', + 'noFileSelected': 'Vui lòng chọn ít nhất một tệp để tiếp tục.', + 'noStoragePermission': 'Yêu cầu quyền lưu trữ', + 'selectFile': 'Chọn tệp', + 'rename': 'Đổi tên', + 'basic': 'Cơ bản', + 'advanced': 'Nâng cao', + 'general': 'Chung', + 'downloadDir': 'Thư mục tải về', + 'downloadDirValid': 'Vui lòng chọn thư mục tải về', + 'connections': 'Kết nối', + 'useServerCtime': 'Sử dụng thời gian máy chủ cho việc tạo tệp', + 'maxRunning': 'Số nhiệm vụ tối đa', + 'items': '@count mục', + 'subscribeTracker': 'Theo dõi Tracker', + 'subscribeFail': + 'Theo dõi thất bại, vui lòng kiểm tra kết nối mạng hoặc thử lại sau', + 'update': 'Cập nhật', + 'updateDaily': 'Cập nhật hàng ngày', + 'lastUpdate': 'Cập nhật lần cuối: @time', + 'addTracker': 'Thêm Tracker', + 'addTrackerHit': 'Vui lòng nhập địa chỉ máy chủ tracker, mỗi dòng một', + 'ui': 'Giao diện', + 'theme': 'Chủ đề', + 'themeSystem': 'Hệ thống', + 'themeLight': 'Sáng', + 'themeDark': 'Tối', + 'locale': 'Ngôn ngữ', + 'about': 'Về chúng tôi', + 'homepage': 'Trang chủ', + 'version': 'Phiên bản', + 'protocol': 'Giao thức', + 'port': 'Cổng', + 'apiToken': 'Mã API', + 'notSet': 'Chưa đặt', + 'set': 'Đặt', + 'effectAfterRestart': 'Hiệu lực sau khi khởi động lại', + 'startAll': 'Bắt đầu tất cả', + 'pauseAll': 'Tạm dừng tất cả', + 'deleteTask': 'Xóa nhiệm vụ', + 'deleteTaskTip': 'Giữ các tệp đã tải về', + 'delete': 'Xóa', + 'newVersionTitle': 'Khám phá phiên bản mới @version', + 'newVersionUpdate': 'Cập nhật ngay', + 'newVersionLater': 'Sau', + 'extensions': 'Tiện ích mở rộng', + 'extensionInstallUrl': 'Liên kết cài đặt', + 'extensionInstallSuccess': 'Cài đặt thành công', + 'extensionUpdateSuccess': 'Cập nhật thành công', + 'extensionDelete': 'Xóa tiện ích mở rộng', + 'extensionAlreadyLatest': 'Đây đã là phiên bản mới nhất', + 'extensionFind': 'Tìm tiện ích mở rộng', + 'extensionDevelop': 'Phát triển tiện ích mở rộng', + 'history': 'Lịch sử', + 'clearHistory': 'Xóa lịch sử', + 'noHistoryFound': 'Không tìm thấy lịch sử', + 'serviceTitle': 'Dịch vụ Tải xuống', + 'serviceText': 'Đang chạy', + 'network': 'Mạng', + 'proxy': 'Proxy', + 'server': 'Máy chủ', + 'username': 'Tên đăng nhập', + 'password': 'Mật khẩu', + 'thanks': 'Cảm ơn', + '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!', + 'browserExtension': 'Tiện ích mở rộng trình duyệt', + }, }; diff --git a/ui/flutter/lib/i18n/langs/zh_cn.dart b/ui/flutter/lib/i18n/langs/zh_cn.dart index cdee8185..a18de6a0 100644 --- a/ui/flutter/lib/i18n/langs/zh_cn.dart +++ b/ui/flutter/lib/i18n/langs/zh_cn.dart @@ -85,5 +85,6 @@ const zhCN = { 'password': '密码', 'thanks': '鸣谢', 'thanksDesc': '感谢所有为 Gopeed 社区建设添砖加瓦的贡献者们!', + 'browserExtension': '浏览器扩展', } }; diff --git a/ui/flutter/lib/i18n/langs/zh_tw.dart b/ui/flutter/lib/i18n/langs/zh_tw.dart index 961d3e41..30c6ff66 100644 --- a/ui/flutter/lib/i18n/langs/zh_tw.dart +++ b/ui/flutter/lib/i18n/langs/zh_tw.dart @@ -84,6 +84,7 @@ const zhTW = { 'username': '名稱', 'password': '密碼', 'thanks': '感謝', - 'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!' + 'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!', + 'browserExtension': '瀏覽器擴充程式', } };