Updated Windows tray images
21
electron.js
@@ -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);
|
||||
|
||||
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
BIN
public/favicon_old.ico
Normal file
|
After Width: | Height: | Size: 361 KiB |
BIN
public/icon.ico
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
BIN
public/icon_old.ico
Normal file
|
After Width: | Height: | Size: 361 KiB |
BIN
public/logo.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/logo_both.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/logo_hs.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/logo_sia.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |