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

feat: default output

+10 -3
+9 -2
src/components/configurator/output/element.js
··· 78 78 // MISC 79 79 80 80 async #findSelectedOutput() { 81 - const id = localStorage.getItem(`${STORAGE_PREFIX}/selected/id`); 81 + const id = localStorage.getItem(`${STORAGE_PREFIX}/selected/id`) ?? 82 + this.getAttribute("default"); 82 83 const el = id ? this.root().querySelector(`#${id}`) : null; 83 84 84 85 if (!el) return null; ··· 117 118 118 119 // ADDITIONAL ACTIONS 119 120 121 + async deselectOutput() { 122 + localStorage.removeItem(`${STORAGE_PREFIX}/selected/id`); 123 + this.#selectedOutput.value = await this.#findSelectedOutput(); 124 + } 125 + 120 126 /** 121 127 * @param {string} id 122 128 */ 123 - selectOutput(id) { 129 + async selectOutput(id) { 124 130 localStorage.setItem(`${STORAGE_PREFIX}/selected/id`, id); 131 + this.#selectedOutput.value = await this.#findSelectedOutput(); 125 132 } 126 133 } 127 134
+1 -1
src/themes/webamp/index.vto
··· 89 89 <!-- Output --> 90 90 <dop-indexed-db id="idb-json-output" key="json"></dop-indexed-db> 91 91 92 - <dc-output> 92 + <dc-output default="idb-json"> 93 93 <dtos-json id="idb-json" output-selector="#idb-json-output"></dtos-json> 94 94 </dc-output> 95 95