Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron frontend #42

Merged
merged 176 commits into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
d2b2af2
Initial electron gui
olmokramer Mar 18, 2019
84decb0
Implement running & logging
olmokramer Mar 22, 2019
45877f4
Fix issues
olmokramer Mar 22, 2019
f087f73
Follow output
olmokramer Mar 22, 2019
a356a9c
Parse events better
olmokramer Mar 22, 2019
08b2ea5
Store config with vuex
olmokramer Mar 25, 2019
fd722b4
Remove readme
olmokramer Mar 25, 2019
660237c
Fix window title
olmokramer Mar 25, 2019
6e4f4aa
Fix built package name
olmokramer Mar 25, 2019
088d2d5
Fix packaging on Windows
Mar 27, 2019
4f7089e
Fix Windows installer
Mar 28, 2019
208c953
Fix Windows packaging & singing
Apr 11, 2019
c6a37a7
Update gui
olmokramer Apr 12, 2019
bfae32d
Add keyup handler to start the fs
olmokramer Apr 12, 2019
c635fa1
Fix logging
olmokramer Apr 12, 2019
2c978f4
Fix help texts and other minor issues
olmokramer Apr 12, 2019
8056953
Add bottom margin to start button
Apr 12, 2019
9e08715
Write password over stdin instead of the command line
olmokramer Apr 13, 2019
9e64a9e
Make sure the mountpoint directory is always deleted
olmokramer Apr 13, 2019
1442da8
Fix formatting
olmokramer Apr 13, 2019
c846f72
Keep the last received event if it could not be parsed
olmokramer Apr 13, 2019
4637648
Only scroll log when already at the bottom
olmokramer Apr 13, 2019
1b2aeaf
Improve logging in frontend
olmokramer Apr 15, 2019
32cb56b
Simplify clearing the password
olmokramer Apr 15, 2019
e961f5d
Move option definitions to config store
olmokramer Apr 15, 2019
c246eaa
Fix whitespace in log messages
olmokramer Apr 16, 2019
9c76071
Fix issues with getting/setting the config
olmokramer Apr 16, 2019
05fb188
Log more errors
olmokramer Apr 16, 2019
43e32fa
Add error notifications
olmokramer Apr 16, 2019
d75bc11
Fix formatting
olmokramer Apr 16, 2019
b522989
Remove console.log
olmokramer Apr 16, 2019
0ada662
Minor fixes on windows
Apr 16, 2019
f4731b1
Fix window title bar icon
Apr 16, 2019
e01ee9d
Extract logging config to its own file
olmokramer Apr 16, 2019
4273ed8
Fix 256x256 icon
olmokramer Apr 16, 2019
8cbac14
Improve logging, don't show notification for all errors
olmokramer Apr 17, 2019
2f424b9
Improve error messages
olmokramer Apr 18, 2019
06497a0
Allow passing jwt token over stdin
olmokramer Apr 23, 2019
1a38171
Reorder buttons, move mountpoint to "advanced" options
olmokramer Apr 23, 2019
9331f95
Use sass and change theme
olmokramer Apr 23, 2019
ca6076e
Fix minor styling issues
olmokramer Apr 23, 2019
6718ef0
Expand advanced options if they are not the default value
olmokramer Apr 23, 2019
92c48b0
Scroll smoothly when toggling "follow log"
olmokramer Apr 23, 2019
ccc2adc
Redo layout
olmokramer Apr 23, 2019
4f315ff
Change order of file and log message so the file is more obvious
olmokramer Apr 23, 2019
40b76ee
Improve makefile
olmokramer Apr 23, 2019
22ae8d7
Fix formatting
olmokramer Apr 23, 2019
0edafa0
Add button to restart from the log page
olmokramer Apr 23, 2019
2ebc337
Never store password in config store
olmokramer Apr 23, 2019
5f1567a
Add help button to show the documentation in a modal
olmokramer Apr 23, 2019
f1a4e6b
Fix install recipe's dependencies in makefile
olmokramer Apr 23, 2019
0cdfce2
Fix version warning formatting
olmokramer Apr 23, 2019
9a480c1
Use monospace font in log messages
olmokramer Apr 23, 2019
4cb58bd
Use primary color for "required" asterisks
olmokramer Apr 23, 2019
b62da32
Make urls in log messages clickable and open in the default browser
olmokramer Apr 23, 2019
5add54b
Fix formatting
olmokramer Apr 23, 2019
d9c72e9
Rewrite f-strings
olmokramer Apr 23, 2019
03115af
Improve startup warning message formatting
olmokramer Apr 23, 2019
05971e0
Include date in exported log's filename
olmokramer Apr 23, 2019
c147efd
Show message on network error
olmokramer Apr 24, 2019
2e58feb
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer Apr 24, 2019
0c852a7
Add "Restarting..." event
olmokramer Apr 24, 2019
5e6babb
Don't use dataclasses
olmokramer Apr 24, 2019
5a54715
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer Apr 24, 2019
96c3244
Fix formatting
olmokramer Apr 24, 2019
091d7b4
Fix tests and warnings in tests
olmokramer Apr 24, 2019
19bfde9
Fix path in error messages
olmokramer Apr 24, 2019
5e51ff1
Mac installer initial
Apr 24, 2019
c3fe8f3
Fix mac installer
Apr 25, 2019
dcf5a79
Fix installing issue: PyInstaller is not available on linux
olmokramer Apr 25, 2019
d36b4f6
Fix issue where logging in with jwt_token didn't store user data
olmokramer Apr 25, 2019
78f6d4a
Better icons
olmokramer Apr 25, 2019
286d774
Run check recipe before building
olmokramer Apr 25, 2019
f6adc18
Remove unused logo svg
olmokramer Apr 25, 2019
5589238
Reset proc on error so the back button becomes available
olmokramer Apr 25, 2019
0a81916
Simplify package.json build recipes
olmokramer Apr 25, 2019
dd07844
Fix notifications
olmokramer Apr 25, 2019
f37169a
Fix mac icon & notifications
olmokramer Apr 26, 2019
bb5245a
Show some notifications only when not in quiet mode
olmokramer Apr 26, 2019
8d03ac6
Remove useless "files" section from windows build config
olmokramer Apr 26, 2019
b32cd2b
Add mac installer scripts
olmokramer Apr 26, 2019
f9da846
Fix tests
olmokramer Apr 26, 2019
b928f97
Fix path separators in mountpoint
olmokramer Apr 26, 2019
096fdb0
Fix "quiet" option help description
olmokramer Apr 26, 2019
bdec87b
Change windows build flags
olmokramer Apr 26, 2019
cbc8857
Lots of stuff
olmokramer Apr 26, 2019
9b5b893
Make the mountpoint clickable
olmokramer Apr 26, 2019
9d3f40c
Show selected options on log page
olmokramer Apr 26, 2019
3bc71c5
Fix install-deps recipe
olmokramer Apr 28, 2019
2696e49
Add viewport meta tag to make it work better when the window is very …
olmokramer Apr 28, 2019
6c407d8
Remove unused component
olmokramer Apr 28, 2019
02f1445
Change "Revision" -> "Revision mode" on log page
olmokramer Apr 28, 2019
d240ae5
Improve help messages and other small things
olmokramer Apr 28, 2019
5041dbb
Use vue-multiselect for the institution selector
olmokramer Apr 28, 2019
13cbb62
Don't show "service has started" message at startup
Apr 29, 2019
32f218d
Improve windows icons
olmokramer Apr 29, 2019
1ab449e
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer Apr 29, 2019
3f3af67
Merge branch 'feature/electron-frontend' of https://github.com/CodeGr…
Apr 29, 2019
806ba3c
Improve build on windows
Apr 29, 2019
468a025
Improve build on windows
Apr 29, 2019
de65b1c
Merge branch 'feature/electron-frontend' of https://github.com/CodeGr…
Apr 29, 2019
0d7e7c8
Fix notifications on Linux
olmokramer Apr 29, 2019
7ebf7df
Fix notifications on Windows
Apr 29, 2019
75f5e0f
Improve Windows notifications
Apr 29, 2019
61e7f70
Fix formatting
olmokramer Apr 29, 2019
a44b5d2
Use initial window title instead of hardcoded value
olmokramer Apr 29, 2019
e06933b
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer Apr 29, 2019
a92efc3
Fix Mac notifications
olmokramer Apr 29, 2019
310f760
Use icon variable
olmokramer Apr 29, 2019
6a10398
Fix Makefile to use python3
olmokramer Apr 29, 2019
ddb95f1
Python 3.5.3 compatibility
olmokramer Apr 29, 2019
bbe690f
Update Makefile
olmokramer Apr 30, 2019
8cc4560
POSIX-compatible Makefile
olmokramer Apr 30, 2019
7e545fc
Initial deb package config
olmokramer Apr 30, 2019
b3d644b
Remove extra icon from Mac notifications
olmokramer Apr 30, 2019
9815c65
Update CodeGrade filesystem readme
DevinHillenius Apr 30, 2019
a6d0b5d
Build debian packages
olmokramer Apr 30, 2019
c5503c3
Make UI text unselectable
olmokramer Apr 30, 2019
e36a7ce
Fix install, index and dependencies
DevinHillenius Apr 30, 2019
f91a002
Merge remote-tracking branch 'origin/docs/update' into feature/electr…
olmokramer Apr 30, 2019
d719efd
Fix dependencies
olmokramer Apr 30, 2019
6ad976b
Fix Makefile
olmokramer Apr 30, 2019
a668a44
Fix Makefile
olmokramer Apr 30, 2019
40d01a0
Fix building on ubuntu
olmokramer Apr 30, 2019
e0781a9
Fix VERSION variable in Makefile
olmokramer Apr 30, 2019
cc48fe2
Fix Makefile
olmokramer Apr 30, 2019
1f02e94
Fix Makefile
olmokramer Apr 30, 2019
6a228ab
Fix Makefile for osx
olmokramer May 1, 2019
4f14f45
Only download winfsp when it is not available
olmokramer May 1, 2019
260fea9
Add ubuntu package patch
olmokramer May 1, 2019
1cf16c0
Add download_file function to build.py
olmokramer May 1, 2019
07c561d
Update usage of the filesystem
DevinHillenius May 1, 2019
fb7bf06
Merge branch 'feature/electron-frontend' of github.com:CodeGra-de/Cod…
DevinHillenius May 1, 2019
5e71318
Fix options popover trigger position with long mountpoint paths
olmokramer May 1, 2019
83b33e2
Fix Makefile
olmokramer May 1, 2019
6485b5f
Fix building docs
DevinHillenius May 1, 2019
0385f30
Fix install instructions
DevinHillenius May 1, 2019
ef0f96a
Update plugins docs
DevinHillenius May 1, 2019
6a509a1
Add make build-docs recipe
olmokramer May 1, 2019
7247353
Merge branch 'feature/electron-frontend' of github.com:CodeGra-de/Cod…
DevinHillenius May 1, 2019
0b1df34
Wrap the mountpoint in the log
olmokramer May 1, 2019
773d318
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer May 1, 2019
ecf09ec
Fix makefile
olmokramer May 1, 2019
3821c93
Update docs style
DevinHillenius May 1, 2019
402617f
merge
DevinHillenius May 1, 2019
83ca3f2
Pad entire right side of log header
olmokramer May 1, 2019
02844e0
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer May 1, 2019
54daa0f
Debian compatibility
olmokramer May 1, 2019
f867743
Install python3-fusepy only if needed
olmokramer May 1, 2019
13d8274
Fix builds on Ubuntu
olmokramer May 3, 2019
f6aff83
Fix 32-bit packages not building on linux
olmokramer May 3, 2019
0006e0c
Extract circular buffer to separate component and add some tests
olmokramer May 5, 2019
69ea42e
Send User-Agent header with all api requests
olmokramer May 5, 2019
25c6ed4
Remove build/ubuntu-deb.patch
olmokramer May 5, 2019
fba8b9d
Automatically generate the .deb patch
olmokramer May 5, 2019
8bf957d
Fix Makefile
olmokramer May 5, 2019
5eca565
Fix centering of the loader
olmokramer May 5, 2019
5eb10fc
Merge branch 'feature/electron-frontend' of git://github.com/CodeGra-…
olmokramer May 5, 2019
12e913d
Fix formatting
olmokramer May 5, 2019
d939222
Fix missing variable
olmokramer May 5, 2019
672a31e
Fix notifications on Windows
May 7, 2019
609cb7b
Ignore messages about .DS_Store on Mac
olmokramer May 23, 2019
377049a
Fix Makefile
olmokramer May 23, 2019
e27a4d2
Add missing plist file for building the Mac installer
olmokramer May 23, 2019
7fd762f
Also ignore .DS_Store files in subdirectories
olmokramer May 23, 2019
02a15c5
Force cache not to work for institutions list
libre-man Aug 15, 2019
9064c34
Add script to install fs on Debian/Ubuntu
libre-man Aug 19, 2019
17d809f
Add support for linux mint
libre-man Aug 19, 2019
b90b19c
Install lxc on travis
libre-man Aug 19, 2019
134b7da
Fix failing tests
libre-man Aug 19, 2019
82dcb2a
Install deps for electron
libre-man Aug 19, 2019
1099af7
Fix tests more
libre-man Aug 19, 2019
a8ef987
Don't use env in tests
libre-man Aug 19, 2019
c589d88
Start xvfb and set a display
libre-man Aug 19, 2019
5dc32a0
Fix coverage
libre-man Aug 19, 2019
28daea7
Fix docs a bit
libre-man Aug 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"comments": false,
"env": {
"test": {
"presets": [
["env", {
"targets": { "node": 7 }
}],
"stage-0"
],
"plugins": ["istanbul"]
},
"main": {
"presets": [
["env", {
"targets": { "node": 7 }
}],
"stage-0"
]
},
"renderer": {
"presets": [
["env", {
"modules": false
}],
"stage-0"
]
},
"web": {
"presets": [
["env", {
"modules": false
}],
"stage-0"
]
}
},
"plugins": ["transform-runtime"]
}
132 changes: 132 additions & 0 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
'use strict'

