feat: prepare for naddr fix
This commit is contained in:
parent
28a251748a
commit
0226fc3f79
4 changed files with 43 additions and 20 deletions
|
|
@ -85,20 +85,22 @@
|
|||
</q-tab-panel>
|
||||
<q-tab-panel name="marketplace">
|
||||
<div class="q-mb-md"> <strong>Information</strong></div>
|
||||
<q-input outlined v-model="info.name" type="text" label="Marketplace Name" class="q-mb-md">
|
||||
<q-input @change="updateUiConfig" outlined v-model="configData.name" type="text" label="Marketplace Name"
|
||||
class="q-mb-md">
|
||||
</q-input>
|
||||
<q-input @change="updateUiConfig" outlined v-model="configData.about" type="textarea" rows="3"
|
||||
label="Marketplace Description" class="q-mb-lg"></q-input>
|
||||
|
||||
<q-input outlined v-model="info.description" type="textarea" rows="3" label="Marketplace Description"
|
||||
class="q-mb-lg"></q-input>
|
||||
<div class="q-mb-md q-mt-lg">
|
||||
<strong>UI Configurations</strong>
|
||||
</div>
|
||||
<q-input outlined v-model="info.theme" type="text" label="Theme" class="q-mb-md">
|
||||
|
||||
<q-input @change="updateUiConfig" outlined v-model="configData.ui.picture" type="text" label="Logo" class="q-mb-md">
|
||||
</q-input>
|
||||
<q-input outlined v-model="info.logo" type="text" label="Logo" class="q-mb-md">
|
||||
</q-input>
|
||||
<q-input outlined v-model="info.banner" type="text" label="Banner" class="q-mb-md">
|
||||
<q-input @change="updateUiConfig" outlined v-model="configData.ui.banner" type="text" label="Banner" class="q-mb-md">
|
||||
</q-input>
|
||||
<q-select @change="updateUiConfig" filled v-model="configData.ui.theme" hint="Choose marketplace theme"
|
||||
:options="themeOptions" label="Marketplace Theme"></q-select>
|
||||
|
||||
|
||||
</q-tab-panel>
|
||||
|
|
@ -111,8 +113,8 @@
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="float-right">
|
||||
<q-btn flat label="Copy Naddr" color="green"></q-btn>
|
||||
<q-btn flat label="Update" color="primary"></q-btn>
|
||||
<q-btn rounded label="Copy Naddr" color="green"></q-btn>
|
||||
<q-btn rounded label="Update" class="q-ml-lg" color="primary"></q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section></q-card-section>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ async function marketConfig(path) {
|
|||
const template = await loadTemplateAsync(path)
|
||||
Vue.component('market-config', {
|
||||
name: 'market-config',
|
||||
props: ['merchants', 'relays'],
|
||||
props: ['merchants', 'relays', 'config'],
|
||||
template,
|
||||
|
||||
data: function () {
|
||||
|
|
@ -12,13 +12,27 @@ async function marketConfig(path) {
|
|||
profiles: new Map(),
|
||||
merchantPubkey: null,
|
||||
relayUrl: null,
|
||||
info: {
|
||||
configData: {
|
||||
identifier: null,
|
||||
name: null,
|
||||
description: null,
|
||||
theme: null,
|
||||
logo: null,
|
||||
banner: null
|
||||
}
|
||||
about: null,
|
||||
ui: {
|
||||
picture: null,
|
||||
banner: null,
|
||||
theme: null
|
||||
}
|
||||
},
|
||||
themeOptions: [
|
||||
'classic',
|
||||
'bitcoin',
|
||||
'flamingo',
|
||||
'cyber',
|
||||
'freedom',
|
||||
'mint',
|
||||
'autumn',
|
||||
'monochrome',
|
||||
'salvador'
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -67,9 +81,13 @@ async function marketConfig(path) {
|
|||
removeRelay: async function (relay) {
|
||||
this.$emit('remove-relay', relay)
|
||||
},
|
||||
updateUiConfig: function () {
|
||||
console.log('### this.info', this.configData)
|
||||
this.$emit('ui-config-update', this.configData)
|
||||
}
|
||||
},
|
||||
created: async function () {
|
||||
|
||||
this.configData = { ...this.configData, ...this.config }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,6 +345,9 @@ const market = async () => {
|
|||
}
|
||||
this.configDialog.show = true
|
||||
},
|
||||
updateUiConfig(configData) {
|
||||
console.log('### updateUiConfig', configData)
|
||||
},
|
||||
async sendConfig() {
|
||||
let { name, about, ui } = this.configDialog.data
|
||||
let merchants = Array.from(this.pubkeys)
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@
|
|||
<q-separator class="q-mt-sm q-mb-md"></q-separator>
|
||||
|
||||
<market-config v-if="activePage === 'market-config'" :merchants="merchants" @add-merchant="addMerchant"
|
||||
@remove-merchant="removeMerchant" :relays="relays" @add-relay="addRelay"
|
||||
@remove-relay="removeRelay"></market-config>
|
||||
@remove-merchant="removeMerchant" :relays="relays" @add-relay="addRelay" @remove-relay="removeRelay"
|
||||
:config="configDialog" @ui-config-update="updateUiConfig"></market-config>
|
||||
|
||||
<user-config v-else-if="activePage === 'user-config'"></user-config>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue