70 | )
71 | }
72 | }
73 |
74 | export default App
75 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | // Import parts of electron to use
4 | const { app, BrowserWindow } = require('electron')
5 | const path = require('path')
6 | const url = require('url')
7 |
8 | // Keep a global reference of the window object, if you don't, the window will
9 | // be closed automatically when the JavaScript object is garbage collected.
10 | let mainWindow
11 |
12 | // Keep a reference for dev mode
13 | let dev = false
14 |
15 | if (process.defaultApp || /[\\/]electron-prebuilt[\\/]/.test(process.execPath) || /[\\/]electron[\\/]/.test(process.execPath)) {
16 | dev = true
17 | }
18 |
19 | // Temporary fix broken high-dpi scale factor on Windows (125% scaling)
20 | // info: https://github.com/electron/electron/issues/9691
21 | if (process.platform === 'win32') {
22 | app.commandLine.appendSwitch('high-dpi-support', 'true')
23 | app.commandLine.appendSwitch('force-device-scale-factor', '1')
24 | }
25 |
26 | function createWindow() {
27 | // Create the browser window.
28 | mainWindow = new BrowserWindow({
29 | width: 1024,
30 | height: 768,
31 | show: false
32 | })
33 |
34 | // and load the index.html of the app.
35 | let indexPath
36 |
37 | if (dev && process.argv.indexOf('--noDevServer') === -1) {
38 | indexPath = url.format({
39 | protocol: 'http:',
40 | host: 'localhost:8080',
41 | pathname: 'index.html',
42 | slashes: true
43 | })
44 | } else {
45 | indexPath = url.format({
46 | protocol: 'file:',
47 | pathname: path.join(__dirname, 'dist', 'index.html'),
48 | slashes: true
49 | })
50 | }
51 |
52 | mainWindow.loadURL(indexPath)
53 |
54 | // Don't show until we are ready and loaded
55 | mainWindow.once('ready-to-show', () => {
56 | mainWindow.show()
57 |
58 | // Open the DevTools automatically if developing
59 | if (dev) {
60 | mainWindow.webContents.openDevTools()
61 | }
62 | })
63 |
64 | // Emitted when the window is closed.
65 | mainWindow.on('closed', function() {
66 | // Dereference the window object, usually you would store windows
67 | // in an array if your app supports multi windows, this is the time
68 | // when you should delete the corresponding element.
69 | mainWindow = null
70 | })
71 | }
72 |
73 | // This method will be called when Electron has finished
74 | // initialization and is ready to create browser windows.
75 | // Some APIs can only be used after this event occurs.
76 | app.on('ready', createWindow)
77 |
78 | // Quit when all windows are closed.
79 | app.on('window-all-closed', () => {
80 | // On macOS it is common for applications and their menu bar
81 | // to stay active until the user quits explicitly with Cmd + Q
82 | if (process.platform !== 'darwin') {
83 | app.quit()
84 | }
85 | })
86 |
87 | app.on('activate', () => {
88 | // On macOS it's common to re-create a window in the app when the
89 | // dock icon is clicked and there are no other windows open.
90 | if (mainWindow === null) {
91 | createWindow()
92 | }
93 | })
94 |
--------------------------------------------------------------------------------
/code-of-conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at deveroalex@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version].
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------