Permalink
Browse files

chore(~): dismiss

  • Loading branch information...
lbgod2222 committed Jul 25, 2018
1 parent 8dd472b commit 0ea392bec288f980d69755d803866184d5926b2f
Showing with 3,007 additions and 2,437 deletions.
  1. +23 −3 .babelrc
  2. +0 −62 package.json
  3. +1 −5 quasar.conf.js
  4. +0 −29 src/index.template.html
  5. +8 −3 src/layouts/login.vue
  6. +13 −2 src/layouts/main.vue
  7. +1 −2 src/utils/util.js
  8. +9 −5 src/utils/validators.js
  9. +2,952 −2,326 yarn.lock
View
@@ -1,8 +1,28 @@
{
"presets": [
[ "env", {"modules": false} ],
"stage-2"
[
"@babel/preset-env", {
"modules": false,
"loose": false,
"useBuiltIns": "usage"
}
],
[
"@babel/preset-stage-2", {
"modules": false,
"loose": false,
"useBuiltIns": true,
"decoratorsLegacy": true
}
]
],
"plugins": [
[
"@babel/transform-runtime", {
"polyfill": false,
"regenerator": false
}
]
],
"plugins": ["transform-runtime"],
"comments": false
}
View

This file was deleted.

Oops, something went wrong.
View
@@ -12,14 +12,10 @@ module.exports = ctx => {
// 'fontawesome'
],
supportIE: true,
vendor: {
add: [],
remove: []
},
build: {
scopeHoisting: true,
vueRouterMode: 'hash',
// gzip: true,
gzip: true,
// analyze: true,
// extractCSS: false,
// useNotifier: false,
View
@@ -13,32 +13,6 @@
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png"> -->
<% if (htmlWebpackPlugin.options.ctx.mode.pwa) { %>
<!-- Add to home screen for Android and modern mobile browsers -->
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="<%= htmlWebpackPlugin.options.pwaManifest.theme_color %>">
<!-- Add to home screen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="<%= htmlWebpackPlugin.options.pwaManifest.background_color %>">
<meta name="apple-mobile-web-app-title" content="<%= htmlWebpackPlugin.options.pwaManifest.name %>">
<!-- <link rel="apple-touch-icon" href="statics/icons/apple-icon-152x152.png"> -->
<!-- Add to home screen for Windows -->
<!-- <meta name="msapplication-TileImage" content="statics/icons/ms-icon-144x144.png"> -->
<meta name="msapplication-TileColor" content="<%= htmlWebpackPlugin.options.pwaManifest.background_color %>">
<% } %>
<%= htmlWebpackPlugin.options.headScripts %>
<!--
The following is optional if you DON'T build for PWA.
Preloads/prefetches chunks/assets.
-->
<% if (!['cordova', 'electron'].includes(htmlWebpackPlugin.options.ctx.modeName) && htmlWebpackPlugin.options.ctx.prod) {
for (var chunk of webpack.chunks) {
for (var file of chunk.files) {
if (file.match(/\.(js|css)$/)) { %>
<link rel="<%= chunk.initial ? 'preload' : 'prefetch' %>" href="<%= file %>" as="<%= file.match(/\.css$/)? 'style' : 'script' %>">
<% }}}} %>
</head>
<body>
<% if (!htmlWebpackPlugin.options.ctx.mode.electron) { %>
@@ -50,9 +24,6 @@
<!-- DO NOT touch the following <div> -->
<div id="q-app"></div>
<!-- DO NOT touch the following -->
<%= htmlWebpackPlugin.options.bodyScripts %>
<!-- built files will be auto injected here -->
</body>
View
@@ -254,6 +254,11 @@ export default {
import(`src/i18n/zh`).then(lang => {
this.$q.i18n.set(lang.default)
})
if (window && window.location && process.env.NODE_ENV === 'production') {
const location = window.location
let server = location.protocol + '//' + location.hostname + ':' + location.port || 80
setCache('currentServer', server)
}
},
created() {
removeCache('currentServer')
@@ -297,7 +302,7 @@ export default {
},
serverUrl(server) {
if (server) {
setCache('currentServer', server)
setCache('currentServer', `http://${server.ip}:${server.port}`)
}
}
}
@@ -346,7 +351,7 @@ html, body {
.login-panel {
width: 513px;
height 412px
height: 412px;
position: relative;
background: #ffffff;
padding: 30px 0 40px 0;
@@ -366,7 +371,7 @@ html, body {
width: 350px;
height: 78px;
margin: 0 auto;
margin-top 120px
margin-top: 120px;
}
.options-panel {
View
@@ -223,7 +223,13 @@ export default {
}
},
methods: {
...mapActions(['refreshAccounts', 'getAccountsInfo', 'getBalances', 'getIssuer', 'registGateway']),
...mapActions([
'refreshAccounts',
'getAccountsInfo',
'getBalances',
'getIssuer',
'registGateway'
]),
...mapMutations([
'updateUserInfo',
'setUserInfo',
@@ -318,11 +324,16 @@ export default {
// }
},
beforeMount() {
let lang = this.$i18n.locale = getCache('locale')
let lang = (this.$i18n.locale = getCache('locale'))
console.log(lang)
import(`src/i18n/${lang}`).then(lang => {
this.$q.i18n.set(lang.default)
})
if (window && window.location && process.env.NODE_ENV === 'production') {
const location = window.location
let server = location.protocol + '//' + location.hostname + ':' + location.port || 80
setCache('currentServer', server)
}
},
async mounted() {
let user = this.userInfo || getCache('user') || null
View
@@ -82,8 +82,7 @@ export const removeCache = key => {
export const getCurrentSeverUrl = () => {
let currentServer = getCache('currentServer')
if (currentServer) {
let { ip, port } = currentServer
return 'http://' + ip + ':' + port
return currentServer
} else {
return false
}
View
@@ -1,4 +1,6 @@
import { withParams } from 'vuelidate/lib/validators/common.js'
import {
withParams
} from 'vuelidate/lib/validators/common.js'
import Bip39 from 'bip39'
export const secondPwdReg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/
@@ -11,23 +13,25 @@ export const assetSymbolReg = /^[A-Z]{3,6}$/
export const amountStrReg = /^\d+(\.\d+)?$/
// bip 39 validator
export const bip39 = () => {
return withParams({ type: this.bip39 }, value => {
return withParams({}, value => {
return Bip39.validateMnemonic(value)
})
}
export const assetName = () => {
return withParams({ type: this.assetName }, value => {
return withParams({
type: this.assetName
}, value => {
return assetNameReg.test(value)
})
}
export const secondPwd = () => {
return withParams({ type: this.secondPwd }, value => {
return withParams({}, value => {
return secondPwdReg.test(value)
})
}
export const address = () => {
return withParams({ type: this.address }, value => {
return withParams({}, value => {
return addressReg.test(value)
})
}
Oops, something went wrong.

0 comments on commit 0ea392b

Please sign in to comment.