mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 22:33:42 +00:00
feat: add browser extension link (#433)
This commit is contained in:
10 files changed
+67
-5
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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',
|
||||
},
|
||||
};
|
||||
@@ -60,5 +60,6 @@ const faIR = {
|
||||
'thanks': 'تشکر',
|
||||
'thanksDesc':
|
||||
'از تمامی افرادی که در ساخت و توسعهی جامعهی Gopeed مشارکت کردهاند، سپاسگزاری میکنیم!',
|
||||
'browserExtension': 'فایل های دانلود شده را نگه دارد',
|
||||
}
|
||||
};
|
||||
@@ -61,5 +61,6 @@ const jaJP = {
|
||||
'newVersionLater': '後で',
|
||||
'thanks': '感謝',
|
||||
'thanksDesc': 'Gopeedコミュニティの建設に協力してくださったすべての貢献者の方々に感謝します!',
|
||||
'browserExtension': 'ブラウザ拡張機能',
|
||||
}
|
||||
};
|
||||
@@ -76,5 +76,6 @@ const ruRU = {
|
||||
'thanks': 'Благодарности',
|
||||
'thanksDesc':
|
||||
'Благодарим всех участников за их вклад в строительство и развитие сообщества Gopeed!',
|
||||
'browserExtension': 'Расширение браузера',
|
||||
}
|
||||
};
|
||||
@@ -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ı',
|
||||
},
|
||||
};
|
||||
@@ -88,5 +88,6 @@ const viVN = {
|
||||
'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',
|
||||
},
|
||||
};
|
||||
@@ -85,5 +85,6 @@ const zhCN = {
|
||||
'password': '密码',
|
||||
'thanks': '鸣谢',
|
||||
'thanksDesc': '感谢所有为 Gopeed 社区建设添砖加瓦的贡献者们!',
|
||||
'browserExtension': '浏览器扩展',
|
||||
}
|
||||
};
|
||||
@@ -84,6 +84,7 @@ const zhTW = {
|
||||
'username': '名稱',
|
||||
'password': '密碼',
|
||||
'thanks': '感謝',
|
||||
'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!'
|
||||
'thanksDesc': '感謝所有為 Gopeed 社區建設添磚加瓦的貢獻者們!',
|
||||
'browserExtension': '瀏覽器擴充程式',
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user