Skip to content

Commit

Permalink
update the view of metadata tab
Browse files Browse the repository at this point in the history
  • Loading branch information
ungarson committed Jan 28, 2021
1 parent c898c7f commit 0aae397
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ html {
background-color: var(--v-data-base) !important;
}
.white-space-normal {
white-space: normal !important;
}
::-webkit-scrollbar {
width: 12px;
}
Expand Down
6 changes: 3 additions & 3 deletions src/views/contract/MetadataTab/ListBlocks/BriefInfo.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<v-container class="pa-0">
<v-list>
<v-list-item v-if="metadata.name" selectable>
<v-list-item selectable>
<v-list-item-content>
<v-list-item-title class="headline"
><span>{{ metadata.name }}</span
><span>{{ metadata.name ? metadata.name : 'Unnamed' }}</span
>&nbsp;<span v-if="metadata.version" class="overline">{{
metadata.version
}}</span></v-list-item-title
>
<v-list-item-subtitle>{{
<v-list-item-subtitle class="white-space-normal">{{
metadata.description
}}</v-list-item-subtitle>
</v-list-item-content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<template>
<v-list class="mt-3">
<v-subheader class="title">Events</v-subheader>
<v-subheader class="title">{{ name }}</v-subheader>
<EntrypointsCard
class="ml-3 mr-3"
:card-max-width="-1"
:entrypoints="metadata.events"
:entrypoints="implementsList"
:is-implementations="true"
/>
</v-list>
</template>

<script>
import EntrypointsCard from "@/components/Cards/EntrypointsCard";
export default {
name: "EventsList",
name: "ImplementationsList",
components: {EntrypointsCard},
props: {
metadata: Object,
name: String,
implementsList: Array,
}
}
</script>
14 changes: 10 additions & 4 deletions src/views/contract/MetadataTab/MetadataTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@
name="Other Fields"
is-treeview
/>
<EventsList
<ImplementationsList
v-if="metadata.events"
:metadata="metadata"
:implementsList="metadata.events"
name="Events"
/>
<ImplementationsList
v-if="metadata.views"
:implementsList="metadata.views"
name="Views"
/>
</v-skeleton-loader>
</v-container>
Expand All @@ -26,11 +32,11 @@
import BriefInfo from "@/views/contract/MetadataTab/ListBlocks/BriefInfo";
import FieldsWrapper from "@/views/contract/MetadataTab/CustomFields/FieldsWrapper";
import ReservedFields from "@/views/contract/MetadataTab/ListBlocks/ReservedFields";
import EventsList from "@/views/contract/MetadataTab/ListBlocks/EventsList";
import ImplementationsList from "@/views/contract/MetadataTab/ListBlocks/ImplementationsList";
export default {
name: "Metadata",
components: {EventsList, ReservedFields, FieldsWrapper, BriefInfo},
components: {ImplementationsList, ReservedFields, FieldsWrapper, BriefInfo},
props: { contract: Object },
data: () => {
return {
Expand Down

0 comments on commit 0aae397

Please sign in to comment.