Skip to content

Commit

Permalink
Merge pull request #2 from DorvakOff/develop
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
DorvakOff authored Jan 9, 2024
2 parents 645f697 + 2aa9ec7 commit fb40295
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deezer-rpc",
"version": "1.0.1",
"version": "1.0.2",
"description": "Deezer integrated with the Discord Rich Presence.",
"main": "build/main.js",
"scripts": {
Expand All @@ -16,7 +16,7 @@
},
"build": {
"appId": "com.dorvak.deezerrpc",
"asar": "true",
"asar": false,
"productName": "DeezerRPC",
"icon": "./assets/images/deezer.png",
"files": [
Expand Down
8 changes: 5 additions & 3 deletions src/manager/title-bar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'path';
import { BrowserView, BrowserWindow, ipcMain } from 'electron';
import {BrowserView, BrowserWindow, dialog, ipcMain} from 'electron';

var titleBar: BrowserView | null = null;
let titleBar: BrowserView | null = null;

export function register() {
if (titleBar == null) {
Expand All @@ -22,7 +22,9 @@ export function register() {
height: 30
});

titleBar.webContents.loadFile(path.join(__dirname, '../assets/titleBar.html'));
titleBar.webContents.loadFile(path.join(__dirname, '../assets/titleBar.html')).catch((error) => {
dialog.showErrorBox('Error', error.message);
})

__mainWindow.setBrowserView(titleBar);
}
Expand Down
4 changes: 3 additions & 1 deletion src/preload/titlebar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ipcRenderer } from 'electron';
import { Color, Titlebar } from 'custom-electron-titlebar';
import path from "path";

window.addEventListener('DOMContentLoaded', () => {
createTitlebar();
Expand All @@ -11,7 +12,8 @@ function createTitlebar() {
onMinimize: () => ipcRenderer.send('window-minimize'),
onMaximize: () => ipcRenderer.send('window-maximize'),
onClose: () => ipcRenderer.send('window-close'),
isMaximized: () => ipcRenderer.sendSync('window-is-maximized')
isMaximized: () => ipcRenderer.sendSync('window-is-maximized'),
icon: path.join(__dirname, '../assets/images/deezer.png'),
});

titlebar.updateTitle('Deezer');
Expand Down
2 changes: 1 addition & 1 deletion src/utils/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function checkVersion(fromUser: boolean) {
checkboxChecked: !Preferences.getPreference<boolean>(APP.preferences.checkUpdates)
}).then(result => {
if (result.response == 0) {
shell.openExternal(`${json.homepage}/releases/tag/${json.version}`);
shell.openExternal(`${json.homepage}/releases/latest`);
}

Preferences.setPreference(APP.preferences.checkUpdates, !result.checkboxChecked)
Expand Down

0 comments on commit fb40295

Please sign in to comment.