Merge pull request #327 from NicolasConstant/topic_fix-icon

Topic fix icon
This commit is contained in:
Nicolas Constant 2020-10-05 02:30:12 +02:00 committed by GitHub
commit d720dc06a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -1,15 +1,28 @@
const { join } = require("path");
const { app, Menu, MenuItem, BrowserWindow, shell } = require("electron");
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win;
const globalAny = global;
if (process.env.NODE_ENV !== 'development') {
globalAny.__static = require('path').join(__dirname, '/assets/icons').replace(/\\/g, '\\\\');
}
function createWindow() {
// Create the browser window.
// Set icon
let icon = join(globalAny.__static, '/png/512x512.png');
if (process.platform === "win32") {
icon = join(globalAny.__static, '/win/icon.ico');
}
// Create the browser window
win = new BrowserWindow({
width: 377,
height: 800,
title: "Sengi",
icon: icon,
backgroundColor: "#131925",
useContentSize: true,
webPreferences: {

View File

@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "0.32.0",
"version": "0.32.1",
"license": "AGPL-3.0-or-later",
"main": "main-electron.js",
"description": "A multi-account desktop client for Mastodon and Pleroma",