mirror of
https://github.com/agam778/MS-365-Electron.git
synced 2026-02-17 09:02:10 +00:00
Updated Files
This commit is contained in:
41
main.js
41
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',
|
||||
|
||||
14
package.json
14
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"
|
||||
}
|
||||
}
|
||||
|
||||
62
update.html
62
update.html
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Check for Updates...</title>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css?family=Roboto:700');
|
||||
|
||||
body {
|
||||
margin:0px;
|
||||
font-family:'Roboto';
|
||||
text-align:center;
|
||||
}
|
||||
p {
|
||||
position:fixed;
|
||||
width:100%;
|
||||
bottom:30px;
|
||||
font-size:12px;
|
||||
color:#999;
|
||||
margin-top:200px;
|
||||
}
|
||||
.button {
|
||||
background-color: #4CAF50; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 16px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 4px 2px;
|
||||
transition-duration: 0.4s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button1 {
|
||||
background-color: white;
|
||||
color: black;
|
||||
border: 2px solid #4CAF50;
|
||||
}
|
||||
|
||||
.button1:hover {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<br>
|
||||
<img alt="Intro Image" src="./Intro Image.png" width="420" height="210">
|
||||
<br><br><br>
|
||||
<h2>You are currently running v1.0.0</h2>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
<script src="https://rawgit.com/hippich/bower-semver/master/semver.min.js"></script>
|
||||
<font size="6">Latest Release: <span id="result"></span></font><br><br><br>
|
||||
<a href="https://github.com/agam778/Microsoft-Office-Electron/releases" target="_blank"><button class="button button1">Click Here to Download <span id="result"></span></button></a>
|
||||
|
||||
<script src="./updatescript.js"></script>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Check for Updates...</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<iframe src="update.html" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
const gitHubPath = 'agam778/Microsoft-Office-Electron';
|
||||
const url = 'https://api.github.com/repos/' + gitHubPath + '/tags';
|
||||
|
||||
$.get(url).done(data => {
|
||||
const versions = data.sort((v1, v2) => semver.compare(v2.name, v1.name));
|
||||
$('#result').html(versions[0].name);
|
||||
});
|
||||
Reference in New Issue
Block a user