From ddc0debc91cdb7695f625dca83c5c1dbc8cde166 Mon Sep 17 00:00:00 2001 From: Agampreet Singh <68941022+agam778@users.noreply.github.com> Date: Tue, 23 Mar 2021 13:03:02 +0530 Subject: [PATCH] Updated Files --- main.js | 41 ++++++++++++++++---------------- package.json | 14 +++++------ update.html | 62 ------------------------------------------------- updater.html | 8 ------- updatescript.js | 7 ------ 5 files changed, 27 insertions(+), 105 deletions(-) delete mode 100644 update.html delete mode 100644 updater.html delete mode 100644 updatescript.js diff --git a/main.js b/main.js index 12dfea6..564d294 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,6 @@ const { app, Menu, BrowserWindow } = require('electron') +const openAboutWindow = require('about-window').default; +const join = require('path').join; const isMac = process.platform === 'darwin' const template = [ @@ -19,33 +21,30 @@ const template = [ }] : []), // { role: 'fileMenu' } { - label: 'Application', + label: 'Microsoft Office - Electron', submenu: [ { label: 'About Microsoft Office - Electron', - click: async () => { - const { shell } = require('electron') - await shell.openExternal('https://github.com/agam778/Microsoft-Office-Electron') - } + click: () => + openAboutWindow({ + icon_path: 'https://github.com/agam778/Microsoft-Office-Electron/blob/main/icon2.png?raw=true', + product_name: 'Microsoft Office - Electron', + copyright: 'Copyright (c) 2021 Agampreet Singh Bajaj', + package_json_dir: __dirname, + bug_report_url: 'https://github.com/agam778/Microsoft-Office-Electron/issues/', + bug_link_text: 'Report an issue', + adjust_window_size: '2', + show_close_button: 'Close', + + }), }, { - label: 'Check for Updates...', + label: 'Learn More', click: async () => { - const { BrowserWindow } = require('electron') - const updatewin = new BrowserWindow({ - width: 650, - height: 600, - icon: './icon.ico', - webPreferences: { - nodeIntegration: true - } - }) - updatewin.setMenuBarVisibility(false) - - updatewin.loadURL('file:///updater.html', - {userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36'}); - } - }, + const { shell } = require('electron'); + await shell.openExternal('https://github.com/agam778/Microsoft-Office-Electron'); +} +}, {type:'separator'}, { role: 'quit', diff --git a/package.json b/package.json index be43b9a..da8d86f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "microsoft-office-electron", - "version": "1.0.0", + "version": "0.1.0", "description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", "main": "main.js", "repository": { @@ -9,14 +9,13 @@ }, "build": { "extraFiles": [ - "updater.html", - "update.html", "index.html", - "updatescript.js", "Intro Image.png", "Loading.gif", "icon.png", - "icon.ico" + "icon.ico", + "license.txt", + "icon2.png" ], "appId": "com.agampreet.microsoft-office-electron", "productName": "Microsoft Office - Electron", @@ -69,10 +68,11 @@ }, "license": "MIT", "devDependencies": { - "electron": "^12.0.0", - "electron-builder": "^22.10.5" + "electron": "^12.0.0", + "electron-builder": "^22.10.5" }, "dependencies": { + "about-window": "^1.14.0", "electron-updater": "^4.3.8" } } diff --git a/update.html b/update.html deleted file mode 100644 index ef956a1..0000000 --- a/update.html +++ /dev/null @@ -1,62 +0,0 @@ - - -
- -
-