Compare commits

...

5 Commits

Author SHA1 Message Date
Guanciottaman
77ee387b00
Merge ff252d6b14 into c709de6bf1 2025-03-10 23:57:38 +06:00
Kingkor Roy Tirtho
c709de6bf1 fix: language picker search broken 2025-03-10 20:44:52 +06:00
Guanciottaman
ff252d6b14
Merge branch 'dev' into patch-1 2024-06-03 16:26:24 +02:00
Guanciottaman
195cad8f39
Update app_it.arb fixing translations 2024-03-27 20:54:18 +01:00
Guanciottaman
19f525fa3c
Update app_it.arb
Made the translations more friendly
2024-03-12 21:44:24 +01:00
4 changed files with 29 additions and 178 deletions

View File

@ -1,126 +0,0 @@
import 'package:shadcn_flutter/shadcn_flutter.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
class AnimateGradient extends HookWidget {
const AnimateGradient({
super.key,
required this.primaryColors,
required this.secondaryColors,
this.child,
this.primaryBegin,
this.primaryEnd,
this.secondaryBegin,
this.secondaryEnd,
AnimationController? controller,
this.duration = const Duration(seconds: 4),
this.animateAlignments = true,
this.reverse = true,
}) : assert(primaryColors.length >= 2),
assert(primaryColors.length == secondaryColors.length),
_controller = controller;
/// [controller]: pass this to have a fine control over the [Animation]
final AnimationController? _controller;
/// [duration]: Time to switch between [Gradient].
/// By default its value is [Duration(seconds:4)]
final Duration duration;
/// [primaryColors]: These will be the starting colors of the [Animation].
final List<Color> primaryColors;
/// [secondaryColors]: These Colors are those in which the [primaryColors] will transition into.
final List<Color> secondaryColors;
/// [primaryBegin]: This is begin [Alignment] for [primaryColors].
/// By default its value is [Alignment.topLeft]
final Alignment? primaryBegin;
/// [primaryBegin]: This is end [Alignment] for [primaryColors].
/// By default its value is [Alignment.topRight]
final Alignment? primaryEnd;
/// [secondaryBegin]: This is begin [Alignment] for [secondaryColors].
/// By default its value is [Alignment.bottomLeft]
final Alignment? secondaryBegin;
/// [secondaryEnd]: This is end [Alignment] for [secondaryColors].
/// By default its value is [Alignment.bottomRight]
final Alignment? secondaryEnd;
/// [animateAlignments]: set to false if you don't want to animate the alignments.
/// This can provide you way cooler animations
final bool animateAlignments;
/// [reverse]: set it to false if you don't want to reverse the animation.
/// using that it will go into one direction only
final bool reverse;
final Widget? child;
@override
Widget build(BuildContext context) {
// ignore: no_leading_underscores_for_local_identifiers
final __controller = useAnimationController(
duration: duration,
)..repeat(reverse: reverse);
final controller = _controller ?? __controller;
final animation = useMemoized(
() => CurvedAnimation(
parent: controller,
curve: Curves.easeInOut,
),
[controller]);
final colorTween = useMemoized(
() => primaryColors.map((color) {
return ColorTween(
begin: color,
end: color,
);
}).toList(),
[primaryColors]);
final colors = useMemoized(
() => colorTween.map((color) {
return color.evaluate(animation)!;
}).toList(),
[colorTween, animation]);
final begin = useMemoized(
() => AlignmentTween(
begin: primaryBegin ?? Alignment.topLeft,
end: primaryEnd ?? Alignment.topRight,
),
[primaryBegin, primaryEnd]);
final end = useMemoized(
() => AlignmentTween(
begin: secondaryBegin ?? Alignment.bottomLeft,
end: secondaryEnd ?? Alignment.bottomRight,
),
[secondaryBegin, secondaryEnd]);
return AnimatedBuilder(
animation: animation,
child: useMemoized(() => child, [child]),
builder: (BuildContext context, Widget? child) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: animateAlignments
? begin.evaluate(animation)
: (primaryBegin as Alignment),
end: animateAlignments
? end.evaluate(animation)
: primaryEnd as Alignment,
colors: colors,
),
),
child: child,
);
},
);
}
}

View File

@ -1,24 +0,0 @@
import 'package:shadcn_flutter/shadcn_flutter.dart';
class SpotubePage<T> extends MaterialPage<T> {
const SpotubePage({required super.child});
}
// class SpotubeSlidePage extends CustomTransitionPage {
// SpotubeSlidePage({
// required super.child,
// super.key,
// }) : super(
// reverseTransitionDuration: const Duration(milliseconds: 150),
// transitionDuration: const Duration(milliseconds: 150),
// transitionsBuilder: (context, animation, secondaryAnimation, child) {
// return SlideTransition(
// position: Tween<Offset>(
// begin: const Offset(1, 0),
// end: Offset.zero,
// ).animate(animation),
// child: child,
// );
// },
// );
// }

View File

