Skip to content

Commit

Permalink
feat(cache): add clear cache button to resolve issues with delayed mu…
Browse files Browse the repository at this point in the history
…lti-device synchronization
  • Loading branch information
rockbenben committed Feb 19, 2025
1 parent 5e094e9 commit a8e3d48
Show file tree
Hide file tree
Showing 16 changed files with 391 additions and 119 deletions.
15 changes: 15 additions & 0 deletions i18n/ar/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "سيتم إرسال رابط تسجيل الدخول إلى بريدك الإلكتروني. انقر عليه لتسجيل الدخول بدون كلمة مرور."
},
"message.fetchError": {
"message": "فشل في جلب المطالبات. يرجى المحاولة مرة أخرى لاحقاً."
},
"message.noPrompts": {
"message": "لم يتم تقديم أي مطالبات حتى الآن. يرجى إضافة مطالباتك."
},
"message.cache.cleared": {
"message": "تم مسح ذاكرة التخزين المؤقت."
},
"tooltip.clearCache": {
"message": "إذا قمت بتحديث مفضلتك أو مطالباتك على جهاز آخر، فانقر لمسح ذاكرة التخزين المؤقت ومزامنة أحدث محتوى."
},
"button.clearCache": {
"message": "مسح ذاكرة التخزين المؤقت"
}
}
15 changes: 15 additions & 0 deletions i18n/bn/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "আপনার ইমেইলে একটি লগইন লিঙ্ক পাঠানো হবে। পাসওয়ার্ড ছাড়াই লগ ইন করতে এটিতে ক্লিক করুন।"
},
"message.fetchError": {
"message": "প্রম্পট আনতে ব্যর্থ হয়েছে। অনুগ্রহ করে পরে আবার চেষ্টা করুন।"
},
"message.noPrompts": {
"message": "এখনও কোনও প্রম্পট জমা দেওয়া হয়নি। অনুগ্রহ করে আপনার প্রম্পট যোগ করুন।"
},
"message.cache.cleared": {
"message": "ক্যাশে সাফ করা হয়েছে।"
},
"tooltip.clearCache": {
"message": "যদি আপনি অন্য ডিভাইসে আপনার পছন্দ বা প্রম্পট আপডেট করে থাকেন, তাহলে ক্যাশে সাফ করতে এবং সর্বশেষ কন্টেন্ট সিঙ্ক করতে ক্লিক করুন।"
},
"button.clearCache": {
"message": "ক্যাশে সাফ করুন"
}
}
15 changes: 15 additions & 0 deletions i18n/de/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "Ein Anmeldelink wird an Ihre E-Mail gesendet. Klicken Sie darauf, um sich ohne Passwort anzumelden."
},
"message.fetchError": {
"message": "Die Eingabeaufforderungen konnten nicht abgerufen werden. Bitte versuchen Sie es später noch einmal."
},
"message.noPrompts": {
"message": "Noch keine Prompts eingereicht. Bitte fügen Sie Ihre Prompts hinzu."
},
"message.cache.cleared": {
"message": "Der Cache wurde geleert."
},
"tooltip.clearCache": {
"message": "Wenn Sie Ihre Favoriten oder Eingabeaufforderungen auf einem anderen Gerät aktualisiert haben, klicken Sie auf , um den Cache zu leeren und die neuesten Inhalte zu synchronisieren."
},
"button.clearCache": {
"message": "Cache löschen"
}
}
15 changes: 15 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "A login link will be sent to your email. Click it to log in without password."
},
"message.fetchError": {
"message": "Failed to fetch prompts. Please try again later."
},
"message.noPrompts": {
"message": "No prompts submitted yet. Please add your prompts."
},
"message.cache.cleared": {
"message": "Cache has been cleared."
},
"tooltip.clearCache": {
"message": "If you’ve updated your favor or prompts on another device, click to clear the cache and sync the latest content."
},
"button.clearCache": {
"message": "Clear Cache"
}
}
15 changes: 15 additions & 0 deletions i18n/es/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "Se enviará un enlace de inicio de sesión a su correo electrónico. Haga clic en él para iniciar sesión sin contraseña."
},
"message.fetchError": {
"message": "No se han podido recuperar los mensajes. Vuelva a intentarlo más tarde."
},
"message.noPrompts": {
"message": "Aún no se han enviado mensajes. Por favor, añada sus sugerencias."
},
"message.cache.cleared": {
"message": "Se ha borrado la memoria caché."
},
"tooltip.clearCache": {
"message": "Si has actualizado tus favoritos o avisos en otro dispositivo, haz clic para borrar la caché y sincronizar el contenido más reciente."
},
"button.clearCache": {
"message": "Borrar caché"
}
}
15 changes: 15 additions & 0 deletions i18n/fr/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "Un lien de connexion vous sera envoyé par email. Cliquez dessus pour vous connecter sans mot de passe."
},
"message.fetchError": {
"message": "Échec de la récupération des invites. Veuillez réessayer plus tard."
},
"message.noPrompts": {
"message": "Aucun texte n'a encore été soumis. Veuillez ajouter vos messages."
},
"message.cache.cleared": {
"message": "Le cache a été effacé."
},
"tooltip.clearCache": {
"message": "Si vous avez mis à jour votre favori ou vos invites sur un autre appareil, cliquez sur pour effacer le cache et synchroniser le dernier contenu."
},
"button.clearCache": {
"message": "Effacer le cache"
}
}
15 changes: 15 additions & 0 deletions i18n/hi/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "आपके ईमेल पर एक लॉगिन लिंक भेजा जाएगा। बिना पासवर्ड के लॉग इन करने के लिए उस पर क्लिक करें।"
},
"message.fetchError": {
"message": "संकेत प्राप्त करने में विफल। कृपया बाद में पुनः प्रयास करें।"
},
"message.noPrompts": {
"message": "अभी तक कोई संकेत प्रस्तुत नहीं किया गया है। कृपया अपने संकेत जोड़ें।"
},
"message.cache.cleared": {
"message": "कैश साफ़ कर दिया गया है."
},
"tooltip.clearCache": {
"message": "यदि आपने किसी अन्य डिवाइस पर अपना फ़ेवर या प्रॉम्प्ट अपडेट किया है, तो कैश साफ़ करने और नवीनतम सामग्री को सिंक करने के लिए क्लिक करें।"
},
"button.clearCache": {
"message": "कैश को साफ़ करें"
}
}
15 changes: 15 additions & 0 deletions i18n/it/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "Un link di accesso verrà inviato al vostro indirizzo e-mail. Fare clic su di esso per accedere senza password."
},
"message.fetchError": {
"message": "Impossibile recuperare i prompt. Riprovare più tardi."
},
"message.noPrompts": {
"message": "Non sono ancora stati inviati suggerimenti. Aggiungete i vostri suggerimenti."
},
"message.cache.cleared": {
"message": "La cache è stata cancellata."
},
"tooltip.clearCache": {
"message": "Se si è aggiornato il favore o i suggerimenti su un altro dispositivo, fare clic per cancellare la cache e sincronizzare i contenuti più recenti."
},
"button.clearCache": {
"message": "Cancella la cache"
}
}
15 changes: 15 additions & 0 deletions i18n/ja/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "ログインリンクが E メールに送信されます。クリックするとパスワードなしでログインできます。"
},
"message.fetchError": {
"message": "プロンプトの取得に失敗しました。後で再試行してください。"
},
"message.noPrompts": {
"message": "まだプロンプトが投稿されていません。プロンプトを追加してください。"
},
"message.cache.cleared": {
"message": "キャッシュがクリアされました。"
},
"tooltip.clearCache": {
"message": "他のデバイスでお気に入りやプロンプトを更新した場合は、クリックしてキャッシュをクリアし、最新のコンテンツを同期してください。"
},
"button.clearCache": {
"message": "キャッシュクリア"
}
}
15 changes: 15 additions & 0 deletions i18n/ko/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "로그인 링크가 이메일로 전송됩니다. 이를 클릭하면 비밀번호 없이 로그인할 수 있습니다."
},
"message.fetchError": {
"message": "프롬프트를 불러오지 못했습니다. 나중에 다시 시도하세요."
},
"message.noPrompts": {
"message": "아직 제출된 프롬프트가 없습니다. 프롬프트를 추가해 주세요."
},
"message.cache.cleared": {
"message": "캐시가 지워졌습니다."
},
"tooltip.clearCache": {
"message": "다른 디바이스에서 즐겨찾기나 프롬프트를 업데이트한 경우 클릭하여 캐시를 지우고 최신 콘텐츠를 동기화하세요."
},
"button.clearCache": {
"message": "캐시 지우기"
}
}
15 changes: 15 additions & 0 deletions i18n/pt/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "Será enviada uma ligação de início de sessão para o seu correio eletrónico. Clique nela para iniciar sessão sem palavra-passe."
},
"message.fetchError": {
"message": "Falha na obtenção de prompts. Por favor, tente novamente mais tarde."
},
"message.noPrompts": {
"message": "Ainda não foram enviadas mensagens. Por favor, adicione as suas sugestões."
},
"message.cache.cleared": {
"message": "A cache foi limpa."
},
"tooltip.clearCache": {
"message": "Se tiver atualizado os seus favoritos ou avisos noutro dispositivo, clique para limpar a cache e sincronizar o conteúdo mais recente."
},
"button.clearCache": {
"message": "Limpar cache"
}
}
15 changes: 15 additions & 0 deletions i18n/ru/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,20 @@
},
"message.passwordlessLogin.info": {
"message": "На вашу электронную почту будет отправлена ссылка для входа в систему. Нажмите на нее, чтобы войти в систему без пароля."
},
"message.fetchError": {
"message": "Не удалось получить подсказки. Пожалуйста, повторите попытку позже."
},
"message.noPrompts": {
"message": "Еще нет представленных подсказок. Пожалуйста, добавьте свои подсказки."
},
"message.cache.cleared": {
"message": "Кэш был очищен."
},
"tooltip.clearCache": {
"message": "Если вы обновили услугу или подсказки на другом устройстве, нажмите, чтобы очистить кэш и синхронизировать последнее содержимое."
},
"button.clearCache": {
"message": "Очистить кэш"
}
}
2 changes: 1 addition & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
};

// Remove User Cache 移除用户缓存信息
function clearUserAllInfoCache() {
export function clearUserAllInfoCache() {
localStorage.removeItem("userAllInfo");
localStorage.removeItem("userAllInfoCacheExpiration");
}
Expand Down
Loading

0 comments on commit a8e3d48

Please sign in to comment.