Updated Windows tray images

This commit is contained in:
Scott E. Graves
2018-10-03 16:57:00 -05:00
parent 9b186fbfac
commit aee85ed0a6
9 changed files with 20 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ function createWindow() {
path: path.resolve(path.join(app.getAppPath(), '..\\..\\repertory-ui.exe')),
});
const image = nativeImage.createFromPath(path.join(__dirname, '/build/icon.ico'));
const image = nativeImage.createFromPath(path.join(__dirname, '/build/logo.png'));
mainContextWindow = Menu.buildFromTemplate([
{
label: 'Visible', type: 'checkbox', click(item) {
@@ -219,6 +219,23 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => {
}
};
const setImage = (hsLocation, siaLocation) => {
if (os.platform() === 'win32') {
let image;
if ((siaLocation.length > 0) && (hsLocation.length > 0)) {
image = nativeImage.createFromPath(path.join(__dirname, '/build/logo_both.png'));
} else if (hsLocation.length > 0) {
image = nativeImage.createFromPath(path.join(__dirname, '/build/logo_hs.png'));
} else if (siaLocation.length > 0) {
image = nativeImage.createFromPath(path.join(__dirname, '/build/logo_sia.png'));
} else {
image = nativeImage.createFromPath(path.join(__dirname, '/build/logo.png'));
}
mainWindowTray.setImage(image);
}
};
const dataDirectory = helpers.resolvePath(data.Directory);
helpers
.detectRepertoryMounts(dataDirectory, data.Version)
@@ -230,6 +247,7 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => {
siaLocation = siaLocation.toUpperCase();
grabDriveLetters(hsLocation, siaLocation);
}
setImage(hsLocation, siaLocation);
standardIPCReply(event, Constants.IPC_Detect_Mounts_Reply, {
DriveLetters: driveLetters,
Locations: {
@@ -244,6 +262,7 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => {
})
.catch(error => {
grabDriveLetters('', '');
setImage('', '');
standardIPCReply(event, Constants.IPC_Detect_Mounts_Reply, {
DriveLetters: driveLetters,
}, error);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

BIN
public/favicon_old.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

BIN
public/icon_old.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

BIN
public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
public/logo_both.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
public/logo_hs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
public/logo_sia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB