import spinner from "templates/spinner.js"; import { formatFingerprint } from 'plugins/omemo/utils.js'; import { html } from "lit"; import { __ } from 'i18n'; const fingerprint = (el) => html` ${formatFingerprint(el.current_device.get('bundle').fingerprint)}`; const device_with_fingerprint = (el) => { const i18n_fingerprint_checkbox_label = __('Checkbox for selecting the following fingerprint'); return html`
  • `; } const device_without_fingerprint = (el) => { const i18n_device_without_fingerprint = __('Device without a fingerprint'); const i18n_fingerprint_checkbox_label = __('Checkbox for selecting the following device'); return html`
  • `; } const device_item = (el) => html` ${(el.device.get('bundle') && el.device.get('bundle').fingerprint) ? device_with_fingerprint(el) : device_without_fingerprint(el) } `; const device_list = (el) => { const i18n_other_devices = __('Other OMEMO-enabled devices'); const i18n_other_devices_label = __('Checkbox to select fingerprints of all other OMEMO devices'); const i18n_remove_devices = __('Remove checked devices and close'); const i18n_select_all = __('Select all'); return html`
    `; } export default (el) => { const i18n_fingerprint = __("This device's OMEMO fingerprint"); const i18n_generate = __('Generate new keys and fingerprint'); return html`
    ${ el.other_devices?.length ? device_list(el) : '' }
    `; }