process.env.NODE_ENV = 'production'

const { say } = require('cfonts')
const chalk = require('chalk')
const del = require('del')
const { spawn } = require('child_process')
const webpack = require('webpack')
const Multispinner = require('multispinner')


const mainConfig = require('./webpack.main.config')
const rendererConfig = require('./webpack.renderer.config')
const webConfig = require('./webpack.web.config')

const doneLog = chalk.bgGreen.white(' DONE ') + ' '
const errorLog = chalk.bgRed.white(' ERROR ') + ' '
const okayLog = chalk.bgBlue.white(' OKAY ') + ' '
const isCI = process.env.CI || false

if (process.env.BUILD_TARGET === 'clean') clean()
else if (process.env.BUILD_TARGET === 'web') web()
else build()

function clean () {
del.sync(['dist/*', 'build/cgfs', 'build/cgapi-consumer'])
console.log(`\n${doneLog}\n`)
process.exit()
}

function build () {
greeting()

del.sync(['dist/electron/*', '!.gitkeep'])

const tasks = ['main', 'renderer']
const m = new Multispinner(tasks, {
preText: 'building',
postText: 'process'
})

let results = ''

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()
})

pack(mainConfig).then(result => {
results += result + '\n\n'
m.success('main')
}).catch(err => {
m.error('main')
console.log(`\n ${errorLog}failed to build main process`)
console.error(`\n${err}\n`)
process.exit(1)
})

