mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2026-04-02 20:35:22 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1c0ab6dbb | |||
| 53c16e7063 | |||
| 2606214e53 | |||
| f5ecebb61a | |||
| 3129030d00 |
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -2,9 +2,6 @@ name: Main
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*.*.*"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -5,6 +5,17 @@ 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.1] - 2021-05-28
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Restore focus to previous window when closing banner
|
||||||
|
- Responsive image
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Settings page not opening
|
||||||
|
|
||||||
## [1.1.0] - 2021-05-15
|
## [1.1.0] - 2021-05-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ Alternatively you can run `yarn build` and the `yarn electron-builder -m` for `m
|
|||||||
1. Bump version in `package.json`
|
1. Bump version in `package.json`
|
||||||
2. Update `CHANGELOG.md`
|
2. Update `CHANGELOG.md`
|
||||||
3. Create a draft release with the new version. (e.g. tag with `v1.2.3`).
|
3. Create a draft release with the new version. (e.g. tag with `v1.2.3`).
|
||||||
4. Push to `main` and github workflow will build and upload assets to the draft matching the version of `package.json` and draft.
|
4. Start the publish action and the ci will build and upload assets to the draft matching the version of `package.json` and draft.
|
||||||
|
|||||||
BIN
assets/tray.png
BIN
assets/tray.png
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 16 KiB |
@@ -11,7 +11,7 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/cupcakearmy/unpixel"
|
"url": "https://github.com/cupcakearmy/unpixel"
|
||||||
},
|
},
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"main": "./dist/back/index.js",
|
"main": "./dist/back/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import os from 'os'
|
import os from 'os'
|
||||||
import { BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
|
import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import logger from 'electron-log'
|
import logger from 'electron-log'
|
||||||
import ms from 'ms'
|
import ms from 'ms'
|
||||||
@@ -64,6 +64,9 @@ export default class Banner {
|
|||||||
static close() {
|
static close() {
|
||||||
if (this.window) {
|
if (this.window) {
|
||||||
Settings.save('lastRun', Date.now())
|
Settings.save('lastRun', Date.now())
|
||||||
|
this.window.minimize()
|
||||||
|
this.window.hide()
|
||||||
|
if (process.platform === 'darwin') app.hide()
|
||||||
this.window.close()
|
this.window.close()
|
||||||
this.window = null
|
this.window = null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default class Settings {
|
|||||||
|
|
||||||
static open() {
|
static open() {
|
||||||
if (this.win) return
|
if (this.win) return
|
||||||
Settings.win = new BrowserWindow({
|
this.win = new BrowserWindow({
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 630,
|
height: 630,
|
||||||
center: true,
|
center: true,
|
||||||
@@ -74,20 +74,21 @@ export default class Settings {
|
|||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
this.win.on('closed', () => (this.win = null))
|
||||||
|
|
||||||
const entry = join(__dirname, '../front/settings/index.html')
|
const entry = join(__dirname, '../front/settings/index.html')
|
||||||
Settings.win.loadFile(entry)
|
this.win.loadFile(entry)
|
||||||
Settings.win.setMenu(null)
|
this.win.setMenu(null)
|
||||||
|
|
||||||
if (DEV) {
|
if (DEV) {
|
||||||
Settings.win.setSize(800, 485)
|
this.win.setSize(800, 485)
|
||||||
Settings.win.setResizable(true)
|
this.win.setResizable(true)
|
||||||
Settings.win.webContents.openDevTools()
|
this.win.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getStatus(): [boolean, number] {
|
static getStatus(): [boolean, number] {
|
||||||
const paused: number = Settings.load('paused')
|
const paused: number = this.load('paused')
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
if (paused > now) {
|
if (paused > now) {
|
||||||
return [true, paused - now]
|
return [true, paused - now]
|
||||||
|
|||||||
@@ -61,11 +61,10 @@ export default class TrayUtility {
|
|||||||
static init() {
|
static init() {
|
||||||
if (!this.tray) {
|
if (!this.tray) {
|
||||||
const file = path.join(__dirname, '../../assets/tray.png')
|
const file = path.join(__dirname, '../../assets/tray.png')
|
||||||
const icon = nativeImage.createFromPath(file).resize({
|
const resized = nativeImage.createFromPath(file).resize({ width: 24, height: 24 })
|
||||||
width: 24,
|
resized.setTemplateImage(true)
|
||||||
height: 24,
|
resized.isMacTemplateImage = true
|
||||||
})
|
this.tray = new Tray(resized)
|
||||||
this.tray = new Tray(icon)
|
|
||||||
this.build()
|
this.build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user