open source

This commit is contained in:
dingyi
2021-03-15 01:14:32 +08:00
commit f4f0d29a40
208 changed files with 24908 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<!--
* @Author: your name
* @Date: 2020-02-29 02:02:16
* @LastEditTime: 2020-02-29 02:38:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /serverless/look/src/entry-pc/App.vue
-->
<template>
<keep-alive>
<router-view />
</keep-alive>
</template>
<style>
@import url("./app.css");
</style>
+102
View File
@@ -0,0 +1,102 @@
html,
body {
margin: 0;
font-size: 14px;
line-height: 1.5;
background-color: #f0f2f5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
a {
text-decoration: none;
color: #0170fe;
}
a:hover {
color: #000;
}
p {
margin: 0;
padding: 0;
}
.p-20 {
padding: 20px;
}
.tc {
text-align: center;
}
.mt-20 {
margin-top: 20px;
}
.mr-10 {
margin-right: 10px;
}
.mb-10 {
margin-bottom: 10px;
}
.mb-20 {
margin-bottom: 20px;
}
.noselect {
user-select: none;
}
.pointer {
cursor: pointer;
}
.font-16 {
font-size: 16px;
}
.bg-white {
background: #fff;
}
.flex-center {
display: flex;
align-items: center;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-sb {
justify-content: space-between;
}
.flex-1 {
flex: 1;
}
.flex-justifycenter {
justify-content: center;
}
.area-title {
font-size: 18px;
color: #333;
margin-bottom: 10px;
}
.box-base {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.box-dark {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
.max-width {
max-width: 1200px;
margin: 0 auto;
}
.mb-5 {
margin-bottom: 5px
}
.text-overflow {
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
white-space: nowrap;
}
.border-eee {
border: 1px solid #eee;
}
+34
View File
@@ -0,0 +1,34 @@
/*
* @Author: your name
* @Date: 2020-02-29 02:02:16
* @LastEditTime: 2020-06-30 14:53:04
* @LastEditors: dingyi
* @Description: In User Settings Edit
* @FilePath: /look-web/src/entry-pc/base.js
*/
import Vue from 'vue'
import '../utils/initChain'
import './element-ui'
import '../components'
import * as api from '../api'
import axios from '../api/axios'
Vue.prototype.$api = api
Vue.prototype.$axios = axios
Vue.filter('shortHash', (val) => {
if (val && val !== '--') {
const str = val.substr(0, 8) + "..." + val.substr(-8, 8);
return str;
}
return "--";
})
Vue.filter('miniHash', (val) => {
if (val && val !== '--') {
const str = "..." + val.substr(-6, 6);
return str;
}
return "--";
})
+13
View File
@@ -0,0 +1,13 @@
/*
* @Author: your name
* @Date: 2020-02-29 02:06:29
* @LastEditTime: 2020-02-29 02:12:17
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /serverless/look/src/entry-pc/element-ui.js
*/
import Vue from 'vue';
import Element from 'element-ui';
import './element-ui.scss'
Vue.use(Element, { size: 'small' });
+65
View File
@@ -0,0 +1,65 @@
$--color-primary: #343a40; // #1890ff;
$--color-success: #52c41a;
$--color-warning: #faad14;
$--color-danger: #ff4d4f;
$--border-radius-base: 0;
$--border-radius-small: 0;
$--tag-border-radius: 0;
$--pagination-border-radius: 0;
$--font-path: "~element-ui/lib/theme-chalk/fonts";
@import "~element-ui/packages/theme-chalk/src/index";
@import "~element-ui/lib/theme-chalk/display.css";
/* element-ui 样式重置 */
.el-message {
background: #fff;
border: 1px solid #ddd;
padding: 10px 16px;
border-radius: 2px;
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
pointer-events: all;
}
.el-message--error .el-message__content,
.el-message--success .el-message__content,
.el-message--warning .el-message__content,
.el-message__content {
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
}
.el-message__icon {
font-size: 16px;
}
.el-alert--warning.is-light {
background-color: #fffbe6;
border: 1px solid #ffe58f;
color: rgba(0, 0, 0, 0.65);
}
.el-alert__title {
display: block;
margin-bottom: 4px;
color: rgba(0, 0, 0, 0.85);
font-size: 16px;
}
.el-alert--warning.is-light .el-alert__description {
color: rgba(0, 0, 0, 0.65);
}
.el-alert__icon.el-icon-warning {
align-self: flex-start;
color: #faad14;
}
.el-menu.el-menu--horizontal {
border-bottom: none;
}
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next,
.el-pagination.is-background .el-pager li {
border-radius: 0;
}
+15
View File
@@ -0,0 +1,15 @@
import Vue from 'vue'
import './base'
import App from './App.vue'
import router from './router'
import store from '../store'
import i18n from '../utils/lang'
Vue.config.productionTip = false
new Vue({
i18n,
router,
store,
render: h => h(App)
}).$mount('#app')
+134
View File
@@ -0,0 +1,134 @@
/*
* @Author: your name
* @Date: 2020-02-29 02:02:16
* @LastEditTime: 2020-10-24 14:05:00
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /look-web/src/entry-pc/router.js
*/
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
redirect: '/validator'
},
{
path: '/',
component: () => import(/* webpackChunkName: "pc" */ '../views/base-layout/_pc.vue'),
children: [
{
path: '/dashboard',
component: () => import(/* webpackChunkName: "pc" */ '../views/dashboard/_pc.vue')
},
{
path: '/chain-add',
component: () => import(/* webpackChunkName: "pc" */ '../views/chain-add/_pc.vue')
},
{
path: '/validator',
component: () => import(/* webpackChunkName: "pc" */ '../views/validator/_pc.vue')
},
{
path: '/validator/:address',
component: () => import(/* webpackChunkName: "pc" */ '../views/validator-address/_pc.vue')
},
{
path: '/block',
component: () => import(/* webpackChunkName: "pc" */ '../views/block/_pc.vue')
},
{
path: '/block-init',
component: () => import(/* webpackChunkName: "pc" */ '../views/block-init/_pc.vue')
},
{
path: '/block/:height',
component: () => import(/* webpackChunkName: "pc" */ '../views/block-height/_pc.vue')
},
{
path: '/uptime',
component: () => import(/* webpackChunkName: "pc" */ '../views/uptime/_pc.vue')
},
{
path: '/parameter',
component: () => import(/* webpackChunkName: "pc" */ '../views/parameter/_pc.vue')
},
{
path: '/tx/:hash',
component: () => import(/* webpackChunkName: "pc" */ '../views/tx-hash/_pc.vue')
},
{
path: '/governance',
component: () => import(/* webpackChunkName: "pc" */ '../views/governance/_pc.vue')
},
{
path: '/governance/:id',
component: () => import(/* webpackChunkName: "pc" */ '../views/governance-id/_pc.vue')
},
{
path: '/wallet',
component: () => import(/* webpackChunkName: "pc" */ '../views/wallet/_pc.vue')
},
{
path: '/wallet-add',
component: () => import(/* webpackChunkName: "pc" */ '../views/wallet-add/_pc.vue')
},
{
path: '/wallet-send',
component: () => import(/* webpackChunkName: "pc" */ '../views/wallet-send/_pc.vue')
},
{
path: '/wallet-stake',
component: () => import(/* webpackChunkName: "pc" */ '../views/wallet-stake/_pc.vue')
},
{
path: '/wallet-vote',
component: () => import(/* webpackChunkName: "pc" */ '../views/wallet-vote/_pc.vue')
},
{
path: '/genesis-time',
component: () => import(/* webpackChunkName: "pc" */ '../views/genesis-time/_pc.vue')
},
{
path: '/cdp',
component: () => import(/* webpackChunkName: "pc" */ '../views/kava/CDP.vue')
},
{
path: '/auction',
component: () => import(/* webpackChunkName: "pc" */ '../views/kava/Auction.vue')
},
{
path: '/bep3',
component: () => import(/* webpackChunkName: "pc" */ '../views/kava/Bep3.vue')
},
{
path: '/pricefeed',
component: () => import(/* webpackChunkName: "pc" */ '../views/kava/Pricefeed.vue')
},
// committee
{
path: '/committee',
component: () => import(/* webpackChunkName: "pc" */ '../views/governance-kava/_pc.vue')
},
{
path: '/committee/:id',
component: () => import(/* webpackChunkName: "pc" */ '../views/governance-id-kava/_pc.vue')
},
]
},
]
const router = new VueRouter({
routes
})
router.afterEach((to, from, next) => {
window.scrollTo(0, 0);
})
export default router