bug with updater

This commit is contained in:
cupcakearmy 2021-05-31 18:58:23 +02:00
parent f1c0ab6dbb
commit 49afc7fccd
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
4 changed files with 773 additions and 1657 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.2] - 2021-05-31
### Fixed
- Bug with update window when banner is currently open
## [1.1.1] - 2021-05-28 ## [1.1.1] - 2021-05-28
### Added ### Added

View File

@ -11,7 +11,7 @@
"repository": { "repository": {
"url": "https://github.com/cupcakearmy/unpixel" "url": "https://github.com/cupcakearmy/unpixel"
}, },
"version": "1.1.1", "version": "1.1.2",
"main": "./dist/back/index.js", "main": "./dist/back/index.js",
"scripts": { "scripts": {
"start": "electron .", "start": "electron .",
@ -62,7 +62,7 @@
"electron": "^12.0.0", "electron": "^12.0.0",
"electron-builder": "^22.10.5", "electron-builder": "^22.10.5",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"parcel": "next", "parcel": "^2.0.0-beta.3.1",
"postcss": "^8.2.10", "postcss": "^8.2.10",
"typescript": "^4.2.3" "typescript": "^4.2.3"
} }

View File

@ -4,6 +4,7 @@ import logger from 'electron-log'
import { dialog, shell } from 'electron' import { dialog, shell } from 'electron'
import pkg from '../../package.json' import pkg from '../../package.json'
import Banner from './banner'
const current = semver.coerce(pkg.version) const current = semver.coerce(pkg.version)
const url = 'https://api.github.com/repos/cupcakearmy/unpixel/tags' const url = 'https://api.github.com/repos/cupcakearmy/unpixel/tags'
@ -25,7 +26,9 @@ export default class Updater {
if (!current) throw new Error('Could not determine current version') if (!current) throw new Error('Could not determine current version')
if (semver.lt(current, latest)) { if (semver.lt(current, latest)) {
logger.info('New version available') logger.info('New version available')
Banner.close()
dialog dialog
// @ts-ignore
.showMessageBox(null, { .showMessageBox(null, {
title: 'Update available', title: 'Update available',
message: 'A newer version is available, please download.', message: 'A newer version is available, please download.',

2417
yarn.lock

File diff suppressed because it is too large Load Diff