pack(rendererConfig).then(result => {
results += result + '\n\n'
m.success('renderer')
}).catch(err => {
m.error('renderer')
console.log(`\n ${errorLog}failed to build renderer process`)
console.error(`\n${err}\n`)
process.exit(1)
})
}

function pack (config) {
return new Promise((resolve, reject) => {
config.mode = 'production'
webpack(config, (err, stats) => {
if (err) reject(err.stack || err)
else if (stats.hasErrors()) {
let err = ''

stats.toString({
chunks: false,
colors: true
})
.split(/\r?\n/)
.forEach(line => {
err += ` ${line}\n`
})

reject(err)
} else {
resolve(stats.toString({
chunks: false,
colors: true
}))
}
})
})
}

function web () {
del.sync(['dist/web/*', '!.gitkeep'])
webConfig.mode = 'production'
webpack(webConfig, (err, stats) => {
if (err || stats.hasErrors()) console.log(err)

console.log(stats.toString({
chunks: false,
colors: true
}))

process.exit()
})
}

function greeting () {
const cols = process.stdout.columns
let text = ''

if (cols > 85) text = 'lets-build'
else if (cols > 60) text = 'lets-|build'
else text = false

if (text && !isCI) {
say(text, {
colors: ['yellow'],
font: 'simple3d',
space: false
})
} else console.log(chalk.yellow.bold('\n lets-build'))
console.log()
}
40 changes: 40 additions & 0 deletions .electron-vue/dev-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')

hotClient.subscribe(event => {
/**
* Reload browser when HTMLWebpackPlugin emits a new index.html
*
* Currently disabled until jantimon/html-webpack-plugin#680 is resolved.
* https://github.com/SimulatedGREG/electron-vue/issues/437
* https://github.com/jantimon/html-webpack-plugin/issues/680
*/
// if (event.action === 'reload') {
// window.location.reload()
// }

/**
* Notify `mainWindow` when `main` process is compiling,
* giving notice for an expected reload of the `electron` process
*/
if (event.action === 'compiling') {
document.body.innerHTML += `
<style>
#dev-client {
background: #4fc08d;
border-radius: 4px;
bottom: 20px;
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
color: #fff;
font-family: 'Source Sans Pro', sans-serif;
left: 20px;
padding: 8px 12px;
position: absolute;
}
</style>
<div id="dev-client">
Compiling Main Process...
</div>
`
}
})
Loading