token metadata fixes for vault and orders view; faucet fix

This commit is contained in:
Tim
2024-03-26 14:55:07 -04:00
parent 9ab0f89950
commit 9e2f11b421
9 changed files with 95 additions and 56 deletions

View File

@@ -1,15 +1,19 @@
<template>
<div class="d-flex flex-column h-100">
<toolbar title="Orders" icon="mdi-format-list-bulleted-square">
</toolbar>
<orders-view/>
</div>
<toolbar-pane title="Orders" icon="mdi-format-list-bulleted-square">
<needs-provider>
<needs-signer>
<orders/>
</needs-signer>
</needs-provider>
</toolbar-pane>
</template>
<script setup>
import Toolbar from "@/components/chart/Toolbar.vue";
import OrdersView from "@/views/OrdersView.vue";
import ToolbarPane from "@/components/chart/ToolbarPane.vue";
import NeedsProvider from "@/components/NeedsProvider.vue";
import Orders from "@/components/Orders.vue";
import NeedsSigner from "@/components/NeedsSigner.vue";
</script>
<style scoped lang="scss">

View File

@@ -1,29 +1,27 @@
<template>
<div class="d-flex flex-column h-100">
<toolbar>
<v-btn variant="flat" prepend-icon="mdi-plus" @click="co.newOrder" v-if="co.orders.length===0">New Order</v-btn>
<v-btn variant="text" prepend-icon="mdi-send" @click="placeOrder"
:color="orderColor" v-if="co.orders.length>0" :disabled="co.drawing">
Place Order
</v-btn>
<v-btn variant="flat" prepend-icon="mdi-cancel" v-if="co.orders.length>0" @click="cancelOrder">Cancel</v-btn>
</toolbar>
<v-dialog v-model="showCancel" max-width="300">
<v-card title="Cancel Order?" text="Do you want to cancel this order and create a new one?">
<v-card-actions>
<v-spacer/>
<v-btn @click="()=>showCancel=false">Keep Existing</v-btn>
<v-btn @click="()=>{co.orders.shift(); showCancel=false}" color="red">Cancel Order</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<!-- <div v-for="b in co.builderList">{{JSON.stringify(b)}}</div>-->
<div class="overflow-y-auto">
<template v-for="o in co.orders">
<chart-order :order="o"/>
</template>
</div>
</div>
<toolbar-pane>
<template v-slot:toolbar>
<v-btn variant="flat" prepend-icon="mdi-plus" @click="co.newOrder" v-if="co.orders.length===0">New Order</v-btn>
<v-btn variant="text" prepend-icon="mdi-send" @click="placeOrder"
:color="orderColor" v-if="co.orders.length>0" :disabled="co.drawing">
Place Order
</v-btn>
<v-btn variant="flat" prepend-icon="mdi-cancel" v-if="co.orders.length>0" @click="cancelOrder">Cancel</v-btn>
</template>
<!-- <div v-for="b in co.builderList">{{JSON.stringify(b)}}</div>-->
<template v-for="o in co.orders">
<chart-order :order="o"/>
</template>
<v-dialog v-model="showCancel" max-width="300">
<v-card title="Cancel Order?" text="Do you want to cancel this order and create a new one?">
<v-card-actions>
<v-spacer/>
<v-btn @click="()=>showCancel=false">Keep Existing</v-btn>
<v-btn @click="()=>{co.orders.shift(); showCancel=false}" color="red">Cancel Order</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</toolbar-pane>
</template>
<script setup>
@@ -38,6 +36,7 @@ import {useTheme} from "vuetify";
import Toolbar from "@/components/chart/Toolbar.vue";
import {Exchange, newOrder} from "@/blockchain/orderlib.js";
import {pendOrder} from "@/blockchain/wallet.js";
import ToolbarPane from "@/components/chart/ToolbarPane.vue";
const s = useStore()
const co = useChartOrderStore()

View File

@@ -1,11 +1,10 @@
<template>
<div class="d-flex flex-column h-100">
<toolbar title="Assets" icon="mdi-currency-btc"></toolbar>
<toolbar-pane title="Assets" icon="mdi-currency-btc">
<needs-signer>
<vault :owner="s.account" :num="0"/>
<faucet variant="outlined" text="Get Free Testnet Coins!" style="width: 15em"/>
</needs-signer>
</div>
</toolbar-pane>
</template>
<script setup>
@@ -15,6 +14,7 @@ import Vault from "@/components/Vault.vue";
import NeedsSigner from "@/components/NeedsSigner.vue";
import Faucet from "@/components/Faucet.vue";
import {useStore} from "@/store/store.js";
import ToolbarPane from "@/components/chart/ToolbarPane.vue";
const s = useStore()

View File

@@ -0,0 +1,22 @@
<template>
<div class="d-flex flex-column h-100">
<toolbar :title="title" :icon="icon">
<slot name="toolbar"/>
</toolbar>
<div class="overflow-y-auto">
<slot/>
</div>
</div>
</template>
<script setup>
import Toolbar from "@/components/chart/Toolbar.vue";
const props = defineProps(['title', 'icon'])
</script>
<style scoped lang="scss">
</style>