fix: login dialog stays after login, mention sp_gaid in tutorial

This commit is contained in:
Kingkor Roy Tirtho 2023-08-04 21:25:01 +06:00
parent aee84a8167
commit b492840512
12 changed files with 90 additions and 57 deletions

View File

@ -38,8 +38,8 @@ class TokenLoginForm extends HookConsumerWidget {
TextField(
controller: keyCodeController,
decoration: InputDecoration(
hintText: context.l10n.spotify_cookie("\"sp_key\""),
labelText: context.l10n.cookie_name_cookie("sp_key"),
hintText: context.l10n.spotify_cookie("\"sp_key (or sp_gaid)\""),
labelText: context.l10n.cookie_name_cookie("sp_key (or sp_gaid)"),
),
keyboardType: TextInputType.visiblePassword,
),

View File

@ -176,14 +176,15 @@
"step_2": "ধাপ 2",
"step_2_steps": "১. একবার আপনি লগ ইন করলে, ব্রাউজার ডেভটুল খুলতে F12 বা মাউসের রাইট ক্লিক > \"Inspect to open Browser DevTools\" টিপুন।\n২. তারপর \"Application\" ট্যাবে যান (Chrome, Edge, Brave etc..) অথবা \"Storage\" Tab (Firefox, Palemoon etc..)\n৩. \"Cookies \" বিভাগে যান তারপর \"https://accounts.spotify.com\" উপবিভাগে যান",
"step_3": "ধাপ 3",
"step_3_steps": "\"sp_dc\" এবং \"sp_key\" কুকিজের মান কপি করুন",
"step_3_steps": "\"sp_dc\" এবং \"sp_key\" (অথবা sp_gaid) কুকিজের মান কপি করুন",
"success_emoji": "আমরা সফল🥳",
"success_message": "এখন আপনি সফলভাবে আপনার Spotify অ্যাকাউন্ট দিয়ে লগ ইন করেছেন। সাধুভাত আপনাকে",
"step_4": "ধাপ 4",
"step_4_steps": "কপি করা \"sp_dc\" এবং \"sp_key\" এর মান সংশ্লিষ্ট ফিল্ডে পেস্ট করুন",
"step_4_steps": "কপি করা \"sp_dc\" এবং \"sp_key\" (অথবা sp_gaid) এর মান সংশ্লিষ্ট ফিল্ডে পেস্ট করুন",
"something_went_wrong": "কিছু ভুল হয়েছে",
"piped_instance": "Piped সার্ভার এড্রেস",
"piped_description": "গান ম্যাচ করার জন্য ব্যবহৃত পাইপড সার্ভার\n এগুলোর মধ্যে কিছু ভাল কাজ নাও করতে পারে৷ তাই নিজ দায়িত্বে ব্যবহার করুন",
"piped_description": "গান ম্যাচ করার জন্য ব্যবহৃত পাইপড সার্ভার",
"piped_warning": "এগুলোর মধ্যে কিছু ভাল কাজ নাও করতে পারে৷ তাই নিজ দায়িত্বে ব্যবহার করুন",
"generate_playlist": "প্লেলিস্ট তৈরি করুন",
"track_exists": "ট্র্যাক {track} ইতিমধ্যে বিদ্যমান",
"replace_downloaded_tracks": "সমস্ত ডাউনলোড করা ট্র্যাক প্রতিস্থাপন করুন",

View File

@ -176,14 +176,15 @@
"step_2": "Schritt 2",
"step_2_steps": "1. Wenn du angemeldet bist, drücke F12 oder klicke mit der rechten Maustaste > Inspektion, um die Browser-Entwicklertools zu öffnen.\n2. Gehe dann zum \"Anwendungs\"-Tab (Chrome, Edge, Brave usw.) oder zum \"Storage\"-Tab (Firefox, Palemoon usw.)\n3. Gehe zum Abschnitt \"Cookies\" und dann zum Unterabschnitt \"https://accounts.spotify.com\"",
"step_3": "Schritt 3",
"step_3_steps": "Kopiere die Werte der Cookies \"sp_dc\" und \"sp_key\"",
"step_3_steps": "Kopiere die Werte der Cookies \"sp_dc\" und \"sp_key\" (oder sp_gaid)",
"success_emoji": "Erfolg🥳",
"success_message": "Jetzt bist du erfolgreich mit deinem Spotify-Konto angemeldet. Gut gemacht, Kumpel!",
"step_4": "Schritt 4",
"step_4_steps": "Füge die kopierten Werte von \"sp_dc\" und \"sp_key\" in die entsprechenden Felder ein",
"step_4_steps": "Füge die kopierten Werte von \"sp_dc\" und \"sp_key\" (oder sp_gaid) in die entsprechenden Felder ein",
"something_went_wrong": "Etwas ist schiefgelaufen",
"piped_instance": "Piped-Serverinstanz",
"piped_description": "Die Piped-Serverinstanz, die zur Titelzuordnung verwendet werden soll\nEinige von ihnen funktionieren möglicherweise nicht gut. Verwende sie also auf eigenes Risiko",
"piped_description": "Die Piped-Serverinstanz, die zur Titelzuordnung verwendet werden soll",
"piped_warning": "Einige von ihnen funktionieren möglicherweise nicht gut. Verwende sie also auf eigenes Risiko",
"generate_playlist": "Playlist generieren",
"track_exists": "Track {track} existiert bereits",
"replace_downloaded_tracks": "Alle heruntergeladenen Titel ersetzen",

View File

@ -176,14 +176,15 @@
"step_2": "Step 2",
"step_2_steps": "1. Once you're logged in, press F12 or Mouse Right Click > Inspect to Open the Browser devtools.\n2. Then go the \"Application\" Tab (Chrome, Edge, Brave etc..) or \"Storage\" Tab (Firefox, Palemoon etc..)\n3. Go to the \"Cookies\" section then the \"https://accounts.spotify.com\" subsection",
"step_3": "Step 3",
"step_3_steps": "Copy the values of \"sp_dc\" and \"sp_key\" Cookies",
"step_3_steps": "Copy the values of \"sp_dc\" and \"sp_key\" (or sp_gaid) Cookies",
"success_emoji": "Success🥳",
"success_message": "Now you're successfully Logged In with your Spotify account. Good Job, mate!",
"step_4": "Step 4",
"step_4_steps": "Paste the copied \"sp_dc\" and \"sp_key\" values in the respective fields",
"step_4_steps": "Paste the copied \"sp_dc\" and \"sp_key\" (or sp_gaid) values in the respective fields",
"something_went_wrong": "Something went wrong",
"piped_instance": "Piped Server Instance",
"piped_description": "The Piped server instance to use for track matching\nSome of them might not work well. So use at your own risk",
"piped_description": "The Piped server instance to use for track matching",
"piped_warning": "Some of them might not work well. So use at your own risk",
"generate_playlist": "Generate Playlist",
"track_exists": "Track {track} already exists",
"replace_downloaded_tracks": "Replace all downloaded tracks",

View File

@ -176,14 +176,15 @@
"step_2": "Paso 2",
"step_2_steps": "1. Una vez que hayas iniciado sesión, presiona F12 o haz clic derecho con el ratón > Inspeccionar para abrir las herramientas de desarrollo del navegador.\n2. Luego ve a la pestaña \"Application\" (Chrome, Edge, Brave, etc.) o \"Storage\" (Firefox, Palemoon, etc.)\n3. Ve a la sección \"Cookies\" y luego la subsección \"https://accounts.spotify.com\"",
"step_3": "Paso 3",
"step_3_steps": "Copia los valores de las Cookies \"sp_dc\" y \"sp_key\"",
"step_3_steps": "Copia los valores de las Cookies \"sp_dc\" y \"sp_key\" (o sp_gaid)",
"success_emoji": "¡Éxito! 🥳",
"success_message": "Ahora has iniciado sesión con éxito en tu cuenta de Spotify. ¡Buen trabajo!",
"step_4": "Paso 4",
"step_4_steps": "Pega los valores copiados de \"sp_dc\" y \"sp_key\" en los campos respectivos",
"step_4_steps": "Pega los valores copiados de \"sp_dc\" y \"sp_key\" (o sp_gaid) en los campos respectivos",
"something_went_wrong": "Algo salió mal",
"piped_instance": "Instancia del servidor Piped",
"piped_description": "La instancia del servidor Piped a utilizar para la coincidencia de pistas\nAlgunas pueden no funcionar bien, úsalas bajo tu propio riesgo",
"piped_description": "La instancia del servidor Piped a utilizar para la coincidencia de pistas",
"piped_warning": "Algunas pueden no funcionar bien, úsalas bajo tu propio riesgo",
"generate_playlist": "Generar Lista de reproducción",
"track_exists": "La canción {track} ya existe",
"replace_downloaded_tracks": "Reemplazar todas las canciones descargadas",

View File

@ -176,14 +176,15 @@
"step_2": "Étape 2",
"step_2_steps": "1. Une fois connecté, appuyez sur F12 ou clic droit de la souris > Inspecter pour ouvrir les outils de développement du navigateur.\n2. Ensuite, allez dans l'onglet \"Application\" (Chrome, Edge, Brave, etc.) ou l'onglet \"Stockage\" (Firefox, Palemoon, etc.)\n3. Allez dans la section \"Cookies\", puis dans la sous-section \"https://accounts.spotify.com\"",
"step_3": "Étape 3",
"step_3_steps": "Copiez les valeurs des cookies \"sp_dc\" et \"sp_key\"",
"step_3_steps": "Copiez les valeurs des cookies \"sp_dc\" et \"sp_key\" (ou sp_gaid)",
"success_emoji": "Succès🥳",
"success_message": "Vous êtes maintenant connecté avec succès à votre compte Spotify. Bon travail, mon ami!",
"step_4": "Étape 4",
"step_4_steps": "Collez les valeurs copiées de \"sp_dc\" et \"sp_key\" dans les champs respectifs",
"step_4_steps": "Collez les valeurs copiées de \"sp_dc\" et \"sp_key\" (ou sp_gaid) dans les champs respectifs",
"something_went_wrong": "Quelque chose s'est mal passé",
"piped_instance": "Instance pipée",
"piped_description": "L'instance de serveur Piped à utiliser pour la correspondance des pistes\nCertaines d'entre elles peuvent ne pas fonctionner correctement. Alors utilisez à vos risques et périls",
"piped_description": "L'instance de serveur Piped à utiliser pour la correspondance des pistes",
"piped_warning": "Certaines d'entre elles peuvent ne pas fonctionner correctement. Alors utilisez à vos risques et périls",
"generate_playlist": "Générer une playlist",
"track_exists": "La piste {track} existe déjà",
"replace_downloaded_tracks": "Remplacer toutes les pistes téléchargées",

View File

@ -176,14 +176,15 @@
"step_2": "2 चरण",
"step_2_steps": "1. जब आप लॉगिन हो जाएँ, तो F12 दबाएं या माउस राइट क्लिक> निरीक्षण करें ताकि ब्राउज़र डेवटूल्स खुलें।\n2. फिर ब्राउज़र के \"एप्लिकेशन\" टैब (Chrome, Edge, Brave आदि) या \"स्टोरेज\" टैब (Firefox, Palemoon आदि) में जाएं\n3. \"कुकीज़\" अनुभाग में जाएं फिर \"https: //accounts.spotify.com\" उप-अनुभाग में जाएं",
"step_3": "स्टेप 3",
"step_3_steps": "\"sp_dc\" और \"sp_key\" कुकीज़ के मान कॉपी करें",
"step_3_steps": "\"sp_dc\" और \"sp_key\" (या sp_gaid) कुकीज़ के मान कॉपी करें",
"success_emoji": "सफलता🥳",
"success_message": "अब आप अपने स्पॉटिफाई अकाउंट से सफलतापूर्वक लॉगइन हो गए हैं। अच्छा काम किया!",
"step_4": "स्टेप 4",
"step_4_steps": "कॉपी की गई \"sp_dc\" और \"sp_key\" मानों को संबंधित फील्ड में पेस्ट करें",
"step_4_steps": "कॉपी की गई \"sp_dc\" और \"sp_key\" (या sp_gaid) मानों को संबंधित फील्ड में पेस्ट करें",
"something_went_wrong": "कुछ गलत हो गया",
"piped_instance": "पाइप्ड सर्वर",
"piped_description": "पाइप किए गए सर्वर\n गानों का मिलान करने के लिए उपयोग किए जाते हैं, हो सकता है कि उनमें से कुछ के साथ ठीक से काम न करें इसलिए अपने जोखिम पर उपयोग करें",
"piped_description": "पाइप किए गए सर्वर",
"piped_warning": "गानों का मिलान करने के लिए उपयोग किए जाते हैं, हो सकता है कि उनमें से कुछ के साथ ठीक से काम न करें इसलिए अपने जोखिम पर उपयोग करें",
"generate_playlist": "प्लेलिस्ट बनाएं",
"track_exists": "ट्रैक {track} पहले से मौजूद है",
"replace_downloaded_tracks": "सभी डाउनलोड किए गए ट्रैक्स को बदलें",

View File

@ -176,14 +176,15 @@
"step_2": "ステップ 2",
"step_2_steps": "1. ログインしたら、F12を押すか、マウス右クリック 調査(検証)でブラウザの開発者ツール (devtools) を開きます。\n2. アプリケーション (Application) タブ (Chrome, Edge, Brave など) またはストレージタブ (Firefox, Palemoon など)\n3. Cookies 欄を選択し、https://accounts.spotify.com の枝を選びます",
"step_3": "ステップ 3",
"step_3_steps": "sp_dc と sp_key の値 (Value) をコピーします",
"step_3_steps": "sp_dc と sp_key (または or sp_gaid) の値 (Value) をコピーします",
"success_emoji": "成功🥳",
"success_message": "アカウントへのログインに成功しました。よくできました!",
"step_4": "ステップ 4",
"step_4_steps": "コピーした sp_dc と sp_keyの値をそれぞれの入力欄に貼り付けます",
"step_4_steps": "コピーした sp_dc と sp_key (または or sp_gaid) の値をそれぞれの入力欄に貼り付けます",
"something_went_wrong": "何か誤りがあります",
"piped_instance": "Piped サーバーのインスタンス",
"piped_description": "曲の一致に使う Piped サーバーのインスタンス\nそれらの一部ではうまく動作しないこともあります。自己責任で使用してください",
"piped_description": "曲の一致に使う Piped サーバーのインスタンス",
"piped_warning": "それらの一部ではうまく動作しないこともあります。自己責任で使用してください",
"generate_playlist": "再生リストの生成",
"track_exists": "曲 {track} は既に存在します",
"replace_downloaded_tracks": "すべてのダウンロード済みの曲を置換",

View File

@ -176,14 +176,15 @@
"step_2": "步骤 2",
"step_2_steps": "1. 一旦你已经完成登录, 按 F12 键或者鼠标右击网页空白区域 > 选择“检查”以打开浏览器开发者工具DevTools\n2. 然后选择 \"应用Application\" 标签页Chrome, Edge, Brave 等基于 Chromium 的浏览器) 或 \"存储Storage\" 标签页 Firefox, Palemoon 等基于 Firefox 的浏览器))\n3. 选择 \"Cookies\" 栏目然后选择 \"https://accounts.spotify.com\" 子栏目",
"step_3": "步骤 3",
"step_3_steps": "复制名称为 \"sp_dc\" 和 \"sp_key\" 的值Cookie Value",
"step_3_steps": "复制名称为 \"sp_dc\" 和 \"sp_key\" (或 sp_gaid) 的值Cookie Value",
"success_emoji": "成功🥳",
"success_message": "你已经成功使用 Spotify 登录。干得漂亮!",
"step_4": "步骤 4",
"step_4_steps": "将 \"sp_dc\" 与 \"sp_key\" 的值分别复制后粘贴到对应的区域",
"step_4_steps": "将 \"sp_dc\" 与 \"sp_key\" (或 sp_gaid) 的值分别复制后粘贴到对应的区域",
"something_went_wrong": "某些地方出现了问题",
"piped_instance": "管道服务器实例",
"piped_description": "管道服务器实例用于匹配歌曲\n它们中的一部分可能并不能正常工作。使用时请自行承担风险",
"piped_description": "管道服务器实例用于匹配歌曲",
"piped_warning": "它们中的一部分可能并不能正常工作。使用时请自行承担风险",
"generate_playlist": "生成歌单",
"track_exists": "歌曲 {track} 已存在",
"replace_downloaded_tracks": "替换已下载的歌曲",

View File

@ -10,10 +10,10 @@ class L10n {
static final all = [
const Locale('en'),
const Locale('bn', 'BD'),
const Locale('de', 'GE'),
const Locale('es', 'ES'),
const Locale('fr', 'FR'),
const Locale('hi', 'IN'),
const Locale('de', 'GE'),
const Locale('ja', 'JP'),
const Locale('zh', 'CN'),
];

View File

@ -75,37 +75,48 @@ class SettingsPage extends HookConsumerWidget {
heading: context.l10n.account,
children: [
if (auth == null)
AdaptiveListTile(
leading: Icon(
SpotubeIcons.login,
color: theme.colorScheme.primary,
),
title: Align(
alignment: Alignment.centerLeft,
child: AutoSizeText(
context.l10n.login_with_spotify,
maxLines: 1,
style: TextStyle(
color: theme.colorScheme.primary,
),
LayoutBuilder(builder: (context, constrains) {
return ListTile(
leading: Icon(
SpotubeIcons.login,
color: theme.colorScheme.primary,
),
),
trailing: (context, update) => FilledButton(
onPressed: () {
GoRouter.of(context).push("/login");
},
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
title: Align(
alignment: Alignment.centerLeft,
child: AutoSizeText(
context.l10n.login_with_spotify,
maxLines: 1,
style: TextStyle(
color: theme.colorScheme.primary,
),
),
),
child: Text(
context.l10n.connect_with_spotify.toUpperCase(),
),
),
)
onTap: constrains.mdAndUp
? null
: () {
GoRouter.of(context).push("/login");
},
trailing: constrains.smAndDown
? null
: FilledButton(
onPressed: () {
GoRouter.of(context).push("/login");
},
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(25.0),
),
),
),
child: Text(
context.l10n.connect_with_spotify
.toUpperCase(),
),
),
);
})
else
Builder(builder: (context) {
return ListTile(
@ -323,8 +334,22 @@ class SettingsPage extends HookConsumerWidget {
const Icon(SpotubeIcons.piped),
title:
Text(context.l10n.piped_instance),
subtitle: Text(
context.l10n.piped_description,
subtitle: RichText(
text: TextSpan(
children: [
TextSpan(
text: context
.l10n.piped_description),
const TextSpan(text: "\n"),
TextSpan(
text:
context.l10n.piped_warning,
style: Theme.of(context)
.textTheme
.labelMedium,
)
],
),
),
value: preferences.pipedInstance,
showValueWhenUnfolded: false,

View File

@ -251,7 +251,7 @@ class UserPreferences extends PersistedChangeNotifier {
youtubeApiType = YoutubeApiType.values.firstWhere(
(type) => type.name == map["youtubeApiType"],
orElse: () => YoutubeApiType.youtube,
orElse: () => YoutubeApiType.piped,
);
}