Skip to content

Commit

Permalink
Merge pull request #1 from Arpish00/feature/my-changes
Browse files Browse the repository at this point in the history
Initial version of Electron app and updated README
  • Loading branch information
AdiChat authored Nov 27, 2024
2 parents 5a33013 + a0f2f74 commit d467501
Show file tree
Hide file tree
Showing 7 changed files with 943 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
27 changes: 26 additions & 1 deletion README.md
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 added index.html
Empty file.
26 changes: 26 additions & 0 deletions index.js
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();
}
});
Loading

0 comments on commit d467501

Please sign in to comment.