import { CustomHTMLElement } from "./lib/custom_html_element.mjs" import { API } from './api.mjs' export class N2PagePreferences extends CustomHTMLElement { static {// {{{ this.tmpl = document.createElement('template') this.tmpl.innerHTML = `

Preferences

` }// }}} constructor() {// {{{ super() window._mbus.subscribe('SHOW_PAGE', event => { if (event.detail.data?.page == 'preferences') this.render() }) }// }}} async render() {// {{{ }// }}} getPreferences() { API.query('GET', '/user/preferences') } } customElements.define('n2-pagepreferences', N2PagePreferences) // Preferences is a set of preferences, of which there can be many named. class Preferences { constructor(name, data) { this.name = name this.data = data } }