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
+157 -95

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ı',
}, },
}; };
+91 -90
View File
@@ -1,92 +1,93 @@
const viVN = { const viVN = {
'vi_VN': { 'vi_VN': {
'label': 'Tiếng Việt', 'label': 'Tiếng Việt',
'error': 'Lỗi', 'error': 'Lỗi',
'tip': 'Mẹo', 'tip': 'Mẹo',
'confirm': 'Xác nhận', 'confirm': 'Xác nhận',
'cancel': 'Hủy', 'cancel': 'Hủy',
'on': 'Bật', 'on': 'Bật',
'off': 'Tắt', 'off': 'Tắt',
'selectAll': 'Chọn tất cả', 'selectAll': 'Chọn tất cả',
'task': 'Nhiệm vụ', 'task': 'Nhiệm vụ',
'downloading': 'đang tải', 'downloading': 'đang tải',
'downloaded': 'đã tải', 'downloaded': 'đã tải',
'setting': 'Cài đặt', 'setting': 'Cài đặt',
'donate': 'Ủng hộ', 'donate': 'Ủng hộ',
'exit': 'Thoát', 'exit': 'Thoát',
'create': 'Tạo nhiệm vụ', 'create': 'Tạo nhiệm vụ',
'directDownload': 'Tải trực tiếp', 'directDownload': 'Tải trực tiếp',
'advancedOptions': 'Tùy chọn nâng cao', 'advancedOptions': 'Tùy chọn nâng cao',
'downloadLink': 'Liên kết tải về', 'downloadLink': 'Liên kết tải về',
'downloadLinkValid': 'Vui lòng nhập liên kết tải về', 'downloadLinkValid': 'Vui lòng nhập liên kết tải về',
'downloadLinkHit': 'downloadLinkHit':
'Vui lòng nhập liên kết tải về, hỗ trợ HTTP/HTTPS/MAGNET@append', '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', 'downloadLinkHitDesktop': ', hoặc kéo tệp torrent vào đây trực tiếp',
'download': 'Tải về', 'download': 'Tải về',
'noFileSelected': 'Vui lòng chọn ít nhất một tệp để tiếp tục.', '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ữ', 'noStoragePermission': 'Yêu cầu quyền lưu trữ',
'selectFile': 'Chọn tệp', 'selectFile': 'Chọn tệp',
'rename': 'Đổi tên', 'rename': 'Đổi tên',
'basic': 'Cơ bản', 'basic': 'Cơ bản',
'advanced': 'Nâng cao', 'advanced': 'Nâng cao',
'general': 'Chung', 'general': 'Chung',
'downloadDir': 'Thư mục tải về', 'downloadDir': 'Thư mục tải về',
'downloadDirValid': 'Vui lòng chọn thư mục tải về', 'downloadDirValid': 'Vui lòng chọn thư mục tải về',
'connections': 'Kết nối', 'connections': 'Kết nối',
'useServerCtime': 'Sử dụng thời gian máy chủ cho việc tạo tệp', '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', 'maxRunning': 'Số nhiệm vụ tối đa',
'items': '@count mục', 'items': '@count mục',
'subscribeTracker': 'Theo dõi Tracker', 'subscribeTracker': 'Theo dõi Tracker',
'subscribeFail': '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', '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', 'update': 'Cập nhật',
'updateDaily': 'Cập nhật hàng ngày', 'updateDaily': 'Cập nhật hàng ngày',
'lastUpdate': 'Cập nhật lần cuối: @time', 'lastUpdate': 'Cập nhật lần cuối: @time',
'addTracker': 'Thêm Tracker', 'addTracker': 'Thêm Tracker',
'addTrackerHit': 'Vui lòng nhập địa chỉ máy chủ tracker, mỗi dòng một', 'addTrackerHit': 'Vui lòng nhập địa chỉ máy chủ tracker, mỗi dòng một',
'ui': 'Giao diện', 'ui': 'Giao diện',
'theme': 'Chủ đề', 'theme': 'Chủ đề',
'themeSystem': 'Hệ thống', 'themeSystem': 'Hệ thống',
'themeLight': 'Sáng', 'themeLight': 'Sáng',
'themeDark': 'Tối', 'themeDark': 'Tối',
'locale': 'Ngôn ngữ', 'locale': 'Ngôn ngữ',
'about': 'Về chúng tôi', 'about': 'Về chúng tôi',
'homepage': 'Trang chủ', 'homepage': 'Trang chủ',
'version': 'Phiên bản', 'version': 'Phiên bản',
'protocol': 'Giao thức', 'protocol': 'Giao thức',
'port': 'Cổng', 'port': 'Cổng',
'apiToken': 'Mã API', 'apiToken': 'Mã API',
'notSet': 'Chưa đặt', 'notSet': 'Chưa đặt',
'set': 'Đặt', 'set': 'Đặt',
'effectAfterRestart': 'Hiệu lực sau khi khởi động lại', 'effectAfterRestart': 'Hiệu lực sau khi khởi động lại',
'startAll': 'Bắt đầu tất cả', 'startAll': 'Bắt đầu tất cả',
'pauseAll': 'Tạm dừng tất cả', 'pauseAll': 'Tạm dừng tất cả',
'deleteTask': 'Xóa nhiệm vụ', 'deleteTask': 'Xóa nhiệm vụ',
'deleteTaskTip': 'Giữ các tệp đã tải về', 'deleteTaskTip': 'Giữ các tệp đã tải về',
'delete': 'Xóa', 'delete': 'Xóa',
'newVersionTitle': 'Khám phá phiên bản mới @version', 'newVersionTitle': 'Khám phá phiên bản mới @version',
'newVersionUpdate': 'Cập nhật ngay', 'newVersionUpdate': 'Cập nhật ngay',
'newVersionLater': 'Sau', 'newVersionLater': 'Sau',
'extensions': 'Tiện ích mở rộng', 'extensions': 'Tiện ích mở rộng',
'extensionInstallUrl': 'Liên kết cài đặt', 'extensionInstallUrl': 'Liên kết cài đặt',
'extensionInstallSuccess': 'Cài đặt thành công', 'extensionInstallSuccess': 'Cài đặt thành công',
'extensionUpdateSuccess': 'Cập nhật thành công', 'extensionUpdateSuccess': 'Cập nhật thành công',
'extensionDelete': 'Xóa tiện ích mở rộng', 'extensionDelete': 'Xóa tiện ích mở rộng',
'extensionAlreadyLatest': 'Đây đã là phiên bản mới nhất', 'extensionAlreadyLatest': 'Đây đã là phiên bản mới nhất',
'extensionFind': 'Tìm tiện ích mở rộng', 'extensionFind': 'Tìm tiện ích mở rộng',
'extensionDevelop': 'Phát triển tiện ích mở rộng', 'extensionDevelop': 'Phát triển tiện ích mở rộng',
'history': 'Lịch sử', 'history': 'Lịch sử',
'clearHistory': 'Xóa lịch sử', 'clearHistory': 'Xóa lịch sử',
'noHistoryFound': 'Không tìm thấy lịch sử', 'noHistoryFound': 'Không tìm thấy lịch sử',
'serviceTitle': 'Dịch vụ Tải xuống', 'serviceTitle': 'Dịch vụ Tải xuống',
'serviceText': 'Đang chạy', 'serviceText': 'Đang chạy',
'network': 'Mạng', 'network': 'Mạng',
'proxy': 'Proxy', 'proxy': 'Proxy',
'server': 'Máy chủ', 'server': 'Máy chủ',
'username': 'Tên đăng nhập', 'username': 'Tên đăng nhập',
'password': 'Mật khẩu', 'password': 'Mật khẩu',
'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': '瀏覽器擴充程式',
} }
}; };