aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/android-sync-page.js
blob: 5145515247796098fa451ad996344e3f6a98ed2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// The Android Sync page: what this phone sends to its groups, on the Android
// 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`
    <div>
      <h2>${t('androidsync.title')}</h2>
      ${platform.photoSync.available && html`
        <${PhotoSyncSection} user=${user} groups=${groups || []} />`}
      ${platform.contactSync.available && html`
        <${DocSyncSection} kind="contacts" user=${user} groups=${groups || []} />`}
    </div>
  `;
}