Skip to content

Commit

Permalink
Fixed scroll buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
mijdavis2 committed Jul 11, 2017
1 parent d4fe3f2 commit bb450c9
Show file tree
Hide file tree
Showing 22 changed files with 717 additions and 1,088 deletions.
16 changes: 16 additions & 0 deletions .electron-vue/build.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const path = require('path')

/**
* `electron-packager` options
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-packager.html
*/
module.exports = {
arch: 'x64',
asar: true,
dir: path.join(__dirname, '../'),
icon: path.join(__dirname, '../build/icons/icon'),
ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,
out: path.join(__dirname, '../build'),
overwrite: true,
platform: process.env.BUILD_TARGET || 'all'
}
19 changes: 15 additions & 4 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ process.env.NODE_ENV = 'production'
const { say } = require('cfonts')
const chalk = require('chalk')
const del = require('del')
const { spawn } = require('child_process')
const packager = require('electron-packager')
const webpack = require('webpack')
const Multispinner = require('multispinner')


const buildConfig = require('./build.config')
const mainConfig = require('./webpack.main.config')
const rendererConfig = require('./webpack.renderer.config')
const webConfig = require('./webpack.web.config')
Expand Down Expand Up @@ -45,8 +45,8 @@ function build () {
m.on('success', () => {
process.stdout.write('\x1B[2J\x1B[0f')
console.log(`\n\n${results}`)
console.log(`${okayLog}take it away ${chalk.yellow('`electron-builder`')}\n`)
process.exit()
console.log(`${okayLog}take it away ${chalk.yellow('`electron-packager`')}\n`)
bundleApp()
})

pack(mainConfig).then(result => {
Expand Down Expand Up @@ -97,6 +97,17 @@ function pack (config) {
})
}

function bundleApp () {
packager(buildConfig, (err, appPaths) => {
if (err) {
console.log(`\n${errorLog}${chalk.yellow('`electron-packager`')} says...\n`)
console.log(err + '\n')
} else {
console.log(`\n${doneLog}\n`)
}
})
}

function web () {
del.sync(['dist/web/*', '!.gitkeep'])
webpack(webConfig, (err, stats) => {
Expand Down
2 changes: 1 addition & 1 deletion .electron-vue/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports.cssLoaders = function (options) {
includePaths: ['node_modules']
}),
scss: generateLoaders('sass', {
includePaths: ['node_modules'],
includePaths: ['node_modules']
}),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
Expand Down
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

48 changes: 8 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "upstream",
"version": "0.0.0",
"version": "0.0.1",
"author": "mijdavis2 <[email protected]>",
"description": "Streamflow calc utility for Trout Unlimited",
"license": null,
"main": "./dist/electron/main.js",
"scripts": {
"build": "node .electron-vue/build.js && build",
"build:dir": "node .electron-vue/build.js && build --dir",
"build": "node .electron-vue/build.js",
"build:darwin": "cross-env BUILD_TARGET=darwin node .electron-vue/build.js",
"build:linux": "cross-env BUILD_TARGET=linux node .electron-vue/build.js",
"build:mas": "cross-env BUILD_TARGET=mas node .electron-vue/build.js",
"build:win32": "cross-env BUILD_TARGET=win32 node .electron-vue/build.js",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
"dev": "node .electron-vue/dev-runner.js",
Expand All @@ -21,42 +24,6 @@
"unit": "karma start test/unit/karma.conf.js",
"postinstall": "npm run lint:fix"
},
"build": {
"productName": "upstream",
"appId": "org.simulatedgreg.electron-vue",
"directories": {
"output": "build"
},
"files": [
"dist/electron",
"node_modules/",
"package.json"
],
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"mac": {
"icon": "build/icons/icon.icns"
},
"win": {
"icon": "build/icons/icon.ico"
},
"linux": {
"icon": "build/icons"
}
},
"dependencies": {
"axios": "^0.16.1",
"fs": "^0.0.1-security",
Expand All @@ -68,6 +35,7 @@
"vue-electron": "^1.0.6",
"vue-floatthead": "^0.0.5",
"vue-router": "^2.5.3",
"vue-scrollto": "^2.7.2",
"vue2-scrollspy": "^1.1.2",
"vuex": "^2.3.1"
},
Expand All @@ -90,9 +58,9 @@
"del": "^2.2.1",
"devtron": "^1.1.0",
"electron": "^1.7.2",
"electron-builder": "^18.6.2",
"electron-debug": "^1.1.0",
"electron-devtools-installer": "^2.0.1",
"electron-packager": "^8.5.0",
"electron-rebuild": "^1.1.3",
"eslint": "^3.13.1",
"eslint-config-standard": "^10.2.1",
Expand Down
1 change: 0 additions & 1 deletion src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>upstream</title>
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
Expand Down
24 changes: 2 additions & 22 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function createWindow () {
* Initial window options
*/
mainWindow = new BrowserWindow({
height: 563,
height: 1000,
useContentSize: true,
width: 1000
width: 1434
})

mainWindow.loadURL(winURL)
Expand All @@ -45,23 +45,3 @@ app.on('activate', () => {
createWindow()
}
})

/**
* Auto Updater
*
* Uncomment the following code below and install `electron-updater` to
* support auto updating. Code Signing with a valid certificate is required.
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating
*/

/*
import { autoUpdater } from 'electron-updater'
autoUpdater.on('update-downloaded', () => {
autoUpdater.quitAndInstall()
})
app.on('ready', () => {
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates()
})
*/
11 changes: 8 additions & 3 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<header class="header">
<nav class="topnav">
<router-link class="brand" to="/"><b>UpStream</b></router-link>
<router-link to="/start">New Report</router-link>
<router-link to="/config">Configure</router-link>
<router-link to="/new">New</router-link>
<router-link to="/current">Current</router-link>
<router-link to="/load">Load</router-link>
<router-link class="float-right" to="/config">Config</router-link>
</nav>
</header>
<div class="main-container">
Expand Down Expand Up @@ -57,6 +59,7 @@
overflow-y scroll
background-color #f1f1f1
#app
height 100%
margin-top 54px
a
color theme-primary
Expand Down Expand Up @@ -108,5 +111,7 @@
color: black
text-decoration: none
.main-container
width 100%
height 100%
.form-select
background #fff
</style>
Empty file removed src/renderer/assets/.gitkeep
Empty file.
25 changes: 5 additions & 20 deletions src/renderer/assets/scroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bb450c9

Please sign in to comment.