Tables
This commit is contained in:
@@ -1,16 +1,158 @@
|
||||
<template>
|
||||
<div class="chain-page">
|
||||
Chain
|
||||
<div class="card-content">
|
||||
<div @click="showModal" class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
</div>
|
||||
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('chain.tableHeader') }}</h3>
|
||||
<div class="search-input">
|
||||
<v-text-field
|
||||
:placeholder="$t('chain.searchHolder')"
|
||||
:value="filter"
|
||||
@input="inputFilter"
|
||||
append-icon="search" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="desserts"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.height }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.id }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('chain.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<v-dialog v-model="modal" persistent>
|
||||
<v-card class="app-modal">
|
||||
<v-card-title>事务列表</v-card-title>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="desserts"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.height }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.id }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('chain.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click.native="hideModal">Close</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createNamespacedHelpers,
|
||||
} from 'vuex'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||
|
||||
export default {
|
||||
name: 'Chain',
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'headers',
|
||||
'desserts',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
'modal',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
'showModal',
|
||||
'hideModal',
|
||||
]),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.chain-page {
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
.app-card {
|
||||
flex: 1;
|
||||
height: 100px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.app-sep {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
flex: 1;
|
||||
margin: 0 20px 20px;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 20px;
|
||||
|
||||
.search-input {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
<v-icon @click="logout">power_settings_new</v-icon>
|
||||
</div>
|
||||
|
||||
<router-view class="app-container" />
|
||||
<transition name="fade">
|
||||
<router-view class="app-container" />
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -251,5 +253,18 @@ export default {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.fade-enter-active, .fade-leave-active {
|
||||
transition-property: opacity;
|
||||
transition-duration: .25s;
|
||||
}
|
||||
|
||||
.fade-enter-active {
|
||||
transition-delay: .4s;
|
||||
}
|
||||
|
||||
.fade-enter, .fade-leave-active {
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
:value="mnemonic"
|
||||
:loading="signing"
|
||||
@input="updateMnemonic"
|
||||
@keyup.13="login"
|
||||
:label="$t('login.inputLabel')" />
|
||||
|
||||
<v-select
|
||||
|
||||
@@ -1,16 +1,124 @@
|
||||
<template>
|
||||
<div class="network-page">
|
||||
Network
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
</div>
|
||||
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('network.tableHeader') }}</h3>
|
||||
<div class="search-input">
|
||||
<v-text-field
|
||||
:placeholder="$t('network.searchHolder')"
|
||||
:value="filter"
|
||||
@input="inputFilter"
|
||||
append-icon="search" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="desserts"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.index }}</td>
|
||||
<td>{{ props.item.address }}</td>
|
||||
<td>{{ props.item.status }}</td>
|
||||
<td>{{ props.item.neighbour }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('network.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createNamespacedHelpers,
|
||||
} from 'vuex'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('network')
|
||||
|
||||
export default {
|
||||
name: 'Network',
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'headers',
|
||||
'desserts',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
]),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.network-page {
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
.app-card {
|
||||
flex: 1;
|
||||
height: 100px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.app-sep {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
flex: 1;
|
||||
margin: 0 20px 20px;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 20px;
|
||||
|
||||
.search-input {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="node-page">
|
||||
Node
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -12,5 +16,21 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.node-page {
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
.app-card {
|
||||
flex: 1;
|
||||
height: 200px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.app-sep {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,131 @@
|
||||
<template>
|
||||
<div class="owner-page">
|
||||
Owner
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
</div>
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('owner.tableHeader') }}</h3>
|
||||
<div class="search-input">
|
||||
<v-text-field
|
||||
:placeholder="$t('owner.searchHolder')"
|
||||
:value="filter"
|
||||
@input="inputFilter"
|
||||
append-icon="search" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="desserts"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.id }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.sender }}</td>
|
||||
<td>{{ props.item.receiver }}</td>
|
||||
<td>{{ props.item.date }}</td>
|
||||
<td>{{ props.item.amount }}</td>
|
||||
<td>{{ props.item.fee }}</td>
|
||||
<td>{{ props.item.remark }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('owner.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createNamespacedHelpers,
|
||||
} from 'vuex'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('owner')
|
||||
|
||||
export default {
|
||||
name: 'Owner',
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'headers',
|
||||
'desserts',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
]),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "../styles/share";
|
||||
|
||||
.owner-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: flex-start;
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
.app-card {
|
||||
flex: 1;
|
||||
height: 200px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.app-sep {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.table-content {
|
||||
flex: 1;
|
||||
margin: 0 20px 20px;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 20px;
|
||||
|
||||
.search-input {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user