mirror of
https://github.com/sern-handler/gui
synced 2026-06-06 01:16:54 +00:00
chore: remove unused variables
This commit is contained in:
@@ -1,23 +1,8 @@
|
|||||||
import { app } from "electron"
|
import { app } from "electron"
|
||||||
import getPlatform from "./utils/getPlatform.js"
|
|
||||||
|
|
||||||
export default async function updateChecker() {
|
export default async function updateChecker() {
|
||||||
const currentOS = getPlatform()
|
|
||||||
const getLatest = await fetch('https://api.github.com/repos/sern-handler/gui/releases/latest')
|
const getLatest = await fetch('https://api.github.com/repos/sern-handler/gui/releases/latest')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
|
|
||||||
const dlUrl = getLatest.assets.map((asset) => {
|
|
||||||
switch (asset.content_type) {
|
|
||||||
case 'application/x-msdownload':
|
|
||||||
return 'windows'
|
|
||||||
case 'application/vnd.appimage':
|
|
||||||
return 'linux'
|
|
||||||
case 'application/x-apple-diskimage':
|
|
||||||
return 'macOS'
|
|
||||||
default:
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if (`v${app.getVersion()}` !== getLatest.tag_name) {
|
if (`v${app.getVersion()}` !== getLatest.tag_name) {
|
||||||
return { version: getLatest.tag_name as string, url: getLatest.html_url as string }
|
return { version: getLatest.tag_name as string, url: getLatest.html_url as string }
|
||||||
|
|||||||
Reference in New Issue
Block a user