import { api } from '../api.js'; import { showToast } from '../components/toast.js'; import { esc } from '../utils.js'; const API = (url, opts = {}) => fetch('/api' + url, { headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('token')}`, ...opts.headers }, ...opts }).then(r => r.json()); export async function render(container) { const hash = window.location.hash; if (hash.startsWith('#/wall/')) { const id = hash.split('#/wall/')[1]; return renderWallEditor(container, id); } return renderList(container); } async function renderList(container) { container.innerHTML = `
Create a video wall to combine multiple displays.
All devices assigned
'}