mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
de-async-ifying stuff = tray fixed!
This commit is contained in:
parent
48fa62d75d
commit
0621a5710c
@ -23,7 +23,7 @@ module.exports = {
|
|||||||
'https://camo.githubusercontent.com/5c5bca9e987d986b8cc7e51066f90c6f8a84af08/68747470733a2f2f63646e2e646973636f72646170702e636f6d2f6174746163686d656e74732f3733313634373938343332333931393933332f3733313732373235393239353032333132342f494d475f323137302e6a7067',
|
'https://camo.githubusercontent.com/5c5bca9e987d986b8cc7e51066f90c6f8a84af08/68747470733a2f2f63646e2e646973636f72646170702e636f6d2f6174746163686d656e74732f3733313634373938343332333931393933332f3733313732373235393239353032333132342f494d475f323137302e6a7067',
|
||||||
options: [],
|
options: [],
|
||||||
hacks: {
|
hacks: {
|
||||||
// 'main/main.js': require('./tray.js')(defaults),
|
'main/main.js': require('./tray.js')(defaults),
|
||||||
'renderer/preload.js': function (store) {
|
'renderer/preload.js': function (store) {
|
||||||
const data = store({ name: 'dragonwocky' });
|
const data = store({ name: 'dragonwocky' });
|
||||||
console.log(data.name);
|
console.log(data.name);
|
||||||
|
@ -6,18 +6,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
let tray;
|
let tray;
|
||||||
const electron = require('electron'),
|
|
||||||
|
module.exports = (defaults) =>
|
||||||
|
function (store) {
|
||||||
|
const electron = require('electron'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
is_mac = process.platform === 'darwin',
|
is_mac = process.platform === 'darwin',
|
||||||
is_win = process.platform === 'win32',
|
is_win = process.platform === 'win32',
|
||||||
settings = {};
|
settings = store(defaults);
|
||||||
|
|
||||||
electron.app.on('ready', () => {
|
electron.app.on('ready', () => {
|
||||||
tray = new electron.Tray(
|
tray = new electron.Tray(
|
||||||
is_win
|
is_win
|
||||||
? path.resolve(__dirname, 'windows.ico')
|
? path.normalize(`${__dirname}/windows.ico`)
|
||||||
: new electron.nativeImage.createFromPath(
|
: new electron.nativeImage.createFromPath(
|
||||||
path.resolve(__dirname, 'mac+linux.png')
|
path.normalize(`${__dirname}/mac+linux.png`)
|
||||||
).resize({
|
).resize({
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
@ -78,4 +81,5 @@ electron.app.on('ready', () => {
|
|||||||
hideWindows();
|
hideWindows();
|
||||||
else showWindows();
|
else showWindows();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user