Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor the appsbar icon to SiteURL #347

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion webapp/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {getConfig} from 'mattermost-redux/selectors/entities/general';

import SidebarHeader from './components/sidebar_header';
import TeamSidebar from './components/team_sidebar';
import RHSSidebar from './components/rhs_sidebar';
Expand Down Expand Up @@ -69,7 +71,9 @@ class PluginClass {

// App Bar icon
if (registry.registerAppBarComponent) {
const iconURL = `/plugins/${id}/public/app-bar-icon.png`;
const config = getConfig(store.getState());
const siteUrl = (config && config.SiteURL) || '';
const iconURL = `${siteUrl}/plugins/${id}/public/app-bar-icon.png`;
registry.registerAppBarComponent(iconURL, boundToggleRHSAction, 'GitLab');
}
}
Expand Down