-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8f88415
Showing
43 changed files
with
990 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["es2015", "stage-0"], | ||
"plugins": ["transform-runtime"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
app/node_modules/** | ||
app/dist/** | ||
app/electron.js | ||
test/unit/coverage/** | ||
test/unit/*.js | ||
test/e2e/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
extends: 'standard', | ||
plugins: [ | ||
'html' | ||
], | ||
'rules': { | ||
// allow paren-less arrow functions | ||
'arrow-parens': 0, | ||
// allow async-await | ||
'generator-star-spacing': 0, | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.DS_Store | ||
app/dist/index.html | ||
app/dist/build.js | ||
app/dist/styles.css | ||
builds/* | ||
coverage | ||
node_modules | ||
npm-debug.log | ||
npm-debug.log.* | ||
thumbs.db | ||
!.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# basecoin-ui | ||
|
||
> An interface for Basecoin. | ||
## Build Setup | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:9080 | ||
npm run dev | ||
|
||
# build electron app for production | ||
npm run build | ||
|
||
# lint all JS/Vue component files in `app/src` | ||
npm run lint | ||
|
||
# run webpack in production | ||
npm run pack | ||
``` | ||
More information can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/docs/npm_scripts.html). | ||
|
||
--- | ||
|
||
This project was generated from [electron-vue](https://github.com/SimulatedGREG/electron-vue) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about this project can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html). | ||
# basecoin-ui |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
'use strict' | ||
|
||
const electron = require('electron') | ||
const path = require('path') | ||
const app = electron.app | ||
const BrowserWindow = electron.BrowserWindow | ||
|
||
let mainWindow | ||
let config = {} | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
config = require('../config') | ||
config.url = `http://localhost:${config.port}` | ||
} else { | ||
config.devtron = false | ||
config.url = `file://${__dirname}/dist/index.html` | ||
} | ||
|
||
function createWindow () { | ||
/** | ||
* Initial window options | ||
*/ | ||
mainWindow = new BrowserWindow({ | ||
height: 600, | ||
width: 800 | ||
}) | ||
|
||
mainWindow.loadURL(config.url) | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
BrowserWindow.addDevToolsExtension(path.join(__dirname, '../node_modules/devtron')) | ||
|
||
let installExtension = require('electron-devtools-installer') | ||
|
||
installExtension.default(installExtension.VUEJS_DEVTOOLS) | ||
.then((name) => mainWindow.webContents.openDevTools()) | ||
.catch((err) => console.log('An error occurred: ', err)) | ||
} | ||
|
||
mainWindow.on('closed', () => { | ||
mainWindow = null | ||
}) | ||
|
||
console.log('mainWindow opened') | ||
} | ||
|
||
app.on('ready', createWindow) | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
app.on('activate', () => { | ||
if (mainWindow === null) { | ||
createWindow() | ||
} | ||
}) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<!-- webpack builds are automatically injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "basecoin-ui", | ||
"version": "0.0.0", | ||
"description": "An interface for Basecoin.", | ||
"main": "electron.js", | ||
"dependencies": { | ||
"vue": "^2.0.1", | ||
"vue-electron": "^1.0.0", | ||
"vue-resource": "^1.0.3", | ||
"vue-router": "^2.0.0", | ||
"vuex": "^2.0.0" | ||
}, | ||
"devDependencies": {}, | ||
"author": "Peng Zhong <[email protected]>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<style> | ||
@import url(https://fonts.googleapis.com/css?family=Lato:300); | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
html, | ||
body { height: 100%; } | ||
body { | ||
align-items: center; | ||
background: | ||
radial-gradient( | ||
ellipse at center, | ||
rgba(255, 255, 255, 1) 0%, | ||
rgba(229, 229, 229, .85) 100% | ||
); | ||
background-position: center; | ||
display: flex; | ||
font-family: Lato, Helvetica, sans-serif; | ||
justify-content: center; | ||
text-align: center; | ||
} | ||
</style> | ||
|
||
<template> | ||
<div> | ||
<router-view></router-view> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import store from 'src/vuex/store' | ||
export default { | ||
store | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<style scoped> | ||
img { | ||
margin-top: -25px; | ||
width: 450px; | ||
} | ||
</style> | ||
|
||
<template> | ||
<div> | ||
<img src="./LandingPageView/assets/logo.png" alt="electron-vue"> | ||
<h1>Welcome.</h1> | ||
<current-page></current-page> | ||
<versions></versions> | ||
<links></links> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import CurrentPage from './LandingPageView/CurrentPage' | ||
import Links from './LandingPageView/Links' | ||
import Versions from './LandingPageView/Versions' | ||
export default { | ||
components: { | ||
CurrentPage, | ||
Links, | ||
Versions | ||
}, | ||
name: 'landing-page' | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<style scoped> | ||
code { | ||
background-color: rgba(40, 56, 76, .5); | ||
border-radius: 3px; | ||
color: #fff; | ||
font-weight: bold; | ||
padding: 3px 6px; | ||
margin: 0 3px; | ||
vertical-align: bottom; | ||
} | ||
p { line-height: 24px; } | ||
</style> | ||
|
||
<template> | ||
<p> | ||
You are currently at <code>`{{ $route.path }}`</code> on the <code>`{{ $route.name }}`</code> view. | ||
</p> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
created () { | ||
// Set $route values that are not preset during unit testing | ||
if (process.env.NODE_ENV === 'testing') { | ||
this.$route = { | ||
name: 'landing-page', | ||
path: '/landing-page' | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<style scoped> | ||
a { | ||
color: rgb(50, 174, 110); | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
color: rgb(40, 56, 76); | ||
} | ||
ul { | ||
list-style-type: none; | ||
margin-top: 10px; | ||
} | ||
li { display: inline-block; } | ||
</style> | ||
|
||
<template> | ||
<ul> | ||
<li><a href="https://simulatedgreg.gitbooks.io/electron-vue/content/index.html">documentation</a></li> | | ||
<li><a href="http://electron.atom.io/">electron</a></li> | | ||
<li><a href="http://vuejs.org/">vue.js</a></li> | ||
</ul> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<p> | ||
You are using electron v{{ versions['atom-shell'] }} with node v{{ versions.node }} on the {{ platform }} platform. | ||
</p> | ||
</template> | ||
|
||
<script> | ||
import os from 'os' | ||
export default { | ||
data () { | ||
return { | ||
platform: os.platform(), | ||
versions: process.versions | ||
} | ||
} | ||
} | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Vue from 'vue' | ||
import Electron from 'vue-electron' | ||
import Resource from 'vue-resource' | ||
import Router from 'vue-router' | ||
|
||
import App from './App' | ||
import routes from './routes' | ||
|
||
Vue.use(Electron) | ||
Vue.use(Resource) | ||
Vue.use(Router) | ||
Vue.config.debug = true | ||
|
||
const router = new Router({ | ||
scrollBehavior: () => ({ y: 0 }), | ||
routes | ||
}) | ||
|
||
/* eslint-disable no-new */ | ||
new Vue({ | ||
router, | ||
...App | ||
}).$mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default [ | ||
{ | ||
path: '/', | ||
name: 'landing-page', | ||
component: require('components/LandingPageView') | ||
}, | ||
{ | ||
path: '*', | ||
redirect: '/' | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as types from './mutation-types' | ||
|
||
export const decrementMain = ({ commit }) => { | ||
commit(types.DECREMENT_MAIN_COUNTER) | ||
} | ||
|
||
export const incrementMain = ({ commit }) => { | ||
commit(types.INCREMENT_MAIN_COUNTER) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const mainCounter = state => state.counters.main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as types from '../mutation-types' | ||
|
||
const state = { | ||
main: 0 | ||
} | ||
|
||
const mutations = { | ||
[types.DECREMENT_MAIN_COUNTER] (state) { | ||
state.main-- | ||
}, | ||
[types.INCREMENT_MAIN_COUNTER] (state) { | ||
state.main++ | ||
} | ||
} | ||
|
||
export default { | ||
state, | ||
mutations | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const files = require.context('.', false, /\.js$/) | ||
const modules = {} | ||
|
||
files.keys().forEach((key) => { | ||
if (key === './index.js') return | ||
modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default | ||
}) | ||
|
||
export default modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const DECREMENT_MAIN_COUNTER = 'DECREMENT_MAIN_COUNTER' | ||
export const INCREMENT_MAIN_COUNTER = 'INCREMENT_MAIN_COUNTER' |
Oops, something went wrong.