summaryrefslogtreecommitdiffstats
path: root/assets/js/vue-eeprom.js
diff options
context:
space:
mode:
authorSimone <26844016+simonebortolin@users.noreply.github.com>2023-02-10 21:20:45 +0100
committerGitHub <noreply@github.com>2023-02-10 21:20:45 +0100
commit4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd (patch)
tree26c757d54747d941ad219b7545cc2f8738962597 /assets/js/vue-eeprom.js
parentFS: Always use the original file (immutable /rom squashfs) to set the ONU hardware version (#148) (diff)
downloadhack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar.gz
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar.bz2
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar.lz
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar.xz
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.tar.zst
hack-gpon.github.io-4649c57e55dba15ba5f5b014ee7bcf89cea4cdfd.zip
Diffstat (limited to 'assets/js/vue-eeprom.js')
-rw-r--r--assets/js/vue-eeprom.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/assets/js/vue-eeprom.js b/assets/js/vue-eeprom.js
new file mode 100644
index 0000000..63f9bfb
--- /dev/null
+++ b/assets/js/vue-eeprom.js
@@ -0,0 +1,28 @@
+const { createApp } = Vue;
+const { loadModule } = window['vue3-sfc-loader'];
+const options = {
+ moduleCache: {
+ vue: Vue,
+ },
+ getFile(url) {
+ return fetch(url).then((resp) =>
+ resp.ok ? resp.text() : Promise.reject(resp)
+ );
+ },
+ addStyle(styleStr) {
+ const style = document.createElement('style');
+ style.textContent = styleStr;
+ const ref = document.head.getElementsByTagName('style')[0] || null;
+ document.head.insertBefore(style, ref);
+ },
+ log(type, ...args) {
+ console.log(type, ...args);
+ },
+};
+const app = createApp({
+ components: {
+ VueLantiqEeprom: Vue.defineAsyncComponent(() =>
+ loadModule('/assets/js/vue/vue-lantiq-eeprom.vue', options)
+ ),
+ },
+}).mount('#app'); \ No newline at end of file