Initial skeleton
This commit is contained in:
parent
d76f40baaf
commit
cc65c91726
7 changed files with 103 additions and 0 deletions
0
config.json
Normal file
0
config.json
Normal file
0
static/components/stall-details/stall-details.html
Normal file
0
static/components/stall-details/stall-details.html
Normal file
15
static/components/stall-details/stall-details.js
Normal file
15
static/components/stall-details/stall-details.js
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
15
static/js/index.js
Normal file
15
static/js/index.js
Normal file
|
|
@ -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()
|
||||
18
static/js/utils.js
Normal file
18
static/js/utils.js
Normal file
|
|
@ -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(`<div>Page not found: ${path}</div>`)
|
||||
}
|
||||
}
|
||||
|
||||
xhttp.open('GET', path, true)
|
||||
xhttp.send()
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
26
templates/nostrmarket/_api_docs.html
Normal file
26
templates/nostrmarket/_api_docs.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<q-card>
|
||||
<q-card-section>
|
||||
<p>
|
||||
Nostr Market<br />
|
||||
<small>
|
||||
Created by,
|
||||
<a
|
||||
class="text-secondary"
|
||||
target="_blank"
|
||||
style="color: unset"
|
||||
href="https://github.com/motorina0"
|
||||
>motorina0</a
|
||||
></small
|
||||
>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<a
|
||||
class="text-secondary"
|
||||
target="_blank"
|
||||
href="/docs#/nostrmarket"
|
||||
class="text-white"
|
||||
>Swagger REST API Documentation</a
|
||||
>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
29
templates/nostrmarket/index.html
Normal file
29
templates/nostrmarket/index.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
|
||||
%} {% block page %}
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12 col-md-7 q-gutter-y-md">
|
||||
<q-card>
|
||||
<q-card-section> section </q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-5 q-gutter-y-md">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<h6 class="text-subtitle1 q-my-none">
|
||||
{{SITE_TITLE}} Nostr Market Extension
|
||||
</h6>
|
||||
</q-card-section>
|
||||
<q-card-section class="q-pa-none">
|
||||
<q-separator></q-separator>
|
||||
<q-list> {% include "nostrmarket/_api_docs.html" %} </q-list>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock%}{% block scripts %} {{ window_vars(user) }}
|
||||
<script src="{{ url_for('nostrstall_static', path='js/utils.js') }}"></script>
|
||||
<script src="{{ url_for('nostrstall_static', path='components/stall-details/stall-details.js') }}"></script>
|
||||
<script src="{{ url_for('nostrstall_static', path='js/index.js') }}"></script>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue