A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4 53 lines 1.3 kB view raw
1import { defineElement, DiffuseElement } from "~/common/element.js"; 2 3/** 4 * @import {ProxiedActions} from "~/common/worker.d.ts" 5 * @import {MetadataElement} from "~/components/metadata/types.d.ts" 6 * @import {Actions} from "./types.d.ts" 7 */ 8 9//////////////////////////////////////////// 10// ELEMENT 11//////////////////////////////////////////// 12 13/** 14 * @implements {ProxiedActions<Actions>} 15 */ 16class MetadataConfigurator extends DiffuseElement { 17 static NAME = "diffuse/configurator/metadata"; 18 static WORKER_URL = "components/configurator/metadata/worker.js"; 19 20 constructor() { 21 super(); 22 23 /** @type {ProxiedActions<Actions>} */ 24 const proxy = this.workerProxy(); 25 26 this.patch = proxy.patch; 27 } 28 29 // WORKERS 30 31 /** 32 * @override 33 */ 34 dependencies() { 35 return Object.fromEntries( 36 Array.from(this.children).map((element) => { 37 const metadata = /** @type {MetadataElement} */ (element); 38 return [metadata.localName, metadata]; 39 }), 40 ); 41 } 42} 43 44export default MetadataConfigurator; 45 46//////////////////////////////////////////// 47// REGISTER 48//////////////////////////////////////////// 49 50export const CLASS = MetadataConfigurator; 51export const NAME = "dc-metadata"; 52 53defineElement(NAME, MetadataConfigurator);