Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
Faelayis authored and actions-user committed Sep 20, 2021
1 parent 6452503 commit c2dacb3
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/updata.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
const process = require("process");
const {
app,
dialog,
Notification,
nativeImage,
} = require("electron");
const { app, dialog, Notification, nativeImage } = require("electron");
const log = require("electron-log");
const isDev = require("electron-is-dev");
const os = require("os");
Expand All @@ -19,30 +14,31 @@ let allow = true,
silent = Boolean,
Interval = Number;

var supportedPlatforms = ["darwin", "win32","linux"];
var supportedPlatforms = ["darwin", "win32", "linux"];
if (process.platform === "darwin" || process.platform === "win32") {
var { autoUpdater } = require('electron');
var { autoUpdater } = require("electron");
var userAgent = format(
"%s/%s (% s: %s)",
package.name,
package.version,
os.platform(),
os.arch()
);
var feedURL = `https://update.electronjs.org/${package.author.name
}/RPC-Pc-Status/${process.platform}-${process.arch}/${app.getVersion()}`;
var feedURL = `https://update.electronjs.org/${
package.author.name
}/RPC-Pc-Status/${process.platform}-${process.arch}/${app.getVersion()}`;
var requestHeaders = { "User-Agent": userAgent };
autoUpdater.setFeedURL(feedURL, requestHeaders);
updateon()
updateon();
} else if (process.platform === "linux") {
var { AppImageUpdater } = require('electron-updater');
var { AppImageUpdater } = require("electron-updater");
const options = {
provider: "github",
owner: `${package.author.name}`,
repo: "RPC-Pc-Status",
}
autoUpdater = new AppImageUpdater(options)
updateon()
};
autoUpdater = new AppImageUpdater(options);
updateon();
}

async function updateon() {
Expand Down

0 comments on commit c2dacb3

Please sign in to comment.