Update icons (#1545)

This commit is contained in:
Guillermo Vayá
2021-04-16 19:29:40 +02:00
committed by GitHub
parent 62de91b7aa
commit b00da1b053
72 changed files with 21 additions and 428 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
src/assets/icon.icns Normal file

Binary file not shown.

BIN
src/assets/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

19
src/assets/linux/icon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -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);
});
}

View File

@@ -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) {