diff --git a/config.json b/config.json new file mode 100644 index 0000000..e69de29 diff --git a/static/components/stall-details/stall-details.html b/static/components/stall-details/stall-details.html new file mode 100644 index 0000000..e69de29 diff --git a/static/components/stall-details/stall-details.js b/static/components/stall-details/stall-details.js new file mode 100644 index 0000000..5b929e1 --- /dev/null +++ b/static/components/stall-details/stall-details.js @@ -0,0 +1,15 @@ +async function stallDetails(path) { + const template = await loadTemplateAsync(path) + Vue.component('stall-details', { + name: 'stall-details', + template, + + //props: ['stall-id', 'adminkey', 'inkey', 'wallet-options'], + data: function () { + return { + tab: 'info', + relay: null + } + } + }) +} diff --git a/static/js/index.js b/static/js/index.js new file mode 100644 index 0000000..b48f3b1 --- /dev/null +++ b/static/js/index.js @@ -0,0 +1,15 @@ +const stalls = async () => { + Vue.component(VueQrcode.name, VueQrcode) + + await relayDetails('static/components/stall-details/stall-details.html') + + new Vue({ + el: '#vue', + mixins: [windowMixin], + data: function () { + return {} + } + }) +} + +stalls() diff --git a/static/js/utils.js b/static/js/utils.js new file mode 100644 index 0000000..11ebc81 --- /dev/null +++ b/static/js/utils.js @@ -0,0 +1,18 @@ +function loadTemplateAsync(path) { + const result = new Promise(resolve => { + const xhttp = new XMLHttpRequest() + + xhttp.onreadystatechange = function () { + if (this.readyState == 4) { + if (this.status == 200) resolve(this.responseText) + + if (this.status == 404) resolve(`
+ Nostr Market
+
+ Created by,
+ motorina0
+