mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-13 05:16:43 +02:00
Add welcome dialog (#2084)
This commit is contained in:
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Želite li ukloniti aplikaciju?",
|
||||
"other": "Želite li ukloniti aplikacije?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Název",
|
||||
"smartname": "Název (Smart)",
|
||||
"sortMethod": "Metoda třídění",
|
||||
"welcome": "Vítejte na",
|
||||
"documentationLinksNote": "Níže odkazovaná stránka Obtainium GitHub obsahuje odkazy na videa, články, diskuse a další zdroje, které vám pomohou pochopit, jak aplikaci používat.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Odstranit Apku?",
|
||||
"other": "Odstranit Apky?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Navn",
|
||||
"smartname": "Navn (Smart)",
|
||||
"sortMethod": "Sorteringsmetode",
|
||||
"welcome": "Velkommen",
|
||||
"documentationLinksNote": "Obtainiums GitHub-side, som der linkes til nedenfor, indeholder links til videoer, artikler, diskussioner og andre ressourcer, som kan hjælpe dig med at forstå, hvordan du bruger appen.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Fjern app?",
|
||||
"other": "Fjern apps?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sortierverfahren",
|
||||
"welcome": "Willkommen",
|
||||
"documentationLinksNote": "Die unten verlinkte GitHub-Seite von Obtainium enthält Links zu Videos, Artikeln, Diskussionen und anderen Ressourcen, die Ihnen helfen werden, die Verwendung der App zu verstehen.",
|
||||
"removeAppQuestion": {
|
||||
"one": "App entfernen?",
|
||||
"other": "Apps entfernen?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Forigi la aplikaĵon?",
|
||||
"other": "Forigi la aplikaĵojn?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Remove App?",
|
||||
"other": "Remove Apps?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nombre",
|
||||
"smartname": "Nombre (Smart)",
|
||||
"sortMethod": "Método de clasificación",
|
||||
"welcome": "Bienvenido",
|
||||
"documentationLinksNote": "La página GitHub de Obtainium enlazada a continuación contiene enlaces a vídeos, artículos, debates y otros recursos que te ayudarán a entender cómo utilizar la aplicación.",
|
||||
"removeAppQuestion": {
|
||||
"one": "¿Eliminar aplicación?",
|
||||
"other": "¿Eliminar aplicaciones?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "برنامه حذف شود؟",
|
||||
"other": "برنامه ها حذف شوند؟"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nom",
|
||||
"smartname": "Nom (Smart)",
|
||||
"sortMethod": "Méthode de tri",
|
||||
"welcome": "Bienvenue",
|
||||
"documentationLinksNote": "La page GitHub d'Obtainium, dont le lien figure ci-dessous, contient des liens vers des vidéos, des articles, des discussions et d'autres ressources qui vous aideront à comprendre comment utiliser l'application.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Supprimer l'application ?",
|
||||
"other": "Supprimer les applications ?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Név",
|
||||
"smartname": "Név (Okos)",
|
||||
"sortMethod": "Rendezési eljárás",
|
||||
"welcome": "Üdvözöljük",
|
||||
"documentationLinksNote": "Az alább linkelt Obtainium GitHub oldal videókra, cikkekre, beszélgetésekre és egyéb forrásokra mutató linkeket tartalmaz, amelyek segítenek megérteni az alkalmazás használatát.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Eltávolítja az alkalmazást?",
|
||||
"other": "Eltávolítja az alkalmazásokat?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nama",
|
||||
"smartname": "Nama (Cerdas)",
|
||||
"sortMethod": "Metode Penyortiran",
|
||||
"welcome": "Selamat datang.",
|
||||
"documentationLinksNote": "Halaman GitHub Obtainium yang ditautkan di bawah ini berisi tautan ke video, artikel, diskusi, dan sumber daya lain yang akan membantu Anda memahami cara menggunakan aplikasi.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Hapus aplikasi?",
|
||||
"other": "Hapus aplikasi?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nome",
|
||||
"smartname": "Nome (intelligente)",
|
||||
"sortMethod": "Metodo di ordinamento",
|
||||
"welcome": "Benvenuti",
|
||||
"documentationLinksNote": "La pagina GitHub di Obtainium collegata qui sotto contiene collegamenti a video, articoli, discussioni e altre risorse che vi aiuteranno a capire come utilizzare l'applicazione.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Rimuovere l'app?",
|
||||
"other": "Rimuovere le app?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "名前(スマート)",
|
||||
"sortMethod": "ソート方法",
|
||||
"welcome": "ようこそ",
|
||||
"documentationLinksNote": "以下のリンクにあるObtainium GitHubページには、ビデオ、記事、ディスカッション、その他のリソースへのリンクがあり、アプリの使い方を理解するのに役立ちます。",
|
||||
"removeAppQuestion": {
|
||||
"one": "アプリを削除しますか?",
|
||||
"other": "アプリを削除しますか?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "이름",
|
||||
"smartname": "이름(스마트)",
|
||||
"sortMethod": "정렬 방법",
|
||||
"welcome": "환영",
|
||||
"documentationLinksNote": "아래에 링크된 Obtainium 깃허브 페이지에는 앱 사용 방법을 이해하는 데 도움이 되는 동영상, 기사, 토론 및 기타 리소스에 대한 링크가 포함되어 있습니다.",
|
||||
"removeAppQuestion": {
|
||||
"one": "앱을 제거하시겠습니까?",
|
||||
"other": "앱을 제거하시겠습니까?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Naam",
|
||||
"smartname": "Naam (Slim)",
|
||||
"sortMethod": "Sorteermethode",
|
||||
"welcome": "Welkom",
|
||||
"documentationLinksNote": "De GitHub pagina van Obtainium waarnaar hieronder wordt gelinkt bevat links naar video's, artikelen, discussies en andere bronnen die je zullen helpen begrijpen hoe je de app kunt gebruiken.",
|
||||
"removeAppQuestion": {
|
||||
"one": "App verwijderen?",
|
||||
"other": "Apps verwijderen?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nazwa",
|
||||
"smartname": "Nazwa (Smart)",
|
||||
"sortMethod": "Metoda sortowania",
|
||||
"welcome": "Witamy",
|
||||
"documentationLinksNote": "Strona Obtainium GitHub, do której link znajduje się poniżej, zawiera linki do filmów, artykułów, dyskusji i innych zasobów, które pomogą ci zrozumieć, jak korzystać z aplikacji.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Usunąć aplikację?",
|
||||
"few": "Usunąć aplikacje?",
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Nome",
|
||||
"smartname": "Nome (Smart)",
|
||||
"sortMethod": "Método de ordenação",
|
||||
"welcome": "Bem-vindo",
|
||||
"documentationLinksNote": "A página do Obtainium no GitHub com a ligação abaixo contém ligações para vídeos, artigos, discussões e outros recursos que o ajudarão a compreender como utilizar a aplicação.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Remover aplicativo?",
|
||||
"other": "Remover aplicativos?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Имя",
|
||||
"smartname": "Имя (умное)",
|
||||
"sortMethod": "Метод сортировки",
|
||||
"welcome": "Добро пожаловать",
|
||||
"documentationLinksNote": "На странице Obtainium GitHub, ссылка на которую приведена ниже, содержатся ссылки на видео, статьи, обсуждения и другие ресурсы, которые помогут вам понять, как пользоваться приложением.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Удалить приложение?",
|
||||
"other": "Удалить приложения?"
|
||||
|
@ -16,6 +16,7 @@ const neverAutoTranslate = {
|
||||
placeholder: ['pl'],
|
||||
importExport: ['fr'],
|
||||
url: ['fr'],
|
||||
name: ['ja'],
|
||||
tencentAppStore: ['*']
|
||||
}
|
||||
|
||||
@ -89,7 +90,7 @@ const main = async () => {
|
||||
await new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
resolve()
|
||||
}, Math.random() * 1000); // Try to avoid rate limit
|
||||
}, Math.random() * 10000); // Try to avoid rate limit
|
||||
})
|
||||
const response = await translateText(str, lang, deeplAPIKey)
|
||||
if (response.translations) {
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Namn",
|
||||
"smartname": "Namn (Smart)",
|
||||
"sortMethod": "Sorteringsmetod",
|
||||
"welcome": "Välkommen",
|
||||
"documentationLinksNote": "Obtainium GitHub-sidan som länkas nedan innehåller länkar till videor, artiklar, diskussioner och andra resurser som hjälper dig att förstå hur du använder appen.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Ta Bort App?",
|
||||
"other": "Ta Bort Appar?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "İsim",
|
||||
"smartname": "İsim (Akıllı)",
|
||||
"sortMethod": "Sıralama Yöntemi",
|
||||
"welcome": "Hoş geldiniz",
|
||||
"documentationLinksNote": "Aşağıda bağlantısı verilen Obtainium GitHub sayfası, uygulamayı nasıl kullanacağınızı anlamanıza yardımcı olacak videolara, makalelere, tartışmalara ve diğer kaynaklara bağlantılar içerir.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Uygulamayı Kaldır?",
|
||||
"other": "Uygulamaları Kaldır?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Ім'я",
|
||||
"smartname": "Ім'я (Smart)",
|
||||
"sortMethod": "Метод сортування",
|
||||
"welcome": "Ласкаво просимо.",
|
||||
"documentationLinksNote": "Сторінка Obtainium на GitHub, посилання на яку наведено нижче, містить посилання на відео, статті, дискусії та інші ресурси, які допоможуть вам зрозуміти, як користуватися додатком.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Видалити застосунок?",
|
||||
"other": "Видалити застосунки?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "Gỡ ứng dụng?",
|
||||
"other": "Gỡ ứng dụng?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "Name",
|
||||
"smartname": "Name (Smart)",
|
||||
"sortMethod": "Sort Method",
|
||||
"welcome": "Welcome",
|
||||
"documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.",
|
||||
"removeAppQuestion": {
|
||||
"one": "移除應用程式?",
|
||||
"other": "移除應用程式?"
|
||||
|
@ -322,6 +322,8 @@
|
||||
"name": "名称",
|
||||
"smartname": "姓名(智能)",
|
||||
"sortMethod": "排序方法",
|
||||
"welcome": "欢迎光临",
|
||||
"documentationLinksNote": "下面链接的 Obtainium GitHub 页面包含视频、文章、讨论和其他资源的链接,可帮助您了解如何使用该应用程序。",
|
||||
"removeAppQuestion": {
|
||||
"one": "是否删除应用?",
|
||||
"other": "是否删除应用?"
|
||||
|
@ -15,6 +15,7 @@ import 'package:obtainium/providers/apps_provider.dart';
|
||||
import 'package:obtainium/providers/settings_provider.dart';
|
||||
import 'package:obtainium/providers/source_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({super.key});
|
||||
@ -54,6 +55,45 @@ class _HomePageState extends State<HomePage> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
initDeepLinks();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
var sp = context.read<SettingsProvider>();
|
||||
if (!sp.welcomeShown) {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext ctx) {
|
||||
return AlertDialog(
|
||||
title: Text(tr('welcome')),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 20,
|
||||
children: [
|
||||
Text(tr('documentationLinksNote')),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
launchUrlString(
|
||||
'https://github.com/ImranR98/Obtainium/blob/main/README.md',
|
||||
mode: LaunchMode.externalApplication);
|
||||
},
|
||||
child: Text(
|
||||
'https://github.com/ImranR98/Obtainium/blob/main/README.md',
|
||||
style: const TextStyle(
|
||||
decoration: TextDecoration.underline,
|
||||
fontWeight: FontWeight.bold),
|
||||
)),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
sp.welcomeShown = true;
|
||||
Navigator.of(context).pop(null);
|
||||
},
|
||||
child: Text(tr('ok'))),
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> initDeepLinks() async {
|
||||
|
@ -150,6 +150,15 @@ class SettingsProvider with ChangeNotifier {
|
||||
return result;
|
||||
}
|
||||
|
||||
bool get welcomeShown {
|
||||
return prefs?.getBool('welcomeShown') ?? false;
|
||||
}
|
||||
|
||||
set welcomeShown(bool welcomeShown) {
|
||||
prefs?.setBool('welcomeShown', welcomeShown);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool checkJustStarted() {
|
||||
if (justStarted) {
|
||||
justStarted = false;
|
||||
|
Reference in New Issue
Block a user