Skip to content

Commit

Permalink
new tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed Jan 1, 2025
1 parent 3f91032 commit ad642fa
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 13 deletions.
Binary file removed assets/bulbTemplate.png
Binary file not shown.
Binary file removed assets/[email protected]
Binary file not shown.
Binary file removed assets/bulbUpdateTemplate.png
Binary file not shown.
Binary file removed assets/[email protected]
Binary file not shown.
Binary file removed assets/bulbUpdateWhite.png
Binary file not shown.
Binary file removed assets/[email protected]
Binary file not shown.
Binary file removed assets/bulbWhite.png
Binary file not shown.
Binary file removed assets/[email protected]
Binary file not shown.
Binary file added assets/trayTemplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/trayUpdateTemplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/trayUpdateWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/trayWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ const config: ForgeConfig = {
extendInfo: './build/Info.plist',
buildVersion: `${process.env.BUILD_NUMBER}`,
extraResource: [
'assets/bulbTemplate.png',
'assets/bulbTemplate@2x.png',
'assets/bulbUpdateTemplate.png',
'assets/bulbUpdateTemplate@2x.png',
'assets/bulbWhite.png',
'assets/bulbWhite@2x.png',
'assets/bulbUpdateWhite.png',
'assets/bulbUpdateWhite@2x.png',
'assets/trayTemplate.png',
'assets/trayTemplate@2x.png',
'assets/trayUpdateTemplate.png',
'assets/trayUpdateTemplate@2x.png',
'assets/trayWhite.png',
'assets/trayWhite@2x.png',
'assets/trayUpdateWhite.png',
'assets/trayUpdateWhite@2x.png',
'assets/icon.ico',
],
...osxPackagerConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/main/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class {
trayIcon = nativeImage.createFromPath(trayIconPath);
} else {
const iconColor = process.platform === 'linux' ? 'White' : 'Template';
const trayIconPath = path.join(assetsFolder, updateAvailable ? `bulbUpdate${iconColor}@2x.png` : `bulb${iconColor}@2x.png`);
const trayIconPath = path.join(assetsFolder, updateAvailable ? `trayUpdate${iconColor}@2x.png` : `tray${iconColor}@2x.png`);
//console.log('trayIconPath', trayIconPath);
trayIcon = nativeImage.createFromPath(trayIconPath);
trayIcon.setTemplateImage(true);
Expand Down
6 changes: 3 additions & 3 deletions src/main/windows/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export const openMainWindow = (opts: CreateWindowOpts = {}) => {

// check
const config = loadSettings(app);
if (config.general.tips.trayIcon) {
const systemTray = process.platform === 'darwin' ? 'menu bar' : 'system tray';
const message = `You can activate Witsy from the light bulb icon in the ${systemTray}.`;
if (config.general.tips.trayIcon === undefined || config.general.tips.trayIcon === true) {
const trayIconDesc = process.platform === 'win32' ? 'the icon in the system tray' : 'the fountain pen icon in the menu bar';
const message = `You can activate Witsy from ${trayIconDesc}.`;
const options = {
buttons: ['OK'],
message: message,
Expand Down
8 changes: 7 additions & 1 deletion src/settings/SettingsGeneral.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<input type="checkbox" v-model="runAtLogin" @change="save" />
</div>
<div class="group hide-on-startup">
<label>Hide chat on start</label>
<label>Hide main window on start</label>
<input type="checkbox" v-model="hideOnStartup" @change="save" />
</div>
<div class="group keep-running">
Expand Down Expand Up @@ -92,3 +92,9 @@ defineExpose({ load })
@import '../../css/tabs.css';
@import '../../css/form.css';
</style>

<style scoped>
form .group label {
min-width: 170px;
}
</style>

0 comments on commit ad642fa

Please sign in to comment.