-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Arpish00/feature/my-changes
Initial version of Electron app and updated README
- Loading branch information
Showing
7 changed files
with
943 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# Desktop-app | ||
## Electron Desktop App Prototype | ||
|
||
This is the first version of the Electron Desktop app that opens the OpenGenus IQ webpage. | ||
|
||
### Screenshot | ||
![Screenshot](screenshots/screenshot_first_version.png) | ||
|
||
##### Steps to run the Electron app: | ||
|
||
Clone the Repository: | ||
|
||
``` | ||
git clone https://github.com/OpenGenus/Desktop-app.git | ||
cd Desktop-app | ||
``` | ||
Install Dependencies: Make sure you have Node.js installed. Then, run: | ||
|
||
``` | ||
npm install | ||
``` | ||
Run the App: | ||
|
||
``` | ||
npm start | ||
``` | ||
This will launch the Electron application, and it should open the OpenGenus IQ webpage directly. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { app, BrowserWindow, screen } = require('electron'); | ||
|
||
function createWindow() { | ||
const { width, height } = screen.getPrimaryDisplay().workAreaSize; | ||
|
||
// Browser window | ||
const win = new BrowserWindow({ | ||
width: Math.floor(width * 0.8), | ||
height: Math.floor(height * 0.8), | ||
webPreferences: { | ||
nodeIntegration: false, | ||
}, | ||
}); | ||
|
||
// Load website | ||
win.loadURL('https://iq.opengenus.org/'); | ||
} | ||
|
||
app.whenReady().then(createWindow); | ||
|
||
// Quit when all windows are closed | ||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); |
Oops, something went wrong.