forked from baking-bad/bcdhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: call stack aliases (baking-bad#501)
- Loading branch information
1 parent
b88c717
commit 9c1e990
Showing
4 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<v-list class="mt-5"> | ||
<v-list-item style="height: 44px"> | ||
<v-list-item-content two-line> | ||
<v-list-item-title class="headline">Call stack</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<div class="d-flex flex-column px-4 call-stack-content-wrapper" style="font-size: 15px"> | ||
<CallStackItem | ||
v-for="(op, idx) in operations" | ||
:key="idx" | ||
:network="network" | ||
:operation="op" | ||
/> | ||
</div> | ||
</v-list> | ||
</template> | ||
|
||
<script> | ||
import CallStackItem from '@/views/opg/CallStackItem.vue'; | ||
export default { | ||
name: "CallStack", | ||
props: { | ||
network: String, | ||
operations: Array, | ||
}, | ||
components: { | ||
CallStackItem | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<div class="d-flex align-center" :class="operation.internal ? 'mt-2' : 'mt-4'"> | ||
<span v-if="operation.internal" class="mr-2" style="font-size: 14px">↳</span> | ||
<div> | ||
<span class="text--secondary" v-if="alias">{{ alias }}</span> | ||
<Shortcut v-else class="text--secondary" :str="operation.destination"/> | ||
<span class="text--secondary" style="font-size: 20px">→</span> | ||
<span v-if="operation.entrypoint" class="hash">{{ operation.entrypoint }}()</span> | ||
<span v-else>{{ operation.amount | uxtz }}</span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Shortcut from "@/components/Shortcut.vue"; | ||
export default { | ||
name: "CallStackItem", | ||
props: { | ||
network: String, | ||
operation: Object | ||
}, | ||
components: { | ||
Shortcut | ||
}, | ||
data: () => { | ||
return { | ||
alias: null | ||
} | ||
}, | ||
async created() { | ||
this.alias = await this.fetchAlias(); | ||
}, | ||
methods: { | ||
async fetchAlias() { | ||
return await this.getAlias(this.network, this.operation.destination) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters