mirror of
https://github.com/agam778/MS-365-Electron.git
synced 2026-02-17 09:02:10 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f4b117575 | ||
|
|
e41073386b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
/node_modules/
|
||||
/.idea/
|
||||
/yarn.lock
|
||||
/release/
|
||||
36
main.js
36
main.js
@@ -3,10 +3,9 @@ const { autoUpdater } = require("electron-updater");
|
||||
const isMac = process.platform === "darwin";
|
||||
const openAboutWindow = require("about-window").default;
|
||||
const isOnline = require("is-online");
|
||||
const Store = require("electron-store");
|
||||
const store = new Store();
|
||||
|
||||
const template = [
|
||||
// { role: 'appMenu' }
|
||||
...(isMac
|
||||
? [
|
||||
{
|
||||
@@ -25,6 +24,7 @@ const template = [
|
||||
},
|
||||
]
|
||||
: []),
|
||||
// { role: 'fileMenu' }
|
||||
{
|
||||
label: "Application",
|
||||
submenu: [
|
||||
@@ -38,7 +38,7 @@ const template = [
|
||||
copyright: "Copyright (c) 2021 Agampreet Singh Bajaj",
|
||||
package_json_dir: __dirname,
|
||||
bug_report_url:
|
||||
"https://github.com/agam778/MS-Office-Electron/issues/",
|
||||
"https://github.com/agam778/Microsoft-Office-Electron/issues/",
|
||||
bug_link_text: "Report an issue",
|
||||
adjust_window_size: "2",
|
||||
show_close_button: "Close",
|
||||
@@ -54,35 +54,13 @@ const template = [
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Open Normal version of MS Office",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set(
|
||||
"enterprise-or-normal",
|
||||
"https://agam778.github.io/MS-Office-Electron/loading"
|
||||
);
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") ===
|
||||
"https://agam778.github.io/MS-Office-Electron/loading",
|
||||
},
|
||||
{
|
||||
label: "Open Enterprise version of MS Office",
|
||||
type: "radio",
|
||||
click() {
|
||||
store.set("enterprise-or-normal", "https://office.com/?auth=2");
|
||||
},
|
||||
checked:
|
||||
store.get("enterprise-or-normal") === "https://office.com/?auth=2",
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
role: "quit",
|
||||
accelerator: process.platform === "darwin" ? "Ctrl+Q" : "Ctrl+Q",
|
||||
},
|
||||
],
|
||||
},
|
||||
// { role: 'editMenu' }
|
||||
{
|
||||
label: "Edit",
|
||||
submenu: [
|
||||
@@ -106,6 +84,7 @@ const template = [
|
||||
: [{ role: "delete" }, { type: "separator" }, { role: "selectAll" }]),
|
||||
],
|
||||
},
|
||||
// { role: 'viewMenu' }
|
||||
{
|
||||
label: "View",
|
||||
submenu: [
|
||||
@@ -122,6 +101,7 @@ const template = [
|
||||
{ role: "togglefullscreen" },
|
||||
],
|
||||
},
|
||||
// { role: 'windowMenu' }
|
||||
{
|
||||
label: "Window",
|
||||
submenu: [
|
||||
@@ -153,9 +133,9 @@ function createWindow() {
|
||||
},
|
||||
});
|
||||
|
||||
win.loadURL(`${store.get("enterprise-or-normal")}`, {
|
||||
win.loadURL("https://agam778.github.io/MS-Office-Electron/loading", {
|
||||
userAgent:
|
||||
"Mozilla/5.0 (x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
|
||||
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ms-office-electron",
|
||||
"version": "0.3.5",
|
||||
"version": "0.3.7",
|
||||
"description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.",
|
||||
"main": "main.js",
|
||||
"repository": {
|
||||
@@ -69,7 +69,7 @@
|
||||
},
|
||||
"author": {
|
||||
"name": "Agampreet Singh",
|
||||
"email": "agam778singh@outlook.com",
|
||||
"email": "agam778@zohomail.in",
|
||||
"url": "https://agam778.is-a.dev/"
|
||||
},
|
||||
"license": "MIT",
|
||||
@@ -79,7 +79,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"about-window": "^1.15.2",
|
||||
"electron-store": "^8.0.1",
|
||||
"electron-updater": "^4.3.9",
|
||||
"is-online": "^9.0.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user