@ -137,16 +137,16 @@
"pre_download_play_description": "Anzi che effettuare lo stream dell'audio, scarica invece i byte e li riproduce (raccomandato per gli utenti con banda più alta)",
"skip_non_music": "Salta i segmenti non di musica (SponsorBlock)",
"blacklist_description": "Tracce e artisti in blacklist",
"wait_for_download_to_finish": "Prego attendere che lo scaricamento corrente finisca",
"wait_for_download_to_finish": "Prego attendere che il download corrente finisca",
"desktop": "Desktop",
"close_behavior": "Comportamento Chiusura",
"close": "Chiudi",
"minimize_to_tray": "Minimizza in tray",
"show_tray_icon": "Mostra icona in tray di sistema",
"about": "A proposito di",
"about": "Informazioni su",
"u_love_spotube": "Sappiamo che ami Spotube",
"check_for_updates": "Controlla aggiornamenti",
"about_spotube": "A proposito di Spotube",
"about_spotube": "Informazioni su Spotube",
"blacklist": "Blacklist",
"please_sponsor": "Per favore sponsorizza/dona",
"spotube_description": "Spotube, un client spotify gratis per tutti, multipiattaforma e leggero",
@ -187,7 +187,7 @@
"generate_playlist": "Genera Playlist",
"track_exists": "La traccia {track} esiste già",
"replace_downloaded_tracks": "Sostituisci tutte le tracce scaricate",
"skip_download_tracks": "Salta lo scaricamento di tutte le tracce scaricate",
"skip_download_tracks": "Salta il download di tutte le tracce scaricate",
"do_you_want_to_replace": "Vuoi sovrascrivere la traccia esistente??",
"replace": "Sovrascrivi",
"skip": "Salta",
@ -256,7 +256,7 @@
"querying_info": "Richiesta informazioni...",
"piped_api_down": "Le Piped API non funzionano",
"piped_down_error_instructions": "L'istanza di Piped {pipedInstance} è correntemente offline\n\nCambia istanza o cambia 'Tipo API' alle API ufficiali YouTube\n\nAssicurati di riavviare l'app dopo il cambio",
"you_are_offline": "Sei correntemente offline",
"you_are_offline": "Al momento sei offline",
"connection_restored": "Connessione ad internet ripristinata",
"use_system_title_bar": "Usa la barra del titolo di sistema",
"crunching_results": "Elaborazione risultati...",
@ -267,15 +267,15 @@
"change_cover": "Cambia copertina",
"add_cover": "Aggiungi copertina",
"restore_defaults": "Ripristina default",
"download_music_codec": "Codec musicale scaricamento",
"streaming_music_codec": "Codec musicale streaming",
"login_with_lastfm": "Accesso a Last.fm",
"connect": "Connetti",
"disconnect_lastfm": "Disconnetti Last.fm",
"download_music_codec": "Codec download musica",
"streaming_music_codec": "Codec streaming musica",
"login_with_lastfm": "Accedi con Last.fm",
"connect": "Connettiti",
"disconnect_lastfm": "Disconnettiti da Last.fm",
"disconnect": "Disconnetti",
"username": "Nome utente",
"password": "Password",
"login": "Accesso",
"login": "Accedi",
"login_with_your_lastfm": "Accedi con il tuo account Last.fm",
"scrobble_to_lastfm": "Invia a Last.fm",
"audio_source": "Fonte audio",
@ -299,7 +299,7 @@
"song_link": "Link della Canzone",
"skip_this_nonsense": "Salta questa sciocchezza",
"freedom_of_music": "“Libertà della Musica”",
"freedom_of_music_palm": "“Libertà della Musica nel palmo della tua mano”",
"freedom_of_music_palm": "“Libertà della Musica nelle tue mani”",
"get_started": "Cominciamo",
"youtube_source_description": "Consigliato e funziona meglio.",
"piped_source_description": "Ti senti libero? Come YouTube ma molto più gratuito.",

View File

@ -133,37 +133,38 @@ class GettingStartedPageLanguageRegionSection extends HookConsumerWidget {
popup: SelectPopup.builder(
searchPlaceholder: Text(context.l10n.search),
builder: (context, searchQuery) {
final filteredLocale = searchQuery?.isNotEmpty != true
? L10n.all
final hasNotQueried =
searchQuery == null || searchQuery.trim().isEmpty;
final filteredLocale = hasNotQueried
? [
const Locale("system", "system"),
...L10n.all,
]
: L10n.all
.where(
(element) =>
filterLocale(element, searchQuery!),
(element) => filterLocale(
element,
searchQuery.trim(),
),
)
.toList();
return SelectItemBuilder(
childCount: filteredLocale.length + 1,
childCount: filteredLocale.length,
builder: (context, index) {
if (index == 0 &&
searchQuery?.isNotEmpty != true) {
final locale = filteredLocale[index];
if (locale == const Locale("system", "system")) {
return SelectItemButton(
value: const Locale("system", "system"),
value: locale,
child: Text(context.l10n.system_default),
);
}
final indexThen = searchQuery?.isNotEmpty != true
? index
: index - 1;
final locale = filteredLocale[indexThen];
return SelectItemButton(
value: locale,
child: Text(
LanguageLocals.getDisplayLanguage(
locale.languageCode)
.toString(),
locale.languageCode,
).toString(),
),
);
},