mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
feat: show country code piped instance list
This commit is contained in:
parent
17a25a501e
commit
60328a6baf
@ -6,6 +6,7 @@ import 'package:flutter_desktop_tools/flutter_desktop_tools.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:piped_client/piped_client.dart';
|
||||
import 'package:spotube/collections/env.dart';
|
||||
import 'package:spotube/collections/language_codes.dart';
|
||||
|
||||
@ -306,7 +307,10 @@ class SettingsPage extends HookConsumerWidget {
|
||||
.map(
|
||||
(e) => DropdownMenuItem(
|
||||
value: e.apiUrl,
|
||||
child: Text(e.name),
|
||||
child: Text(
|
||||
"${e.name}\n"
|
||||
"${e.locations.map(countryCodeToEmoji).join(" ")}",
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
@ -325,7 +329,7 @@ class SettingsPage extends HookConsumerWidget {
|
||||
);
|
||||
}),
|
||||
AdaptiveSelectTile<SearchMode>(
|
||||
secondary: const Icon(SpotubeIcons.youtube),
|
||||
secondary: const Icon(SpotubeIcons.search),
|
||||
title: Text(context.l10n.search_mode),
|
||||
value: preferences.searchMode,
|
||||
options: SearchMode.values
|
||||
|
@ -30,7 +30,7 @@ enum CloseBehavior {
|
||||
|
||||
enum SearchMode {
|
||||
youtube._internal('YouTube'),
|
||||
youtubeMusic._internal('YouTubeMusic');
|
||||
youtubeMusic._internal('YouTube Music');
|
||||
|
||||
final String label;
|
||||
|
||||
@ -83,7 +83,7 @@ class UserPreferences extends PersistedChangeNotifier {
|
||||
this.showSystemTrayIcon = true,
|
||||
this.locale = const Locale("system", "system"),
|
||||
this.pipedInstance = "https://pipedapi.kavin.rocks",
|
||||
this.searchMode = SearchMode.youtubeMusic,
|
||||
this.searchMode = SearchMode.youtube,
|
||||
this.skipNonMusic = true,
|
||||
}) : super() {
|
||||
if (downloadLocation.isEmpty) {
|
||||
|
Loading…
Reference in New Issue
Block a user