Update icons (#1545)
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.0 KiB |
BIN
src/assets/icon.icns
Normal file
BIN
src/assets/icon.ico
Normal file
After Width: | Height: | Size: 210 KiB |
69
src/assets/linux/README.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Mattermost Desktop for Linux
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Install](#install)
|
||||
- [User Guide](#user-guide)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
If you installed the application via a package manager, it's ready to use in your system. Please follow the [User Guide](#user-guide) for further information.
|
||||
|
||||
Otherwise, first locate the extracted directory in your desired directory (e.g. `/opt/mattermost-desktop-<VERSION>`) and follow the steps below.
|
||||
|
||||
### Desktop launcher
|
||||
|
||||
Execute the script file to create a `Mattermost.desktop` file.
|
||||
|
||||
```
|
||||
/opt/mattermost-desktop-<VERSION>/create_desktop_file.sh
|
||||
```
|
||||
|
||||
Then move it to the appropriate directory of your desktop environment. For example, on Ubuntu Unity it's `~/.local/share/applications/` for the current user.
|
||||
|
||||
```
|
||||
mv Mattermost.desktop ~/.local/share/applications/
|
||||
```
|
||||
|
||||
### Terminal command
|
||||
|
||||
Set a `PATH` environment variable to enable launching from the terminal. For example, you can append the following line into `~/.bashrc`.
|
||||
|
||||
```sh
|
||||
# assuming that /opt/mattermost-desktop-<VERSION>/mattermost-desktop is the executable file.
|
||||
export PATH=$PATH:/opt/mattermost-desktop-<VERSION>
|
||||
```
|
||||
|
||||
Alternatively, you can also create a symbolic link for the application.
|
||||
|
||||
```sh
|
||||
sudo ln -s /opt/mattermost-desktop-<VERSION>/mattermost-desktop /usr/local/bin/
|
||||
```
|
||||
|
||||
You're now all set! See the [User Guide](#user-guide) below for instructions.
|
||||
|
||||
|
||||
## User Guide
|
||||
|
||||
After launching, you need to configure the application to interact with your team.
|
||||
|
||||
1. If you don't see a page titled "Settings", select **File** > **Settings...** from the menu bar.
|
||||
2. Click **Add new team** next to the right of Team Management section.
|
||||
3. Enter **Name** and a valid **URL**, which begins with either `http://` or `https://`.
|
||||
4. Click **Add**.
|
||||
5. Click **Save**.
|
||||
|
||||
More guides are available at [Mattermost Documentation](https://about.mattermost.com/default-desktop-app-documentation/).
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
See [contributing guidelines](https://github.com/mattermost/desktop/blob/master/CONTRIBUTING.md) for reporting bugs, features or submitting pull requests.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Apache License, Version 2.0
|
BIN
src/assets/linux/app_icon.png
Normal file
After Width: | Height: | Size: 201 KiB |
18
src/assets/linux/create_desktop_file.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
WORKING_DIR=`pwd`
|
||||
THIS_PATH=`readlink -f $0`
|
||||
cd `dirname ${THIS_PATH}`
|
||||
FULL_PATH=`pwd`
|
||||
cd ${WORKING_DIR}
|
||||
cat <<EOS > Mattermost.desktop
|
||||
[Desktop Entry]
|
||||
Name=Mattermost
|
||||
Comment=Mattermost Desktop application for Linux
|
||||
Exec="${FULL_PATH}/mattermost-desktop"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=${FULL_PATH}/app_icon.png
|
||||
Categories=Network;InstantMessaging;
|
||||
EOS
|
||||
chmod +x Mattermost.desktop
|
BIN
src/assets/linux/dark/MenuIcon.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
src/assets/linux/dark/MenuIcon@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/linux/dark/MenuIconMention.png
Normal file
After Width: | Height: | Size: 650 B |
BIN
src/assets/linux/dark/MenuIconMention@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 649 B |
BIN
src/assets/linux/dark/MenuIconUnread.png
Normal file
After Width: | Height: | Size: 658 B |
BIN
src/assets/linux/dark/MenuIconUnread@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 730 B |
19
src/assets/linux/icon.svg
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
src/assets/linux/light/MenuIcon.png
Normal file
After Width: | Height: | Size: 572 B |
BIN
src/assets/linux/light/MenuIcon@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/linux/light/MenuIconMention.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
src/assets/linux/light/MenuIconMention@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 768 B |
Before Width: | Height: | Size: 692 B |
BIN
src/assets/linux/light/MenuIconUnread.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
src/assets/linux/light/MenuIconUnread@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 883 B |
Before Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 1001 B |
BIN
src/assets/osx/menuIcons/MenuIcon16Template.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
src/assets/osx/menuIcons/MenuIcon16Template@2x.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
src/assets/osx/menuIcons/MenuIcon20Template.png
Normal file
After Width: | Height: | Size: 392 B |
BIN
src/assets/osx/menuIcons/MenuIcon20Template@2x.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
src/assets/osx/menuIcons/MenuIcon24Template.png
Normal file
After Width: | Height: | Size: 463 B |
BIN
src/assets/osx/menuIcons/MenuIcon24Template@2x.png
Normal file
After Width: | Height: | Size: 841 B |
BIN
src/assets/osx/menuIcons/MenuIcon32Template.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
src/assets/osx/menuIcons/MenuIcon32Template@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/osx/menuIcons/MenuIconUnread16Template.png
Normal file
After Width: | Height: | Size: 731 B |
BIN
src/assets/osx/menuIcons/MenuIconUnread16Template@2x.png
Normal file
After Width: | Height: | Size: 1001 B |
BIN
src/assets/osx/menuIcons/MenuIconUnread20Template.png
Normal file
After Width: | Height: | Size: 766 B |
BIN
src/assets/osx/menuIcons/MenuIconUnread20Template@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/osx/menuIcons/MenuIconUnread24Template.png
Normal file
After Width: | Height: | Size: 847 B |
BIN
src/assets/osx/menuIcons/MenuIconUnread24Template@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/osx/menuIcons/MenuIconUnread32Template.png
Normal file
After Width: | Height: | Size: 1001 B |
BIN
src/assets/osx/menuIcons/MenuIconUnread32Template@2x.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/windows/tray@2x.ico
Normal file
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/windows/tray_mention@2x.ico
Normal file
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/windows/tray_unread@2x.ico
Normal file
After Width: | Height: | Size: 9.4 KiB |
@@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import path from 'path';
|
||||
import {app, nativeImage, nativeTheme, Tray, systemPreferences} from 'electron';
|
||||
import {app, nativeImage, Tray, systemPreferences} from 'electron';
|
||||
|
||||
import {UPDATE_TRAY} from 'common/communication';
|
||||
|
||||
@@ -27,19 +27,17 @@ export function refreshTrayImages(trayIconTheme) {
|
||||
break;
|
||||
case 'darwin':
|
||||
{
|
||||
const osxNormal = nativeImage.createFromPath(path.resolve(assetsDir, 'osx/menuIcons/MenuIcon16Template.png'));
|
||||
const osxUnread = nativeImage.createFromPath(path.resolve(assetsDir, 'osx/menuIcons/MenuIconUnread16Template.png'));
|
||||
osxNormal.setTemplateImage(true);
|
||||
osxUnread.setTemplateImage(true);
|
||||
|
||||
trayImages = {
|
||||
light: {
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/MenuIcon.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/MenuIconUnread.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/MenuIconMention.png')),
|
||||
},
|
||||
clicked: {
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/ClickedMenuIcon.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/ClickedMenuIconUnread.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'osx/ClickedMenuIconMention.png')),
|
||||
},
|
||||
normal: osxNormal,
|
||||
unread: osxUnread,
|
||||
mention: osxUnread,
|
||||
};
|
||||
switchMenuIconImages(trayImages, nativeTheme.shouldUseDarkColors);
|
||||
|
||||
break;
|
||||
}
|
||||
case 'linux':
|
||||
@@ -47,16 +45,16 @@ export function refreshTrayImages(trayIconTheme) {
|
||||
const theme = trayIconTheme;
|
||||
try {
|
||||
trayImages = {
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconTemplate.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnreadTemplate.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMentionTemplate.png')),
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIcon.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnread.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMention.png')),
|
||||
};
|
||||
} catch (e) {
|
||||
//Fallback for invalid theme setting
|
||||
trayImages = {
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconTemplate.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconUnreadTemplate.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconMentionTemplate.png')),
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIcon.png')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconUnread.png')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconMention.png')),
|
||||
};
|
||||
}
|
||||
break;
|
||||
@@ -70,25 +68,12 @@ export function refreshTrayImages(trayIconTheme) {
|
||||
return trayImages;
|
||||
}
|
||||
|
||||
export function switchMenuIconImages(icons, isDarkMode) {
|
||||
if (isDarkMode) {
|
||||
icons.normal = icons.clicked.normal;
|
||||
icons.unread = icons.clicked.unread;
|
||||
icons.mention = icons.clicked.mention;
|
||||
} else {
|
||||
icons.normal = icons.light.normal;
|
||||
icons.unread = icons.light.unread;
|
||||
icons.mention = icons.light.mention;
|
||||
}
|
||||
}
|
||||
|
||||
export function setupTray(icontheme) {
|
||||
refreshTrayImages(icontheme);
|
||||
trayIcon = new Tray(trayImages.normal);
|
||||
if (process.platform === 'darwin') {
|
||||
trayIcon.setPressedImage(trayImages.clicked.normal);
|
||||
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', () => {
|
||||
switchMenuIconImages(trayImages, nativeTheme.shouldUseDarkColors);
|
||||
trayIcon.setImage(trayImages.normal);
|
||||
});
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ export function showMainWindow(deeplinkingURL) {
|
||||
status.mainWindow.show();
|
||||
} else {
|
||||
status.mainWindow = createMainWindow(status.config, {
|
||||
linuxAppIcon: path.join(assetsDir, 'appicon.png'),
|
||||
linuxAppIcon: path.join(assetsDir, 'linux', 'app_icon.png'),
|
||||
});
|
||||
|
||||
if (!status.mainWindow) {
|
||||
|