├── .babelrc ├── .electron-vue ├── build.js ├── dev-client.js ├── dev-runner.js ├── webpack.main.config.js ├── webpack.renderer.config.js └── webpack.web.config.js ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── appveyor.yml ├── build └── icons │ ├── 256x256.png │ ├── icon.icns │ ├── icon.ico │ ├── pile.icns │ ├── pile.ico │ └── pile.png ├── dist ├── electron │ └── .gitkeep └── web │ └── .gitkeep ├── docs ├── CHANGELOG.md ├── CHANGELOG_zh.md └── README_zh.md ├── package.json ├── src ├── index.ejs ├── main │ ├── configStore.js │ ├── index.dev.js │ └── index.js └── renderer │ ├── App.vue │ ├── assets │ ├── .gitkeep │ ├── github-markdown.css │ ├── less.min.js │ ├── prism.css │ ├── prism.js │ └── styleLoader.js │ ├── components │ ├── Board.vue │ ├── EditModal.vue │ ├── Hub.vue │ ├── HubItem.vue │ ├── HubItemNote.vue │ ├── HubItemTodo.vue │ ├── HubNote.vue │ ├── HubTodo.vue │ ├── LandingPage.vue │ ├── NewBoardModal.vue │ ├── RenameModal.vue │ ├── SettingsModal.vue │ └── SortHubModal.vue │ ├── lang │ ├── en.js │ └── zh.js │ ├── main.js │ ├── router │ └── index.js │ └── store │ ├── index.js │ └── modules │ └── boardsStore.js ├── static ├── .gitkeep └── icons │ ├── menubar.png │ ├── pile.ico │ └── pile.png └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "comments": false, 3 | "env": { 4 | "main": { 5 | "presets": [ 6 | ["env", { 7 | "targets": { "node": 7 } 8 | }], 9 | "stage-0" 10 | ] 11 | }, 12 | "renderer": { 13 | "presets": [ 14 | ["env", { 15 | "modules": false 16 | }], 17 | "stage-0" 18 | ] 19 | }, 20 | "web": { 21 | "presets": [ 22 | ["env", { 23 | "modules": false 24 | }], 25 | "stage-0" 26 | ] 27 | } 28 | }, 29 | "plugins": ["transform-runtime"] 30 | } 31 | -------------------------------------------------------------------------------- /.electron-vue/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | const { say } = require('cfonts') 6 | const chalk = require('chalk') 7 | const del = require('del') 8 | const { spawn } = require('child_process') 9 | const webpack = require('webpack') 10 | const Multispinner = require('multispinner') 11 | 12 | 13 | const mainConfig = require('./webpack.main.config') 14 | const rendererConfig = require('./webpack.renderer.config') 15 | const webConfig = require('./webpack.web.config') 16 | 17 | const doneLog = chalk.bgGreen.white(' DONE ') + ' ' 18 | const errorLog = chalk.bgRed.white(' ERROR ') + ' ' 19 | const okayLog = chalk.bgBlue.white(' OKAY ') + ' ' 20 | const isCI = process.env.CI || false 21 | 22 | if (process.env.BUILD_TARGET === 'clean') clean() 23 | else if (process.env.BUILD_TARGET === 'web') web() 24 | else build() 25 | 26 | function clean () { 27 | del.sync(['build/*', '!build/icons', '!build/icons/icon.*']) 28 | console.log(`\n${doneLog}\n`) 29 | process.exit() 30 | } 31 | 32 | function build () { 33 | greeting() 34 | 35 | del.sync(['dist/electron/*', '!.gitkeep']) 36 | 37 | const tasks = ['main', 'renderer'] 38 | const m = new Multispinner(tasks, { 39 | preText: 'building', 40 | postText: 'process' 41 | }) 42 | 43 | let results = '' 44 | 45 | m.on('success', () => { 46 | process.stdout.write('\x1B[2J\x1B[0f') 47 | console.log(`\n\n${results}`) 48 | console.log(`${okayLog}take it away ${chalk.yellow('`electron-builder`')}\n`) 49 | process.exit() 50 | }) 51 | 52 | pack(mainConfig).then(result => { 53 | results += result + '\n\n' 54 | m.success('main') 55 | }).catch(err => { 56 | m.error('main') 57 | console.log(`\n ${errorLog}failed to build main process`) 58 | console.error(`\n${err}\n`) 59 | process.exit(1) 60 | }) 61 | 62 | pack(rendererConfig).then(result => { 63 | results += result + '\n\n' 64 | m.success('renderer') 65 | }).catch(err => { 66 | m.error('renderer') 67 | console.log(`\n ${errorLog}failed to build renderer process`) 68 | console.error(`\n${err}\n`) 69 | process.exit(1) 70 | }) 71 | } 72 | 73 | function pack (config) { 74 | return new Promise((resolve, reject) => { 75 | webpack(config, (err, stats) => { 76 | if (err) reject(err.stack || err) 77 | else if (stats.hasErrors()) { 78 | let err = '' 79 | 80 | stats.toString({ 81 | chunks: false, 82 | colors: true 83 | }) 84 | .split(/\r?\n/) 85 | .forEach(line => { 86 | err += ` ${line}\n` 87 | }) 88 | 89 | reject(err) 90 | } else { 91 | resolve(stats.toString({ 92 | chunks: false, 93 | colors: true 94 | })) 95 | } 96 | }) 97 | }) 98 | } 99 | 100 | function web () { 101 | del.sync(['dist/web/*', '!.gitkeep']) 102 | webpack(webConfig, (err, stats) => { 103 | if (err || stats.hasErrors()) console.log(err) 104 | 105 | console.log(stats.toString({ 106 | chunks: false, 107 | colors: true 108 | })) 109 | 110 | process.exit() 111 | }) 112 | } 113 | 114 | function greeting () { 115 | const cols = process.stdout.columns 116 | let text = '' 117 | 118 | if (cols > 85) text = 'lets-build' 119 | else if (cols > 60) text = 'lets-|build' 120 | else text = false 121 | 122 | if (text && !isCI) { 123 | say(text, { 124 | colors: ['yellow'], 125 | font: 'simple3d', 126 | space: false 127 | }) 128 | } else console.log(chalk.yellow.bold('\n lets-build')) 129 | console.log() 130 | } 131 | -------------------------------------------------------------------------------- /.electron-vue/dev-client.js: -------------------------------------------------------------------------------- 1 | const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 2 | 3 | hotClient.subscribe(event => { 4 | /** 5 | * Reload browser when HTMLWebpackPlugin emits a new index.html 6 | * 7 | * Currently disabled until jantimon/html-webpack-plugin#680 is resolved. 8 | * https://github.com/SimulatedGREG/electron-vue/issues/437 9 | * https://github.com/jantimon/html-webpack-plugin/issues/680 10 | */ 11 | // if (event.action === 'reload') { 12 | // window.location.reload() 13 | // } 14 | 15 | /** 16 | * Notify `mainWindow` when `main` process is compiling, 17 | * giving notice for an expected reload of the `electron` process 18 | */ 19 | if (event.action === 'compiling') { 20 | document.body.innerHTML += ` 21 | 34 | 35 |
36 | Compiling Main Process... 37 |
38 | ` 39 | } 40 | }) 41 | -------------------------------------------------------------------------------- /.electron-vue/dev-runner.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const chalk = require('chalk') 4 | const electron = require('electron') 5 | const path = require('path') 6 | const { say } = require('cfonts') 7 | const { spawn } = require('child_process') 8 | const webpack = require('webpack') 9 | const WebpackDevServer = require('webpack-dev-server') 10 | const webpackHotMiddleware = require('webpack-hot-middleware') 11 | 12 | const mainConfig = require('./webpack.main.config') 13 | const rendererConfig = require('./webpack.renderer.config') 14 | 15 | let electronProcess = null 16 | let manualRestart = false 17 | let hotMiddleware 18 | 19 | function logStats (proc, data) { 20 | let log = '' 21 | 22 | log += chalk.yellow.bold(`┏ ${proc} Process ${new Array((19 - proc.length) + 1).join('-')}`) 23 | log += '\n\n' 24 | 25 | if (typeof data === 'object') { 26 | data.toString({ 27 | colors: true, 28 | chunks: false 29 | }).split(/\r?\n/).forEach(line => { 30 | log += ' ' + line + '\n' 31 | }) 32 | } else { 33 | log += ` ${data}\n` 34 | } 35 | 36 | log += '\n' + chalk.yellow.bold(`┗ ${new Array(28 + 1).join('-')}`) + '\n' 37 | 38 | console.log(log) 39 | } 40 | 41 | function startRenderer () { 42 | return new Promise((resolve, reject) => { 43 | rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer) 44 | 45 | const compiler = webpack(rendererConfig) 46 | hotMiddleware = webpackHotMiddleware(compiler, { 47 | log: false, 48 | heartbeat: 2500 49 | }) 50 | 51 | compiler.plugin('compilation', compilation => { 52 | compilation.plugin('html-webpack-plugin-after-emit', (data, cb) => { 53 | hotMiddleware.publish({ action: 'reload' }) 54 | cb() 55 | }) 56 | }) 57 | 58 | compiler.plugin('done', stats => { 59 | logStats('Renderer', stats) 60 | }) 61 | 62 | const server = new WebpackDevServer( 63 | compiler, 64 | { 65 | contentBase: path.join(__dirname, '../'), 66 | quiet: true, 67 | before (app, ctx) { 68 | app.use(hotMiddleware) 69 | ctx.middleware.waitUntilValid(() => { 70 | resolve() 71 | }) 72 | } 73 | } 74 | ) 75 | 76 | server.listen(9080) 77 | }) 78 | } 79 | 80 | function startMain () { 81 | return new Promise((resolve, reject) => { 82 | mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main) 83 | 84 | const compiler = webpack(mainConfig) 85 | 86 | compiler.plugin('watch-run', (compilation, done) => { 87 | logStats('Main', chalk.white.bold('compiling...')) 88 | hotMiddleware.publish({ action: 'compiling' }) 89 | done() 90 | }) 91 | 92 | compiler.watch({}, (err, stats) => { 93 | if (err) { 94 | console.log(err) 95 | return 96 | } 97 | 98 | logStats('Main', stats) 99 | 100 | if (electronProcess && electronProcess.kill) { 101 | manualRestart = true 102 | process.kill(electronProcess.pid) 103 | electronProcess = null 104 | startElectron() 105 | 106 | setTimeout(() => { 107 | manualRestart = false 108 | }, 5000) 109 | } 110 | 111 | resolve() 112 | }) 113 | }) 114 | } 115 | 116 | function startElectron () { 117 | electronProcess = spawn(electron, ['--inspect=5858', path.join(__dirname, '../dist/electron/main.js')]) 118 | 119 | electronProcess.stdout.on('data', data => { 120 | electronLog(data, 'blue') 121 | }) 122 | electronProcess.stderr.on('data', data => { 123 | electronLog(data, 'red') 124 | }) 125 | 126 | electronProcess.on('close', () => { 127 | if (!manualRestart) process.exit() 128 | }) 129 | } 130 | 131 | function electronLog (data, color) { 132 | let log = '' 133 | data = data.toString().split(/\r?\n/) 134 | data.forEach(line => { 135 | log += ` ${line}\n` 136 | }) 137 | if (/[0-9A-z]+/.test(log)) { 138 | console.log( 139 | chalk[color].bold('┏ Electron -------------------') + 140 | '\n\n' + 141 | log + 142 | chalk[color].bold('┗ ----------------------------') + 143 | '\n' 144 | ) 145 | } 146 | } 147 | 148 | function greeting () { 149 | const cols = process.stdout.columns 150 | let text = '' 151 | 152 | if (cols > 104) text = 'electron-vue' 153 | else if (cols > 76) text = 'electron-|vue' 154 | else text = false 155 | 156 | if (text) { 157 | say(text, { 158 | colors: ['yellow'], 159 | font: 'simple3d', 160 | space: false 161 | }) 162 | } else console.log(chalk.yellow.bold('\n electron-vue')) 163 | console.log(chalk.blue(' getting ready...') + '\n') 164 | } 165 | 166 | function init () { 167 | greeting() 168 | 169 | Promise.all([startRenderer(), startMain()]) 170 | .then(() => { 171 | startElectron() 172 | }) 173 | .catch(err => { 174 | console.error(err) 175 | }) 176 | } 177 | 178 | init() 179 | -------------------------------------------------------------------------------- /.electron-vue/webpack.main.config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.BABEL_ENV = 'main' 4 | 5 | const path = require('path') 6 | const { dependencies } = require('../package.json') 7 | const webpack = require('webpack') 8 | 9 | const BabiliWebpackPlugin = require('babili-webpack-plugin') 10 | 11 | let mainConfig = { 12 | entry: { 13 | main: path.join(__dirname, '../src/main/index.js') 14 | }, 15 | externals: [ 16 | ...Object.keys(dependencies || {}) 17 | ], 18 | module: { 19 | rules: [ 20 | { 21 | test: /\.js$/, 22 | use: 'babel-loader', 23 | exclude: /node_modules/ 24 | }, 25 | { 26 | test: /\.node$/, 27 | use: 'node-loader' 28 | } 29 | ] 30 | }, 31 | node: { 32 | __dirname: process.env.NODE_ENV !== 'production', 33 | __filename: process.env.NODE_ENV !== 'production' 34 | }, 35 | output: { 36 | filename: '[name].js', 37 | libraryTarget: 'commonjs2', 38 | path: path.join(__dirname, '../dist/electron') 39 | }, 40 | plugins: [ 41 | new webpack.NoEmitOnErrorsPlugin() 42 | ], 43 | resolve: { 44 | extensions: ['.js', '.json', '.node'] 45 | }, 46 | target: 'electron-main' 47 | } 48 | 49 | /** 50 | * Adjust mainConfig for development settings 51 | */ 52 | if (process.env.NODE_ENV !== 'production') { 53 | mainConfig.plugins.push( 54 | new webpack.DefinePlugin({ 55 | '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"` 56 | }) 57 | ) 58 | } 59 | 60 | /** 61 | * Adjust mainConfig for production settings 62 | */ 63 | if (process.env.NODE_ENV === 'production') { 64 | mainConfig.plugins.push( 65 | new BabiliWebpackPlugin(), 66 | new webpack.DefinePlugin({ 67 | 'process.env.NODE_ENV': '"production"' 68 | }) 69 | ) 70 | } 71 | 72 | module.exports = mainConfig 73 | -------------------------------------------------------------------------------- /.electron-vue/webpack.renderer.config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.BABEL_ENV = 'renderer' 4 | 5 | const path = require('path') 6 | const { dependencies } = require('../package.json') 7 | const webpack = require('webpack') 8 | 9 | const BabiliWebpackPlugin = require('babili-webpack-plugin') 10 | const CopyWebpackPlugin = require('copy-webpack-plugin') 11 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 12 | const HtmlWebpackPlugin = require('html-webpack-plugin') 13 | 14 | /** 15 | * List of node_modules to include in webpack bundle 16 | * 17 | * Required for specific packages like Vue UI libraries 18 | * that provide pure *.vue files that need compiling 19 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals 20 | */ 21 | let whiteListedModules = ['vue'] 22 | 23 | let rendererConfig = { 24 | devtool: '#cheap-module-eval-source-map', 25 | entry: { 26 | renderer: path.join(__dirname, '../src/renderer/main.js') 27 | }, 28 | externals: [ 29 | ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)) 30 | ], 31 | module: { 32 | rules: [ 33 | { 34 | test: /\.css$/, 35 | use: ExtractTextPlugin.extract({ 36 | fallback: 'style-loader', 37 | use: 'css-loader' 38 | }) 39 | }, 40 | { 41 | test: /\.html$/, 42 | use: 'vue-html-loader' 43 | }, 44 | { 45 | test: /\.js$/, 46 | use: 'babel-loader', 47 | exclude: /node_modules/ 48 | }, 49 | { 50 | test: /\.node$/, 51 | use: 'node-loader' 52 | }, 53 | { 54 | test: /\.vue$/, 55 | use: { 56 | loader: 'vue-loader', 57 | options: { 58 | extractCSS: process.env.NODE_ENV === 'production', 59 | loaders: { 60 | sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1', 61 | scss: 'vue-style-loader!css-loader!sass-loader' 62 | } 63 | } 64 | } 65 | }, 66 | { 67 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 68 | use: { 69 | loader: 'url-loader', 70 | query: { 71 | limit: 10000, 72 | name: 'imgs/[name]--[folder].[ext]' 73 | } 74 | } 75 | }, 76 | { 77 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 78 | loader: 'url-loader', 79 | options: { 80 | limit: 10000, 81 | name: 'media/[name]--[folder].[ext]' 82 | } 83 | }, 84 | { 85 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 86 | use: { 87 | loader: 'url-loader', 88 | query: { 89 | limit: 10000, 90 | name: 'fonts/[name]--[folder].[ext]' 91 | } 92 | } 93 | } 94 | ] 95 | }, 96 | node: { 97 | __dirname: process.env.NODE_ENV !== 'production', 98 | __filename: process.env.NODE_ENV !== 'production' 99 | }, 100 | plugins: [ 101 | new ExtractTextPlugin('styles.css'), 102 | new HtmlWebpackPlugin({ 103 | filename: 'index.html', 104 | template: path.resolve(__dirname, '../src/index.ejs'), 105 | minify: { 106 | collapseWhitespace: true, 107 | removeAttributeQuotes: true, 108 | removeComments: true 109 | }, 110 | nodeModules: process.env.NODE_ENV !== 'production' 111 | ? path.resolve(__dirname, '../node_modules') 112 | : false 113 | }), 114 | new webpack.HotModuleReplacementPlugin(), 115 | new webpack.NoEmitOnErrorsPlugin() 116 | ], 117 | output: { 118 | filename: '[name].js', 119 | libraryTarget: 'commonjs2', 120 | path: path.join(__dirname, '../dist/electron') 121 | }, 122 | resolve: { 123 | alias: { 124 | '@': path.join(__dirname, '../src/renderer'), 125 | 'vue$': 'vue/dist/vue.esm.js' 126 | }, 127 | extensions: ['.js', '.vue', '.json', '.css', '.node'] 128 | }, 129 | target: 'electron-renderer' 130 | } 131 | 132 | /** 133 | * Adjust rendererConfig for development settings 134 | */ 135 | if (process.env.NODE_ENV !== 'production') { 136 | rendererConfig.plugins.push( 137 | new webpack.DefinePlugin({ 138 | '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"` 139 | }) 140 | ) 141 | } 142 | 143 | /** 144 | * Adjust rendererConfig for production settings 145 | */ 146 | if (process.env.NODE_ENV === 'production') { 147 | rendererConfig.devtool = '' 148 | 149 | rendererConfig.plugins.push( 150 | new BabiliWebpackPlugin(), 151 | new CopyWebpackPlugin([ 152 | { 153 | from: path.join(__dirname, '../static'), 154 | to: path.join(__dirname, '../dist/electron/static'), 155 | ignore: ['.*'] 156 | } 157 | ]), 158 | new webpack.DefinePlugin({ 159 | 'process.env.NODE_ENV': '"production"' 160 | }), 161 | new webpack.LoaderOptionsPlugin({ 162 | minimize: true 163 | }) 164 | ) 165 | } 166 | 167 | module.exports = rendererConfig 168 | -------------------------------------------------------------------------------- /.electron-vue/webpack.web.config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.BABEL_ENV = 'web' 4 | 5 | const path = require('path') 6 | const webpack = require('webpack') 7 | 8 | const BabiliWebpackPlugin = require('babili-webpack-plugin') 9 | const CopyWebpackPlugin = require('copy-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const HtmlWebpackPlugin = require('html-webpack-plugin') 12 | 13 | let webConfig = { 14 | devtool: '#cheap-module-eval-source-map', 15 | entry: { 16 | web: path.join(__dirname, '../src/renderer/main.js') 17 | }, 18 | module: { 19 | rules: [ 20 | { 21 | test: /\.css$/, 22 | use: ExtractTextPlugin.extract({ 23 | fallback: 'style-loader', 24 | use: 'css-loader' 25 | }) 26 | }, 27 | { 28 | test: /\.html$/, 29 | use: 'vue-html-loader' 30 | }, 31 | { 32 | test: /\.js$/, 33 | use: 'babel-loader', 34 | include: [ path.resolve(__dirname, '../src/renderer') ], 35 | exclude: /node_modules/ 36 | }, 37 | { 38 | test: /\.vue$/, 39 | use: { 40 | loader: 'vue-loader', 41 | options: { 42 | extractCSS: true, 43 | loaders: { 44 | sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1', 45 | scss: 'vue-style-loader!css-loader!sass-loader' 46 | } 47 | } 48 | } 49 | }, 50 | { 51 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 52 | use: { 53 | loader: 'url-loader', 54 | query: { 55 | limit: 10000, 56 | name: 'imgs/[name].[ext]' 57 | } 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | use: { 63 | loader: 'url-loader', 64 | query: { 65 | limit: 10000, 66 | name: 'fonts/[name].[ext]' 67 | } 68 | } 69 | } 70 | ] 71 | }, 72 | plugins: [ 73 | new ExtractTextPlugin('styles.css'), 74 | new HtmlWebpackPlugin({ 75 | filename: 'index.html', 76 | template: path.resolve(__dirname, '../src/index.ejs'), 77 | minify: { 78 | collapseWhitespace: true, 79 | removeAttributeQuotes: true, 80 | removeComments: true 81 | }, 82 | nodeModules: false 83 | }), 84 | new webpack.DefinePlugin({ 85 | 'process.env.IS_WEB': 'true' 86 | }), 87 | new webpack.HotModuleReplacementPlugin(), 88 | new webpack.NoEmitOnErrorsPlugin() 89 | ], 90 | output: { 91 | filename: '[name].js', 92 | path: path.join(__dirname, '../dist/web') 93 | }, 94 | resolve: { 95 | alias: { 96 | '@': path.join(__dirname, '../src/renderer'), 97 | 'vue$': 'vue/dist/vue.esm.js' 98 | }, 99 | extensions: ['.js', '.vue', '.json', '.css'] 100 | }, 101 | target: 'web' 102 | } 103 | 104 | /** 105 | * Adjust webConfig for production settings 106 | */ 107 | if (process.env.NODE_ENV === 'production') { 108 | webConfig.devtool = '' 109 | 110 | webConfig.plugins.push( 111 | new BabiliWebpackPlugin(), 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.join(__dirname, '../static'), 115 | to: path.join(__dirname, '../dist/web/static'), 116 | ignore: ['.*'] 117 | } 118 | ]), 119 | new webpack.DefinePlugin({ 120 | 'process.env.NODE_ENV': '"production"' 121 | }), 122 | new webpack.LoaderOptionsPlugin({ 123 | minimize: true 124 | }) 125 | ) 126 | } 127 | 128 | module.exports = webConfig 129 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | dist/electron/* 3 | dist/web/* 4 | build/* 5 | !build/icons 6 | node_modules/ 7 | npm-debug.log 8 | npm-debug.log.* 9 | thumbs.db 10 | !.gitkeep 11 | .vscode/* 12 | db.json 13 | settings.json 14 | style.* -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8.3 2 | sudo: required 3 | dist: trusty 4 | language: c 5 | matrix: 6 | include: 7 | - os: osx 8 | - os: linux 9 | env: CC=clang CXX=clang++ npm_config_clang=1 10 | compiler: clang 11 | cache: 12 | directories: 13 | - node_modules 14 | - "$HOME/.electron" 15 | - "$HOME/.cache" 16 | addons: 17 | apt: 18 | packages: 19 | - libgnome-keyring-dev 20 | - icnsutils 21 | before_install: 22 | - mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([ 23 | "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz 24 | | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull 25 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi 26 | install: 27 | - nvm install 7 28 | - curl -o- -L https://yarnpkg.com/install.sh | bash 29 | - source ~/.bashrc 30 | - npm install -g xvfb-maybe 31 | - yarn 32 | script: 33 | - yarn run build 34 | branches: 35 | only: 36 | - master 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

16 | 17 | # Pile 18 | 19 | > Organize your piled work at one place. 20 | 21 | [README](https://github.com/mtobeiyf/pile/blob/master/README.md) | [中文说明](https://github.com/mtobeiyf/pile/blob/master/docs/README_zh.md) 22 | 23 |

24 | 25 |

26 | 27 | ## Why Pile? 28 | 29 | The way we get things done is often project-oriented. However, the files, applications, tasklists, etc. are **scattered everywhere**. Pile is a place for you to **put them all together**. 30 | 31 | ## Usage 32 | 33 | Before we get started, let me help you get it more clear how to use Pile. 34 | 35 | ### Board 36 | 37 | A board (or tab) is a place to hold all the resources of your **project** or **workspace**. You can organize your things related to the project/workspace using *hubs*. 38 | 39 | ### Hub 40 | 41 | A hub (or card) is an area for specific stuff. There are currently three kinds of hubs: 42 | 43 | #### App/File 44 | 45 | You can add apps or files you may use in this area so that you can quickly access them and open them. 46 | 47 |

48 | 49 |

50 | 51 | #### Notes 52 | 53 | Online resources (often appeared as links) or your thoughts can be taken down here. **Markdown** is supported! :tada: 54 | 55 |

56 | 57 |

58 | 59 | #### Todo 60 | 61 | A simple todolist related to the project. 62 | 63 |

64 | 65 |

66 | 67 | ## Features 68 | 69 | - Drag and drop, easy and convenient. 70 | - Various application scenarios. 71 | - Endless possibilities. Developer, designer, writer... 72 | - Pin your workspace/project to your desktop. 73 | - Markdown support, emoji included. 74 | 75 | ## Installation 76 | 77 | :tada: Support Windows/Linux/macOS 78 | 79 | ### Windows 80 | - Go to the [release page](https://github.com/mtobeiyf/pile/releases) 81 | - Download and run the setup **.exe** file and Pile will be insalled automatically 82 | - Or download the portable **.zip** file, unzip it and run `Pile.exe` 83 | 84 | ### Linux / macOS 85 | - Go to the [release page](https://github.com/mtobeiyf/pile/releases) 86 | - Linux user: Download **.AppImage** and run it 87 | - Mac user: Download portable **.zip** file or **.dmg** installation file 88 | - You can build by yourself, see [Build Steps](https://github.com/mtobeiyf/pile#user-content-build-setup) 89 | 90 | ## Technical 91 | 92 | ### Stack 93 | 94 | - [Electron](https://electronjs.org/) : Framework 95 | - [electron-vue](https://github.com/SimulatedGREG/electron-vue) : Skeleton 96 | - [iView](https://www.iviewui.com/) : UI toolkit 97 | 98 | ### Build Setup 99 | 100 | ``` bash 101 | # install dependencies 102 | yarn # or npm install 103 | 104 | # serve with hot reload at localhost:9080 105 | yarn run dev # or npm run dev 106 | 107 | # build electron application for production 108 | yarn run build:dir # or npm run build:dir 109 | 110 | ``` 111 | 112 | --- 113 | 114 | ## Changelog 115 | 116 | Detailed changes for each release are documented in the [CHANGELOG.md](https://github.com/mtobeiyf/pile/blob/master/docs/CHANGELOG.md) 117 | 118 | ## Acknowledgment 119 | 120 | - [Vue.js](https://vuejs.org/) 121 | - [vue-markdown](https://github.com/miaolz123/vue-markdown) 122 | - [lowdb](https://github.com/typicode/lowdb) 123 | - [Backlog](https://github.com/czytelny/backlog) 124 | 125 | ## License 126 | 127 | Licensed under the [GPL v3.0](https://opensource.org/licenses/GPL-3.0) License. 128 | 129 | Copyright (c) 2018 [Fing](http://imfing.com). 130 | All rights reserved. 131 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.1.{build} 2 | 3 | branches: 4 | only: 5 | - master 6 | 7 | image: Visual Studio 2017 8 | platform: 9 | - x64 10 | 11 | cache: 12 | - node_modules 13 | - '%APPDATA%\npm-cache' 14 | - '%USERPROFILE%\.electron' 15 | - '%USERPROFILE%\AppData\Local\Yarn\cache' 16 | 17 | init: 18 | - git config --global core.autocrlf input 19 | 20 | install: 21 | - ps: Install-Product node 8 x64 22 | - git reset --hard HEAD 23 | - yarn 24 | - node --version 25 | 26 | build_script: 27 | - yarn build 28 | 29 | test: off 30 | -------------------------------------------------------------------------------- /build/icons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/256x256.png -------------------------------------------------------------------------------- /build/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/icon.icns -------------------------------------------------------------------------------- /build/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/icon.ico -------------------------------------------------------------------------------- /build/icons/pile.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/pile.icns -------------------------------------------------------------------------------- /build/icons/pile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/pile.ico -------------------------------------------------------------------------------- /build/icons/pile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/build/icons/pile.png -------------------------------------------------------------------------------- /dist/electron/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/dist/electron/.gitkeep -------------------------------------------------------------------------------- /dist/web/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/dist/web/.gitkeep -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.3.2](https://github.com/mtobeiyf/pile/compare/v0.3.0...v0.3.2) 4 | ### New Features 5 | - User can specify data path 6 | - Support customizing style 7 | - Markdown style enhancement 8 | - Shortcut to quit app 9 | - Drag animation improved 10 | - Slim scroll bar 11 | - Theme supported (coming soon) 12 | 13 | ### Fixes 14 | - Code highlight not working 15 | - Copy and paste on macOS 16 | - Blurry Windows tray icon 17 | - Wrong LaTeX equation display 18 | 19 | ## [0.3.0](https://github.com/mtobeiyf/pile/compare/v0.2.2...v0.3.0) 20 | ### New Features 21 | - Builds for macOS and Linux are available 22 | - Other small adjustments 23 | 24 | ### Fixes 25 | - [macOS/Linux] Wrong icon display on launcher bar 26 | - [macOS/Linux] Error message at first launch 27 | - [macOS] Wrong App/File icon display 28 | - [macOS] Copy & Paste not working 29 | - [macOS] Too large menu bar icon 30 | 31 | ## [0.2.2](https://github.com/mtobeiyf/pile/compare/v0.2.1...v0.2.2) 32 | ### New Features 33 | - Drag and drop links/url from browser address bar 34 | - Release Linux & macOS builds 35 | 36 | ### Fixes 37 | - Settings modal overwrites board data 38 | 39 | ## [0.2.1](https://github.com/mtobeiyf/pile/compare/v0.2.0...v0.2.1) 40 | 41 | ### New Features 42 | - Support rearrange hubs in current board 43 | - Support Shift+Enter to submit new Note 44 | 45 | ### Fixes 46 | - Fix links opened multiple times when clicked in Note 47 | 48 | ## [0.2.0](https://github.com/mtobeiyf/pile/compare/v0.1.1...v0.2.0) 49 | 50 | ### New Features 51 | - Launch at system startup 52 | - Check for updates 53 | - Pin current board to desktop 54 | - Remember last window size and position 55 | 56 | ### Fixes 57 | - Data storage being overwritten on setup 58 | - Windows size auto growth 59 | - Incorrect default board language 60 | 61 | ## [0.1.1](https://github.com/mtobeiyf/pile/compare/v0.1.0...v0.1.1) 62 | 63 | ### Features 64 | - Tray icon support 65 | - Edit boards in settings 66 | - One instance restriction 67 | 68 | ### Fixes 69 | 70 | - Context menu missing for items 71 | - Wrong tooltip for setting button 72 | 73 | ## 0.1.0 74 | 75 | - Initial release 76 | -------------------------------------------------------------------------------- /docs/CHANGELOG_zh.md: -------------------------------------------------------------------------------- 1 | # 版本记录 2 | 3 | ## [0.3.0](https://github.com/mtobeiyf/pile/compare/v0.2.2...v0.3.0) 4 | ### 新特性 5 | - 支持macOS和Linux平台 6 | - 其它小的改进 7 | 8 | ### 修复 9 | - [macOS/Linux] 地址栏图标显示异常 10 | - [macOS/Linux] 第一次运行错误提升 11 | - [macOS] 应用/文件图标不正常显示 12 | - [macOS] 文本框无法复制粘贴 13 | - [macOS] 地址栏图标过大 14 | 15 | ## [0.2.2](https://github.com/mtobeiyf/pile/compare/v0.2.1...v0.2.2) 16 | 17 | ### 新特性 18 | - 支持从浏览器地址栏拖拽链接来建立快捷方式 19 | - 构建Linux & macOS编译版本 20 | 21 | ### 修复 22 | - 设置页面覆盖原始数据 23 | 24 | ## [0.2.1](https://github.com/mtobeiyf/pile/compare/v0.2.0...v0.2.1) 25 | 26 | ### 新特性 27 | - 调整标签页中区域顺序 28 | - Shift+Enter快捷提交笔记 29 | 30 | ### 修复 31 | - 笔记中的链接点击后多次打开 32 | 33 | ## [0.2.0](https://github.com/mtobeiyf/pile/compare/v0.1.1...v0.2.0) 34 | 35 | ### 新特性 36 | - 托盘设置开机启动 37 | - 在设置中检测新版本 38 | - 固定当前标签到桌面以便快捷访问 39 | - 自动恢复上次窗口大小及位置 40 | 41 | ### 修复 42 | - 错误的数据存储位置 43 | - 每次运行窗口大小不一 44 | - 错误的默认标签语言 45 | 46 | ## [0.1.1](https://github.com/mtobeiyf/pile/compare/v0.1.0...v0.1.1) 47 | 48 | ### 新特性 49 | - 支持托盘图标 50 | - 标签页重命名及排序 51 | - 限制运行一个实例 52 | 53 | ### 修复 54 | 55 | - 右击菜单不显示的问题 56 | - 设置按钮不正确的提示信息 57 | 58 | ## 0.1.0 59 | 60 | - 第一个发行版 61 | -------------------------------------------------------------------------------- /docs/README_zh.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 | 14 | # Pile 15 | 16 | > 有条不紊的管理你的工作与生活 17 | 18 | [README](https://github.com/mtobeiyf/pile/blob/master/README.md) | [中文说明](https://github.com/mtobeiyf/pile/blob/master/docs/README_zh.md) 19 | 20 |

21 | 22 |

23 | 24 | ## 为什么使用Pile? 25 | 26 | 我们都遇到过**文件凌乱不堪**,想找却找不到的情形。即便将文件分门别类放好了,在我们**切换到另一项事务**时寻找起来依旧不够便捷。好的网页、精彩的文章、资源等等,也许藏在你的收藏夹深处。 27 | Pile就是一个让你更好的管理你的工作、学习、生活的强力工具。 28 | 29 | ## 使用说明 30 | 31 | 在开始使用之前,我先简要介绍一下如何更好使用Pile 32 | 33 | ### 标签 34 | 35 | 一个标签是存放你一个**项目/工作区**的资源的地方。在标签中你可以通过添加不同的**区域/卡片**来组织你需要用到的事务。 36 | 37 | ### 卡片 38 | 39 | 一个区域/卡片是存放特定东西的地方。当前由三种不同的卡片: 40 | 41 | #### 应用/文件 42 | 43 | 你可以通过拖拽的方式添加应用、文件(夹)、快捷方式等,只需单击即可快速打开。右击还可以打开其所在文件夹。 44 | 45 |

46 | 47 |

48 | 49 | #### 笔记 50 | 51 | 网络资源(链接)、你的想法等,都可以在这里被记录下来,并快捷访问。支持**Markdown**! :tada: 52 | 53 |

54 | 55 |

56 | 57 | #### 待办 58 | 59 | 与你这个项目相关的待办事项 60 | 61 |

62 | 63 |

64 | 65 | ## 特性 66 | 67 | - 简易的拖拽操作 68 | - 适用于多种应用场景 69 | - 无尽的可能性,不论你是开发者、设计师、作家…… 70 | - 固定标签到桌面,让工作区触手可及 71 | - 支持Markdown和emoji :smiley: 72 | 73 | ## 下载安装 74 | 75 | :tada: 支持 Windows/Linux/macOS 76 | 77 | ### Windows 78 | 79 | - 进入 [发行页面](https://github.com/mtobeiyf/pile/releases) 80 | - 下载并运行安装**.exe**文件,Pile将会自动安装好并启动 81 | - 也可以下载便携版**zip**文件,解压后运行`Pile.exe` 82 | 83 | ### Linux/macOS 84 | 85 | - 进入 [发行页面](https://github.com/mtobeiyf/pile/releases) 86 | - Linux用户: 下载 **.AppImage** 并运行 87 | - Mac用户: 下载便携版 **.zip** 文件,或者 **.dmg** 安装文件 88 | - 你也可以尝试自己构建,见 [开发配置](https://github.com/mtobeiyf/pile/blob/master/docs/README_zh.md#%E5%BC%80%E5%8F%91%E9%85%8D%E7%BD%AE) 89 | 90 | ## 技术相关 91 | 92 | ### 技术栈 93 | 94 | - [Electron](https://electronjs.org/) : 框架 95 | - [electron-vue](https://github.com/SimulatedGREG/electron-vue) : 脚手架 96 | - [iView](https://www.iviewui.com/) : UI组件 97 | 98 | ### 开发配置 99 | 100 | ``` bash 101 | # install dependencies 102 | yarn # or npm install 103 | 104 | # serve with hot reload at localhost:9080 105 | yarn run dev # or npm run dev 106 | 107 | # build electron application for production 108 | yarn run build:dir # or npm run build:dir 109 | 110 | ``` 111 | 112 | --- 113 | 114 | ## 版本记录 115 | 116 | 详细的变更记录可以访问[CHANGELOG_zh.md](https://github.com/mtobeiyf/pile/blob/master/docs/CHANGELOG_zh.md) 117 | 118 | ## 鸣谢 119 | 120 | - [Vue.js](https://vuejs.org/) 121 | - [vue-markdown](https://github.com/miaolz123/vue-markdown) 122 | - [lowdb](https://github.com/typicode/lowdb) 123 | - [Backlog](https://github.com/czytelny/backlog) 124 | 125 | ## License 126 | 127 | Licensed under the [GPL v3.0](https://opensource.org/licenses/GPL-3.0) License. 128 | 129 | Copyright (c) 2018 [Fing](http://imfing.com). 130 | All rights reserved. 131 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pile", 3 | "version": "0.3.2", 4 | "author": "Fing ", 5 | "description": "A simple & powerful app to organize your piled work at one place", 6 | "license": "(GPL-3.0)", 7 | "main": "./dist/electron/main.js", 8 | "scripts": { 9 | "build": "node .electron-vue/build.js && electron-builder", 10 | "build:dir": "node .electron-vue/build.js && electron-builder --dir", 11 | "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", 12 | "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js", 13 | "dev": "node .electron-vue/dev-runner.js", 14 | "pack": "npm run pack:main && npm run pack:renderer", 15 | "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js", 16 | "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js", 17 | "postinstall": "" 18 | }, 19 | "build": { 20 | "productName": "Pile", 21 | "appId": "com.imfing.pile", 22 | "directories": { 23 | "output": "build" 24 | }, 25 | "files": [ 26 | "dist/electron/**/*", 27 | "static/**/*" 28 | ], 29 | "dmg": { 30 | "contents": [ 31 | { 32 | "x": 410, 33 | "y": 150, 34 | "type": "link", 35 | "path": "/Applications" 36 | }, 37 | { 38 | "x": 130, 39 | "y": 150, 40 | "type": "file" 41 | } 42 | ] 43 | }, 44 | "mac": { 45 | "icon": "build/icons/pile.icns" 46 | }, 47 | "win": { 48 | "icon": "build/icons/pile.ico", 49 | "target": [ 50 | "nsis", 51 | "zip" 52 | ] 53 | }, 54 | "nsis": { 55 | "artifactName": "${productName}-Setup-${version}.${ext}" 56 | }, 57 | "linux": { 58 | "icon": "build/icons" 59 | } 60 | }, 61 | "dependencies": { 62 | "autolinker": "^1.6.2", 63 | "axios": "^0.16.1", 64 | "iview": "^2.11.0", 65 | "katex": "^0.9.0", 66 | "lodash": "^4.17.5", 67 | "lodash-id": "^0.14.0", 68 | "lowdb": "^1.0.0", 69 | "markdown-it": "^8.4.1", 70 | "prismjs": "^1.14.0", 71 | "system-icon": "^0.1.2", 72 | "velocity-animate": "^1.5.1", 73 | "vue": "^2.5.13", 74 | "vue-electron": "^1.0.6", 75 | "vue-i18n": "^7.4.2", 76 | "vue-markdown": "^2.2.4", 77 | "vue-router": "^2.5.3", 78 | "vuedraggable": "^2.16.0" 79 | }, 80 | "devDependencies": { 81 | "babel-core": "^6.25.0", 82 | "babel-loader": "^7.1.1", 83 | "babel-plugin-transform-runtime": "^6.23.0", 84 | "babel-preset-env": "^1.6.0", 85 | "babel-preset-stage-0": "^6.24.1", 86 | "babel-register": "^6.24.1", 87 | "babili-webpack-plugin": "^0.1.2", 88 | "cfonts": "^1.1.3", 89 | "chalk": "^2.1.0", 90 | "copy-webpack-plugin": "^4.0.1", 91 | "cross-env": "^5.0.5", 92 | "css-loader": "^0.28.4", 93 | "del": "^3.0.0", 94 | "devtron": "^1.4.0", 95 | "electron": "^1.7.5", 96 | "electron-builder": "^19.19.1", 97 | "electron-debug": "^1.4.0", 98 | "electron-devtools-installer": "^2.2.0", 99 | "electron-rebuild": "^1.7.3", 100 | "extract-text-webpack-plugin": "^3.0.0", 101 | "file-loader": "^0.11.2", 102 | "html-webpack-plugin": "^2.30.1", 103 | "katex": "^0.9.0", 104 | "multispinner": "^0.2.1", 105 | "node-loader": "^0.6.0", 106 | "node-sass": "^4.8.3", 107 | "sass-loader": "^7.0.1", 108 | "style-loader": "^0.18.2", 109 | "url-loader": "^0.5.9", 110 | "vue-html-loader": "^1.2.4", 111 | "vue-loader": "^13.7.1", 112 | "vue-style-loader": "^3.0.1", 113 | "vue-template-compiler": "^2.4.2", 114 | "webpack": "^3.5.2", 115 | "webpack-dev-server": "^2.7.1", 116 | "webpack-hot-middleware": "^2.18.2" 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pile 6 | <% if (htmlWebpackPlugin.options.nodeModules) { %> 7 | 8 | 11 | <% } %> 12 | 13 | 14 |
15 | 16 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/configStore.js: -------------------------------------------------------------------------------- 1 | const low = require('lowdb') 2 | const FileSync = require('lowdb/adapters/FileSync') 3 | const fs = require('fs') 4 | const path = require('path') 5 | 6 | export default function (dataPath) { 7 | const settingsAdapter = new FileSync(dataPath) 8 | const settings = low(settingsAdapter) 9 | 10 | // default settings 11 | settings.defaults({ 12 | windowState: { 13 | height: 563, 14 | useContentSize: false, 15 | width: 1000, 16 | show: false, 17 | minWidth: 300, 18 | x: undefined, 19 | y: undefined 20 | }, 21 | appSettings: { 22 | locale: "", 23 | autoStart: false 24 | } 25 | }).write() 26 | 27 | return { 28 | // window state 29 | getWindowState() { 30 | return settings.get('windowState') 31 | .value() 32 | }, 33 | updateWindowState(updateProp) { 34 | return settings.get('windowState') 35 | .assign(updateProp) 36 | .write() 37 | }, 38 | // app settings 39 | getAppSettings() { 40 | return settings.get('appSettings') 41 | .cloneDeep() 42 | .value() 43 | }, 44 | updateAppSettings(updateProp) { 45 | return settings.get('appSettings') 46 | .assign(updateProp) 47 | .write() 48 | }, 49 | // locale/i18n 50 | getLocale() { 51 | return settings.get('appSettings.locale') 52 | .value() 53 | }, 54 | updateLocale(locale) { 55 | return settings.get('appSettings') 56 | .set('locale', locale) 57 | .write() 58 | }, 59 | // auto start config 60 | getAutoStart() { 61 | if (!settings.get('appSettings').has('autoStart').value()) { 62 | settings.set('appSettings.autoStart', false).write() 63 | return false 64 | } else return settings.get('appSettings.autoStart').value() 65 | }, 66 | updateAutoStart(value) { 67 | settings.set('appSettings.autoStart', value).write() 68 | }, 69 | // user specified data path 70 | getDataPath() { 71 | if (!settings.get('appSettings').has('dataPath').value()) { 72 | let dataDir = require("electron").app.getPath('userData') 73 | let dataPath = path.join(dataDir, 'db.json') 74 | settings.set('appSettings.dataPath', dataPath).write() 75 | return dataPath 76 | } else return settings.get('appSettings.dataPath').value() 77 | }, 78 | updateDatePath(value) { 79 | settings.set('appSettings.dataPath', value).write() 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /src/main/index.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is used specifically and only for development. It installs 3 | * `electron-debug` & `vue-devtools`. There shouldn't be any need to 4 | * modify this file, but it can be used to extend your development 5 | * environment. 6 | */ 7 | 8 | /* eslint-disable */ 9 | 10 | // Set environment for development 11 | process.env.NODE_ENV = 'development' 12 | 13 | // Install `electron-debug` with `devtron` 14 | require('electron-debug')({ showDevTools: true }) 15 | 16 | // Install `vue-devtools` 17 | require('electron').app.on('ready', () => { 18 | let installExtension = require('electron-devtools-installer') 19 | installExtension.default(installExtension.VUEJS_DEVTOOLS) 20 | .then(() => {}) 21 | .catch(err => { 22 | console.log('Unable to install `vue-devtools`: \n', err) 23 | }) 24 | }) 25 | 26 | // Require `main` process to boot app 27 | require('./index') 28 | -------------------------------------------------------------------------------- /src/main/index.js: -------------------------------------------------------------------------------- 1 | import { app, BrowserWindow, Menu, Tray, nativeImage, ipcMain } from 'electron' 2 | import configStore from "./configStore" 3 | 4 | const path = require('path') 5 | const fs = require('fs') 6 | 7 | // Load settings and data 8 | var configPath, dataPath, customStylePath 9 | if (process.env.NODE_ENV !== 'development') { 10 | // Set to avoid error at first launch 11 | if (!fs.existsSync(app.getPath('userData'))) { 12 | fs.mkdirSync(app.getPath('userData')) 13 | } 14 | configPath = path.join(app.getPath('userData'), 'settings.json') 15 | dataPath = path.join(app.getPath('userData'), 'db.json') 16 | customStylePath = path.join(app.getPath('userData'), 'style.less') 17 | } 18 | else { 19 | // Data under developing 20 | configPath = 'settings.json' 21 | dataPath = 'db.json' 22 | customStylePath = 'style.less' 23 | } 24 | 25 | // AppSettings 26 | const appSettings = configStore(configPath) 27 | 28 | global.settings = {} 29 | 30 | // Load paths 31 | global.settings.userDataPath = appSettings.getDataPath() 32 | global.settings.userStylePath = customStylePath 33 | 34 | /** 35 | * Set `__static` path to static files in production 36 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html 37 | */ 38 | if (process.env.NODE_ENV !== 'development') { 39 | global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') 40 | } 41 | 42 | let mainWindow 43 | let tray = null 44 | 45 | const winURL = process.env.NODE_ENV === 'development' 46 | ? `http://localhost:9080` 47 | : `file://${__dirname}/index.html` 48 | 49 | const isSecondInstance = app.makeSingleInstance((commandLine, workingDirectory) => { 50 | // Someone tried to run a second instance, we should focus our window. 51 | if (mainWindow) { 52 | if (mainWindow.isMinimized()) mainWindow.restore() 53 | mainWindow.show() 54 | mainWindow.focus() 55 | } 56 | }) 57 | 58 | if (isSecondInstance) { 59 | app.exit() 60 | } 61 | 62 | function createWindow() { 63 | /** 64 | * Initial window options 65 | */ 66 | const windowConfig = appSettings.getWindowState() 67 | 68 | if (process.platform === 'win32') { 69 | windowConfig.icon = path.join(__static, 'icons/pile.ico') 70 | } 71 | else { 72 | windowConfig.icon = path.join(__static, 'icons/pile.png') 73 | } 74 | 75 | mainWindow = new BrowserWindow(windowConfig) 76 | // mainWindow = new BrowserWindow({ icon: path.join(__static, 'icons/pile.ico') }) 77 | 78 | // mainWindow.webContents.openDevTools() 79 | 80 | mainWindow.loadURL(winURL) 81 | 82 | mainWindow.on('ready-to-show', () => { 83 | mainWindow.show() 84 | mainWindow.focus() 85 | }) 86 | 87 | mainWindow.on('closed', () => { 88 | mainWindow = null 89 | }) 90 | 91 | mainWindow.on('close', function (event) { 92 | event.preventDefault(); 93 | mainWindow.hide(); 94 | return false; 95 | }); 96 | 97 | mainWindow.on('resize', () => saveWindowState(mainWindow)) 98 | mainWindow.on('move', () => saveWindowState(mainWindow)) 99 | } 100 | 101 | app.on('ready', createWindow) 102 | 103 | // Need to import vue first :( 104 | import Vue from 'vue'; 105 | import VueI18n from 'vue-i18n' 106 | 107 | Vue.use(VueI18n) 108 | 109 | app.on('ready', function () { 110 | var i18n = new VueI18n({ 111 | locale: getLocale(), 112 | messages: { 113 | 'zh-CN': require('../renderer/lang/zh'), 114 | 'en-US': require('../renderer/lang/en') 115 | } 116 | }) 117 | 118 | mainWindow.webContents.on('did-finish-load', () => { 119 | mainWindow.webContents.send('loadLocale', getLocale()) 120 | // injectCustomStyle(customStylePath) 121 | }) 122 | 123 | // Handle drop redirect 124 | var handleRedirect = (e, url) => { 125 | if (url != mainWindow.webContents.getURL()) { 126 | e.preventDefault() 127 | require('electron').shell.openExternal(url) 128 | } 129 | } 130 | 131 | mainWindow.webContents.on('will-navigate', handleRedirect) 132 | mainWindow.webContents.on('new-window', handleRedirect) 133 | 134 | // Menu 135 | var template = [ 136 | { 137 | label: i18n.t("m.menu.view"), 138 | submenu: [ 139 | { label: i18n.t("m.menu.reload"), accelerator: 'CmdOrCtrl+R', role: 'reload' }, 140 | { label: i18n.t("m.menu.devtool"), accelerator: 'F12', role: 'toggledevtools'}, 141 | { label: i18n.t("m.menu.close"), accelerator: 'CmdOrCtrl+Q', 142 | click() { app.exit() } 143 | } 144 | ] 145 | }, 146 | { 147 | label: i18n.t("m.menu.edit.label"), 148 | submenu: [ 149 | { label: i18n.t("m.menu.edit.undo"), accelerator: "CmdOrCtrl+Z", selector: "undo:" }, 150 | { label: i18n.t("m.menu.edit.redo"), accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" }, 151 | { type: "separator" }, 152 | { label: i18n.t("m.menu.edit.cut"), accelerator: "CmdOrCtrl+X", selector: "cut:" }, 153 | { label: i18n.t("m.menu.edit.copy"), accelerator: "CmdOrCtrl+C", selector: "copy:" }, 154 | { label: i18n.t("m.menu.edit.paste"), accelerator: "CmdOrCtrl+V", selector: "paste:" }, 155 | { label: i18n.t("m.menu.edit.selectall"), accelerator: "CmdOrCtrl+A", selector: "selectAll:" } 156 | ] 157 | }, 158 | { 159 | label: i18n.t("m.menu.help"), 160 | submenu: [ 161 | { 162 | label: i18n.t("m.menu.feedback"), 163 | click() { require('electron').shell.openExternal('https://github.com/mtobeiyf/pile/issues') } 164 | }, 165 | { 166 | label: i18n.t("m.menu.about"), 167 | click() { require('electron').shell.openExternal('https://github.com/mtobeiyf/pile') } 168 | } 169 | ] 170 | } 171 | ] 172 | var menu = Menu.buildFromTemplate(template) 173 | Menu.setApplicationMenu(menu); 174 | 175 | // Set tray 176 | var trayIcon 177 | if (process.platform === "darwin") { 178 | trayIcon = nativeImage.createFromPath(path.join(__static, 'icons/menubar.png')) 179 | } 180 | else if (process.platform === "win32") { 181 | trayIcon = nativeImage.createFromPath(path.join(__static, 'icons/pile.ico')) 182 | } 183 | else { 184 | trayIcon = nativeImage.createFromPath(path.join(__static, 'icons/pile.png')) 185 | } 186 | tray = new Tray(trayIcon) 187 | const contextMenu = Menu.buildFromTemplate([ 188 | { 189 | label: i18n.t("m.tray.show"), 190 | click() { 191 | mainWindow.show() 192 | if (mainWindow.isMinimized()) mainWindow.restore() 193 | mainWindow.focus() 194 | } 195 | }, 196 | { 197 | label: i18n.t("m.tray.autoStart"), 198 | type: 'checkbox', 199 | checked: appSettings.getAutoStart(), 200 | click() { 201 | let status = contextMenu.items[1].checked 202 | if (status) { 203 | app.setLoginItemSettings({ openAtLogin: true }) 204 | } 205 | else { 206 | app.setLoginItemSettings({ openAtLogin: false }) 207 | } 208 | appSettings.updateAutoStart(status) 209 | } 210 | }, 211 | { 212 | label: i18n.t("m.tray.quit"), 213 | click() { 214 | app.exit() 215 | } 216 | } 217 | ]) 218 | tray.on('click', function () { 219 | mainWindow.show() 220 | if (mainWindow.isMinimized()) mainWindow.restore() 221 | mainWindow.focus() 222 | }) 223 | tray.on('double-click', function () { 224 | mainWindow.show() 225 | if (mainWindow.isMinimized()) mainWindow.restore() 226 | mainWindow.focus() 227 | }) 228 | tray.setToolTip('Pile') 229 | tray.setContextMenu(contextMenu) 230 | }); 231 | 232 | app.on('activate', () => { 233 | if (mainWindow === null) { 234 | createWindow() 235 | } 236 | }) 237 | 238 | app.on('window-all-closed', () => { 239 | if (process.platform !== 'darwin') { 240 | app.quit() 241 | } 242 | }) 243 | 244 | // ipc Events 245 | 246 | ipcMain.on('getLocale', (event, data) => { 247 | mainWindow.webContents.send('loadLocale', getLocale()) 248 | }) 249 | 250 | ipcMain.on('updateLocale', (event, data) => { 251 | appSettings.updateLocale(data) 252 | }) 253 | 254 | ipcMain.on('changeDataPath', (event, data) => { 255 | appSettings.updateDatePath(data) 256 | }) 257 | 258 | // Helper Functions 259 | 260 | function getLocale() { 261 | // Get locale from setting 262 | if (appSettings.getLocale().length == 0) { 263 | if (app.getLocale() == "zh-CN") { 264 | appSettings.updateLocale("zh-CN") 265 | return "zh-CN" 266 | } 267 | else { 268 | appSettings.updateLocale("en-US") 269 | return "en-US" 270 | } 271 | } 272 | else { 273 | return appSettings.getLocale() 274 | } 275 | } 276 | 277 | function saveWindowState(mainWindow) { 278 | // Save the window state 279 | appSettings.updateWindowState(mainWindow.getBounds()) 280 | } 281 | 282 | function injectCustomStyle(path) { 283 | // inject local css file 284 | if (fs.existsSync(path)) { 285 | fs.readFile(path, "utf-8", function (error, data) { 286 | if (!error) { 287 | var formatedData = data.replace(/\s{2,10}/g, ' ').trim() 288 | mainWindow.webContents.insertCSS(formatedData) 289 | } 290 | }) 291 | } 292 | } 293 | 294 | /** 295 | * Auto Updater 296 | * 297 | * Uncomment the following code below and install `electron-updater` to 298 | * support auto updating. Code Signing with a valid certificate is required. 299 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating 300 | */ 301 | 302 | /* 303 | import { autoUpdater } from 'electron-updater' 304 | 305 | autoUpdater.on('update-downloaded', () => { 306 | autoUpdater.quitAndInstall() 307 | }) 308 | 309 | app.on('ready', () => { 310 | if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates() 311 | }) 312 | */ 313 | -------------------------------------------------------------------------------- /src/renderer/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 30 | -------------------------------------------------------------------------------- /src/renderer/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/src/renderer/assets/.gitkeep -------------------------------------------------------------------------------- /src/renderer/assets/github-markdown.css: -------------------------------------------------------------------------------- 1 | .markdown-body { 2 | -ms-text-size-adjust: 100%; 3 | -webkit-text-size-adjust: 100%; 4 | line-height: 1.5; 5 | color: #24292e; 6 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 7 | /* font-size: 16px; */ 8 | line-height: 1.5; 9 | word-wrap: break-word; 10 | } 11 | 12 | .markdown-body .pl-c { 13 | color: #6a737d; 14 | } 15 | 16 | .markdown-body .pl-c1, 17 | .markdown-body .pl-s .pl-v { 18 | color: #005cc5; 19 | } 20 | 21 | .markdown-body .pl-e, 22 | .markdown-body .pl-en { 23 | color: #6f42c1; 24 | } 25 | 26 | .markdown-body .pl-smi, 27 | .markdown-body .pl-s .pl-s1 { 28 | color: #24292e; 29 | } 30 | 31 | .markdown-body .pl-ent { 32 | color: #22863a; 33 | } 34 | 35 | .markdown-body .pl-k { 36 | color: #d73a49; 37 | } 38 | 39 | .markdown-body .pl-s, 40 | .markdown-body .pl-pds, 41 | .markdown-body .pl-s .pl-pse .pl-s1, 42 | .markdown-body .pl-sr, 43 | .markdown-body .pl-sr .pl-cce, 44 | .markdown-body .pl-sr .pl-sre, 45 | .markdown-body .pl-sr .pl-sra { 46 | color: #032f62; 47 | } 48 | 49 | .markdown-body .pl-v, 50 | .markdown-body .pl-smw { 51 | color: #e36209; 52 | } 53 | 54 | .markdown-body .pl-bu { 55 | color: #b31d28; 56 | } 57 | 58 | .markdown-body .pl-ii { 59 | color: #fafbfc; 60 | background-color: #b31d28; 61 | } 62 | 63 | .markdown-body .pl-c2 { 64 | color: #fafbfc; 65 | background-color: #d73a49; 66 | } 67 | 68 | .markdown-body .pl-c2::before { 69 | content: "^M"; 70 | } 71 | 72 | .markdown-body .pl-sr .pl-cce { 73 | font-weight: bold; 74 | color: #22863a; 75 | } 76 | 77 | .markdown-body .pl-ml { 78 | color: #735c0f; 79 | } 80 | 81 | .markdown-body .pl-mh, 82 | .markdown-body .pl-mh .pl-en, 83 | .markdown-body .pl-ms { 84 | font-weight: bold; 85 | color: #005cc5; 86 | } 87 | 88 | .markdown-body .pl-mi { 89 | font-style: italic; 90 | color: #24292e; 91 | } 92 | 93 | .markdown-body .pl-mb { 94 | font-weight: bold; 95 | color: #24292e; 96 | } 97 | 98 | .markdown-body .pl-md { 99 | color: #b31d28; 100 | background-color: #ffeef0; 101 | } 102 | 103 | .markdown-body .pl-mi1 { 104 | color: #22863a; 105 | background-color: #f0fff4; 106 | } 107 | 108 | .markdown-body .pl-mc { 109 | color: #e36209; 110 | background-color: #ffebda; 111 | } 112 | 113 | .markdown-body .pl-mi2 { 114 | color: #f6f8fa; 115 | background-color: #005cc5; 116 | } 117 | 118 | .markdown-body .pl-mdr { 119 | font-weight: bold; 120 | color: #6f42c1; 121 | } 122 | 123 | .markdown-body .pl-ba { 124 | color: #586069; 125 | } 126 | 127 | .markdown-body .pl-sg { 128 | color: #959da5; 129 | } 130 | 131 | .markdown-body .pl-corl { 132 | text-decoration: underline; 133 | color: #032f62; 134 | } 135 | 136 | .markdown-body .octicon { 137 | display: inline-block; 138 | vertical-align: text-top; 139 | fill: currentColor; 140 | } 141 | 142 | .markdown-body a { 143 | background-color: transparent; 144 | } 145 | 146 | .markdown-body a:active, 147 | .markdown-body a:hover { 148 | outline-width: 0; 149 | } 150 | 151 | .markdown-body strong { 152 | font-weight: inherit; 153 | } 154 | 155 | .markdown-body strong { 156 | font-weight: bolder; 157 | } 158 | 159 | .markdown-body h1 { 160 | font-size: 2em; 161 | margin: 0.67em 0; 162 | } 163 | 164 | .markdown-body img { 165 | border-style: none; 166 | } 167 | 168 | .markdown-body code, 169 | .markdown-body kbd, 170 | .markdown-body pre { 171 | font-family: monospace, monospace; 172 | font-size: 1em; 173 | } 174 | 175 | .markdown-body hr { 176 | box-sizing: content-box; 177 | height: 0; 178 | overflow: visible; 179 | } 180 | 181 | .markdown-body input { 182 | font: inherit; 183 | margin: 0; 184 | } 185 | 186 | .markdown-body input { 187 | overflow: visible; 188 | } 189 | 190 | .markdown-body [type="checkbox"] { 191 | box-sizing: border-box; 192 | padding: 0; 193 | } 194 | 195 | .markdown-body * { 196 | box-sizing: border-box; 197 | } 198 | 199 | .markdown-body input { 200 | font-family: inherit; 201 | font-size: inherit; 202 | line-height: inherit; 203 | } 204 | 205 | .markdown-body a { 206 | color: #0366d6; 207 | text-decoration: none; 208 | } 209 | 210 | .markdown-body a:hover { 211 | text-decoration: underline; 212 | } 213 | 214 | .markdown-body strong { 215 | font-weight: 600; 216 | } 217 | 218 | .markdown-body hr { 219 | height: 0; 220 | margin: 15px 0; 221 | overflow: hidden; 222 | background: transparent; 223 | border: 0; 224 | border-bottom: 1px solid #dfe2e5; 225 | } 226 | 227 | .markdown-body hr::before { 228 | display: table; 229 | content: ""; 230 | } 231 | 232 | .markdown-body hr::after { 233 | display: table; 234 | clear: both; 235 | content: ""; 236 | } 237 | 238 | .markdown-body table { 239 | border-spacing: 0; 240 | border-collapse: collapse; 241 | } 242 | 243 | .markdown-body td, 244 | .markdown-body th { 245 | padding: 0; 246 | } 247 | 248 | .markdown-body h1, 249 | .markdown-body h2, 250 | .markdown-body h3, 251 | .markdown-body h4, 252 | .markdown-body h5, 253 | .markdown-body h6 { 254 | margin-top: 0; 255 | margin-bottom: 0; 256 | } 257 | 258 | .markdown-body h1 { 259 | font-size: 32px; 260 | font-weight: 600; 261 | } 262 | 263 | .markdown-body h2 { 264 | font-size: 24px; 265 | font-weight: 600; 266 | } 267 | 268 | .markdown-body h3 { 269 | font-size: 20px; 270 | font-weight: 600; 271 | } 272 | 273 | .markdown-body h4 { 274 | font-size: 16px; 275 | font-weight: 600; 276 | } 277 | 278 | .markdown-body h5 { 279 | font-size: 14px; 280 | font-weight: 600; 281 | } 282 | 283 | .markdown-body h6 { 284 | font-size: 12px; 285 | font-weight: 600; 286 | } 287 | 288 | .markdown-body p { 289 | margin-top: 0; 290 | margin-bottom: 10px; 291 | } 292 | 293 | .markdown-body blockquote { 294 | margin: 0; 295 | } 296 | 297 | .markdown-body ul, 298 | .markdown-body ol { 299 | padding-left: 0; 300 | margin-top: 0; 301 | margin-bottom: 0; 302 | } 303 | 304 | .markdown-body ol ol, 305 | .markdown-body ul ol { 306 | list-style-type: lower-roman; 307 | } 308 | 309 | .markdown-body ul ul ol, 310 | .markdown-body ul ol ol, 311 | .markdown-body ol ul ol, 312 | .markdown-body ol ol ol { 313 | list-style-type: lower-alpha; 314 | } 315 | 316 | .markdown-body dd { 317 | margin-left: 0; 318 | } 319 | 320 | /* .markdown-body code { 321 | font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; 322 | font-size: 12px; 323 | } */ 324 | 325 | .markdown-body pre { 326 | margin-top: 0; 327 | margin-bottom: 0; 328 | font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; 329 | font-size: 12px; 330 | } 331 | 332 | .markdown-body .octicon { 333 | vertical-align: text-bottom; 334 | } 335 | 336 | .markdown-body .pl-0 { 337 | padding-left: 0 !important; 338 | } 339 | 340 | .markdown-body .pl-1 { 341 | padding-left: 4px !important; 342 | } 343 | 344 | .markdown-body .pl-2 { 345 | padding-left: 8px !important; 346 | } 347 | 348 | .markdown-body .pl-3 { 349 | padding-left: 16px !important; 350 | } 351 | 352 | .markdown-body .pl-4 { 353 | padding-left: 24px !important; 354 | } 355 | 356 | .markdown-body .pl-5 { 357 | padding-left: 32px !important; 358 | } 359 | 360 | .markdown-body .pl-6 { 361 | padding-left: 40px !important; 362 | } 363 | 364 | .markdown-body::before { 365 | display: table; 366 | content: ""; 367 | } 368 | 369 | .markdown-body::after { 370 | display: table; 371 | clear: both; 372 | content: ""; 373 | } 374 | 375 | .markdown-body>*:first-child { 376 | margin-top: 0 !important; 377 | } 378 | 379 | .markdown-body>*:last-child { 380 | margin-bottom: 0 !important; 381 | } 382 | 383 | .markdown-body a:not([href]) { 384 | color: inherit; 385 | text-decoration: none; 386 | } 387 | 388 | .markdown-body .anchor { 389 | float: left; 390 | padding-right: 4px; 391 | margin-left: -20px; 392 | line-height: 1; 393 | } 394 | 395 | .markdown-body .anchor:focus { 396 | outline: none; 397 | } 398 | 399 | .markdown-body p, 400 | .markdown-body blockquote, 401 | .markdown-body ul, 402 | .markdown-body ol, 403 | .markdown-body dl, 404 | .markdown-body table, 405 | .markdown-body pre { 406 | margin-top: 0; 407 | margin-bottom: 16px; 408 | } 409 | 410 | .markdown-body hr { 411 | height: 0.25em; 412 | padding: 0; 413 | margin: 24px 0; 414 | background-color: #e1e4e8; 415 | border: 0; 416 | } 417 | 418 | .markdown-body blockquote { 419 | padding: 0 1em; 420 | color: #6a737d; 421 | border-left: 0.25em solid #dfe2e5; 422 | } 423 | 424 | .markdown-body blockquote>:first-child { 425 | margin-top: 0; 426 | } 427 | 428 | .markdown-body blockquote>:last-child { 429 | margin-bottom: 0; 430 | } 431 | 432 | .markdown-body kbd { 433 | display: inline-block; 434 | padding: 3px 5px; 435 | font-size: 11px; 436 | line-height: 10px; 437 | color: #444d56; 438 | vertical-align: middle; 439 | background-color: #fafbfc; 440 | border: solid 1px #c6cbd1; 441 | border-bottom-color: #959da5; 442 | border-radius: 3px; 443 | box-shadow: inset 0 -1px 0 #959da5; 444 | } 445 | 446 | .markdown-body h1, 447 | .markdown-body h2, 448 | .markdown-body h3, 449 | .markdown-body h4, 450 | .markdown-body h5, 451 | .markdown-body h6 { 452 | margin-top: 24px; 453 | margin-bottom: 16px; 454 | font-weight: 600; 455 | line-height: 1.25; 456 | } 457 | 458 | .markdown-body h1 .octicon-link, 459 | .markdown-body h2 .octicon-link, 460 | .markdown-body h3 .octicon-link, 461 | .markdown-body h4 .octicon-link, 462 | .markdown-body h5 .octicon-link, 463 | .markdown-body h6 .octicon-link { 464 | color: #1b1f23; 465 | vertical-align: middle; 466 | visibility: hidden; 467 | } 468 | 469 | .markdown-body h1:hover .anchor, 470 | .markdown-body h2:hover .anchor, 471 | .markdown-body h3:hover .anchor, 472 | .markdown-body h4:hover .anchor, 473 | .markdown-body h5:hover .anchor, 474 | .markdown-body h6:hover .anchor { 475 | text-decoration: none; 476 | } 477 | 478 | .markdown-body h1:hover .anchor .octicon-link, 479 | .markdown-body h2:hover .anchor .octicon-link, 480 | .markdown-body h3:hover .anchor .octicon-link, 481 | .markdown-body h4:hover .anchor .octicon-link, 482 | .markdown-body h5:hover .anchor .octicon-link, 483 | .markdown-body h6:hover .anchor .octicon-link { 484 | visibility: visible; 485 | } 486 | 487 | .markdown-body h1 { 488 | padding-bottom: 0.3em; 489 | font-size: 2em; 490 | border-bottom: 1px solid #eaecef; 491 | } 492 | 493 | .markdown-body h2 { 494 | padding-bottom: 0.3em; 495 | font-size: 1.5em; 496 | border-bottom: 1px solid #eaecef; 497 | } 498 | 499 | .markdown-body h3 { 500 | font-size: 1.25em; 501 | } 502 | 503 | .markdown-body h4 { 504 | font-size: 1em; 505 | } 506 | 507 | .markdown-body h5 { 508 | font-size: 0.875em; 509 | } 510 | 511 | .markdown-body h6 { 512 | font-size: 0.85em; 513 | color: #6a737d; 514 | } 515 | 516 | .markdown-body ul, 517 | .markdown-body ol { 518 | padding-left: 2em; 519 | } 520 | 521 | .markdown-body ul ul, 522 | .markdown-body ul ol, 523 | .markdown-body ol ol, 524 | .markdown-body ol ul { 525 | margin-top: 0; 526 | margin-bottom: 0; 527 | } 528 | 529 | .markdown-body li { 530 | word-wrap: break-all; 531 | } 532 | 533 | .markdown-body li>p { 534 | margin-top: 16px; 535 | } 536 | 537 | .markdown-body li+li { 538 | margin-top: 0.25em; 539 | } 540 | 541 | .markdown-body dl { 542 | padding: 0; 543 | } 544 | 545 | .markdown-body dl dt { 546 | padding: 0; 547 | margin-top: 16px; 548 | font-size: 1em; 549 | font-style: italic; 550 | font-weight: 600; 551 | } 552 | 553 | .markdown-body dl dd { 554 | padding: 0 16px; 555 | margin-bottom: 16px; 556 | } 557 | 558 | .markdown-body table { 559 | display: block; 560 | width: 100%; 561 | overflow: auto; 562 | } 563 | 564 | .markdown-body table th { 565 | font-weight: 600; 566 | } 567 | 568 | .markdown-body table th, 569 | .markdown-body table td { 570 | padding: 6px 13px; 571 | border: 1px solid #dfe2e5; 572 | } 573 | 574 | .markdown-body table tr { 575 | background-color: #fff; 576 | border-top: 1px solid #c6cbd1; 577 | } 578 | 579 | .markdown-body table tr:nth-child(2n) { 580 | background-color: #f6f8fa; 581 | } 582 | 583 | .markdown-body img { 584 | max-width: 100%; 585 | box-sizing: content-box; 586 | background-color: #fff; 587 | } 588 | 589 | .markdown-body img[align=right] { 590 | padding-left: 20px; 591 | } 592 | 593 | .markdown-body img[align=left] { 594 | padding-right: 20px; 595 | } 596 | 597 | /* .markdown-body code { 598 | padding: 0.2em 0.4em; 599 | margin: 0; 600 | font-size: 85%; 601 | background-color: rgba(27,31,35,0.05); 602 | border-radius: 3px; 603 | } */ 604 | 605 | .markdown-body pre { 606 | word-wrap: normal; 607 | } 608 | 609 | .markdown-body pre>code { 610 | padding: 0; 611 | margin: 0; 612 | font-size: 100%; 613 | word-break: normal; 614 | white-space: pre; 615 | background: transparent; 616 | border: 0; 617 | } 618 | /* 619 | .markdown-body .highlight { 620 | margin-bottom: 16px; 621 | } 622 | 623 | .markdown-body .highlight pre { 624 | margin-bottom: 0; 625 | word-break: normal; 626 | } 627 | 628 | .markdown-body .highlight pre, 629 | .markdown-body pre { 630 | padding: 16px; 631 | overflow: auto; 632 | font-size: 85%; 633 | line-height: 1.45; 634 | background-color: #f6f8fa; 635 | border-radius: 3px; 636 | } */ 637 | 638 | .markdown-body pre code { 639 | display: inline; 640 | max-width: auto; 641 | padding: 0; 642 | margin: 0; 643 | overflow: visible; 644 | line-height: inherit; 645 | word-wrap: normal; 646 | background-color: transparent; 647 | border: 0; 648 | } 649 | 650 | .markdown-body .full-commit .btn-outline:not(:disabled):hover { 651 | color: #005cc5; 652 | border-color: #005cc5; 653 | } 654 | 655 | .markdown-body kbd { 656 | display: inline-block; 657 | padding: 3px 5px; 658 | font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; 659 | line-height: 10px; 660 | color: #444d56; 661 | vertical-align: middle; 662 | background-color: #fafbfc; 663 | border: solid 1px #d1d5da; 664 | border-bottom-color: #c6cbd1; 665 | border-radius: 3px; 666 | box-shadow: inset 0 -1px 0 #c6cbd1; 667 | } 668 | 669 | .markdown-body :checked+.radio-label { 670 | position: relative; 671 | z-index: 1; 672 | border-color: #0366d6; 673 | } 674 | 675 | .markdown-body .task-list-item { 676 | list-style-type: none; 677 | } 678 | 679 | .markdown-body .task-list-item+.task-list-item { 680 | margin-top: 3px; 681 | } 682 | 683 | .markdown-body .task-list-item input { 684 | margin: 0 0.2em 0.25em -1.6em; 685 | vertical-align: middle; 686 | } 687 | 688 | .markdown-body hr { 689 | border-bottom-color: #eee; 690 | } 691 | -------------------------------------------------------------------------------- /src/renderer/assets/prism.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.11.0 2 | http://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+c+bash+basic+cpp+csharp+java+json+latex+markdown+matlab+php+python+r+swift+vbnet+verilog */ 3 | /** 4 | * okaidia theme for JavaScript, CSS and HTML 5 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/ 6 | * @author ocodia 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: #f8f8f2; 12 | background: none; 13 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); 14 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | } 31 | 32 | /* Code blocks */ 33 | pre[class*="language-"] { 34 | padding: 1em; 35 | margin: .5em 0; 36 | overflow: auto; 37 | border-radius: 0.3em; 38 | } 39 | 40 | :not(pre) > code[class*="language-"], 41 | pre[class*="language-"] { 42 | background: #272822; 43 | } 44 | 45 | /* Inline code */ 46 | :not(pre) > code[class*="language-"] { 47 | padding: .1em; 48 | border-radius: .3em; 49 | white-space: normal; 50 | } 51 | 52 | .token.comment, 53 | .token.prolog, 54 | .token.doctype, 55 | .token.cdata { 56 | color: slategray; 57 | } 58 | 59 | .token.punctuation { 60 | color: #f8f8f2; 61 | } 62 | 63 | .namespace { 64 | opacity: .7; 65 | } 66 | 67 | .token.property, 68 | .token.tag, 69 | .token.constant, 70 | .token.symbol, 71 | .token.deleted { 72 | color: #f92672; 73 | } 74 | 75 | .token.boolean, 76 | .token.number { 77 | color: #ae81ff; 78 | } 79 | 80 | .token.selector, 81 | .token.attr-name, 82 | .token.string, 83 | .token.char, 84 | .token.builtin, 85 | .token.inserted { 86 | color: #a6e22e; 87 | } 88 | 89 | .token.operator, 90 | .token.entity, 91 | .token.url, 92 | .language-css .token.string, 93 | .style .token.string, 94 | .token.variable { 95 | color: #f8f8f2; 96 | } 97 | 98 | .token.atrule, 99 | .token.attr-value, 100 | .token.function { 101 | color: #e6db74; 102 | } 103 | 104 | .token.keyword { 105 | color: #66d9ef; 106 | } 107 | 108 | .token.regex, 109 | .token.important { 110 | color: #fd971f; 111 | } 112 | 113 | .token.important, 114 | .token.bold { 115 | font-weight: bold; 116 | } 117 | .token.italic { 118 | font-style: italic; 119 | } 120 | 121 | .token.entity { 122 | cursor: help; 123 | } 124 | 125 | -------------------------------------------------------------------------------- /src/renderer/assets/prism.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.11.0 2 | http://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+c+bash+basic+cpp+csharp+java+json+latex+markdown+matlab+php+python+r+swift+vbnet+verilog */ 3 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,N=t.length;N>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,S=w.slice(0,A),C=w.slice(j),M=[b,P];S&&(++b,k+=S.length,M.push(S));var E=new s(g,f?n.tokenize(_,f):_,y,_,m);if(M.push(E),C&&M.push(C),Array.prototype.splice.apply(t,M),1!=P&&n.matchGrammar(e,t,r,b,k,!0,g),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 4 | Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 5 | Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); 6 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 7 | Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|\d*\.?\d+(?:[Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"}}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; 8 | Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; 9 | !function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); 10 | Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^_ +\-.A-Z\d])*"/i,greedy:!0},number:/(?:\b|\B[.-])(?:\d+\.?\d*)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,"function":/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; 11 | Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(?:true|false)\b/,operator:/--?|\+\+?|!=?|<{1,2}=?|>{1,2}=?|->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|\|?|\?|\*|\/|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)\w+/i,lookbehind:!0}}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); 12 | Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],number:/\b-?(?:0x[\da-f]+|\d*\.?\d+f?)\b/i}),Prism.languages.insertBefore("csharp","keyword",{"generic-method":{pattern:/[a-z0-9_]+\s*<[^>\r\n]+?>\s*(?=\()/i,alias:"function",inside:{keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}); 13 | Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}); 14 | Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee][+-]?\d+)?)\b/,punctuation:/[{}[\]);,]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; 15 | !function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},"function":{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(Prism); 16 | Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold); 17 | Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/\b-?(?:\d*\.?\d+(?:[eE][+-]?\d+)?(?:[ij])?|[ij])\b/,keyword:/\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/,"function":/(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}; 18 | Prism.languages.php=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),Prism.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),Prism.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),Prism.languages.markup&&(Prism.hooks.add("before-highlight",function(e){"php"===e.language&&/(?:<\?php|<\?)/gi.test(e.code)&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi,function(a){for(var n=e.tokenStack.length;-1!==e.backupCode.indexOf("___PHP"+n+"___");)++n;return e.tokenStack[n]=a,"___PHP"+n+"___"}),e.grammar=Prism.languages.markup)}),Prism.hooks.add("before-insert",function(e){"php"===e.language&&e.backupCode&&(e.code=e.backupCode,delete e.backupCode)}),Prism.hooks.add("after-highlight",function(e){if("php"===e.language&&e.tokenStack){e.grammar=Prism.languages.php;for(var a=0,n=Object.keys(e.tokenStack);a'+Prism.highlight(r,e.grammar,"php").replace(/\$/g,"$$$$")+"")}e.element.innerHTML=e.highlightedCode}})); 19 | Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; 20 | Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},"boolean":/\b(?:TRUE|FALSE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:NaN|Inf)\b/,/\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]?\d+)?[iL]?\b/],keyword:/\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}; 21 | Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|Protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.util.clone(Prism.languages.swift); 22 | Prism.languages.vbnet=Prism.languages.extend("basic",{keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0}]}); 23 | Prism.languages.verilog={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},property:/\B\$\w+\b/,constant:/\B`\w+\b/,"function":/\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|class|case|casex|casez|cell|chandle|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endspecify|endsequence|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always_latch|always_comb|always_ff|always)\b ?@?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b\d*[._]?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}; 24 | -------------------------------------------------------------------------------- /src/renderer/assets/styleLoader.js: -------------------------------------------------------------------------------- 1 | // Load custom css 2 | const fs = require('fs') 3 | 4 | function injectCustomStyle(path, type = 'css') { 5 | if (fs.existsSync(path)) { 6 | var link = document.createElement("link"); 7 | link.href = path; 8 | if (type === 'css') { 9 | link.type = "text/css"; 10 | link.rel = "stylesheet"; 11 | } else if (type === 'less') { 12 | link.type = "text/css"; 13 | link.rel = "stylesheet/less"; 14 | } 15 | document.getElementsByTagName("head")[0].appendChild(link); 16 | } 17 | } 18 | 19 | function injectCustomScript(path) { 20 | const less = require('./less.min.js') 21 | if (fs.existsSync(path)) { 22 | var script = document.createElement("script"); 23 | script.src = path; 24 | scipt.type = "text/javascript"; 25 | document.getElementsByTagName("body")[0].appendChild(script); 26 | } 27 | } 28 | 29 | window.onload = function () { 30 | var customStylePath = require('electron').remote.getGlobal('settings').userStylePath 31 | if (fs.existsSync(customStylePath)) { 32 | injectCustomStyle(customStylePath, 'less') 33 | injectCustomScript('/src/renderer/assets/less.min.js') 34 | } 35 | } -------------------------------------------------------------------------------- /src/renderer/components/Board.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 160 | 161 | -------------------------------------------------------------------------------- /src/renderer/components/EditModal.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 49 | 50 | -------------------------------------------------------------------------------- /src/renderer/components/Hub.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 216 | 217 | -------------------------------------------------------------------------------- /src/renderer/components/HubItem.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 166 | 167 | 175 | 176 | -------------------------------------------------------------------------------- /src/renderer/components/HubItemNote.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 95 | 96 | -------------------------------------------------------------------------------- /src/renderer/components/HubItemTodo.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 108 | 109 | 133 | -------------------------------------------------------------------------------- /src/renderer/components/HubNote.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 63 | 170 | 171 | -------------------------------------------------------------------------------- /src/renderer/components/HubTodo.vue: -------------------------------------------------------------------------------- 1 | 81 | 82 | 179 | 180 | 190 | 191 | -------------------------------------------------------------------------------- /src/renderer/components/LandingPage.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 205 | 206 | -------------------------------------------------------------------------------- /src/renderer/components/NewBoardModal.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 43 | 44 | 48 | -------------------------------------------------------------------------------- /src/renderer/components/RenameModal.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 48 | 49 | -------------------------------------------------------------------------------- /src/renderer/components/SettingsModal.vue: -------------------------------------------------------------------------------- 1 | 124 | 125 | 266 | 267 | -------------------------------------------------------------------------------- /src/renderer/components/SortHubModal.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 65 | -------------------------------------------------------------------------------- /src/renderer/lang/en.js: -------------------------------------------------------------------------------- 1 | export const m = { 2 | pile: 'Pile', 3 | menu: { 4 | view: "View", 5 | reload: "Reload", 6 | help: "Help", 7 | feedback: 'Feedback', 8 | about: "About", 9 | devtool: "Devtools", 10 | close: "Quit", 11 | edit: { 12 | label: "Edit", 13 | undo: "Undo", 14 | redo: "Redo", 15 | cut: "Cut", 16 | copy: "Copy", 17 | paste: "Paste", 18 | selectall: "Select All" 19 | } 20 | }, 21 | tray: { 22 | show: 'Show', 23 | quit: 'Quit', 24 | autoStart: 'Launch at startup' 25 | }, 26 | settings: { 27 | tip: 'Open settings', 28 | title: 'Settings', 29 | save: 'Save', 30 | close: 'Close', 31 | langTitle: 'Display language', 32 | boardsEdit: 'Setup boards order and name', 33 | advanced: { 34 | title: 'Advanced', 35 | tip: 'You know what you are doing', 36 | storage: { 37 | open: 'Open Storage Folder', 38 | title: 'Storage Path', 39 | change: 'Change Path', 40 | reset: 'Reset' 41 | } 42 | }, 43 | update: { 44 | current: 'Current version', 45 | check: 'Check updates', 46 | loading: 'Checking...', 47 | notFound: 'You have the latest version', 48 | newFound: 'New version available' 49 | }, 50 | success: 'Settings saved' 51 | }, 52 | action: { 53 | rename: 'Rename', 54 | delete: 'Delete', 55 | edit: 'Edit', 56 | openFolder: 'Open Folder' 57 | }, 58 | board: { 59 | default: 'Default Board', 60 | lastBoard: 'You should keep at least one board', 61 | pinTip: 'Pin this board to desktop', 62 | pinOK: 'Created shortcut on desktop', 63 | sortTip: 'Adjust hubs', 64 | sortOK: 'Hubs adjusted', 65 | new: { 66 | tip: 'Add new board', 67 | title: 'Add new board', 68 | placeholder: 'New board name', 69 | confirm: 'Add new board', 70 | cancel: 'Cancel', 71 | success: 'Board added' 72 | } 73 | }, 74 | info: { 75 | emptyHub: 'Drag app/file/folder here and access them in this place.', 76 | noHubs: 'No hubs yet. Try creating a new hub using the menu above.', 77 | lnkError: 'Error reading the shortcut, please drop the orginal file.', 78 | urlError: 'Invalid URL, make sure it begins with "http(s)"' 79 | }, 80 | todo: { 81 | todo: 'Todo', 82 | done: 'Done', 83 | hint: 'Enter new todo...' 84 | }, 85 | note: { 86 | placeholder: 'Input text/links, markdown is supported...' 87 | }, 88 | newHub: { 89 | button: 'New Hub', 90 | item: 'App/File', 91 | note: 'Notes', 92 | todo: 'Todo' 93 | }, 94 | modal: { 95 | rename: { 96 | title: 'Rename', 97 | content: 'Rename', 98 | placeholder: 'Enter new name...', 99 | ok: 'Ok', 100 | cancel: 'Cancel', 101 | success: { 102 | hub: 'Rename ok', 103 | item: 'Rename ok' 104 | } 105 | }, 106 | delete: { 107 | title: 'Delete', 108 | content: 'Are you sure to delete', 109 | ok: 'Ok, delete', 110 | cancel: 'Cancel', 111 | success: { 112 | board: 'Board removed', 113 | hub: 'Hub removed' 114 | } 115 | }, 116 | edit: { 117 | title: 'Edit', 118 | placeholder: 'Enter something here...', 119 | ok: 'Save', 120 | cancel: 'Cancel', 121 | success: { 122 | note: 'Note saved.' 123 | } 124 | }, 125 | sort: { 126 | title: 'Adjust hubs', 127 | ok: 'Save', 128 | cancel: 'Cancel', 129 | success: 'Adjusted' 130 | } 131 | }, 132 | 133 | } 134 | -------------------------------------------------------------------------------- /src/renderer/lang/zh.js: -------------------------------------------------------------------------------- 1 | export const m = { 2 | pile: 'Pile', 3 | menu: { 4 | view: "视图", 5 | reload: "重新加载", 6 | help: "帮助", 7 | feedback: '反馈建议', 8 | about: "关于", 9 | devtool: "开发者工具", 10 | close: "退出", 11 | edit: { 12 | label: "编辑", 13 | undo: "撤销", 14 | redo: "恢复", 15 | cut: "剪切", 16 | copy: "复制", 17 | paste: "粘贴", 18 | selectall: "全选" 19 | } 20 | }, 21 | tray: { 22 | show: '显示', 23 | quit: '退出', 24 | autoStart: '开机启动' 25 | }, 26 | settings: { 27 | tip: '打开设置', 28 | title: '设置', 29 | save: '保存', 30 | close: '关闭', 31 | langTitle: '界面语言', 32 | boardsEdit: '标签页编辑', 33 | advanced: { 34 | title: '高级设置', 35 | tip: '谨慎修改此部分设置', 36 | storage: { 37 | open: '打开存储位置', 38 | title: '存储位置', 39 | change: '更改位置', 40 | reset: '重置' 41 | } 42 | }, 43 | update: { 44 | current: '当前版本', 45 | check: '检查更新', 46 | loading: '检查中...', 47 | notFound: '已经是最新版', 48 | newFound: '立即更新' 49 | }, 50 | success: '设置已保存' 51 | }, 52 | action: { 53 | rename: '重命名', 54 | delete: '删除', 55 | edit: '编辑', 56 | openFolder: '打开文件夹' 57 | }, 58 | board: { 59 | default: '工作区', 60 | lastBoard: '你需要至少保留一个标签', 61 | pinTip: '固定该标签到桌面', 62 | pinOK: '成功发送到桌面快捷方式', 63 | sortTip: '调整区域', 64 | sortOK: '调整完成', 65 | new: { 66 | tip: '添加新标签页', 67 | title: '添加新标签页', 68 | placeholder: '输入标签页名称', 69 | confirm: '添加', 70 | cancel: '取消', 71 | success: '标签添加成功' 72 | } 73 | }, 74 | info: { 75 | emptyHub: '向此处拖拽来添加文件/程序/快捷方式等,即可在此处快速访问', 76 | noHubs: '空空如也,使用上方新建按钮来添加一些区域吧~', 77 | lnkError: '该快捷方式有误,请拖拽源文件', 78 | urlError: '无效URL,请确保以"http(s)"开头' 79 | }, 80 | todo: { 81 | todo: '待办', 82 | done: '完成', 83 | hint: '输入新的待办...' 84 | }, 85 | note: { 86 | placeholder: '可以输入文字笔记/网页链接,支持Markdown' 87 | }, 88 | newHub: { 89 | button: '新建区域', 90 | item: '应用/文件', 91 | note: '笔记', 92 | todo: '待办' 93 | }, 94 | modal: { 95 | rename: { 96 | title: '重命名', 97 | content: '重命名', 98 | placeholder: '输入新名称...', 99 | ok: '重命名', 100 | cancel: '取消', 101 | success: { 102 | hub: '区域重命名成功', 103 | item: '修改成功' 104 | } 105 | }, 106 | delete: { 107 | title: '删除', 108 | content: '你确定删除', 109 | ok: '删除', 110 | cancel: '取消', 111 | success:{ 112 | board: '标签页删除成功', 113 | hub: '区域删除成功' 114 | } 115 | }, 116 | edit: { 117 | title: '编辑', 118 | placeholder: '在此输入', 119 | ok: '保存', 120 | cancel: '取消', 121 | success: { 122 | note: '编辑已保存' 123 | } 124 | }, 125 | sort: { 126 | title: '调整区域', 127 | ok: '保存', 128 | cancel: '取消', 129 | success: '调整成功' 130 | } 131 | } 132 | } -------------------------------------------------------------------------------- /src/renderer/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios' 3 | 4 | import App from './App' 5 | import router from './router' 6 | 7 | import iView from 'iview' 8 | import 'iview/dist/styles/iview.css' 9 | 10 | import VueI18n from 'vue-i18n' 11 | 12 | Vue.use(iView); 13 | Vue.use(VueI18n) 14 | 15 | const i18n = new VueI18n({ 16 | locale: 'zh-CN', // 语言标识 17 | messages: { 18 | 'zh-CN': require('./lang/zh'), // 中文语言包 19 | 'en-US': require('./lang/en') // 英文语言包 20 | } 21 | }) 22 | 23 | // require static files here 24 | require('katex/dist/katex.min.css') 25 | require('./assets/styleLoader.js') 26 | 27 | if (!process.env.IS_WEB) Vue.use(require('vue-electron')) 28 | Vue.http = Vue.prototype.$http = axios 29 | Vue.config.productionTip = false 30 | 31 | /* eslint-disable no-new */ 32 | new Vue({ 33 | components: { App }, 34 | i18n, 35 | router, 36 | template: '' 37 | }).$mount('#app') 38 | -------------------------------------------------------------------------------- /src/renderer/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | Vue.use(Router) 5 | 6 | export default new Router({ 7 | routes: [ 8 | { 9 | path: '/', 10 | name: 'landing-page', 11 | component: require('@/components/LandingPage').default 12 | }, 13 | { 14 | path: '*', 15 | redirect: '/' 16 | } 17 | ] 18 | }) 19 | -------------------------------------------------------------------------------- /src/renderer/store/index.js: -------------------------------------------------------------------------------- 1 | const low = require('lowdb') 2 | const FileSync = require('lowdb/adapters/FileSync') 3 | const { remote } = require('electron') 4 | 5 | const dataAdapter = new FileSync(remote.getGlobal('settings').userDataPath) 6 | 7 | module.exports = { 8 | db: low(dataAdapter), 9 | } -------------------------------------------------------------------------------- /src/renderer/store/modules/boardsStore.js: -------------------------------------------------------------------------------- 1 | import { db } from '../../store' 2 | 3 | import lodashId from 'lodash-id' 4 | 5 | db._.mixin(lodashId) 6 | 7 | function getLabel() { 8 | var app = require("electron").remote.app; 9 | let locale = app.getLocale() 10 | if (locale == "zh-CN") return "工作区" 11 | else return "Default Board" 12 | } 13 | 14 | db.defaults({ 15 | activeBoard: 'default', 16 | boards: [{ 17 | id: 'default', 18 | label: getLabel(), 19 | hubs: [] 20 | }] 21 | }).write() 22 | 23 | export default { 24 | saveNewBoard(boardName) { 25 | return db 26 | .get('boards') 27 | .insert({ 28 | label: boardName, 29 | hubs: [] 30 | }) 31 | .write() 32 | }, 33 | saveBoardsArray(boardsArray) { 34 | return db 35 | .set('boards', boardsArray) 36 | .write() 37 | }, 38 | saveHubsArray(boardId, items) { 39 | return db 40 | .get('boards') 41 | .getById(boardId) 42 | .set('hubs', items) 43 | .write() 44 | }, 45 | saveHubItemsArray(boardId, hubId, items) { 46 | return db 47 | .get('boards') 48 | .getById(boardId) 49 | .get('hubs') 50 | .getById(hubId) 51 | .set('items', items) 52 | .write() 53 | }, 54 | removeBoard(boardId) { 55 | db.get('boards') 56 | .remove({ id: boardId }) 57 | .write() 58 | }, 59 | setActiveBoard(boardId) { 60 | db.set('activeBoard', boardId) 61 | .write() 62 | }, 63 | checkBoard(boardId) { 64 | let len = db.get('boards') 65 | .filter({ id: boardId }) 66 | .value() 67 | .length 68 | if (len == 0) return false 69 | else return true 70 | }, 71 | getActiveBoard() { 72 | return db.get('activeBoard') 73 | .value() 74 | }, 75 | getFirstBoard() { 76 | return db.get('boards') 77 | .first() 78 | .value() 79 | }, 80 | getList() { 81 | return db 82 | .get('boards') 83 | .cloneDeep() 84 | .value() 85 | }, 86 | addHubToEnd(boardId, type, title) { 87 | return db 88 | .get('boards') 89 | .getById(boardId) 90 | .get('hubs') 91 | .insert({ 92 | label: title, 93 | type: type, 94 | items: [] 95 | }) 96 | .write() 97 | }, 98 | getHubs(boardId) { 99 | return db 100 | .get('boards') 101 | .getById(boardId) 102 | .get('hubs') 103 | .cloneDeep() 104 | .value() 105 | }, 106 | getHubItems(boardId, hubId) { 107 | return db 108 | .get('boards') 109 | .getById(boardId) 110 | .get('hubs') 111 | .getById(hubId) 112 | .get('items') 113 | .cloneDeep() 114 | .value() 115 | }, 116 | addHubItem(boardId, hubId, path, label) { 117 | return db 118 | .get('boards') 119 | .getById(boardId) 120 | .get('hubs') 121 | .getById(hubId) 122 | .get('items') 123 | .insert({ 124 | path: path, 125 | label: label 126 | }) 127 | .write() 128 | }, 129 | removeHubItem(boardId, hubId, itemId) { 130 | db.get('boards') 131 | .getById(boardId) 132 | .get('hubs') 133 | .getById(hubId) 134 | .get('items') 135 | .remove({ id: itemId }) 136 | .write() 137 | }, 138 | removeHub(boardId, hubId) { 139 | db.get('boards') 140 | .getById(boardId) 141 | .get('hubs') 142 | .remove({ id: hubId }) 143 | .write() 144 | }, 145 | setHubLabel(boardId, hubId, label) { 146 | db.get('boards') 147 | .getById(boardId) 148 | .get('hubs') 149 | .getById(hubId) 150 | .set('label', label) 151 | .write() 152 | }, 153 | addHubNote(boardId, hubId, content) { 154 | return db 155 | .get('boards') 156 | .getById(boardId) 157 | .get('hubs') 158 | .getById(hubId) 159 | .get('items') 160 | .insert({ 161 | content: content 162 | }) 163 | .write() 164 | }, 165 | setHubItemContent(boardId, hubId, itemId, content) { 166 | db.get('boards') 167 | .getById(boardId) 168 | .get('hubs') 169 | .getById(hubId) 170 | .get('items') 171 | .getById(itemId) 172 | .set('content', content) 173 | .write() 174 | }, 175 | setHubItemLabel(boardId, hubId, itemId, content) { 176 | db.get('boards') 177 | .getById(boardId) 178 | .get('hubs') 179 | .getById(hubId) 180 | .get('items') 181 | .getById(itemId) 182 | .set('label', content) 183 | .write() 184 | }, 185 | removeHubNote(boardId, hubId, itemId) { 186 | db.get('boards') 187 | .getById(boardId) 188 | .get('hubs') 189 | .getById(hubId) 190 | .get('items') 191 | .remove({ id: itemId }) 192 | .write() 193 | }, 194 | setTodoIsDone(boardId, hubId, itemId, newVal) { 195 | db.get('boards') 196 | .getById(boardId) 197 | .get('hubs') 198 | .getById(hubId) 199 | .get('items') 200 | .getById(itemId) 201 | .set('isDone', newVal) 202 | .write() 203 | }, 204 | addHubTodoItem(boardId, hubId, content) { 205 | return db 206 | .get('boards') 207 | .getById(boardId) 208 | .get('hubs') 209 | .getById(hubId) 210 | .get('items') 211 | .insert({ 212 | content: content, 213 | isDone: false 214 | }) 215 | .write() 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/static/.gitkeep -------------------------------------------------------------------------------- /static/icons/menubar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/static/icons/menubar.png -------------------------------------------------------------------------------- /static/icons/pile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/static/icons/pile.ico -------------------------------------------------------------------------------- /static/icons/pile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imfing/pile/105bd1e4e1858267c6bdcaedf4ac5685fac0efda/static/icons/pile.png --------------------------------------------------------------------------------