diff --git a/frontend/firebase-init.js b/frontend/firebase-init.js index 76d856bc..86813f5c 100644 --- a/frontend/firebase-init.js +++ b/frontend/firebase-init.js @@ -48,4 +48,4 @@ const loadFirebaseAuth = () => { return authModulePromise; }; -export { loadFirebaseAuth, authDomainInputs }; +export { isFireBaseSet, loadFirebaseAuth, authDomainInputs }; diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 87f5962a..34e81d91 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "Navigation", "Home": "Home", "IPInfo": "IP Infos", @@ -201,9 +200,6 @@ "WebRTC": "WebRTC Leak Test", "DNSLeakTest": "DNS Leak Test", "SpeedTest": "Speed Test", - "PingTest": "Global Latency", - "MTRTest": "MTR Test", - "RuleTest": "Rule Test", "AdvancedTools": "Advanced Tools", "SearchDocs": "Search docs…", "DocsToolConfirm": "Share your current test results?", diff --git a/frontend/locales/fr.json b/frontend/locales/fr.json index a7ce2903..463382cd 100644 --- a/frontend/locales/fr.json +++ b/frontend/locales/fr.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "Navigation", "Home": "Accueil", "IPInfo": "Infos IP", @@ -201,9 +200,6 @@ "WebRTC": "Test WebRTC Leak", "DNSLeakTest": "Test de fuite DNS", "SpeedTest": "Test de vitesse", - "PingTest": "Latence mondiale", - "MTRTest": "Test MTR", - "RuleTest": "Test de règles", "AdvancedTools": "Outils avancés", "SearchDocs": "Rechercher dans la doc…", "DocsToolConfirm": "Partager vos résultats actuels ?", diff --git a/frontend/locales/pt-BR.json b/frontend/locales/pt-BR.json index 0862fea1..be7388f2 100644 --- a/frontend/locales/pt-BR.json +++ b/frontend/locales/pt-BR.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "Navegação", "Home": "Início", "IPInfo": "Dados de IP", @@ -201,9 +200,6 @@ "WebRTC": "Vazamento WebRTC", "DNSLeakTest": "Vazamento de DNS", "SpeedTest": "Velocidade", - "PingTest": "Latência global", - "MTRTest": "Teste MTR", - "RuleTest": "Teste de regras", "AdvancedTools": "Ferramentas avançadas", "SearchDocs": "Pesquisar na documentação…", "DocsToolConfirm": "Compartilhar seus resultados atuais dos testes?", diff --git a/frontend/locales/ru.json b/frontend/locales/ru.json index 0c4fb8d4..43431113 100644 --- a/frontend/locales/ru.json +++ b/frontend/locales/ru.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "Навигация", "Home": "Главная", "IPInfo": "Сведения об IP", @@ -201,9 +200,6 @@ "WebRTC": "Тест утечки WebRTC", "DNSLeakTest": "Тест утечки DNS", "SpeedTest": "Тест скорости", - "PingTest": "Глобальная задержка", - "MTRTest": "Тест MTR", - "RuleTest": "Проверка правил", "AdvancedTools": "Расширенные инструменты", "SearchDocs": "Поиск по документации…", "DocsToolConfirm": "Показать ваши текущие результаты?", diff --git a/frontend/locales/zh-TW.json b/frontend/locales/zh-TW.json index 7698103f..39b370ee 100644 --- a/frontend/locales/zh-TW.json +++ b/frontend/locales/zh-TW.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "導覽", "Home": "首頁", "IPInfo": "IP 資訊", @@ -201,9 +200,6 @@ "WebRTC": "WebRTC 洩漏測試", "DNSLeakTest": "DNS 洩漏測試", "SpeedTest": "網速測試", - "PingTest": "全球延遲", - "MTRTest": "MTR 測試", - "RuleTest": "分流測試", "AdvancedTools": "進階工具", "SearchDocs": "搜尋文件…", "DocsToolConfirm": "要讓助手查看目前的測試結果嗎?", diff --git a/frontend/locales/zh.json b/frontend/locales/zh.json index 8d024fc8..c0d0c316 100644 --- a/frontend/locales/zh.json +++ b/frontend/locales/zh.json @@ -192,7 +192,6 @@ }, "nav": { "id": "nav", - "Title": "IPCheck.ing", "Navigation": "导航", "Home": "首页", "IPInfo": "IP 信息", @@ -201,9 +200,6 @@ "WebRTC": "WebRTC 泄露测试", "DNSLeakTest": "DNS 泄露测试", "SpeedTest": "网速测试", - "PingTest": "全球延迟", - "MTRTest": "MTR 测试", - "RuleTest": "分流测试", "AdvancedTools": "高级工具", "SearchDocs": "搜索文档…", "DocsToolConfirm": "把当前的检测结果给助手看?", diff --git a/frontend/main.js b/frontend/main.js index 314e79c9..56874c22 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -127,8 +127,6 @@ analytics.setUserProperties({ }); unregisterLegacyServiceWorker(); -// Check Firebase environment -store.checkFirebaseEnv(); // Backend configs load fire-and-forget: components read `store.configs` // reactively, so the first render never waits on this round trip. diff --git a/frontend/store.js b/frontend/store.js index 7ba20098..f4a1d2f3 100644 --- a/frontend/store.js +++ b/frontend/store.js @@ -1,6 +1,6 @@ // store.js import { defineStore } from 'pinia'; -import { loadFirebaseAuth, authDomainInputs } from './firebase-init.js'; +import { isFireBaseSet, loadFirebaseAuth, authDomainInputs } from './firebase-init.js'; import { signInProvidersFor } from './utils/auth-domain.js'; import { writeAuthHint } from './utils/auth-hint.js'; import { markPendingRedirectSignIn, shouldFallBackToRedirect, takePendingRedirectSignIn } from './utils/auth-redirect.js'; @@ -67,7 +67,7 @@ export const useMainStore = defineStore('main', { ipv6Domain: import.meta.env?.VITE_CURL_IPV6_DOMAIN, ipv64Domain: import.meta.env?.VITE_CURL_IPV64_DOMAIN, }, - isFireBaseSet: false, + isFireBaseSet, openSheet: null, loadingStatus: createLoadingStatus(), isDarkMode: false, @@ -259,16 +259,6 @@ export const useMainStore = defineStore('main', { changeSection(section) { this.currentSection = section; }, - // check Firebase environment - checkFirebaseEnv() { - const env = import.meta.env ?? {}; - const envConfigs = { - key: env.VITE_FIREBASE_API_KEY, - domain: env.VITE_FIREBASE_AUTH_DOMAIN, - project: env.VITE_FIREBASE_PROJECT_ID, - } - this.isFireBaseSet = !!envConfigs.key && !!envConfigs.domain && !!envConfigs.project; - }, // sign in with Google async signInWithGoogle() { await this.signInWithProvider('google'); diff --git a/frontend/style/style.css b/frontend/style/style.css index 9a17eb66..117076d2 100644 --- a/frontend/style/style.css +++ b/frontend/style/style.css @@ -68,10 +68,9 @@ --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --radius: 0.5rem; - /* Canonical page background (the installed app's Nav in its mobile - `bg-page-bg` variant reads it). Must stay in sync with the literal - hex values in: index.html inline `html { background }`, index.html - , public/manifest.webmanifest. */ + /* Canonical page background: the installed app's Nav (`bg-page-bg`) and + the manifest's theme_color use it. index.html's html background and + theme-color are tuned separately on purpose. */ --page-bg: #f4f4f4; }