diff --git a/CLAUDE.md b/CLAUDE.md
index c44cf38..ba44ae0 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -91,4 +91,4 @@ npm run build # build de prod
- Leaked Password Protection (Supabase) demande l'offre payante : remplacée par la vérification HIBP côté client (`src/lib/pwned.ts`).
- **Skills de sécurité** (`.claude/skills/README.md`) : 16 skills mukul975 (Apache-2.0) + `sharp-edges` et `differential-review` de Trail of Bits (CC BY-SA 4.0, texte seul). N'en ajouter que de sources connues, après lecture complète (skills piégés : étude Snyk « ToxicSkills »). Audit du 1er déc. 2026 : verrous admin/mail testés en ligne (404 sans secret, 401 sans jeton / clé publique / jeton falsifié `alg=none`), `npm audit --omit=dev` = 0. Audit de toute l'app (même jour) : double authentification exigée par toutes les fonctions appelables et le stockage (`20261201130000_mfa_everywhere.sql`, testé en aal1/aal2 dans une transaction annulée) ; `ratings` : plafond commun de recherches Trakt (120/min par instance) et seuls les titres trouvés vont en base. Limites par IP des fonctions `tmdb` / `ratings` : `clientIp()` (`_shared/auth.ts`) lit `cf-connecting-ip` puis `x-real-ip`, JAMAIS `x-forwarded-for` (le client le choisit librement, vérifié dans les journaux Supabase). Redirections autorisées par Supabase Auth (vérifié par sonde) : `https://bobinoo.org/**` et une entrée de test `http://127.0.0.1:*` à retirer dans le tableau de bord.
- **Textes de l'app (anti-slop, 1er déc. 2026)** : tutoiement partout (aussi en russe), pas de tiret long « — » pour relier deux idées (deux-points ou point), pas d'émoji comme icône (lucide-react), pas de promesse que l'app ne tient pas. Skills : `humanizer` (textes), `deslop` (code), `hallmark` sloplint (design), voir `.claude/skills/README.md`. Les flèches « → » d'accent après un libellé sont un choix de design voulu.
-- **Installation iPhone (2 déc. 2026)** : guide « Installer Bobinoo » (`components/InstallGuide.tsx`) : carte masquable sur l'accueil (`azuucine:install-hint`) et section des Réglages, seulement dans le navigateur d'un iPhone/iPad (`lib/install.ts`). Pas de connexion Apple (elle exige un compte Apple Developer payant) : à ajouter seulement si l'app passe sur l'App Store.
+- **Installation iPhone (2 déc. 2026)** : guide « Installer Bobinoo » (`components/InstallGuide.tsx`) : carte masquable sur l'accueil (`azuucine:install-hint`) et section des Réglages, sur les appareils Apple seulement (`lib/install.ts`, `installPlatform()`) : iPhone/iPad (Partager → Sur l'écran d'accueil), Mac + Safari 17+ (Fichier → Ajouter au Dock), Mac + Chrome/Edge (icône d'installation de la barre d'adresse) ; rien sur Firefox, Windows, Android, ni si l'app est déjà installée. Pas de connexion Apple (elle exige un compte Apple Developer payant) : à ajouter seulement si l'app passe sur l'App Store.
diff --git a/src/components/InstallGuide.tsx b/src/components/InstallGuide.tsx
index 9432da5..4c97c3d 100644
--- a/src/components/InstallGuide.tsx
+++ b/src/components/InstallGuide.tsx
@@ -1,26 +1,41 @@
-import { Plus, Share, SquarePlus, X } from 'lucide-react'
-import { useState } from 'react'
-import { t } from '../i18n'
-import { canInstallOnIos } from '../lib/install'
+import { Menu, MonitorDown, Plus, Share, SquarePlus, X } from 'lucide-react'
+import { useState, type ReactNode } from 'react'
+import { t, type TKey } from '../i18n'
+import { installPlatform, type InstallPlatform } from '../lib/install'
/**
- * Installer Bobinoo sur un iPhone ou un iPad : il n'y a pas de bouton d'installation sur iOS, il faut passer
- * par le menu Partager du navigateur. Ces trois étapes l'expliquent.
+ * Installer Bobinoo sur un appareil Apple : iOS n'a pas de bouton d'installation (menu Partager du navigateur),
+ * Safari sur Mac passe par Fichier → Ajouter au Dock, Chrome et Edge par l'icône de la barre d'adresse.
*/
-export function InstallSteps() {
- const steps = [
- { icon: , text: t('install.step1') },
- { icon: , text: t('install.step2') },
- { icon: , text: t('install.step3') },
- ]
+const STEPS: Record = {
+ ios: [
+ { icon: , key: 'install.step1' },
+ { icon: , key: 'install.step2' },
+ { icon: , key: 'install.step3' },
+ ],
+ 'mac-safari': [
+ { icon: , key: 'install.macSafari1' },
+ { icon: , key: 'install.macSafari2' },
+ { icon: , key: 'install.macSafari3' },
+ ],
+ 'mac-chrome': [
+ { icon: , key: 'install.macChrome1' },
+ { icon: , key: 'install.macChrome2' },
+ ],
+}
+
+/** Phrase d'introduction : écran d'accueil (iPhone, iPad) ou Dock (Mac). */
+export const installHint = (platform: InstallPlatform) => t(platform === 'ios' ? 'install.hint' : 'install.hintMac')
+
+export function InstallSteps({ platform }: { platform: InstallPlatform }) {
return (
- {steps.map((s, i) => (
-
+ {STEPS[platform].map((s) => (
+
{s.icon}
- {s.text}
+ {t(s.key)}
))}
@@ -29,10 +44,10 @@ export function InstallSteps() {
const HIDDEN_KEY = 'azuucine:install-hint'
-/** Carte de l'accueil, dans le navigateur d'un iPhone ou d'un iPad seulement, masquable pour de bon. */
+/** Carte de l'accueil, sur un appareil Apple seulement, masquable pour de bon. */
export function InstallHint() {
+ const [platform] = useState(installPlatform)
const [hidden, setHidden] = useState(() => {
- if (!canInstallOnIos()) return true
try {
return localStorage.getItem(HIDDEN_KEY) === '1'
} catch {
@@ -40,7 +55,7 @@ export function InstallHint() {
}
})
const [open, setOpen] = useState(false)
- if (hidden) return null
+ if (!platform || hidden) return null
const hide = () => {
setHidden(true)
@@ -56,7 +71,7 @@ export function InstallHint() {
{t('install.title')}
-
{t('install.hint')}
+
{installHint(platform)}
@@ -64,7 +79,7 @@ export function InstallHint() {
{open ? (
-
+
) : (
setOpen(true)} className="btn btn-ghost mt-3 px-3 py-2 text-sm">
diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts
index 4fff048..e353b1b 100644
--- a/src/i18n/locales/ar.ts
+++ b/src/i18n/locales/ar.ts
@@ -1187,6 +1187,12 @@ const dict: Translations = {
"install.step1": "اضغط على زر المشاركة (المربع الذي فيه سهم للأعلى). في أجهزة iPhone الحديثة تجده في القائمة «…».",
"install.step2": "اختر «إضافة إلى الشاشة الرئيسية».",
"install.step3": "اضغط «إضافة»: ستظهر أيقونة Bobinoo بجانب تطبيقاتك الأخرى.",
+ "install.hintMac": "أضف Bobinoo إلى Dock: سيفتح كتطبيق في نافذة خاصة به.",
+ "install.macSafari1": "من شريط القوائم أعلى الشاشة، افتح قائمة «ملف».",
+ "install.macSafari2": "اختر «إضافة إلى Dock…».",
+ "install.macSafari3": "انقر «إضافة»: سيظهر Bobinoo في Dock.",
+ "install.macChrome1": "انقر على أيقونة التثبيت في شريط العنوان.",
+ "install.macChrome2": "انقر «تثبيت»: سيفتح Bobinoo في نافذة خاصة به ويُضاف إلى Dock.",
}
export default dict
diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts
index 9dde233..a7837d2 100644
--- a/src/i18n/locales/de.ts
+++ b/src/i18n/locales/de.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Tippe auf die Teilen-Taste (das Quadrat mit dem Pfeil nach oben). Auf neueren iPhones findest du sie im Menü „…“.",
"install.step2": "Wähle „Zum Home-Bildschirm“.",
"install.step3": "Tippe auf „Hinzufügen“: Das Bobinoo-Symbol erscheint bei deinen anderen Apps.",
+ "install.hintMac": "Füge Bobinoo zu deinem Dock hinzu: Es öffnet sich dann wie eine App, in einem eigenen Fenster.",
+ "install.macSafari1": "Öffne in der Menüleiste oben auf dem Bildschirm das Menü „Ablage“.",
+ "install.macSafari2": "Wähle „Zum Dock hinzufügen …“.",
+ "install.macSafari3": "Klicke auf „Hinzufügen“: Bobinoo erscheint in deinem Dock.",
+ "install.macChrome1": "Klicke rechts in der Adressleiste auf das Installationssymbol.",
+ "install.macChrome2": "Klicke auf „Installieren“: Bobinoo öffnet sich in einem eigenen Fenster und landet in deinem Dock.",
}
export default dict
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts
index 4318d03..168366b 100644
--- a/src/i18n/locales/en.ts
+++ b/src/i18n/locales/en.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Tap the Share button (the square with an arrow pointing up). On recent iPhones, it’s in the “…” menu.",
"install.step2": "Choose “Add to Home Screen”.",
"install.step3": "Tap “Add”: the Bobinoo icon appears with your other apps.",
+ "install.hintMac": "Add Bobinoo to your Dock: it opens like an app, in its own window.",
+ "install.macSafari1": "In the menu bar at the top of the screen, open the File menu.",
+ "install.macSafari2": "Choose “Add to Dock…”.",
+ "install.macSafari3": "Click “Add”: Bobinoo appears in your Dock.",
+ "install.macChrome1": "Click the install icon on the right of the address bar.",
+ "install.macChrome2": "Click “Install”: Bobinoo opens in its own window and joins your Dock.",
}
export default dict
diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts
index 989be36..c1ed7a1 100644
--- a/src/i18n/locales/es.ts
+++ b/src/i18n/locales/es.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Toca el botón Compartir (el cuadrado con una flecha hacia arriba). En los iPhone más recientes está en el menú «…».",
"install.step2": "Elige «Añadir a pantalla de inicio».",
"install.step3": "Toca «Añadir»: el icono de Bobinoo aparecerá junto a tus otras apps.",
+ "install.hintMac": "Añade Bobinoo a tu Dock: se abrirá como una app, en su propia ventana.",
+ "install.macSafari1": "En la barra de menús, en la parte superior de la pantalla, abre el menú Archivo.",
+ "install.macSafari2": "Elige «Añadir al Dock…».",
+ "install.macSafari3": "Haz clic en «Añadir»: Bobinoo aparecerá en tu Dock.",
+ "install.macChrome1": "Haz clic en el icono de instalación, a la derecha de la barra de direcciones.",
+ "install.macChrome2": "Haz clic en «Instalar»: Bobinoo se abrirá en su propia ventana y se añadirá a tu Dock.",
}
export default dict
diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts
index e525570..4bcca7d 100644
--- a/src/i18n/locales/fr.ts
+++ b/src/i18n/locales/fr.ts
@@ -1040,6 +1040,12 @@ const dict = {
"install.step1": "Touche le bouton Partager (le carré avec une flèche vers le haut). Sur les derniers iPhone, il se trouve dans le menu « … ».",
"install.step2": "Choisis « Sur l'écran d'accueil ».",
"install.step3": "Touche « Ajouter » : l'icône Bobinoo apparaît avec tes autres apps.",
+ "install.hintMac": "Ajoute Bobinoo à ton Dock : elle s'ouvrira comme une app, dans sa propre fenêtre.",
+ "install.macSafari1": "Dans la barre des menus en haut de l'écran, ouvre le menu Fichier.",
+ "install.macSafari2": "Choisis « Ajouter au Dock… ».",
+ "install.macSafari3": "Clique sur « Ajouter » : Bobinoo apparaît dans ton Dock.",
+ "install.macChrome1": "Clique sur l'icône d'installation, à droite de la barre d'adresse.",
+ "install.macChrome2": "Clique sur « Installer » : Bobinoo s'ouvre dans sa propre fenêtre et rejoint ton Dock.",
}
export default dict
diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts
index e322c73..00c6c2e 100644
--- a/src/i18n/locales/hi.ts
+++ b/src/i18n/locales/hi.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "शेयर बटन (ऊपर की ओर तीर वाला चौकोर) पर टैप करें। नए iPhone में यह “…” मेन्यू में होता है।",
"install.step2": "“होम स्क्रीन में जोड़ें” चुनें।",
"install.step3": "“जोड़ें” पर टैप करें: Bobinoo का आइकन आपके दूसरे ऐप्स के साथ दिखेगा।",
+ "install.hintMac": "Bobinoo को अपने Dock में जोड़ें: यह ऐप की तरह, अपनी अलग विंडो में खुलेगा।",
+ "install.macSafari1": "स्क्रीन के ऊपर मेन्यू बार में “फ़ाइल” मेन्यू खोलें।",
+ "install.macSafari2": "“Dock में जोड़ें…” चुनें।",
+ "install.macSafari3": "“जोड़ें” पर क्लिक करें: Bobinoo आपके Dock में दिखेगा।",
+ "install.macChrome1": "एड्रेस बार के दाईं ओर इंस्टॉल आइकन पर क्लिक करें।",
+ "install.macChrome2": "“इंस्टॉल करें” पर क्लिक करें: Bobinoo अपनी अलग विंडो में खुलेगा और Dock में जुड़ जाएगा।",
}
export default dict
diff --git a/src/i18n/locales/id.ts b/src/i18n/locales/id.ts
index 8eee3de..0e8e20e 100644
--- a/src/i18n/locales/id.ts
+++ b/src/i18n/locales/id.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Ketuk tombol Bagikan (kotak dengan panah ke atas). Di iPhone terbaru, tombol ini ada di menu “…”.",
"install.step2": "Pilih “Tambah ke Layar Utama”.",
"install.step3": "Ketuk “Tambah”: ikon Bobinoo muncul bersama app lainnya.",
+ "install.hintMac": "Tambahkan Bobinoo ke Dock: Bobinoo akan terbuka seperti app, di jendelanya sendiri.",
+ "install.macSafari1": "Di bar menu bagian atas layar, buka menu File.",
+ "install.macSafari2": "Pilih “Tambahkan ke Dock…”.",
+ "install.macSafari3": "Klik “Tambah”: Bobinoo muncul di Dock.",
+ "install.macChrome1": "Klik ikon instal di sebelah kanan bilah alamat.",
+ "install.macChrome2": "Klik “Instal”: Bobinoo terbuka di jendelanya sendiri dan masuk ke Dock.",
}
export default dict
diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts
index 59697df..fafe55e 100644
--- a/src/i18n/locales/it.ts
+++ b/src/i18n/locales/it.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Tocca il pulsante Condividi (il quadrato con la freccia verso l’alto). Sugli iPhone più recenti si trova nel menu «…».",
"install.step2": "Scegli «Aggiungi alla schermata Home».",
"install.step3": "Tocca «Aggiungi»: l’icona di Bobinoo comparirà insieme alle altre app.",
+ "install.hintMac": "Aggiungi Bobinoo al Dock: si aprirà come un’app, in una finestra tutta sua.",
+ "install.macSafari1": "Nella barra dei menu, in alto sullo schermo, apri il menu File.",
+ "install.macSafari2": "Scegli «Aggiungi al Dock…».",
+ "install.macSafari3": "Fai clic su «Aggiungi»: Bobinoo comparirà nel Dock.",
+ "install.macChrome1": "Fai clic sull’icona di installazione, a destra della barra degli indirizzi.",
+ "install.macChrome2": "Fai clic su «Installa»: Bobinoo si apre in una finestra tutta sua e compare nel Dock.",
}
export default dict
diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts
index 86a445e..554c5d0 100644
--- a/src/i18n/locales/ja.ts
+++ b/src/i18n/locales/ja.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "共有ボタン(上向き矢印のついた四角)をタップします。最近の iPhone では「…」メニューの中にあります。",
"install.step2": "「ホーム画面に追加」を選びます。",
"install.step3": "「追加」をタップすると、ほかのアプリと並んで Bobinoo のアイコンが表示されます。",
+ "install.hintMac": "Bobinoo を Dock に追加すると、アプリのように専用のウインドウで開けます。",
+ "install.macSafari1": "画面上部のメニューバーで「ファイル」メニューを開きます。",
+ "install.macSafari2": "「Dockに追加…」を選びます。",
+ "install.macSafari3": "「追加」をクリックすると、Bobinoo が Dock に表示されます。",
+ "install.macChrome1": "アドレスバーの右側にあるインストールのアイコンをクリックします。",
+ "install.macChrome2": "「インストール」をクリックすると、Bobinoo が専用のウインドウで開き、Dock に追加されます。",
}
export default dict
diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts
index aef2d0c..a3633b7 100644
--- a/src/i18n/locales/ko.ts
+++ b/src/i18n/locales/ko.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "공유 버튼(위쪽 화살표가 있는 네모)을 탭하세요. 최신 iPhone에서는 '…' 메뉴 안에 있어요.",
"install.step2": "'홈 화면에 추가'를 선택하세요.",
"install.step3": "'추가'를 탭하면 다른 앱들 사이에 Bobinoo 아이콘이 나타나요.",
+ "install.hintMac": "Bobinoo를 Dock에 추가하면 앱처럼 별도의 창으로 열려요.",
+ "install.macSafari1": "화면 위쪽 메뉴 막대에서 '파일' 메뉴를 여세요.",
+ "install.macSafari2": "'Dock에 추가…'를 선택하세요.",
+ "install.macSafari3": "'추가'를 클릭하면 Dock에 Bobinoo가 나타나요.",
+ "install.macChrome1": "주소창 오른쪽에 있는 설치 아이콘을 클릭하세요.",
+ "install.macChrome2": "'설치'를 클릭하면 Bobinoo가 별도의 창으로 열리고 Dock에 추가돼요.",
}
export default dict
diff --git a/src/i18n/locales/nl.ts b/src/i18n/locales/nl.ts
index c82e598..2f7e738 100644
--- a/src/i18n/locales/nl.ts
+++ b/src/i18n/locales/nl.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Tik op de deelknop (het vierkant met een pijl omhoog). Op nieuwere iPhones staat die in het menu ‘…’.",
"install.step2": "Kies ‘Zet op beginscherm’.",
"install.step3": "Tik op ‘Voeg toe’: het Bobinoo-icoon verschijnt tussen je andere apps.",
+ "install.hintMac": "Zet Bobinoo in je Dock: het opent dan als een app, in een eigen venster.",
+ "install.macSafari1": "Open in de menubalk bovenaan het scherm het menu ‘Archief’.",
+ "install.macSafari2": "Kies ‘Voeg toe aan Dock…’.",
+ "install.macSafari3": "Klik op ‘Voeg toe’: Bobinoo verschijnt in je Dock.",
+ "install.macChrome1": "Klik op het installatiepictogram rechts in de adresbalk.",
+ "install.macChrome2": "Klik op ‘Installeren’: Bobinoo opent in een eigen venster en komt in je Dock.",
}
export default dict
diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts
index ad80065..9ee0a59 100644
--- a/src/i18n/locales/pl.ts
+++ b/src/i18n/locales/pl.ts
@@ -1136,6 +1136,12 @@ const dict: Translations = {
"install.step1": "Stuknij przycisk Udostępnij (kwadrat ze strzałką w górę). W nowszych iPhone’ach znajdziesz go w menu „…”.",
"install.step2": "Wybierz „Do ekranu początkowego”.",
"install.step3": "Stuknij „Dodaj”: ikona Bobinoo pojawi się obok innych aplikacji.",
+ "install.hintMac": "Dodaj Bobinoo do Docka: otworzy się jak aplikacja, we własnym oknie.",
+ "install.macSafari1": "Na pasku menu u góry ekranu otwórz menu Plik.",
+ "install.macSafari2": "Wybierz „Dodaj do Docka…”.",
+ "install.macSafari3": "Kliknij „Dodaj”: Bobinoo pojawi się w Docku.",
+ "install.macChrome1": "Kliknij ikonę instalacji po prawej stronie paska adresu.",
+ "install.macChrome2": "Kliknij „Zainstaluj”: Bobinoo otworzy się we własnym oknie i trafi do Docka.",
}
export default dict
diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts
index dc719af..f47d353 100644
--- a/src/i18n/locales/pt.ts
+++ b/src/i18n/locales/pt.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Toque no botão Compartilhar (o quadrado com uma seta para cima). Nos iPhones mais recentes, ele fica no menu “…”.",
"install.step2": "Escolha “Adicionar à Tela de Início”.",
"install.step3": "Toque em “Adicionar”: o ícone do Bobinoo aparece junto com seus outros apps.",
+ "install.hintMac": "Adicione o Bobinoo ao seu Dock: ele abre como um app, em uma janela própria.",
+ "install.macSafari1": "Na barra de menus, no topo da tela, abra o menu Arquivo.",
+ "install.macSafari2": "Escolha “Adicionar ao Dock…”.",
+ "install.macSafari3": "Clique em “Adicionar”: o Bobinoo aparece no seu Dock.",
+ "install.macChrome1": "Clique no ícone de instalação, à direita da barra de endereço.",
+ "install.macChrome2": "Clique em “Instalar”: o Bobinoo abre em uma janela própria e vai para o seu Dock.",
}
export default dict
diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts
index 409f74a..f3753bd 100644
--- a/src/i18n/locales/ru.ts
+++ b/src/i18n/locales/ru.ts
@@ -1136,6 +1136,12 @@ const dict: Translations = {
"install.step1": "Нажми кнопку «Поделиться» (квадрат со стрелкой вверх). На новых iPhone она в меню «…».",
"install.step2": "Выбери «На экран „Домой“».",
"install.step3": "Нажми «Добавить»: значок Bobinoo появится рядом с другими приложениями.",
+ "install.hintMac": "Добавь Bobinoo в Dock: он будет открываться как приложение, в отдельном окне.",
+ "install.macSafari1": "В строке меню вверху экрана открой меню «Файл».",
+ "install.macSafari2": "Выбери «Добавить в Dock…».",
+ "install.macSafari3": "Нажми «Добавить»: Bobinoo появится в Dock.",
+ "install.macChrome1": "Нажми на значок установки справа в адресной строке.",
+ "install.macChrome2": "Нажми «Установить»: Bobinoo откроется в отдельном окне и появится в Dock.",
}
export default dict
diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts
index 5572ed4..709f839 100644
--- a/src/i18n/locales/th.ts
+++ b/src/i18n/locales/th.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "แตะปุ่มแชร์ (สี่เหลี่ยมที่มีลูกศรชี้ขึ้น) ใน iPhone รุ่นใหม่ ปุ่มนี้อยู่ในเมนู “…”",
"install.step2": "เลือก “เพิ่มไปยังหน้าจอโฮม”",
"install.step3": "แตะ “เพิ่ม” แล้วไอคอน Bobinoo จะปรากฏพร้อมแอปอื่นๆ ของคุณ",
+ "install.hintMac": "เพิ่ม Bobinoo ไปยัง Dock แล้วจะเปิดในหน้าต่างของตัวเองเหมือนแอป",
+ "install.macSafari1": "เปิดเมนู “ไฟล์” ในแถบเมนูด้านบนของหน้าจอ",
+ "install.macSafari2": "เลือก “เพิ่มไปยัง Dock…”",
+ "install.macSafari3": "คลิก “เพิ่ม” แล้ว Bobinoo จะปรากฏใน Dock",
+ "install.macChrome1": "คลิกไอคอนติดตั้งทางขวาของแถบที่อยู่",
+ "install.macChrome2": "คลิก “ติดตั้ง” แล้ว Bobinoo จะเปิดในหน้าต่างของตัวเองและอยู่ใน Dock",
}
export default dict
diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts
index 02107af..9ec8f96 100644
--- a/src/i18n/locales/tr.ts
+++ b/src/i18n/locales/tr.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Paylaş düğmesine dokun (yukarı ok olan kare). Yeni iPhone’larda “…” menüsündedir.",
"install.step2": "“Ana Ekrana Ekle”yi seç.",
"install.step3": "“Ekle”ye dokun: Bobinoo simgesi diğer uygulamalarının yanında görünür.",
+ "install.hintMac": "Bobinoo’yu Dock’a ekle: bir uygulama gibi, kendi penceresinde açılır.",
+ "install.macSafari1": "Ekranın üstündeki menü çubuğunda Dosya menüsünü aç.",
+ "install.macSafari2": "“Dock’a Ekle…” seçeneğini seç.",
+ "install.macSafari3": "“Ekle”ye tıkla: Bobinoo Dock’ta görünür.",
+ "install.macChrome1": "Adres çubuğunun sağındaki yükleme simgesine tıkla.",
+ "install.macChrome2": "“Yükle”ye tıkla: Bobinoo kendi penceresinde açılır ve Dock’a eklenir.",
}
export default dict
diff --git a/src/i18n/locales/vi.ts b/src/i18n/locales/vi.ts
index 27a6405..faa52ed 100644
--- a/src/i18n/locales/vi.ts
+++ b/src/i18n/locales/vi.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "Chạm vào nút Chia sẻ (hình vuông có mũi tên hướng lên). Trên các iPhone mới, nút này nằm trong menu “…”.",
"install.step2": "Chọn “Thêm vào MH chính”.",
"install.step3": "Chạm “Thêm”: biểu tượng Bobinoo sẽ xuất hiện cùng các app khác của bạn.",
+ "install.hintMac": "Thêm Bobinoo vào Dock: Bobinoo sẽ mở như một app, trong cửa sổ riêng.",
+ "install.macSafari1": "Trên thanh menu ở đầu màn hình, mở menu Tệp.",
+ "install.macSafari2": "Chọn “Thêm vào Dock…”.",
+ "install.macSafari3": "Bấm “Thêm”: Bobinoo xuất hiện trong Dock.",
+ "install.macChrome1": "Bấm vào biểu tượng cài đặt ở bên phải thanh địa chỉ.",
+ "install.macChrome2": "Bấm “Cài đặt”: Bobinoo mở trong cửa sổ riêng và có mặt trong Dock.",
}
export default dict
diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts
index adc052b..e5cc08e 100644
--- a/src/i18n/locales/zh.ts
+++ b/src/i18n/locales/zh.ts
@@ -1038,6 +1038,12 @@ const dict: Translations = {
"install.step1": "轻点“分享”按钮(带向上箭头的方框)。在较新的 iPhone 上,它位于“…”菜单中。",
"install.step2": "选择“添加到主屏幕”。",
"install.step3": "轻点“添加”:Bobinoo 图标会出现在你的其他 App 旁边。",
+ "install.hintMac": "把 Bobinoo 添加到程序坞,它会像 App 一样在独立窗口中打开。",
+ "install.macSafari1": "在屏幕顶部的菜单栏中打开“文件”菜单。",
+ "install.macSafari2": "选择“添加到程序坞…”。",
+ "install.macSafari3": "点按“添加”:Bobinoo 会出现在你的程序坞中。",
+ "install.macChrome1": "点按地址栏右侧的安装图标。",
+ "install.macChrome2": "点按“安装”:Bobinoo 会在独立窗口中打开,并加入你的程序坞。",
}
export default dict
diff --git a/src/lib/install.ts b/src/lib/install.ts
index b0f4f9b..87a381c 100644
--- a/src/lib/install.ts
+++ b/src/lib/install.ts
@@ -4,10 +4,25 @@ export function isAppleMobile(): boolean {
return /iPhone|iPad|iPod/.test(ua) || (/Macintosh/.test(ua) && navigator.maxTouchPoints > 1)
}
-/** App ouverte depuis l'écran d'accueil (déjà installée). */
+/** App ouverte depuis l'écran d'accueil ou le Dock (déjà installée). */
export function isStandalone(): boolean {
return window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true
}
-/** Guide « Installer sur l'iPhone » : utile seulement dans le navigateur d'un iPhone ou d'un iPad. */
-export const canInstallOnIos = () => isAppleMobile() && !isStandalone()
+/** Façon d'installer Bobinoo sur un appareil Apple : iPhone/iPad, Mac avec Safari, Mac avec Chrome ou Edge. */
+export type InstallPlatform = 'ios' | 'mac-safari' | 'mac-chrome'
+
+/**
+ * Guide « Installer Bobinoo » : seulement sur un appareil Apple où l'installation existe, et pas déjà installée.
+ * Mac + Safari : « Ajouter au Dock » existe depuis Safari 17. Mac + Firefox : pas d'installation possible.
+ */
+export function installPlatform(): InstallPlatform | null {
+ if (isStandalone()) return null
+ if (isAppleMobile()) return 'ios'
+ const ua = navigator.userAgent
+ if (!/Macintosh/.test(ua)) return null
+ if (/Chrome\/|Edg\//.test(ua) && !/OPR\//.test(ua)) return 'mac-chrome'
+ const safari = /Version\/(\d+)/.exec(ua)
+ if (/Safari\//.test(ua) && !/Firefox|FxiOS/.test(ua) && safari && Number(safari[1]) >= 17) return 'mac-safari'
+ return null
+}
diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx
index 375b6e8..7d736c9 100644
--- a/src/pages/SettingsPage.tsx
+++ b/src/pages/SettingsPage.tsx
@@ -12,8 +12,8 @@ import { THEME_MODES } from '../lib/theme'
import { cx } from '../lib/utils'
import { useMedia } from '../store'
import { BugReportRow } from '../components/moderation/BugReport'
-import { InstallSteps } from '../components/InstallGuide'
-import { canInstallOnIos } from '../lib/install'
+import { installHint, InstallSteps } from '../components/InstallGuide'
+import { installPlatform } from '../lib/install'
import { APP_VERSION, buildLabel } from '../lib/appInfo'
// Assistant d'import (lecture des fichiers, recherche des titres) : chargé seulement quand on l'ouvre
@@ -42,6 +42,7 @@ export default function SettingsPage() {
const [confirm, setConfirm] = useState(null)
const [deleting, setDeleting] = useState(false)
const [usage, setUsage] = useState()
+ const [install] = useState(installPlatform)
useEffect(() => {
navigator.storage
@@ -260,12 +261,12 @@ export default function SettingsPage() {
>
)}
- {canInstallOnIos() && (
+ {install && (
<>
{t('install.title')}
-
{t('install.hint')}
-
+
{installHint(install)}
+
>
)}