From a0793dd37030f7213ecb07a018b11e6a8adf9238 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 10 Oct 2026 12:56:26 +0200 Subject: feat(android): back the phone's contacts up to a group of one's own A Contacts backup section on the Android Sync page sends a dated .vcf into /-contacts once a day when the address book changed, only to a group the account is alone in, checked again at every run. Co-Authored-By: Claude Opus 5.5 --- .../src/meshbay_hub/static/android-sync-page.js | 11 +- packages/meshbay-hub/src/meshbay_hub/static/app.js | 31 ++- .../src/meshbay_hub/static/locales/de.js | 21 ++ .../src/meshbay_hub/static/locales/en.js | 21 ++ .../src/meshbay_hub/static/locales/es.js | 21 ++ .../src/meshbay_hub/static/locales/fr.js | 21 ++ .../src/meshbay_hub/static/locales/it.js | 21 ++ .../src/meshbay_hub/static/locales/ja.js | 21 ++ .../src/meshbay_hub/static/locales/nl.js | 21 ++ .../src/meshbay_hub/static/locales/pl.js | 21 ++ .../src/meshbay_hub/static/locales/pt-BR.js | 21 ++ .../src/meshbay_hub/static/locales/zh-CN.js | 21 ++ .../src/meshbay_hub/static/phone-sync-settings.js | 210 +++++++++++++++++ .../src/meshbay_hub/static/phone-sync.js | 249 +++++++++++++++++++++ .../src/meshbay_hub/static/photo-sync.js | 13 +- .../meshbay-hub/src/meshbay_hub/static/platform.js | 27 +++ 16 files changed, 739 insertions(+), 12 deletions(-) create mode 100644 packages/meshbay-hub/src/meshbay_hub/static/phone-sync-settings.js create mode 100644 packages/meshbay-hub/src/meshbay_hub/static/phone-sync.js (limited to 'packages/meshbay-hub/src/meshbay_hub') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/android-sync-page.js b/packages/meshbay-hub/src/meshbay_hub/static/android-sync-page.js index 6285b3c..5145515 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/android-sync-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/android-sync-page.js @@ -1,16 +1,21 @@ // The Android Sync page: what this phone sends to its groups, on the Android -// application only (docs/MESHBAY_DESIGN.md §9.12). Loaded on demand, like the -// sections it holds: no other client has it. +// application only (docs/MESHBAY_DESIGN.md §9.12, §9.13). Loaded on demand, +// like the sections it holds: no other client has it. import { html } from './vendor/htm-preact.js'; import { t } from './i18n.js'; +import * as platform from './platform.js'; import { PhotoSyncSection } from './photo-sync-settings.js'; +import { DocSyncSection } from './phone-sync-settings.js'; export function AndroidSyncPage({ user, groups }) { return html`

${t('androidsync.title')}

- <${PhotoSyncSection} user=${user} groups=${groups || []} /> + ${platform.photoSync.available && html` + <${PhotoSyncSection} user=${user} groups=${groups || []} />`} + ${platform.contactSync.available && html` + <${DocSyncSection} kind="contacts" user=${user} groups=${groups || []} />`}
`; } diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index 973729e..72c52ac 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -463,7 +463,7 @@ function Sidebar({ groups, presence, indexProgressPct, route, menuOpen, role, sh href="#/create-group"><${Icon} name="plus" /> ${t('sidebar.create_group')} `} - ${platform.photoSync.available && html` + ${PHONE_SYNC && html`