feat: add browser extension link (#433)

This commit is contained in:
Levi
2024-03-30 09:12:24 +08:00
committed by GitHub
parent 56ef25065e
commit 207c287c97
10 changed files with 157 additions and 95 deletions
@@ -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<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
final httpConfig = downloaderCfg.value.protocolConfig.http;
@@ -687,8 +697,11 @@ class SettingView extends GetView<SettingController> {
Text('general'.tr),
Card(
child: Column(
children: _addDivider(
[buildDownloadDir(), buildMaxRunning()]),
children: _addDivider([
buildDownloadDir(),
buildMaxRunning(),
buildBrowserExtension()
]),
)),
const Text('HTTP'),
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',
'thanksDesc':
'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': 'تشکر',
'thanksDesc':
'از تمامی افرادی که در ساخت و توسعه‌ی جامعه‌ی Gopeed مشارکت کرده‌اند، سپاسگزاری می‌کنیم!',
'browserExtension': 'فایل های دانلود شده را نگه دارد',
}
};
+1
View File
@@ -61,5 +61,6 @@ const jaJP = {
'newVersionLater': '後で',
'thanks': '感謝',
'thanksDesc': 'Gopeedコミュニティの建設に協力してくださったすべての貢献者の方々に感謝します!',
'browserExtension': 'ブラウザ拡張機能',
}
};
+1
View File
@@ -76,5 +76,6 @@ const ruRU = {
'thanks': 'Благодарности',
'thanksDesc':
'Благодарим всех участников за их вклад в строительство и развитие сообщества Gopeed!',
'browserExtension': 'Расширение браузера',
}
};
+5 -2
View File
@@ -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ı',
},
};
+91 -90
View File
@@ -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',
},
};
+1
View File
@@ -85,5 +85,6 @@ const zhCN = {
'password': '密码',
'thanks': '鸣谢',
'thanksDesc': '感谢所有为 Gopeed 社区建设添砖加瓦的贡献者们!',
'browserExtension': '浏览器扩展',
}
};
+2 -1
View File
@@ -84,6 +84,7 @@ const zhTW = {
'username': '名稱',
'password': '密碼',
'thanks': '感謝',
'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!'
'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!',
'browserExtension': '瀏覽器擴充程式',
}
};