Add "Enable all" and "Disable all" in the language selection screen #126

This commit is contained in:
kodjomoustapha 2024-02-20 13:30:21 +01:00
parent bdbd738f04
commit 72a212b4a5
14 changed files with 74 additions and 13 deletions

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "زائد",
"blend_mode_exclusion": "استثناء",
"custom_color_filter": "مرشح اللون المخصص",
"color_filter_blend_mode": "وضع امتزاج مرشح اللون"
"color_filter_blend_mode": "وضع امتزاج مرشح اللون",
"enable_all": "تمكين الكل",
"disable_all": "تعطيل الكل"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Plus",
"blend_mode_exclusion": "Ausschluss",
"custom_color_filter": "Benutzerdefinierter Farbfilter",
"color_filter_blend_mode": "Farbfilter-Mischmodus"
"color_filter_blend_mode": "Farbfilter-Mischmodus",
"enable_all": "Alle aktivieren",
"disable_all": "Alle deaktivieren"
}

View file

@ -310,5 +310,7 @@
"blend_mode_plus": "Plus",
"blend_mode_exclusion": "Exclusion",
"custom_color_filter": "Custom color filter",
"color_filter_blend_mode": "Color filter blend mode"
"color_filter_blend_mode": "Color filter blend mode",
"enable_all": "Enable all",
"disable_all": "Disable all"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Más",
"blend_mode_exclusion": "Exclusión",
"custom_color_filter": "Filtro de color personalizado",
"color_filter_blend_mode": "Modo de mezcla de filtro de color"
"color_filter_blend_mode": "Modo de mezcla de filtro de color",
"enable_all": "Activar todo",
"disable_all": "Desactivar todo"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Más",
"blend_mode_exclusion": "Exclusión",
"custom_color_filter": "Filtro de color personalizado",
"color_filter_blend_mode": "Modo de mezcla del filtro de color"
"color_filter_blend_mode": "Modo de mezcla del filtro de color",
"enable_all": "Activar todo",
"disable_all": "Desactivar todo"
}

View file

@ -309,5 +309,7 @@
"blend_mode_plus": "Ajout",
"blend_mode_exclusion": "Exclusion",
"custom_color_filter": "Filtre de couleur personnalisé",
"color_filter_blend_mode": "Mode de fusion du filtre de couleur"
"color_filter_blend_mode": "Mode de fusion du filtre de couleur",
"enable_all": "Activer tout",
"disable_all": "Désactiver tout"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Tambah",
"blend_mode_exclusion": "Pengecualian",
"custom_color_filter": "Filter warna kustom",
"color_filter_blend_mode": "Mode pencampuran filter warna"
"color_filter_blend_mode": "Mode pencampuran filter warna",
"enable_all": "Aktifkan semua",
"disable_all": "Nonaktifkan semua"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Più",
"blend_mode_exclusion": "Esclusione",
"custom_color_filter": "Filtro colore personalizzato",
"color_filter_blend_mode": "Modalità di miscelazione del filtro colore"
"color_filter_blend_mode": "Modalità di miscelazione del filtro colore",
"enable_all": "Abilita tutto",
"disable_all": "Disabilita tutto"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Mais",
"blend_mode_exclusion": "Exclusão",
"custom_color_filter": "Filtro de cor personalizado",
"color_filter_blend_mode": "Modo de mistura do filtro de cor"
"color_filter_blend_mode": "Modo de mistura do filtro de cor",
"enable_all": "Ativar tudo",
"disable_all": "Desativar tudo"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Mais",
"blend_mode_exclusion": "Exclusão",
"custom_color_filter": "Filtro de cor personalizado",
"color_filter_blend_mode": "Modo de mistura de filtro de cor"
"color_filter_blend_mode": "Modo de mistura de filtro de cor",
"enable_all": "Ativar todos",
"disable_all": "Desativar todos"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Плюс",
"blend_mode_exclusion": "Исключение",
"custom_color_filter": "Пользовательский цветной фильтр",
"color_filter_blend_mode": "Режим смешивания цветового фильтра"
"color_filter_blend_mode": "Режим смешивания цветового фильтра",
"enable_all": "Включить все",
"disable_all": "Отключить все"
}

View file

@ -308,5 +308,7 @@
"blend_mode_plus": "Artı",
"blend_mode_exclusion": "Dışlama",
"custom_color_filter": "Özel renk filtresi",
"color_filter_blend_mode": "Renk filtresi karışım modu"
"color_filter_blend_mode": "Renk filtresi karışım modu",
"enable_all": "Tümünü Etkinleştir",
"disable_all": "Tümünü Devre Dışı Bırak"
}

View file

@ -310,5 +310,7 @@
"blend_mode_plus": "加",
"blend_mode_exclusion": "排除",
"custom_color_filter": "自定义颜色滤镜",
"color_filter_blend_mode": "颜色滤镜混合模式"
"color_filter_blend_mode": "颜色滤镜混合模式",
"enable_all": "启用全部",
"disable_all": "禁用全部"
}

View file

@ -5,6 +5,7 @@ import 'package:mangayomi/main.dart';
import 'package:mangayomi/models/source.dart';
import 'package:mangayomi/providers/l10n_providers.dart';
import 'package:mangayomi/modules/browse/extension/widgets/extension_lang_list_tile_widget.dart';
import 'package:mangayomi/utils/global_style.dart';
class ExtensionsLang extends ConsumerWidget {
final bool isManga;
@ -16,6 +17,40 @@ class ExtensionsLang extends ConsumerWidget {
return Scaffold(
appBar: AppBar(
title: Text(l10n.extensions),
actions: [
PopupMenuButton(
popUpAnimationStyle: popupAnimationStyle,
itemBuilder: (context) {
return [
PopupMenuItem<int>(
value: 0,
child: Text(l10n.enable_all),
),
PopupMenuItem<int>(
value: 1,
child: Text(l10n.disable_all),
),
];
},
onSelected: (value) {
isar.writeTxnSync(() {
bool enable = true;
if (value == 0) {
} else if (value == 1) {
enable = false;
}
final sources = isar.sources
.filter()
.idIsNotNull()
.and()
.isMangaEqualTo(isManga)
.findAllSync();
for (var source in sources) {
isar.sources.putSync(source..isActive = enable);
}
});
}),
],
),
body: StreamBuilder(
stream: isar.sources