├── .babelrc ├── .dockerignore ├── .electron-vue ├── build.js ├── dev-client.js ├── dev-runner.js ├── webpack.main.config.js ├── webpack.renderer.config.js └── webpack.web.config.js ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── appveyor.yml ├── build └── icons │ ├── 512x512.png │ ├── icon.icns │ └── icon.ico ├── dist ├── electron │ └── .gitkeep └── web │ └── .gitkeep ├── package-lock.json ├── package.json ├── src ├── index.ejs ├── main │ ├── index.dev.js │ └── index.js └── renderer │ ├── App.vue │ ├── components │ ├── Clock.vue │ ├── Featured.vue │ ├── History.vue │ └── LayoutLoader.vue │ ├── layouts │ └── novosga.default.vue │ ├── main.js │ ├── pages │ ├── Home.vue │ └── Settings.vue │ ├── router │ └── index.js │ ├── services │ ├── api.js │ ├── audio.js │ ├── speech.js │ └── storage.js │ ├── store │ ├── actions.js │ ├── getters.js │ ├── index.js │ ├── modules │ │ ├── auth.js │ │ ├── index.js │ │ └── settings.js │ └── mutations.js │ └── util │ └── functions.js └── static ├── .gitkeep ├── css └── app.css ├── i18n ├── en.json ├── es.json └── pt_BR.json ├── images └── logo.png └── sound └── alert ├── README.md ├── airport-bingbong.wav ├── ding-dong.wav ├── doorbell-bingbong.wav ├── ekiga-vm.wav ├── infobleep.wav ├── quito-mariscal-sucre.wav └── toydoorbell.wav /.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 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | dist/electron/* 3 | dist/web/* 4 | build/* 5 | dist/* 6 | !build/icons 7 | node_modules/ 8 | npm-debug.log 9 | npm-debug.log.* 10 | thumbs.db 11 | !.gitkeep 12 | -------------------------------------------------------------------------------- /.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 | config.mode = 'production' 76 | webpack(config, (err, stats) => { 77 | if (err) reject(err.stack || err) 78 | else if (stats.hasErrors()) { 79 | let err = '' 80 | 81 | stats.toString({ 82 | chunks: false, 83 | colors: true 84 | }) 85 | .split(/\r?\n/) 86 | .forEach(line => { 87 | err += ` ${line}\n` 88 | }) 89 | 90 | reject(err) 91 | } else { 92 | resolve(stats.toString({ 93 | chunks: false, 94 | colors: true 95 | })) 96 | } 97 | }) 98 | }) 99 | } 100 | 101 | function web () { 102 | del.sync(['dist/web/*', '!.gitkeep']) 103 | webConfig.mode = 'production' 104 | webpack(webConfig, (err, stats) => { 105 | if (err || stats.hasErrors()) console.log(err) 106 | 107 | console.log(stats.toString({ 108 | chunks: false, 109 | colors: true 110 | })) 111 | 112 | process.exit() 113 | }) 114 | } 115 | 116 | function greeting () { 117 | const cols = process.stdout.columns 118 | let text = '' 119 | 120 | if (cols > 85) text = 'lets-build' 121 | else if (cols > 60) text = 'lets-|build' 122 | else text = false 123 | 124 | if (text && !isCI) { 125 | say(text, { 126 | colors: ['yellow'], 127 | font: 'simple3d', 128 | space: false 129 | }) 130 | } else console.log(chalk.yellow.bold('\n lets-build')) 131 | console.log() 132 | } -------------------------------------------------------------------------------- /.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 | rendererConfig.mode = 'development' 45 | const compiler = webpack(rendererConfig) 46 | hotMiddleware = webpackHotMiddleware(compiler, { 47 | log: false, 48 | heartbeat: 2500 49 | }) 50 | 51 | compiler.hooks.compilation.tap('compilation', compilation => { 52 | compilation.hooks.htmlWebpackPluginAfterEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => { 53 | hotMiddleware.publish({ action: 'reload' }) 54 | cb() 55 | }) 56 | }) 57 | 58 | compiler.hooks.done.tap('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 | mainConfig.mode = 'development' 84 | const compiler = webpack(mainConfig) 85 | 86 | compiler.hooks.watchRun.tapAsync('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 | var args = [ 118 | '--inspect=5858', 119 | path.join(__dirname, '../dist/electron/main.js') 120 | ] 121 | 122 | // detect yarn or npm and process commandline args accordingly 123 | if (process.env.npm_execpath.endsWith('yarn.js')) { 124 | args = args.concat(process.argv.slice(3)) 125 | } else if (process.env.npm_execpath.endsWith('npm-cli.js')) { 126 | args = args.concat(process.argv.slice(2)) 127 | } 128 | 129 | electronProcess = spawn(electron, args) 130 | 131 | electronProcess.stdout.on('data', data => { 132 | electronLog(data, 'blue') 133 | }) 134 | electronProcess.stderr.on('data', data => { 135 | electronLog(data, 'red') 136 | }) 137 | 138 | electronProcess.on('close', () => { 139 | if (!manualRestart) process.exit() 140 | }) 141 | } 142 | 143 | function electronLog (data, color) { 144 | let log = '' 145 | data = data.toString().split(/\r?\n/) 146 | data.forEach(line => { 147 | log += ` ${line}\n` 148 | }) 149 | if (/[0-9A-z]+/.test(log)) { 150 | console.log( 151 | chalk[color].bold('┏ Electron -------------------') + 152 | '\n\n' + 153 | log + 154 | chalk[color].bold('┗ ----------------------------') + 155 | '\n' 156 | ) 157 | } 158 | } 159 | 160 | function greeting () { 161 | const cols = process.stdout.columns 162 | let text = '' 163 | 164 | if (cols > 104) text = 'electron-vue' 165 | else if (cols > 76) text = 'electron-|vue' 166 | else text = false 167 | 168 | if (text) { 169 | say(text, { 170 | colors: ['yellow'], 171 | font: 'simple3d', 172 | space: false 173 | }) 174 | } else console.log(chalk.yellow.bold('\n electron-vue')) 175 | console.log(chalk.blue(' getting ready...') + '\n') 176 | } 177 | 178 | function init () { 179 | greeting() 180 | 181 | Promise.all([startRenderer(), startMain()]) 182 | .then(() => { 183 | startElectron() 184 | }) 185 | .catch(err => { 186 | console.error(err) 187 | }) 188 | } 189 | 190 | init() 191 | -------------------------------------------------------------------------------- /.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 MinifyPlugin = require("babel-minify-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 | enforce: 'pre', 23 | exclude: /node_modules/, 24 | use: { 25 | loader: 'eslint-loader', 26 | options: { 27 | formatter: require('eslint-friendly-formatter') 28 | } 29 | } 30 | }, 31 | { 32 | test: /\.js$/, 33 | use: 'babel-loader', 34 | exclude: /node_modules/ 35 | }, 36 | { 37 | test: /\.node$/, 38 | use: 'node-loader' 39 | } 40 | ] 41 | }, 42 | node: { 43 | __dirname: process.env.NODE_ENV !== 'production', 44 | __filename: process.env.NODE_ENV !== 'production' 45 | }, 46 | output: { 47 | filename: '[name].js', 48 | libraryTarget: 'commonjs2', 49 | path: path.join(__dirname, '../dist/electron') 50 | }, 51 | plugins: [ 52 | new webpack.NoEmitOnErrorsPlugin() 53 | ], 54 | resolve: { 55 | extensions: ['.js', '.json', '.node'] 56 | }, 57 | target: 'electron-main' 58 | } 59 | 60 | /** 61 | * Adjust mainConfig for development settings 62 | */ 63 | if (process.env.NODE_ENV !== 'production') { 64 | mainConfig.plugins.push( 65 | new webpack.DefinePlugin({ 66 | '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"` 67 | }) 68 | ) 69 | } 70 | 71 | /** 72 | * Adjust mainConfig for production settings 73 | */ 74 | if (process.env.NODE_ENV === 'production') { 75 | mainConfig.plugins.push( 76 | new MinifyPlugin(), 77 | new webpack.DefinePlugin({ 78 | 'process.env.NODE_ENV': '"production"' 79 | }) 80 | ) 81 | } 82 | 83 | module.exports = mainConfig 84 | -------------------------------------------------------------------------------- /.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 MinifyPlugin = require("babel-minify-webpack-plugin") 10 | const CopyWebpackPlugin = require('copy-webpack-plugin') 11 | const MiniCssExtractPlugin = require('mini-css-extract-plugin') 12 | const HtmlWebpackPlugin = require('html-webpack-plugin') 13 | const { VueLoaderPlugin } = require('vue-loader') 14 | 15 | /** 16 | * List of node_modules to include in webpack bundle 17 | * 18 | * Required for specific packages like Vue UI libraries 19 | * that provide pure *.vue files that need compiling 20 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals 21 | */ 22 | let whiteListedModules = ['vue'] 23 | 24 | let rendererConfig = { 25 | devtool: '#cheap-module-eval-source-map', 26 | entry: { 27 | renderer: path.join(__dirname, '../src/renderer/main.js') 28 | }, 29 | externals: [ 30 | ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)) 31 | ], 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.(js|vue)$/, 36 | enforce: 'pre', 37 | exclude: /node_modules/, 38 | use: { 39 | loader: 'eslint-loader', 40 | options: { 41 | formatter: require('eslint-friendly-formatter') 42 | } 43 | } 44 | }, 45 | { 46 | test: /\.scss$/, 47 | use: ['vue-style-loader', 'css-loader', 'sass-loader'] 48 | }, 49 | { 50 | test: /\.sass$/, 51 | use: ['vue-style-loader', 'css-loader', 'sass-loader?indentedSyntax'] 52 | }, 53 | { 54 | test: /\.less$/, 55 | use: ['vue-style-loader', 'css-loader', 'less-loader'] 56 | }, 57 | { 58 | test: /\.css$/, 59 | use: ['vue-style-loader', 'css-loader'] 60 | }, 61 | { 62 | test: /\.html$/, 63 | use: 'vue-html-loader' 64 | }, 65 | { 66 | test: /\.js$/, 67 | use: 'babel-loader', 68 | exclude: /node_modules/ 69 | }, 70 | { 71 | test: /\.node$/, 72 | use: 'node-loader' 73 | }, 74 | { 75 | test: /\.vue$/, 76 | use: { 77 | loader: 'vue-loader', 78 | options: { 79 | extractCSS: process.env.NODE_ENV === 'production', 80 | loaders: { 81 | sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1', 82 | scss: 'vue-style-loader!css-loader!sass-loader', 83 | less: 'vue-style-loader!css-loader!less-loader' 84 | } 85 | } 86 | } 87 | }, 88 | { 89 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 90 | use: { 91 | loader: 'url-loader', 92 | query: { 93 | limit: 10000, 94 | name: 'imgs/[name]--[folder].[ext]' 95 | } 96 | } 97 | }, 98 | { 99 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 100 | loader: 'url-loader', 101 | options: { 102 | limit: 10000, 103 | name: 'media/[name]--[folder].[ext]' 104 | } 105 | }, 106 | { 107 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 108 | use: { 109 | loader: 'url-loader', 110 | query: { 111 | limit: 10000, 112 | name: 'fonts/[name]--[folder].[ext]' 113 | } 114 | } 115 | } 116 | ] 117 | }, 118 | node: { 119 | __dirname: process.env.NODE_ENV !== 'production', 120 | __filename: process.env.NODE_ENV !== 'production' 121 | }, 122 | plugins: [ 123 | new VueLoaderPlugin(), 124 | new MiniCssExtractPlugin({filename: 'styles.css'}), 125 | new HtmlWebpackPlugin({ 126 | filename: 'index.html', 127 | template: path.resolve(__dirname, '../src/index.ejs'), 128 | templateParameters(compilation, assets, options) { 129 | return { 130 | compilation: compilation, 131 | webpack: compilation.getStats().toJson(), 132 | webpackConfig: compilation.options, 133 | htmlWebpackPlugin: { 134 | files: assets, 135 | options: options, 136 | }, 137 | process, 138 | }; 139 | }, 140 | minify: { 141 | collapseWhitespace: true, 142 | removeAttributeQuotes: true, 143 | removeComments: true 144 | }, 145 | nodeModules: process.env.NODE_ENV !== 'production' 146 | ? path.resolve(__dirname, '../node_modules') 147 | : false 148 | }), 149 | new webpack.HotModuleReplacementPlugin(), 150 | new webpack.NoEmitOnErrorsPlugin() 151 | ], 152 | output: { 153 | filename: '[name].js', 154 | libraryTarget: 'commonjs2', 155 | path: path.join(__dirname, '../dist/electron') 156 | }, 157 | resolve: { 158 | alias: { 159 | '@': path.join(__dirname, '../src/renderer'), 160 | 'vue$': 'vue/dist/vue.esm.js' 161 | }, 162 | extensions: ['.js', '.vue', '.json', '.css', '.node'] 163 | }, 164 | target: 'electron-renderer' 165 | } 166 | 167 | /** 168 | * Adjust rendererConfig for development settings 169 | */ 170 | if (process.env.NODE_ENV !== 'production') { 171 | rendererConfig.plugins.push( 172 | new webpack.DefinePlugin({ 173 | '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"` 174 | }) 175 | ) 176 | } 177 | 178 | /** 179 | * Adjust rendererConfig for production settings 180 | */ 181 | if (process.env.NODE_ENV === 'production') { 182 | rendererConfig.devtool = '' 183 | 184 | rendererConfig.plugins.push( 185 | new MinifyPlugin(), 186 | new CopyWebpackPlugin([ 187 | { 188 | from: path.join(__dirname, '../static'), 189 | to: path.join(__dirname, '../dist/electron/static'), 190 | ignore: ['.*'] 191 | } 192 | ]), 193 | new webpack.DefinePlugin({ 194 | 'process.env.NODE_ENV': '"production"' 195 | }), 196 | new webpack.LoaderOptionsPlugin({ 197 | minimize: true 198 | }) 199 | ) 200 | } 201 | 202 | module.exports = rendererConfig 203 | -------------------------------------------------------------------------------- /.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 MinifyPlugin = require("babel-minify-webpack-plugin") 9 | const CopyWebpackPlugin = require('copy-webpack-plugin') 10 | const MiniCssExtractPlugin = require('mini-css-extract-plugin') 11 | const HtmlWebpackPlugin = require('html-webpack-plugin') 12 | const { VueLoaderPlugin } = require('vue-loader') 13 | 14 | let webConfig = { 15 | devtool: '#cheap-module-eval-source-map', 16 | entry: { 17 | web: path.join(__dirname, '../src/renderer/main.js') 18 | }, 19 | module: { 20 | rules: [ 21 | { 22 | test: /\.(js|vue)$/, 23 | enforce: 'pre', 24 | exclude: /node_modules/, 25 | use: { 26 | loader: 'eslint-loader', 27 | options: { 28 | formatter: require('eslint-friendly-formatter') 29 | } 30 | } 31 | }, 32 | { 33 | test: /\.scss$/, 34 | use: ['vue-style-loader', 'css-loader', 'sass-loader'] 35 | }, 36 | { 37 | test: /\.sass$/, 38 | use: ['vue-style-loader', 'css-loader', 'sass-loader?indentedSyntax'] 39 | }, 40 | { 41 | test: /\.less$/, 42 | use: ['vue-style-loader', 'css-loader', 'less-loader'] 43 | }, 44 | { 45 | test: /\.css$/, 46 | use: ['vue-style-loader', 'css-loader'] 47 | }, 48 | { 49 | test: /\.html$/, 50 | use: 'vue-html-loader' 51 | }, 52 | { 53 | test: /\.js$/, 54 | use: 'babel-loader', 55 | include: [ path.resolve(__dirname, '../src/renderer') ], 56 | exclude: /node_modules/ 57 | }, 58 | { 59 | test: /\.vue$/, 60 | use: { 61 | loader: 'vue-loader', 62 | options: { 63 | extractCSS: true, 64 | loaders: { 65 | sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1', 66 | scss: 'vue-style-loader!css-loader!sass-loader', 67 | less: 'vue-style-loader!css-loader!less-loader' 68 | } 69 | } 70 | } 71 | }, 72 | { 73 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 74 | use: { 75 | loader: 'url-loader', 76 | query: { 77 | limit: 10000, 78 | name: 'imgs/[name].[ext]' 79 | } 80 | } 81 | }, 82 | { 83 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 84 | use: { 85 | loader: 'url-loader', 86 | query: { 87 | limit: 10000, 88 | name: 'fonts/[name].[ext]' 89 | } 90 | } 91 | } 92 | ] 93 | }, 94 | plugins: [ 95 | new VueLoaderPlugin(), 96 | new MiniCssExtractPlugin({filename: 'styles.css'}), 97 | new HtmlWebpackPlugin({ 98 | filename: 'index.html', 99 | template: path.resolve(__dirname, '../src/index.ejs'), 100 | minify: { 101 | collapseWhitespace: true, 102 | removeAttributeQuotes: true, 103 | removeComments: true 104 | }, 105 | nodeModules: false 106 | }), 107 | new webpack.DefinePlugin({ 108 | 'process.env.IS_WEB': 'true' 109 | }), 110 | new webpack.HotModuleReplacementPlugin(), 111 | new webpack.NoEmitOnErrorsPlugin() 112 | ], 113 | output: { 114 | filename: '[name].js', 115 | path: path.join(__dirname, '../dist/web') 116 | }, 117 | resolve: { 118 | alias: { 119 | '@': path.join(__dirname, '../src/renderer'), 120 | 'vue$': 'vue/dist/vue.esm.js' 121 | }, 122 | extensions: ['.js', '.vue', '.json', '.css'] 123 | }, 124 | target: 'web' 125 | } 126 | 127 | /** 128 | * Adjust webConfig for production settings 129 | */ 130 | if (process.env.NODE_ENV === 'production') { 131 | webConfig.devtool = '' 132 | 133 | webConfig.plugins.push( 134 | new MinifyPlugin(), 135 | new CopyWebpackPlugin([ 136 | { 137 | from: path.join(__dirname, '../static'), 138 | to: path.join(__dirname, '../dist/web/static'), 139 | ignore: ['.*'] 140 | } 141 | ]), 142 | new webpack.DefinePlugin({ 143 | 'process.env.NODE_ENV': '"production"' 144 | }), 145 | new webpack.LoaderOptionsPlugin({ 146 | minimize: true 147 | }) 148 | ) 149 | } 150 | 151 | module.exports = webConfig 152 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/.eslintignore -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | env: { 8 | browser: true, 9 | node: true 10 | }, 11 | extends: 'standard', 12 | globals: { 13 | __static: true 14 | }, 15 | plugins: [ 16 | 'html' 17 | ], 18 | 'rules': { 19 | // allow paren-less arrow functions 20 | 'arrow-parens': 0, 21 | // allow async-await 22 | 'generator-star-spacing': 0, 23 | // allow debugger during development 24 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - name: Log in to the Container registry 15 | uses: docker/login-action@v2.1.0 16 | with: 17 | username: ${{ secrets.DOCKER_HUB_USER }} 18 | password: ${{ secrets.DOCKER_HUB_TOKEN }} 19 | 20 | - name: Extract metadata (tags, labels) for Docker 21 | id: meta 22 | uses: docker/metadata-action@v4.3.0 23 | with: 24 | images: ${{ github.repository }} 25 | 26 | - name: Build and push Docker image 27 | uses: docker/build-push-action@v4.0.0 28 | with: 29 | context: . 30 | push: true 31 | tags: ${{ steps.meta.outputs.tags }} 32 | labels: ${{ steps.meta.outputs.labels }} 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | dist/electron/* 3 | dist/web/* 4 | build/* 5 | dist/* 6 | !build/icons 7 | node_modules/ 8 | npm-debug.log 9 | npm-debug.log.* 10 | thumbs.db 11 | !.gitkeep 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8 AS build 2 | 3 | WORKDIR /app 4 | 5 | COPY . /app 6 | 7 | RUN npm install && \ 8 | npm run build:web 9 | 10 | FROM nginx:alpine 11 | 12 | COPY --from=build --chown=nginx:nginx /app/dist/web /usr/share/nginx/html 13 | 14 | EXPOSE 80 15 | 16 | CMD ["nginx", "-g", "daemon off;"] 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Rogerio Lino 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Painel Web 2 | 3 | Este repositório possui o código do Painel de exibição de senhas do [NovoSGA](http://github.com/novosga/novosga), podendo utilizar-se dos releases disponíveis ou editar o código e personalizá-lo caso queira. 4 | 5 | Caso possua alguma sugestão de melhoria, fique a vontade de criar um pull request! 6 | 7 | ---- 8 | 9 | This repository has the code of panel of [NovoSGA](http://github.com/novosga/novosga), you can use the available releases or edit the code and customize it if you want. 10 | 11 | If you have any suggestions for improvement, feel free to create a pull request! 12 | 13 | ---- 14 | 15 | ## Build Setup 16 | 17 | ``` bash 18 | # install dependencies 19 | npm install 20 | 21 | # serve with hot reload at localhost:8080 22 | npm run dev 23 | 24 | # build for production with minification 25 | npm run build 26 | ``` 27 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2017 2 | 3 | platform: 4 | - x64 5 | 6 | artifacts: 7 | - path: build\win-unpacked 8 | name: painel-web-$(appveyor_build_version)-x64-win 9 | type: zip 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 run build 28 | 29 | test: off 30 | 31 | #deploy: 32 | # description: "Painel Web $(appveyor_build_version)" 33 | # provider: GitHub 34 | # draft: true 35 | # prerelease: true 36 | # auth_token: 37 | # secure: jAoBlzSLWDwiDEs7yaPJHvPr3rzz1+lyZw5n4XQfdQayg3qbWWGq+44+zOLyodha 38 | # artifact: "build\\painel-web-$(appveyor_build_version)-x64-win.zip" 39 | # on: 40 | # appveyor_repo_tag: true 41 | -------------------------------------------------------------------------------- /build/icons/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/build/icons/512x512.png -------------------------------------------------------------------------------- /build/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/build/icons/icon.icns -------------------------------------------------------------------------------- /build/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/build/icons/icon.ico -------------------------------------------------------------------------------- /dist/electron/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/dist/electron/.gitkeep -------------------------------------------------------------------------------- /dist/web/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/dist/web/.gitkeep -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "painel-web", 3 | "description": "Novo SGA panel", 4 | "license": "MIT", 5 | "version": "2.1.0", 6 | "homepage": "http://novosga.org", 7 | "author": { 8 | "name": "Rogerio Lino", 9 | "email": "rogeriolino@gmail.com", 10 | "url": "http://rogeriolino.com" 11 | }, 12 | "main": "./dist/electron/main.js", 13 | "scripts": { 14 | "build": "node .electron-vue/build.js && electron-builder", 15 | "build:dir": "node .electron-vue/build.js && electron-builder --dir", 16 | "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", 17 | "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js", 18 | "dev": "node .electron-vue/dev-runner.js", 19 | "lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src", 20 | "lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src", 21 | "pack": "npm run pack:main && npm run pack:renderer", 22 | "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js", 23 | "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js", 24 | "postinstall": "npm run lint:fix" 25 | }, 26 | "build": { 27 | "productName": "Painel Web", 28 | "appId": "org.novosga.painel-web", 29 | "directories": { 30 | "output": "build" 31 | }, 32 | "files": [ 33 | "dist/electron/**/*" 34 | ], 35 | "dmg": { 36 | "contents": [ 37 | { 38 | "x": 410, 39 | "y": 150, 40 | "type": "link", 41 | "path": "/Applications" 42 | }, 43 | { 44 | "x": 130, 45 | "y": 150, 46 | "type": "file" 47 | } 48 | ] 49 | }, 50 | "mac": { 51 | "icon": "build/icons/icon.icns" 52 | }, 53 | "win": { 54 | "icon": "build/icons/icon.ico" 55 | }, 56 | "linux": { 57 | "target": "AppImage", 58 | "icon": "build/icons", 59 | "category": "Utility" 60 | } 61 | }, 62 | "dependencies": { 63 | "axios": "^0.18.0", 64 | "axios-retry": "^3.1.9", 65 | "bulma": "^0.7.1", 66 | "font-awesome": "^4.7.0", 67 | "moment": "^2.18.1", 68 | "promise-queue": "^2.2.3", 69 | "vue": "^2.5.16", 70 | "vue-electron": "^1.0.6", 71 | "vue-router": "^3.0.1", 72 | "vue-swal": "0.0.6", 73 | "vuex": "^3.0.1", 74 | "vuex-electron": "^1.0.0" 75 | }, 76 | "devDependencies": { 77 | "ajv": "^6.5.0", 78 | "babel-core": "^6.26.3", 79 | "babel-loader": "^7.1.4", 80 | "babel-plugin-transform-runtime": "^6.23.0", 81 | "babel-preset-env": "^1.7.0", 82 | "babel-preset-stage-0": "^6.24.1", 83 | "babel-register": "^6.26.0", 84 | "babel-minify-webpack-plugin": "^0.3.1", 85 | "cfonts": "^2.1.2", 86 | "chalk": "^2.4.1", 87 | "copy-webpack-plugin": "^4.5.1", 88 | "cross-env": "^5.1.6", 89 | "css-loader": "^0.28.11", 90 | "del": "^3.0.0", 91 | "devtron": "^1.4.0", 92 | "electron": "^7.2.4", 93 | "electron-debug": "^1.5.0", 94 | "electron-devtools-installer": "^2.2.4", 95 | "electron-builder": "^20.19.2", 96 | "babel-eslint": "^8.2.3", 97 | "eslint": "^4.19.1", 98 | "eslint-friendly-formatter": "^4.0.1", 99 | "eslint-loader": "^2.0.0", 100 | "eslint-plugin-html": "^4.0.3", 101 | "eslint-config-standard": "^11.0.0", 102 | "eslint-plugin-import": "^2.12.0", 103 | "eslint-plugin-node": "^6.0.1", 104 | "eslint-plugin-promise": "^3.8.0", 105 | "eslint-plugin-standard": "^3.1.0", 106 | "mini-css-extract-plugin": "0.4.0", 107 | "file-loader": "^1.1.11", 108 | "html-webpack-plugin": "^3.2.0", 109 | "multispinner": "^0.2.1", 110 | "node-loader": "^0.6.0", 111 | "node-sass": "^4.12.0", 112 | "sass-loader": "^7.0.3", 113 | "style-loader": "^0.21.0", 114 | "url-loader": "^1.0.1", 115 | "vue-html-loader": "^1.2.4", 116 | "vue-loader": "^15.2.4", 117 | "vue-style-loader": "^4.1.0", 118 | "vue-template-compiler": "^2.5.16", 119 | "webpack-cli": "^3.0.8", 120 | "webpack": "^4.15.1", 121 | "webpack-dev-server": ">=3.1.11", 122 | "webpack-hot-middleware": "^2.22.2", 123 | "webpack-merge": "^4.1.3" 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Panel App | Novo SGA 6 | <% if (htmlWebpackPlugin.options.nodeModules) { %> 7 | 8 | 11 | <% } %> 12 | 13 | 14 |
15 | 16 | <% if (!process.browser) { %> 17 | 20 | <% } %> 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /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 | // Install `electron-debug` with `devtron` 11 | require('electron-debug')({ showDevTools: true }) 12 | 13 | // Install `vue-devtools` 14 | require('electron').app.on('ready', () => { 15 | let installExtension = require('electron-devtools-installer') 16 | installExtension.default(installExtension.VUEJS_DEVTOOLS) 17 | .then(() => {}) 18 | .catch(err => { 19 | console.log('Unable to install `vue-devtools`: \n', err) 20 | }) 21 | }) 22 | 23 | // Require `main` process to boot app 24 | require('./index') -------------------------------------------------------------------------------- /src/main/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import { app, BrowserWindow, Menu } from 'electron' 4 | 5 | /** 6 | * Set `__static` path to static files in production 7 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html 8 | */ 9 | if (process.env.NODE_ENV !== 'development') { 10 | global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') 11 | } 12 | 13 | let mainWindow 14 | const winURL = process.env.NODE_ENV === 'development' 15 | ? `http://localhost:9080` 16 | : `file://${__dirname}/index.html` 17 | 18 | function createWindow () { 19 | const fullscreen = process.argv.indexOf('--fullscreen') !== -1 20 | 21 | /** 22 | * Initial window options 23 | */ 24 | mainWindow = new BrowserWindow({ 25 | useContentSize: true, 26 | fullscreen: fullscreen, 27 | webPreferences: { 28 | nodeIntegration: true 29 | } 30 | }) 31 | 32 | mainWindow.loadURL(winURL) 33 | 34 | mainWindow.on('closed', () => { 35 | mainWindow = null 36 | }) 37 | 38 | mainWindow.maximize() 39 | 40 | const template = [ 41 | { 42 | label: 'View', 43 | submenu: [ 44 | { 45 | label: 'Settings', 46 | click () { 47 | if (mainWindow.webContents) { 48 | mainWindow.webContents.send('navigate', '/settings') 49 | } 50 | } 51 | }, 52 | {type: 'separator'}, 53 | {role: 'reload'}, 54 | {role: 'forcereload'}, 55 | {role: 'toggledevtools'}, 56 | {type: 'separator'}, 57 | {role: 'togglefullscreen'} 58 | ] 59 | }, 60 | { role: 'editMenu' }, 61 | { 62 | role: 'window', 63 | submenu: [ 64 | {role: 'minimize'}, 65 | {role: 'close'} 66 | ] 67 | }, 68 | { 69 | role: 'help', 70 | submenu: [ 71 | { 72 | label: 'About', 73 | click () { require('electron').shell.openExternal('http://novosga.org') } 74 | } 75 | ] 76 | } 77 | ] 78 | 79 | if (!fullscreen) { 80 | const menu = Menu.buildFromTemplate(template) 81 | Menu.setApplicationMenu(menu) 82 | } 83 | } 84 | 85 | app.on('ready', createWindow) 86 | 87 | app.on('window-all-closed', () => { 88 | if (process.platform !== 'darwin') { 89 | app.quit() 90 | } 91 | }) 92 | 93 | app.on('activate', () => { 94 | if (mainWindow === null) { 95 | createWindow() 96 | } 97 | }) 98 | 99 | /** 100 | * Auto Updater 101 | * 102 | * Uncomment the following code below and install `electron-updater` to 103 | * support auto updating. Code Signing with a valid certificate is required. 104 | * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating 105 | */ 106 | 107 | /* 108 | import { autoUpdater } from 'electron-updater' 109 | 110 | autoUpdater.on('update-downloaded', () => { 111 | autoUpdater.quitAndInstall() 112 | }) 113 | 114 | app.on('ready', () => { 115 | if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates() 116 | }) 117 | */ 118 | -------------------------------------------------------------------------------- /src/renderer/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 17 | -------------------------------------------------------------------------------- /src/renderer/components/Clock.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 82 | -------------------------------------------------------------------------------- /src/renderer/components/Featured.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 67 | -------------------------------------------------------------------------------- /src/renderer/components/History.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 58 | -------------------------------------------------------------------------------- /src/renderer/components/LayoutLoader.vue: -------------------------------------------------------------------------------- 1 | 163 | -------------------------------------------------------------------------------- /src/renderer/layouts/novosga.default.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 113 | 114 | 194 | -------------------------------------------------------------------------------- /src/renderer/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios' 3 | import VueSwal from 'vue-swal' 4 | 5 | import App from './App' 6 | import store from './store' 7 | import router from './router' 8 | 9 | if (!process.env.IS_WEB) Vue.use(require('vue-electron')) 10 | Vue.http = Vue.prototype.$http = axios 11 | Vue.config.productionTip = false 12 | 13 | Vue.use(VueSwal) 14 | 15 | Vue.filter('trans', (value) => { 16 | return store.state.dict[value] || value 17 | }) 18 | 19 | /* eslint-disable no-new */ 20 | new Vue({ 21 | components: { App }, 22 | router, 23 | store, 24 | template: '', 25 | beforeCreate () { 26 | this.$store.dispatch('loadConfig') 27 | }, 28 | mounted () { 29 | if (this.$electron) { 30 | this.$electron.ipcRenderer.on('navigate', (e, routePath) => { 31 | this.$router.push(routePath) 32 | }) 33 | } 34 | } 35 | }).$mount('#app') 36 | -------------------------------------------------------------------------------- /src/renderer/pages/Home.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 26 | 27 | 45 | -------------------------------------------------------------------------------- /src/renderer/pages/Settings.vue: -------------------------------------------------------------------------------- 1 | 511 | 512 | 698 | 699 | 707 | -------------------------------------------------------------------------------- /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: 'home', 11 | component: require('@/pages/Home').default 12 | }, 13 | { 14 | path: '/settings', 15 | name: 'settings', 16 | component: require('@/pages/Settings').default 17 | }, 18 | { 19 | path: '*', 20 | redirect: '/' 21 | } 22 | ] 23 | }) 24 | -------------------------------------------------------------------------------- /src/renderer/services/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import axiosRetry from 'axios-retry' 3 | 4 | class Client { 5 | constructor (server, moduleName, retries) { 6 | let host = server + '' 7 | 8 | if (!host.endsWith('/')) { 9 | host += '/' 10 | } 11 | 12 | if (moduleName) { 13 | host += moduleName + '/' 14 | } 15 | 16 | if (retries) { 17 | this.retries = retries 18 | } 19 | 20 | this.endpoint = host + 'api' 21 | } 22 | 23 | request (url, config) { 24 | config.withCredentials = true 25 | 26 | // Set auto-retry for network failed requests 27 | axiosRetry(axios, { 28 | retries: this.retries || 5, 29 | retryDelay: axiosRetry.exponentialDelay 30 | }) 31 | 32 | return new Promise((resolve, reject) => { 33 | axios 34 | .request(`${this.endpoint}${url}`, config) 35 | .then(response => { 36 | resolve(response.data) 37 | }, error => { 38 | let message = error.message 39 | if (error.response) { 40 | message = error.response.statusText 41 | if (error.response.data && error.response.data.error_description) { 42 | message += ': ' + error.response.data.error_description 43 | } 44 | } 45 | reject(message) 46 | }) 47 | }) 48 | } 49 | 50 | info (token) { 51 | const config = { 52 | headers: { 53 | Authorization: 'Bearer ' + token 54 | } 55 | } 56 | return this.request('', config) 57 | } 58 | 59 | unities (token) { 60 | const config = { 61 | headers: { 62 | Authorization: 'Bearer ' + token 63 | } 64 | } 65 | return this.request(`/unidades`, config) 66 | } 67 | 68 | services (token, unityId) { 69 | const config = { 70 | headers: { 71 | Authorization: 'Bearer ' + token 72 | } 73 | } 74 | return this.request(`/unidades/${unityId}/servicos`, config) 75 | } 76 | 77 | messages (token, unity, services) { 78 | const id = typeof (unity) === 'object' ? unity.id : unity 79 | const config = { 80 | headers: { 81 | Authorization: 'Bearer ' + token 82 | }, 83 | params: { 84 | servicos: services.map(s => parseInt(s, 10)).filter(s => s > 0).join(',') 85 | } 86 | } 87 | return this.request(`/unidades/${id}/painel`, config) 88 | } 89 | } 90 | 91 | export { Client } 92 | -------------------------------------------------------------------------------- /src/renderer/services/audio.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 4 | alertPath: 'static/sound', 5 | 6 | alertsAvailable: { 7 | 'Default': 'ekiga-vm.wav', 8 | 'Airport Bingbong': 'airport-bingbong.wav', 9 | 'Ding dong': 'ding-dong.wav', 10 | 'Doorbell Bingbong': 'doorbell-bingbong.wav', 11 | 'Info bleep': 'infobleep.wav', 12 | 'Quito Mariscal sucre': 'quito-mariscal-sucre.wav', 13 | 'Toy doorbell': 'toydoorbell.wav' 14 | }, 15 | 16 | playAlert (filename) { 17 | return new Promise((resolve, reject) => { 18 | filename = filename || this.alertsAvailable.Default 19 | 20 | const audio = new Audio() 21 | audio.src = `${this.alertPath}/alert/${filename}` 22 | audio.onended = resolve 23 | audio.onerror = reject 24 | audio.play() 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/renderer/services/speech.js: -------------------------------------------------------------------------------- 1 | 2 | function speechQueue (speech, texts, lang, index) { 3 | return new Promise((resolve, reject) => { 4 | if (texts.length === 0 || index >= texts.length) { 5 | resolve() 6 | return 7 | } 8 | 9 | let text = texts[index] 10 | speech(text, lang).then(() => { 11 | speechQueue(speech, texts, lang, index + 1) 12 | .then(resolve) 13 | .catch(reject) 14 | }, reject) 15 | }) 16 | } 17 | 18 | export default { 19 | 20 | speech (text, lang) { 21 | return new Promise((resolve, reject) => { 22 | const msg = new SpeechSynthesisUtterance() 23 | msg.text = text 24 | msg.lang = (lang || '').replace('_', '-').toLowerCase() 25 | 26 | msg.onerror = reject 27 | msg.onend = resolve 28 | 29 | speechSynthesis.speak(msg) 30 | }) 31 | }, 32 | 33 | speechAll (texts, lang) { 34 | return speechQueue(this.speech, texts, lang, 0) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/renderer/services/storage.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 4 | storagePrefixKey: 'painel-web.v2.', 5 | 6 | get (name, defaultValue) { 7 | const json = localStorage.getItem(this.storagePrefixKey + name) 8 | let data 9 | try { 10 | data = JSON.parse(json) 11 | } catch (e) { 12 | data = defaultValue 13 | } 14 | return data 15 | }, 16 | 17 | set (name, value) { 18 | const str = JSON.stringify(value) 19 | localStorage.setItem(this.storagePrefixKey + name, str) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/renderer/store/actions.js: -------------------------------------------------------------------------------- 1 | import { Client } from '@/services/api' 2 | import storage from '@/services/storage' 3 | 4 | function normalizeMessage (data) { 5 | return { 6 | id: data.id, 7 | type: 'ticket', 8 | title: data.siglaSenha + ('000' + data.numeroSenha).slice(-3), 9 | subtitle: data.local + ' ' + ('00' + data.numeroLocal).slice(-2), 10 | description: data.prioridade, 11 | $data: data 12 | } 13 | } 14 | 15 | export const loadConfig = ({ commit }) => { 16 | const config = storage.get('config', {}) 17 | commit('updateConfig', config) 18 | } 19 | 20 | export const saveConfig = ({ commit }, config) => { 21 | commit('updateConfig', config) 22 | } 23 | 24 | export const fetchApiInfo = ({ commit, rootState }) => { 25 | return new Promise((resolve, reject) => { 26 | const api = new Client(rootState.config.server) 27 | api 28 | .info(rootState.auth.accessToken) 29 | .then(data => { 30 | commit('updateApiInfo', data) 31 | resolve() 32 | }, error => { 33 | reject(error) 34 | }) 35 | }) 36 | } 37 | 38 | export const fetchMessages = ({ state, commit }) => { 39 | return new Promise((resolve, reject) => { 40 | const api = new Client(state.config.server, null, state.config.retries) 41 | api 42 | .messages(state.auth.accessToken, state.config.unity, state.config.services) 43 | .then(messages => { 44 | if (messages.length) { 45 | const last = normalizeMessage(messages[0]) 46 | commit('newMessage', last) 47 | } 48 | resolve() 49 | }, reject) 50 | .catch(reject) 51 | }) 52 | } 53 | -------------------------------------------------------------------------------- /src/renderer/store/getters.js: -------------------------------------------------------------------------------- 1 | 2 | export const theme = state => { 3 | return 'Default' 4 | } 5 | 6 | export const message = state => { 7 | let message = state.messages[0] 8 | if (!message) { 9 | message = { 10 | id: 0, 11 | title: '', 12 | subtitle: '', 13 | description: '' 14 | } 15 | } 16 | return message 17 | } 18 | 19 | export const apiInfo = state => { 20 | return state.apiInfo 21 | } 22 | 23 | export const history = state => { 24 | return state.messages.slice(1) 25 | } 26 | -------------------------------------------------------------------------------- /src/renderer/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import * as getters from './getters' 4 | import * as actions from './actions' 5 | import mutations from './mutations' 6 | import modules from './modules' 7 | 8 | Vue.use(Vuex) 9 | 10 | const state = { 11 | config: {}, 12 | dict: {}, 13 | apiInfo: {}, 14 | messages: [ 15 | /* 16 | { 17 | id, 18 | type, 19 | title 20 | } 21 | */ 22 | ] 23 | } 24 | 25 | const store = new Vuex.Store({ 26 | state, 27 | getters, 28 | actions, 29 | mutations, 30 | modules, 31 | strict: process.env.NODE_ENV !== 'production' 32 | }) 33 | 34 | export default store 35 | -------------------------------------------------------------------------------- /src/renderer/store/modules/auth.js: -------------------------------------------------------------------------------- 1 | import { Client } from '@/services/api' 2 | import storage from '@/services/storage' 3 | import moment from 'moment' 4 | 5 | const accessTokenKey = 'access_token' 6 | const refreshTokenKey = 'refresh_token' 7 | const expireDateKey = 'expire_date' 8 | 9 | const state = { 10 | accessToken: storage.get(accessTokenKey), 11 | refreshToken: storage.get(refreshTokenKey), 12 | expireDate: storage.get(expireDateKey) 13 | } 14 | 15 | const getters = { 16 | isAuthenticated (state) { 17 | return !!state.accessToken 18 | }, 19 | isExpired (state) { 20 | const dt1 = moment(state.expireDate) 21 | const dt2 = moment() 22 | return !state.expireDate || (dt1 <= dt2) 23 | } 24 | } 25 | 26 | const mutations = { 27 | updateToken (state, token) { 28 | if (!token) { 29 | token = { 30 | access_token: null, 31 | refresh_token: null 32 | } 33 | } 34 | 35 | state.accessToken = token.access_token 36 | state.refreshToken = token.refresh_token 37 | state.expireDate = null 38 | 39 | if (token.expires_in) { 40 | // expiration time minus 5 minutes 41 | const secs = 5 * 60 42 | const dt = moment().add(token.expires_in - secs, 's') 43 | state.expireDate = dt.format() 44 | } 45 | 46 | storage.set(accessTokenKey, state.accessToken) 47 | storage.set(refreshTokenKey, state.refreshToken) 48 | storage.set(expireDateKey, state.expireDate) 49 | } 50 | } 51 | 52 | const actions = { 53 | token ({ state, commit, rootState }) { 54 | return new Promise((resolve, reject) => { 55 | try { 56 | const server = rootState.config.server 57 | const clientId = rootState.config.clientId 58 | const clientSecret = rootState.config.clientSecret 59 | const username = rootState.config.username 60 | const password = rootState.config.password 61 | 62 | if (!server) { 63 | throw new Error('No server host') 64 | } 65 | 66 | if (!clientId || !clientSecret) { 67 | throw new Error('No client credential') 68 | } 69 | if (!username || !password) { 70 | throw new Error('No username and password') 71 | } 72 | 73 | var params = new URLSearchParams() 74 | params.append('grant_type', 'password') 75 | params.append('client_id', clientId) 76 | params.append('client_secret', clientSecret) 77 | params.append('username', username) 78 | params.append('password', password) 79 | 80 | const api = new Client(rootState.config.server) 81 | 82 | api 83 | .request('/token', { method: 'POST', data: params }) 84 | .then(data => { 85 | commit('updateToken', data) 86 | resolve(data) 87 | }, error => { 88 | reject(error) 89 | }) 90 | } catch (e) { 91 | reject(e) 92 | } 93 | }) 94 | }, 95 | 96 | refresh ({ state, commit, rootState }) { 97 | return new Promise((resolve, reject) => { 98 | var params = new URLSearchParams() 99 | params.append('grant_type', 'refresh_token') 100 | params.append('client_id', rootState.config.clientId) 101 | params.append('client_secret', rootState.config.clientSecret) 102 | params.append('refresh_token', state.refreshToken) 103 | 104 | const api = new Client(rootState.config.server) 105 | 106 | api 107 | .request('/token', { method: 'POST', data: params }) 108 | .then(data => { 109 | commit('updateToken', data) 110 | resolve(data) 111 | }, error => { 112 | reject(error) 113 | }) 114 | }) 115 | } 116 | } 117 | 118 | export default { 119 | state, 120 | getters, 121 | actions, 122 | mutations 123 | } 124 | -------------------------------------------------------------------------------- /src/renderer/store/modules/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The file enables `@/store/index.js` to import all vuex modules 3 | * in a one-shot manner. There should not be any reason to edit this file. 4 | */ 5 | 6 | const files = require.context('.', false, /\.js$/) 7 | const modules = {} 8 | 9 | files.keys().forEach(key => { 10 | if (key === './index.js') return 11 | modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default 12 | }) 13 | 14 | export default modules 15 | -------------------------------------------------------------------------------- /src/renderer/store/modules/settings.js: -------------------------------------------------------------------------------- 1 | import { Client } from '@/services/api' 2 | 3 | const state = { 4 | unities: [], 5 | services: [], 6 | availableThemes: [ 7 | { 8 | id: 'novosga.default', 9 | name: 'Default', 10 | options: [ 11 | { 12 | name: 'logo', 13 | label: 'Logo', 14 | type: 'url', 15 | required: false, 16 | placeholder: 'https://' 17 | }, 18 | { 19 | name: 'footerText', 20 | label: 'Footer text', 21 | type: 'text', 22 | required: false, 23 | placeholder: '' 24 | } 25 | ] 26 | } 27 | ] 28 | } 29 | 30 | const getters = { 31 | getTheme: (state) => (id) => { 32 | const theme = state.availableThemes.find(t => t.id === id) 33 | return theme 34 | } 35 | } 36 | 37 | const mutations = { 38 | updateUnities (state, unities) { 39 | state.unities = unities 40 | }, 41 | 42 | updateServices (state, services) { 43 | state.services = services 44 | } 45 | } 46 | 47 | const actions = { 48 | fetchUnities ({ state, commit, rootState }) { 49 | return new Promise((resolve, reject) => { 50 | const api = new Client(rootState.config.server) 51 | api 52 | .unities(rootState.auth.accessToken) 53 | .then(data => { 54 | commit('updateUnities', data) 55 | resolve() 56 | }, error => { 57 | reject(error) 58 | }) 59 | }) 60 | }, 61 | 62 | fetchServices ({ state, commit, rootState }, unityId) { 63 | commit('updateServices', []) 64 | 65 | if (!unityId) { 66 | return Promise.resolve() 67 | } 68 | 69 | return new Promise((resolve, reject) => { 70 | const api = new Client(rootState.config.server) 71 | api 72 | .services(rootState.auth.accessToken, unityId) 73 | .then(data => { 74 | commit('updateServices', data) 75 | resolve() 76 | }, error => { 77 | reject(error) 78 | }) 79 | }) 80 | } 81 | } 82 | 83 | export default { 84 | state, 85 | getters, 86 | actions, 87 | mutations 88 | } 89 | -------------------------------------------------------------------------------- /src/renderer/store/mutations.js: -------------------------------------------------------------------------------- 1 | import storage from '@/services/storage' 2 | 3 | const HISTORY_MAX_LENGTH = 5 4 | 5 | function equals (m1, m2) { 6 | return m1.type === m2.type && m1.title === m2.title 7 | } 8 | 9 | export default { 10 | updateConfig (state, config) { 11 | config = config || {} 12 | state.config = config 13 | storage.set('config', config) 14 | 15 | const locale = config.locale || 'en' 16 | 17 | state.dict = require(`../../../static/i18n/${locale}.json`) 18 | }, 19 | 20 | updateApiInfo (state, apiInfo) { 21 | state.apiInfo = apiInfo || {} 22 | }, 23 | 24 | newMessage (state, message) { 25 | if (state.messages.length) { 26 | const last = state.messages[0] 27 | if (last.id === message.id) { 28 | return 29 | } 30 | 31 | // prevent multiple messages of same type+title 32 | for (let i = 0; i < state.messages.length; i++) { 33 | let m = state.messages[i] 34 | if (equals(m, message)) { 35 | state.messages.splice(state.messages.indexOf(m), 1) 36 | break 37 | } 38 | } 39 | } 40 | 41 | state.messages.unshift(message) 42 | 43 | if (state.messages.length > HISTORY_MAX_LENGTH) { 44 | state.messages.pop() 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/renderer/util/functions.js: -------------------------------------------------------------------------------- 1 | 2 | const debug = true 3 | 4 | export function log () { 5 | if (debug) { 6 | console.log.apply(null, arguments) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/.gitkeep -------------------------------------------------------------------------------- /static/css/app.css: -------------------------------------------------------------------------------- 1 | h1.brand { 2 | text-align: center; 3 | padding: 2rem 0 !important; 4 | } 5 | 6 | .ui.left.fixed.vertical.inverted.menu { 7 | padding-left: 0; 8 | padding-right: 0; 9 | } 10 | 11 | .ui.main.grid { 12 | width: 100%; 13 | padding-left: 20rem; 14 | } -------------------------------------------------------------------------------- /static/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu.settings": "Settings", 3 | "menu.go_back": "Back", 4 | "menu.general": "General", 5 | "menu.interface": "Interface", 6 | "menu.server": "Server", 7 | "menu.services": "Services", 8 | "menu.sound": "Sound", 9 | "history.title": "History", 10 | "history.empty": "Empty", 11 | "settings.title": "Settings", 12 | "settings.subtitle": "Panel settings", 13 | "settings.interface.theme_options": "Theme options", 14 | "settings.interface.colors": "Colors", 15 | "settings.label.theme": "Theme", 16 | "settings.label.page_bg_color_normal": "Page background (Normal)", 17 | "settings.label.page_font_color_normal": "Page font (Normal)", 18 | "settings.label.page_bg_color_priority": "Page background (Priority)", 19 | "settings.label.page_font_color_priority": "Page font (Priority)", 20 | "settings.label.featured_font_color_normal": "Fonte da senha (Normal)", 21 | "settings.label.featured_font_color_priority": "Fonte da senha (Prioridade)", 22 | "settings.label.history_font_color_normal": "Fonte do histórico (Normal)", 23 | "settings.label.history_font_color_priority": "Fonte do histórico (Prioridade)", 24 | "settings.label.sidebar_bg_color_normal": "Sidebar background (Normal)", 25 | "settings.label.sidebar_font_color_normal": "Sidebar font (Normal)", 26 | "settings.label.sidebar_bg_color_priority": "Sidebar background (Priority)", 27 | "settings.label.sidebar_font_color_priority": "Sidebar font (Priority)", 28 | "settings.label.footer_bg_color_normal": "Footer background (Normal)", 29 | "settings.label.footer_font_color_normal": "Footer font (Normal)", 30 | "settings.label.footer_bg_color_priority": "Footer background (Priority)", 31 | "settings.label.footer_font_color_priority": "Footer font (Priority)", 32 | "settings.label.clock_bg_color_normal": "Clock background (Normal)", 33 | "settings.label.clock_font_color_normal": "Clock font (Normal)", 34 | "settings.label.clock_bg_color_priority": "Clock background (Priority)", 35 | "settings.label.clock_font_color_priority": "Clock font (Priority)", 36 | "settings.label.locale": "Locale", 37 | "settings.label.server": "Server", 38 | "settings.label.username": "Username", 39 | "settings.label.password": "Password", 40 | "settings.label.client_id": "Client ID", 41 | "settings.label.client_secret": "Client Secret", 42 | "settings.label.unity": "Unity", 43 | "settings.label.services": "Services", 44 | "settings.label.alert": "Alert", 45 | "settings.label.speech_enabled": "Speach", 46 | "settings.label.retries": "Retries before show network error", 47 | "settings.btn.save": "Save", 48 | "settings.services.empty": "Empty", 49 | "date_format": "MMMM Do YYYY" 50 | } 51 | -------------------------------------------------------------------------------- /static/i18n/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu.settings": "Configuración", 3 | "menu.go_back": "Volver", 4 | "menu.general": "General", 5 | "menu.interface": "Interface", 6 | "menu.server": "Servidor", 7 | "menu.services": "Servicios", 8 | "menu.sound": "Sonido", 9 | "history.title": "Historial", 10 | "history.empty": "Vacío", 11 | "settings.title": "Configuración", 12 | "settings.subtitle": "Panel de configuración", 13 | "settings.interface.theme_options": "Opções do tema", 14 | "settings.interface.colors": "Colores", 15 | "settings.label.theme": "Tema", 16 | "settings.label.page_bg_color_normal": "Fondo de la páginad (Normal)", 17 | "settings.label.page_font_color_normal": "Fuente de la página (Normal)", 18 | "settings.label.page_bg_color_priority": "Fondo de la página (Prioridad)", 19 | "settings.label.page_font_color_priority": "Fuente de la página (Prioridad)", 20 | "settings.label.featured_font_color_normal": "Fonte da senha (Normal)", 21 | "settings.label.featured_font_color_priority": "Fonte da senha (Prioridade)", 22 | "settings.label.history_font_color_normal": "Fonte do histórico (Normal)", 23 | "settings.label.history_font_color_priority": "Fonte do histórico (Prioridade)", 24 | "settings.label.sidebar_bg_color_normal": "Fondo de la barra (Normal)", 25 | "settings.label.sidebar_font_color_normal": "Fuente de la barra (Normal)", 26 | "settings.label.sidebar_bg_color_priority": "Fondo de la barra (Prioridad)", 27 | "settings.label.sidebar_font_color_priority": "Fuente de la barra (Prioridad)", 28 | "settings.label.footer_bg_color_normal": "Fondo del pie (Normal)", 29 | "settings.label.footer_font_color_normal": "Fuente del pie (Normal)", 30 | "settings.label.footer_bg_color_priority": "Fondo del pie (Prioridad)", 31 | "settings.label.footer_font_color_priority": "Fuente del pie (Prioridad)", 32 | "settings.label.clock_bg_color_normal": "Fondo del reloj (Normal)", 33 | "settings.label.clock_font_color_normal": "Fuente del reloj (Normal)", 34 | "settings.label.clock_bg_color_priority": "Fondo del reloj (Prioridad)", 35 | "settings.label.clock_font_color_priority": "Fuente del reloj (Prioridad)", 36 | "settings.label.locale": "Idioma", 37 | "settings.label.server": "Servidor", 38 | "settings.label.username": "Usuario", 39 | "settings.label.password": "Contraseña", 40 | "settings.label.client_id": "Client ID", 41 | "settings.label.client_secret": "Client Secret", 42 | "settings.label.unity": "Unidad", 43 | "settings.label.services": "Servicios", 44 | "settings.label.alert": "Alerta", 45 | "settings.label.speech_enabled": "Vocalizar", 46 | "settings.btn.save": "Guardar", 47 | "settings.services.empty": "Vacío", 48 | "date_format": "DD [de] MMMM [de] YYYY" 49 | } 50 | -------------------------------------------------------------------------------- /static/i18n/pt_BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu.settings": "Configurações", 3 | "menu.go_back": "Voltar", 4 | "menu.general": "Geral", 5 | "menu.interface": "Interface", 6 | "menu.server": "Servidor", 7 | "menu.services": "Serviços", 8 | "menu.sound": "Som", 9 | "history.title": "Histórico", 10 | "history.empty": "Vazio", 11 | "settings.title": "Configurações", 12 | "settings.subtitle": "Configurações do painel", 13 | "settings.interface.theme_options": "Opções do tema", 14 | "settings.interface.colors": "Cores", 15 | "settings.label.theme": "Tema", 16 | "settings.label.page_bg_color_normal": "Fundo da página (Normal)", 17 | "settings.label.page_font_color_normal": "Fonte da página (Normal)", 18 | "settings.label.page_bg_color_priority": "Fundo da página (Prioridade)", 19 | "settings.label.page_font_color_priority": "Fonte da página (Prioridade)", 20 | "settings.label.featured_font_color_normal": "Fonte da senha (Normal)", 21 | "settings.label.featured_font_color_priority": "Fonte da senha (Prioridade)", 22 | "settings.label.history_font_color_normal": "Fonte do histórico (Normal)", 23 | "settings.label.history_font_color_priority": "Fonte do histórico (Prioridade)", 24 | "settings.label.sidebar_bg_color_normal": "Fundo da lateral (Normal)", 25 | "settings.label.sidebar_font_color_normal": "Fonte da lateral (Normal)", 26 | "settings.label.sidebar_bg_color_priority": "Fundo da lateral (Prioridade)", 27 | "settings.label.sidebar_font_color_priority": "Fonte da lateral (Prioridade)", 28 | "settings.label.footer_bg_color_normal": "Fundo do rodapé (Normal)", 29 | "settings.label.footer_font_color_normal": "Fonte do rodapé (Normal)", 30 | "settings.label.footer_bg_color_priority": "Fundo do rodapé (Prioridade)", 31 | "settings.label.footer_font_color_priority": "Fonte do rodapé (Prioridade)", 32 | "settings.label.clock_bg_color_normal": "Fundo do relógio (Normal)", 33 | "settings.label.clock_font_color_normal": "Fonte do relógio (Normal)", 34 | "settings.label.clock_bg_color_priority": "Fundo do relógio (Prioridade)", 35 | "settings.label.clock_font_color_priority": "Fonte do relógio (Prioridade)", 36 | "settings.label.locale": "Idioma", 37 | "settings.label.server": "Servidor", 38 | "settings.label.username": "Usuário", 39 | "settings.label.password": "Senha", 40 | "settings.label.client_id": "Client ID", 41 | "settings.label.client_secret": "Client Secret", 42 | "settings.label.unity": "Unidade", 43 | "settings.label.services": "Serviços", 44 | "settings.label.alert": "Alerta", 45 | "settings.label.speech_enabled": "Vocalizar", 46 | "settings.label.retries": "Tentativas antes de exibir erro de rede", 47 | "settings.btn.save": "Salvar", 48 | "settings.services.empty": "Nenhum serviço", 49 | "date_format": "DD [de] MMMM [de] YYYY" 50 | } 51 | -------------------------------------------------------------------------------- /static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/images/logo.png -------------------------------------------------------------------------------- /static/sound/alert/README.md: -------------------------------------------------------------------------------- 1 | Sounds by freesound.org 2 | 3 | 4 | doorbell-bingbong.wav 5 | http://www.freesound.org/people/Benboncan/sounds/76925/ 6 | 7 | toydoorbell.wav 8 | http://www.freesound.org/people/AMPUL/sounds/29726/ 9 | 10 | ding-dong.wav 11 | http://www.freesound.org/people/2887679652/sounds/171755/ 12 | 13 | quito-mariscal-sucre.wav 14 | http://www.freesound.org/people/milton./sounds/81085/ 15 | 16 | infobleep.wav 17 | http://www.freesound.org/people/Divinux/sounds/198414/ 18 | 19 | airport-bingbong.wav 20 | http://www.freesound.org/people/Benboncan/sounds/93646/ -------------------------------------------------------------------------------- /static/sound/alert/airport-bingbong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/airport-bingbong.wav -------------------------------------------------------------------------------- /static/sound/alert/ding-dong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/ding-dong.wav -------------------------------------------------------------------------------- /static/sound/alert/doorbell-bingbong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/doorbell-bingbong.wav -------------------------------------------------------------------------------- /static/sound/alert/ekiga-vm.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/ekiga-vm.wav -------------------------------------------------------------------------------- /static/sound/alert/infobleep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/infobleep.wav -------------------------------------------------------------------------------- /static/sound/alert/quito-mariscal-sucre.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/quito-mariscal-sucre.wav -------------------------------------------------------------------------------- /static/sound/alert/toydoorbell.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/novosga/panel-app/e862b80a69a0c9ceee2c52b672f7a26b6976b912/static/sound/alert/toydoorbell.wav --------------------------------------------------------------------------------