diff --git a/src/i18n/en.js b/src/i18n/en.js index c64f402..833aac7 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -12,4 +12,35 @@ export default { titleNetwork: 'Network', titleMarket: 'Market', }, + owner: { + tableHeader: '我的交易', + searchHolder: '请输入该输入的', + thId: '交易 ID', + thType: '类型', + thSender: '发送者', + thReceiver: '接收者', + thDate: '日期', + thAmount: '金额', + thFee: '手续费', + thRemark: '备注', + tableNone: '暂无数据', + }, + network: { + tableHeader: '当前邻居', + searchHolder: '请输入该输入的', + thIndex: '序号', + thAddress: '连接地址', + thStatus: '连接状态', + thNeighbour: '邻居主人的账户地址', + tableNone: '暂无数据', + }, + chain: { + tableHeader: '区块列表', + searchHolder: '请输入该输入的', + thHeight: '区块高度', + thTimestamp: '时间戳', + thType: '区块类型', + thId: '区块 ID', + tableNone: '暂无数据', + }, } diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index dddb836..8340a69 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -7,9 +7,40 @@ export default { }, home: { titleOwner: '个人中心', - titleChain: '区块/交易', + titleChain: '链内数据', titleNode: '当前节点', - titleNetwork: '网络链接', + titleNetwork: '对等网络', titleMarket: '应用商城', }, + owner: { + tableHeader: '我的交易', + searchHolder: '请输入该输入的', + thId: '交易 ID', + thType: '类型', + thSender: '发送者', + thReceiver: '接收者', + thDate: '日期', + thAmount: '金额', + thFee: '手续费', + thRemark: '备注', + tableNone: '暂无数据', + }, + network: { + tableHeader: '当前邻居', + searchHolder: '请输入该输入的', + thIndex: '序号', + thAddress: '连接地址', + thStatus: '连接状态', + thNeighbour: '邻居主人的账户地址', + tableNone: '暂无数据', + }, + chain: { + tableHeader: '区块列表', + searchHolder: '请输入该输入的', + thHeight: '区块高度', + thTimestamp: '时间戳', + thType: '区块类型', + thId: '区块 ID', + tableNone: '暂无数据', + }, } diff --git a/src/services/ui.js b/src/services/ui.js index 903269e..e036bfd 100644 --- a/src/services/ui.js +++ b/src/services/ui.js @@ -5,9 +5,14 @@ import { VBtn, VMenu, VIcon, + VDialog, VSelect, VTextField, + VPagination, } from 'vuetify/es5/components' +import { VSpacer } from 'vuetify/es5/components/VGrid' +import { VDataTable } from 'vuetify/es5/components/VDataTable' +import { VCard, VCardTitle, VCardActions } from 'vuetify/es5/components/VCard' import { Ripple } from 'vuetify/es5/directives' import 'vuetify/dist/vuetify.min.css' import 'material-design-icons-iconfont/dist/material-design-icons.css' @@ -22,9 +27,16 @@ Vue.use(Vuetify, { Vue.component('VApp', VApp) Vue.component('VBtn', VBtn) +Vue.component('VCard', VCard) Vue.component('VMenu', VMenu) Vue.component('VIcon', VIcon) +Vue.component('VDialog', VDialog) +Vue.component('VSpacer', VSpacer) Vue.component('VSelect', VSelect) Vue.component('VTextField', VTextField) +Vue.component('VDataTable', VDataTable) +Vue.component('VPagination', VPagination) +Vue.component('VCardTitle', VCardTitle) +Vue.component('VCardActions', VCardActions) Vue.directive('Ripple', Ripple) diff --git a/src/store/modules/chain.js b/src/store/modules/chain.js index 623ab4b..8b210d3 100644 --- a/src/store/modules/chain.js +++ b/src/store/modules/chain.js @@ -1,8 +1,42 @@ export default { namespaced: true, + state: { + pageEntity: [5, 10, 25], + headers: [ + { text: 'chain.thHeight', value: 'height', align: 'center' }, + { text: 'chain.thTimestamp', value: 'timestamp', align: 'center' }, + { text: 'chain.thType', value: 'type', align: 'center' }, + { text: 'chain.thId', value: 'id', align: 'center' }, + ], + desserts: [ + { + height: '1', + timestamp: '2011-11-20', + type: '0', + id: 'ajlk;gaklewklgjqwejj', + }, + ], + fetching: false, + filter: '', + modal: false, }, - mutations: {}, + + mutations: { + inputFilter(state, filter) { + state.filter = filter + }, + + showModal(state) { + state.modal = true + }, + + hideModal(state) { + state.modal = false + }, + }, + actions: {}, + getters: {}, } diff --git a/src/store/modules/network.js b/src/store/modules/network.js index c3240d4..a545eea 100644 --- a/src/store/modules/network.js +++ b/src/store/modules/network.js @@ -1,7 +1,33 @@ export default { namespaced: true, - state: {}, - mutations: {}, + + state: { + pageEntity: [5, 10, 25], + headers: [ + { text: 'network.thIndex', value: 'index', align: 'center' }, + { text: 'network.thAddress', value: 'address', align: 'center' }, + { text: 'network.thStatus', value: 'status', align: 'center' }, + { text: 'network.thNeighbour', value: 'neighbour', align: 'center' }, + ], + desserts: [ + { + index: '1', + address: '192.168.0.1', + status: '0', + neighbour: 'ajlk;gaklewklgjqwejj', + }, + ], + fetching: false, + filter: '', + }, + + mutations: { + inputFilter(state, filter) { + state.filter = filter + }, + }, + actions: {}, + getters: {}, } diff --git a/src/store/modules/owner.js b/src/store/modules/owner.js index c3240d4..84eed08 100644 --- a/src/store/modules/owner.js +++ b/src/store/modules/owner.js @@ -1,7 +1,42 @@ export default { namespaced: true, - state: {}, - mutations: {}, - actions: {}, + + state: { + pageEntity: [5, 10, 25], + headers: [ + { text: 'owner.thId', value: 'id', align: 'center' }, + { text: 'owner.thType', value: 'type', align: 'center' }, + { text: 'owner.thSender', value: 'sender', align: 'center' }, + { text: 'owner.thReceiver', value: 'receiver', align: 'center' }, + { text: 'owner.thDate', value: 'date', align: 'center' }, + { text: 'owner.thAmount', value: 'amount', align: 'center' }, + { text: 'owner.thFee', value: 'fee', align: 'center' }, + { text: 'owner.thRemark', value: 'remark', align: 'center' }, + ], + desserts: [ + // { + // id: 'xxxxx', + // type: 'zzz', + // sender: 'xxx', + // receiver: 'dddd', + // date: '333', + // amount: '12', + // fee: 32, + // remark: 'xxxx', + // }, + ], + fetching: false, + filter: '', + }, + + mutations: { + inputFilter(state, filter) { + state.filter = filter + }, + }, + + actions: { + }, + getters: {}, } diff --git a/src/store/rootStore.js b/src/store/rootStore.js index afb045e..d4f80db 100644 --- a/src/store/rootStore.js +++ b/src/store/rootStore.js @@ -26,11 +26,6 @@ const sideMenus = [ icon: 'group', path: '/owner', }, - { - title: 'home.titleChain', - icon: 'public', - path: '/chain', - }, { title: 'home.titleNode', icon: 'all_inclusive', @@ -38,9 +33,14 @@ const sideMenus = [ }, { title: 'home.titleNetwork', - icon: 'language', + icon: 'public', path: '/network', }, + { + title: 'home.titleChain', + icon: 'timeline', + path: '/chain', + }, { title: 'home.titleMarket', icon: 'apps', diff --git a/src/styles/_share.scss b/src/styles/_share.scss index f804a1d..6ffa0e8 100644 --- a/src/styles/_share.scss +++ b/src/styles/_share.scss @@ -7,6 +7,11 @@ $accentColor: #FFCDD2; height: 100%; } +@mixin app-normal-card { + @extend .elevation-1; + background-color: white; +} + .v-icon { user-select: none; } diff --git a/src/views/Chain.vue b/src/views/Chain.vue index 0c898d7..e4f3c00 100644 --- a/src/views/Chain.vue +++ b/src/views/Chain.vue @@ -1,16 +1,158 @@ diff --git a/src/views/Home.vue b/src/views/Home.vue index 19e8e69..2b8c8a2 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -41,7 +41,9 @@ power_settings_new - + + + @@ -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 + } } diff --git a/src/views/Login.vue b/src/views/Login.vue index 413cff1..6ffa445 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -13,6 +13,7 @@ :value="mnemonic" :loading="signing" @input="updateMnemonic" + @keyup.13="login" :label="$t('login.inputLabel')" />
- Network +
+
+
+
+
+
+
+
+
+ +
+
+

{{ $t('network.tableHeader') }}

+
+ +
+
+ + +
diff --git a/src/views/Node.vue b/src/views/Node.vue index abf2a8d..011b269 100644 --- a/src/views/Node.vue +++ b/src/views/Node.vue @@ -1,6 +1,10 @@ @@ -12,5 +16,21 @@ export default { diff --git a/src/views/Owner.vue b/src/views/Owner.vue index adc2bba..b7d5dc4 100644 --- a/src/views/Owner.vue +++ b/src/views/Owner.vue @@ -1,16 +1,131 @@