[WebApp][MM-52138]: Wrap all the components using compass-components with compass-components theme provider (#22941)
* wrap all the components using compass-components with compass-components theme provider Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
698613c002
Коммит
b5ce8ac741
@@ -4,8 +4,7 @@
|
|||||||
import React, {memo, useCallback} from 'react';
|
import React, {memo, useCallback} from 'react';
|
||||||
|
|
||||||
import ReactSelect, {ValueType} from 'react-select';
|
import ReactSelect, {ValueType} from 'react-select';
|
||||||
|
import ChevronDownIcon from '@mattermost/compass-icons/components/chevron-down';
|
||||||
import Icon from '@mattermost/compass-components/foundations/icon/Icon'; // eslint-disable-line no-restricted-imports
|
|
||||||
|
|
||||||
import {trackEvent} from 'actions/telemetry_actions';
|
import {trackEvent} from 'actions/telemetry_actions';
|
||||||
|
|
||||||
@@ -57,10 +56,7 @@ const TimeFrameDropdown = (props: Props) => {
|
|||||||
const CustomDropwdown = () => {
|
const CustomDropwdown = () => {
|
||||||
return (
|
return (
|
||||||
<span className='icon'>
|
<span className='icon'>
|
||||||
<Icon
|
<ChevronDownIcon size={12}/>
|
||||||
size={12}
|
|
||||||
glyph={'chevron-down'}
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,11 +16,14 @@ import Input from 'components/widgets/inputs/input/input';
|
|||||||
import DatePicker from 'components/date_picker';
|
import DatePicker from 'components/date_picker';
|
||||||
import Menu from 'components/widgets/menu/menu';
|
import Menu from 'components/widgets/menu/menu';
|
||||||
import Timestamp from 'components/timestamp';
|
import Timestamp from 'components/timestamp';
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
|
|
||||||
import {getCurrentLocale} from 'selectors/i18n';
|
import {getCurrentLocale} from 'selectors/i18n';
|
||||||
import {isKeyPressed} from 'utils/keyboard';
|
import {isKeyPressed} from 'utils/keyboard';
|
||||||
import {localizeMessage} from 'utils/utils';
|
import {localizeMessage} from 'utils/utils';
|
||||||
import {getCurrentMomentForTimezone} from 'utils/timezone';
|
import {getCurrentMomentForTimezone} from 'utils/timezone';
|
||||||
import Constants, {A11yCustomEventTypes, A11yFocusEventDetail} from 'utils/constants';
|
import Constants, {A11yCustomEventTypes, A11yFocusEventDetail} from 'utils/constants';
|
||||||
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
const CUSTOM_STATUS_TIME_PICKER_INTERVALS_IN_MINUTES = 30;
|
const CUSTOM_STATUS_TIME_PICKER_INTERVALS_IN_MINUTES = 30;
|
||||||
|
|
||||||
@@ -62,6 +65,7 @@ const DateTimeInputContainer: React.FC<Props> = (props: Props) => {
|
|||||||
const [isPopperOpen, setIsPopperOpen] = useState(false);
|
const [isPopperOpen, setIsPopperOpen] = useState(false);
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
const timeButtonRef = useRef<HTMLButtonElement>(null);
|
const timeButtonRef = useRef<HTMLButtonElement>(null);
|
||||||
|
const theme = useSelector(getTheme);
|
||||||
|
|
||||||
const handlePopperOpenState = useCallback((isOpen: boolean) => {
|
const handlePopperOpenState = useCallback((isOpen: boolean) => {
|
||||||
setIsPopperOpen(isOpen);
|
setIsPopperOpen(isOpen);
|
||||||
@@ -150,6 +154,7 @@ const DateTimeInputContainer: React.FC<Props> = (props: Props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<CompassThemeProvider theme={theme}>
|
||||||
<div className='dateTime'>
|
<div className='dateTime'>
|
||||||
<div className='dateTime__date'>
|
<div className='dateTime__date'>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
@@ -215,6 +220,7 @@ const DateTimeInputContainer: React.FC<Props> = (props: Props) => {
|
|||||||
</MenuWrapper>
|
</MenuWrapper>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {ActionFunc} from 'mattermost-redux/types/actions';
|
|||||||
import {UserStatus} from '@mattermost/types/users';
|
import {UserStatus} from '@mattermost/types/users';
|
||||||
|
|
||||||
import GenericModal from 'components/generic_modal';
|
import GenericModal from 'components/generic_modal';
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
|
|
||||||
import Constants, {A11yCustomEventTypes, A11yFocusEventDetail, UserStatuses} from 'utils/constants';
|
import Constants, {A11yCustomEventTypes, A11yFocusEventDetail, UserStatuses} from 'utils/constants';
|
||||||
import Menu from 'components/widgets/menu/menu';
|
import Menu from 'components/widgets/menu/menu';
|
||||||
@@ -26,12 +27,15 @@ import {isKeyPressed} from 'utils/keyboard';
|
|||||||
import {localizeMessage} from 'utils/utils';
|
import {localizeMessage} from 'utils/utils';
|
||||||
import Input from 'components/widgets/inputs/input/input';
|
import Input from 'components/widgets/inputs/input/input';
|
||||||
import DatePicker from 'components/date_picker';
|
import DatePicker from 'components/date_picker';
|
||||||
|
import {Theme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onExited: () => void;
|
onExited: () => void;
|
||||||
userId: string;
|
userId: string;
|
||||||
currentDate: Date;
|
currentDate: Date;
|
||||||
locale: string;
|
locale: string;
|
||||||
|
|
||||||
|
theme: Theme;
|
||||||
actions: {
|
actions: {
|
||||||
setStatus: (status: UserStatus) => ActionFunc;
|
setStatus: (status: UserStatus) => ActionFunc;
|
||||||
};
|
};
|
||||||
@@ -232,6 +236,7 @@ export default class DndCustomTimePicker extends React.PureComponent<Props, Stat
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<CompassThemeProvider theme={this.props.theme}>
|
||||||
<GenericModal
|
<GenericModal
|
||||||
ariaLabel={localizeMessage('dnd_custom_time_picker_modal.defaultMsg', 'Disable notifications until')}
|
ariaLabel={localizeMessage('dnd_custom_time_picker_modal.defaultMsg', 'Disable notifications until')}
|
||||||
onExited={this.props.onExited}
|
onExited={this.props.onExited}
|
||||||
@@ -289,6 +294,7 @@ export default class DndCustomTimePicker extends React.PureComponent<Props, Stat
|
|||||||
</MenuWrapper>
|
</MenuWrapper>
|
||||||
</div>
|
</div>
|
||||||
</GenericModal>
|
</GenericModal>
|
||||||
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {connect} from 'react-redux';
|
|||||||
import {bindActionCreators, Dispatch} from 'redux';
|
import {bindActionCreators, Dispatch} from 'redux';
|
||||||
|
|
||||||
import {setStatus} from 'mattermost-redux/actions/users';
|
import {setStatus} from 'mattermost-redux/actions/users';
|
||||||
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
|
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
|
||||||
|
|
||||||
@@ -19,10 +20,12 @@ const DndCustomTimePicker = makeAsyncComponent('DndCustomTimePicker', React.lazy
|
|||||||
function mapStateToProps(state: GlobalState) {
|
function mapStateToProps(state: GlobalState) {
|
||||||
const userId = getCurrentUserId(state);
|
const userId = getCurrentUserId(state);
|
||||||
const locale = getCurrentLocale(state);
|
const locale = getCurrentLocale(state);
|
||||||
|
const theme = getTheme(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
userId,
|
userId,
|
||||||
locale,
|
locale,
|
||||||
|
theme,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import LeftControls from './left_controls/left_controls';
|
|||||||
import RightControls from './right_controls/right_controls';
|
import RightControls from './right_controls/right_controls';
|
||||||
|
|
||||||
import {useIsLoggedIn} from './hooks';
|
import {useIsLoggedIn} from './hooks';
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
|
import {useSelector} from 'react-redux';
|
||||||
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
const GlobalHeaderContainer = styled.header`
|
const GlobalHeaderContainer = styled.header`
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -38,17 +41,20 @@ const GlobalHeaderContainer = styled.header`
|
|||||||
const GlobalHeader = (): JSX.Element | null => {
|
const GlobalHeader = (): JSX.Element | null => {
|
||||||
const isLoggedIn = useIsLoggedIn();
|
const isLoggedIn = useIsLoggedIn();
|
||||||
const currentProductID = useCurrentProductId();
|
const currentProductID = useCurrentProductId();
|
||||||
|
const theme = useSelector(getTheme);
|
||||||
|
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<CompassThemeProvider theme={theme}>
|
||||||
<GlobalHeaderContainer id='global-header'>
|
<GlobalHeaderContainer id='global-header'>
|
||||||
<LeftControls/>
|
<LeftControls/>
|
||||||
<CenterControls productId={currentProductID}/>
|
<CenterControls productId={currentProductID}/>
|
||||||
<RightControls productId={currentProductID}/>
|
<RightControls productId={currentProductID}/>
|
||||||
</GlobalHeaderContainer>
|
</GlobalHeaderContainer>
|
||||||
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import React, {useRef, useCallback, useEffect, useState} from 'react';
|
|||||||
import {useDispatch, useSelector} from 'react-redux';
|
import {useDispatch, useSelector} from 'react-redux';
|
||||||
import styled, {css} from 'styled-components';
|
import styled, {css} from 'styled-components';
|
||||||
|
|
||||||
import Icon from '@mattermost/compass-components/foundations/icon/Icon'; // eslint-disable-line no-restricted-imports
|
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
import {getShowTaskListBool} from 'selectors/onboarding';
|
import {getShowTaskListBool} from 'selectors/onboarding';
|
||||||
@@ -15,6 +13,7 @@ import {shouldShowAutoLinkedBoard} from 'selectors/plugins';
|
|||||||
import {
|
import {
|
||||||
getBool,
|
getBool,
|
||||||
getMyPreferences as getMyPreferencesSelector,
|
getMyPreferences as getMyPreferencesSelector,
|
||||||
|
getTheme,
|
||||||
} from 'mattermost-redux/selectors/entities/preferences';
|
} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
import {getMyPreferences, savePreferences} from 'mattermost-redux/actions/preferences';
|
import {getMyPreferences, savePreferences} from 'mattermost-redux/actions/preferences';
|
||||||
import {getPrevTrialLicense} from 'mattermost-redux/actions/admin';
|
import {getPrevTrialLicense} from 'mattermost-redux/actions/admin';
|
||||||
@@ -29,6 +28,7 @@ import {
|
|||||||
import {useFirstAdminUser, useIsCurrentUserSystemAdmin} from 'components/global_header/hooks';
|
import {useFirstAdminUser, useIsCurrentUserSystemAdmin} from 'components/global_header/hooks';
|
||||||
import {useHandleOnBoardingTaskTrigger} from 'components/onboarding_tasks/onboarding_tasks_manager';
|
import {useHandleOnBoardingTaskTrigger} from 'components/onboarding_tasks/onboarding_tasks_manager';
|
||||||
import OnBoardingVideoModal from 'components/onboarding_tasks/onboarding_video_modal/onboarding_video_modal';
|
import OnBoardingVideoModal from 'components/onboarding_tasks/onboarding_video_modal/onboarding_video_modal';
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
|
|
||||||
import {openModal} from 'actions/views/modals';
|
import {openModal} from 'actions/views/modals';
|
||||||
import {GlobalState} from 'types/store';
|
import {GlobalState} from 'types/store';
|
||||||
@@ -42,6 +42,7 @@ import {TaskListPopover} from './onboarding_tasklist_popover';
|
|||||||
import {Task} from './onboarding_tasklist_task';
|
import {Task} from './onboarding_tasklist_task';
|
||||||
import Completed from './onboarding_tasklist_completed';
|
import Completed from './onboarding_tasklist_completed';
|
||||||
import {CompletedAnimation} from './onboarding_tasklist_animations';
|
import {CompletedAnimation} from './onboarding_tasklist_animations';
|
||||||
|
import {CloseIcon, PlayIcon, PlaylistCheckIcon} from '@mattermost/compass-icons/components';
|
||||||
|
|
||||||
const TaskItems = styled.div`
|
const TaskItems = styled.div`
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -102,19 +103,13 @@ const Button = styled.button<{open: boolean}>(({open}) => {
|
|||||||
background: var(--center-channel-bg);
|
background: var(--center-channel-bg);
|
||||||
border: solid 1px rgba(var(--center-channel-color-rgb), 0.16);
|
border: solid 1px rgba(var(--center-channel-color-rgb), 0.16);
|
||||||
box-shadow: var(--elevation-3);
|
box-shadow: var(--elevation-3);
|
||||||
|
|
||||||
i {
|
|
||||||
color: rgba(var(--center-channel-color-rgb), 0.56);
|
color: rgba(var(--center-channel-color-rgb), 0.56);
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: rgba(var(--center-channel-color-rgb), 0.24);
|
border-color: rgba(var(--center-channel-color-rgb), 0.24);
|
||||||
box-shadow: var(--elevation-4);
|
box-shadow: var(--elevation-4);
|
||||||
|
|
||||||
i {
|
|
||||||
color: rgba(var(--center-channel-color-rgb), 0.72)
|
color: rgba(var(--center-channel-color-rgb), 0.72)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
span {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
@@ -154,8 +149,8 @@ const PlayButton = styled.button`
|
|||||||
box-shadow: var(--elevation-4);
|
box-shadow: var(--elevation-4);
|
||||||
}
|
}
|
||||||
|
|
||||||
i {
|
svg {
|
||||||
margin-right: 10px;
|
margin-right: 6px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -190,6 +185,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
|||||||
const isFirstAdmin = useFirstAdminUser();
|
const isFirstAdmin = useFirstAdminUser();
|
||||||
const isEnableOnboardingFlow = useSelector((state: GlobalState) => getConfig(state).EnableOnboardingFlow === 'true');
|
const isEnableOnboardingFlow = useSelector((state: GlobalState) => getConfig(state).EnableOnboardingFlow === 'true');
|
||||||
const [showTaskList, firstTimeOnboarding] = useSelector(getShowTaskListBool);
|
const [showTaskList, firstTimeOnboarding] = useSelector(getShowTaskListBool);
|
||||||
|
const theme = useSelector(getTheme);
|
||||||
|
|
||||||
// a/b test auto show linked boards
|
// a/b test auto show linked boards
|
||||||
const autoShowLinkedBoard = useSelector((state: GlobalState) => shouldShowAutoLinkedBoard(state));
|
const autoShowLinkedBoard = useSelector((state: GlobalState) => shouldShowAutoLinkedBoard(state));
|
||||||
@@ -318,7 +314,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<CompassThemeProvider theme={theme}>
|
||||||
<CompletedAnimation completed={showAnimation}/>
|
<CompletedAnimation completed={showAnimation}/>
|
||||||
<Button
|
<Button
|
||||||
onClick={toggleTaskList}
|
onClick={toggleTaskList}
|
||||||
@@ -326,7 +322,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
|||||||
open={open}
|
open={open}
|
||||||
data-cy='onboarding-task-list-action-button'
|
data-cy='onboarding-task-list-action-button'
|
||||||
>
|
>
|
||||||
<Icon glyph={open ? 'close' : 'playlist-check'}/>
|
{open ? <CloseIcon size={20}/> : <PlaylistCheckIcon size={20}/>}
|
||||||
{itemsLeft !== 0 && (<span>{itemsLeft}</span>)}
|
{itemsLeft !== 0 && (<span>{itemsLeft}</span>)}
|
||||||
</Button>
|
</Button>
|
||||||
<TaskListPopover
|
<TaskListPopover
|
||||||
@@ -363,10 +359,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
|||||||
<PlayButton
|
<PlayButton
|
||||||
onClick={openVideoModal}
|
onClick={openVideoModal}
|
||||||
>
|
>
|
||||||
<Icon
|
<PlayIcon size={18}/>
|
||||||
glyph={'play'}
|
|
||||||
size={16}
|
|
||||||
/>
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='onboardingTask.checklist.video_title'
|
id='onboardingTask.checklist.video_title'
|
||||||
defaultMessage='Watch overview'
|
defaultMessage='Watch overview'
|
||||||
@@ -396,7 +389,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
|||||||
)}
|
)}
|
||||||
</TaskItems>
|
</TaskItems>
|
||||||
</TaskListPopover>
|
</TaskListPopover>
|
||||||
</>
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`components/post_edit_history/edited_post_item should match snapshot 1`] = `
|
exports[`components/post_edit_history/edited_post_item should match snapshot 1`] = `
|
||||||
<div
|
<CompassThemeProvider
|
||||||
|
theme={Object {}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
className="edit-post-history__container"
|
className="edit-post-history__container"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
>
|
>
|
||||||
<PostAriaLabelDiv
|
<PostAriaLabelDiv
|
||||||
className="a11y__section post"
|
className="a11y__section post"
|
||||||
id="searchResult_post_id"
|
id="searchResult_post_id"
|
||||||
@@ -112,14 +115,18 @@ exports[`components/post_edit_history/edited_post_item should match snapshot 1`]
|
|||||||
</OverlayTrigger>
|
</OverlayTrigger>
|
||||||
</div>
|
</div>
|
||||||
</PostAriaLabelDiv>
|
</PostAriaLabelDiv>
|
||||||
</div>
|
</div>
|
||||||
|
</CompassThemeProvider>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/post_edit_history/edited_post_item should match snapshot when isCurrent is true 1`] = `
|
exports[`components/post_edit_history/edited_post_item should match snapshot when isCurrent is true 1`] = `
|
||||||
<div
|
<CompassThemeProvider
|
||||||
|
theme={Object {}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
className="edit-post-history__container edit-post-history__container__background"
|
className="edit-post-history__container edit-post-history__container__background"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
>
|
>
|
||||||
<PostAriaLabelDiv
|
<PostAriaLabelDiv
|
||||||
className="a11y__section post"
|
className="a11y__section post"
|
||||||
id="searchResult_post_id"
|
id="searchResult_post_id"
|
||||||
@@ -269,5 +276,6 @@ exports[`components/post_edit_history/edited_post_item should match snapshot whe
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</PostAriaLabelDiv>
|
</PostAriaLabelDiv>
|
||||||
</div>
|
</div>
|
||||||
|
</CompassThemeProvider>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
import React, {ComponentProps} from 'react';
|
import React, {ComponentProps} from 'react';
|
||||||
import {shallow} from 'enzyme';
|
import {shallow} from 'enzyme';
|
||||||
|
|
||||||
|
import {Theme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
import {TestHelper} from 'utils/test_helper';
|
import {TestHelper} from 'utils/test_helper';
|
||||||
import {ModalIdentifiers} from 'utils/constants';
|
import {ModalIdentifiers} from 'utils/constants';
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ describe('components/post_edit_history/edited_post_item', () => {
|
|||||||
message: 'post message',
|
message: 'post message',
|
||||||
}),
|
}),
|
||||||
isCurrent: false,
|
isCurrent: false,
|
||||||
|
theme: {} as Theme,
|
||||||
postCurrentVersion: TestHelper.getPostMock({
|
postCurrentVersion: TestHelper.getPostMock({
|
||||||
id: 'post_current_version_id',
|
id: 'post_current_version_id',
|
||||||
message: 'post current version message',
|
message: 'post current version message',
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import React, {memo, useCallback, useState} from 'react';
|
|||||||
import {defineMessages, useIntl} from 'react-intl';
|
import {defineMessages, useIntl} from 'react-intl';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
import {Theme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
import IconButton from '@mattermost/compass-components/components/icon-button'; // eslint-disable-line no-restricted-imports
|
import IconButton from '@mattermost/compass-components/components/icon-button'; // eslint-disable-line no-restricted-imports
|
||||||
import {CheckIcon} from '@mattermost/compass-icons/components';
|
import {CheckIcon} from '@mattermost/compass-icons/components';
|
||||||
|
|
||||||
@@ -15,6 +17,7 @@ import Constants, {ModalIdentifiers} from 'utils/constants';
|
|||||||
import {imageURLForUser} from 'utils/utils';
|
import {imageURLForUser} from 'utils/utils';
|
||||||
import {t} from 'utils/i18n';
|
import {t} from 'utils/i18n';
|
||||||
|
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
import PostAriaLabelDiv from 'components/post_view/post_aria_label_div';
|
import PostAriaLabelDiv from 'components/post_view/post_aria_label_div';
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
import OverlayTrigger from 'components/overlay_trigger';
|
||||||
import PostMessageContainer from 'components/post_view/post_message_view';
|
import PostMessageContainer from 'components/post_view/post_message_view';
|
||||||
@@ -51,9 +54,10 @@ const itemMessages = defineMessages({
|
|||||||
export type Props = PropsFromRedux & {
|
export type Props = PropsFromRedux & {
|
||||||
post: Post;
|
post: Post;
|
||||||
isCurrent?: boolean;
|
isCurrent?: boolean;
|
||||||
|
theme: Theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EditedPostItem = ({post, isCurrent = false, postCurrentVersion, actions}: Props) => {
|
const EditedPostItem = ({post, isCurrent = false, postCurrentVersion, theme, actions}: Props) => {
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
const [open, setOpen] = useState(isCurrent);
|
const [open, setOpen] = useState(isCurrent);
|
||||||
|
|
||||||
@@ -202,6 +206,7 @@ const EditedPostItem = ({post, isCurrent = false, postCurrentVersion, actions}:
|
|||||||
const timeStampValue = post.edit_at === 0 ? post.create_at : post.edit_at;
|
const timeStampValue = post.edit_at === 0 ? post.create_at : post.edit_at;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<CompassThemeProvider theme={theme}>
|
||||||
<div
|
<div
|
||||||
className={postContainerClass}
|
className={postContainerClass}
|
||||||
onClick={togglePost}
|
onClick={togglePost}
|
||||||
@@ -236,6 +241,7 @@ const EditedPostItem = ({post, isCurrent = false, postCurrentVersion, actions}:
|
|||||||
{open && messageContainer}
|
{open && messageContainer}
|
||||||
</PostAriaLabelDiv>
|
</PostAriaLabelDiv>
|
||||||
</div>
|
</div>
|
||||||
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,14 @@ import {closeRightHandSide} from 'actions/views/rhs';
|
|||||||
import {openModal} from 'actions/views/modals';
|
import {openModal} from 'actions/views/modals';
|
||||||
|
|
||||||
import EditedPostItem from './edited_post_item';
|
import EditedPostItem from './edited_post_item';
|
||||||
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
function mapStateToProps(state: GlobalState) {
|
function mapStateToProps(state: GlobalState) {
|
||||||
const selectedPostId = getSelectedPostId(state) || '';
|
const selectedPostId = getSelectedPostId(state) || '';
|
||||||
|
const theme = getTheme(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
theme,
|
||||||
postCurrentVersion: getPost(state, selectedPostId),
|
postCurrentVersion: getPost(state, selectedPostId),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import {useShowOnboardingTutorialStep} from 'components/tours/onboarding_tour';
|
|||||||
import {OnboardingTourSteps} from 'components/tours';
|
import {OnboardingTourSteps} from 'components/tours';
|
||||||
|
|
||||||
import {setAddChannelDropdown} from 'actions/views/add_channel_dropdown';
|
import {setAddChannelDropdown} from 'actions/views/add_channel_dropdown';
|
||||||
|
import CompassThemeProvider from 'components/compass_theme_provider/compass_theme_provider';
|
||||||
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
|
|
||||||
type SidebarHeaderContainerProps = {
|
type SidebarHeaderContainerProps = {
|
||||||
id?: string;
|
id?: string;
|
||||||
@@ -106,6 +108,7 @@ const SidebarHeader: React.FC<Props> = (props: Props): JSX.Element => {
|
|||||||
const showInviteTutorialTip = useShowOnboardingTutorialStep(OnboardingTourSteps.INVITE_PEOPLE);
|
const showInviteTutorialTip = useShowOnboardingTutorialStep(OnboardingTourSteps.INVITE_PEOPLE);
|
||||||
const usageDeltas = useGetUsageDeltas();
|
const usageDeltas = useGetUsageDeltas();
|
||||||
const isAddChannelOpen = useSelector(isAddChannelDropdownOpen);
|
const isAddChannelOpen = useSelector(isAddChannelDropdownOpen);
|
||||||
|
const theme = useSelector(getTheme);
|
||||||
const openAddChannelOpen = useCallback((open: boolean) => {
|
const openAddChannelOpen = useCallback((open: boolean) => {
|
||||||
dispatch(setAddChannelDropdown(open));
|
dispatch(setAddChannelDropdown(open));
|
||||||
}, []);
|
}, []);
|
||||||
@@ -117,7 +120,7 @@ const SidebarHeader: React.FC<Props> = (props: Props): JSX.Element => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<CompassThemeProvider theme={theme}>
|
||||||
<SidebarHeaderContainer
|
<SidebarHeaderContainer
|
||||||
id={'sidebar-header-container'}
|
id={'sidebar-header-container'}
|
||||||
>
|
>
|
||||||
@@ -164,7 +167,7 @@ const SidebarHeader: React.FC<Props> = (props: Props): JSX.Element => {
|
|||||||
showWorkTemplateButton={props.showWorkTemplateButton}
|
showWorkTemplateButton={props.showWorkTemplateButton}
|
||||||
/>
|
/>
|
||||||
</SidebarHeaderContainer>
|
</SidebarHeaderContainer>
|
||||||
</>
|
</CompassThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -93,9 +93,8 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] =
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -208,8 +207,7 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -222,8 +220,7 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] =
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -411,9 +408,8 @@ exports[`components/StatusDropdown should match snapshot with custom status and
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -526,8 +522,7 @@ exports[`components/StatusDropdown should match snapshot with custom status and
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -540,8 +535,7 @@ exports[`components/StatusDropdown should match snapshot with custom status and
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -681,9 +675,8 @@ exports[`components/StatusDropdown should match snapshot with custom status enab
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -796,8 +789,7 @@ exports[`components/StatusDropdown should match snapshot with custom status enab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -810,8 +802,7 @@ exports[`components/StatusDropdown should match snapshot with custom status enab
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -951,9 +942,8 @@ exports[`components/StatusDropdown should match snapshot with custom status expi
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1066,8 +1056,7 @@ exports[`components/StatusDropdown should match snapshot with custom status expi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1080,8 +1069,7 @@ exports[`components/StatusDropdown should match snapshot with custom status expi
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1222,9 +1210,8 @@ exports[`components/StatusDropdown should match snapshot with custom status puls
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1337,8 +1324,7 @@ exports[`components/StatusDropdown should match snapshot with custom status puls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1351,8 +1337,7 @@ exports[`components/StatusDropdown should match snapshot with custom status puls
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1467,9 +1452,8 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1582,8 +1566,7 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1596,8 +1579,7 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1704,9 +1686,8 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1819,8 +1800,7 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1833,8 +1813,7 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -1974,9 +1953,8 @@ exports[`components/StatusDropdown should not show clear status button when cust
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -2089,8 +2067,7 @@ exports[`components/StatusDropdown should not show clear status button when cust
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -2103,8 +2080,7 @@ exports[`components/StatusDropdown should not show clear status button when cust
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -2292,9 +2268,8 @@ exports[`components/StatusDropdown should show clear status button when custom s
|
|||||||
id="status-menu-away"
|
id="status-menu-away"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
rightDecorator={
|
rightDecorator={
|
||||||
<Icon
|
<CheckIcon
|
||||||
color="success"
|
color="var(--semantic-color-success)"
|
||||||
glyph="check"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -2407,8 +2382,7 @@ exports[`components/StatusDropdown should show clear status button when custom s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<AccountOutlineIcon
|
||||||
glyph="account-outline"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -2421,8 +2395,7 @@ exports[`components/StatusDropdown should show clear status button when custom s
|
|||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<MenuItemAction
|
<MenuItemAction
|
||||||
icon={
|
icon={
|
||||||
<Icon
|
<ExitToAppIcon
|
||||||
glyph="exit-to-app"
|
|
||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import classNames from 'classnames';
|
|||||||
|
|
||||||
import StatusIcon from '@mattermost/compass-components/components/status-icon'; // eslint-disable-line no-restricted-imports
|
import StatusIcon from '@mattermost/compass-components/components/status-icon'; // eslint-disable-line no-restricted-imports
|
||||||
import Text from '@mattermost/compass-components/components/text'; // eslint-disable-line no-restricted-imports
|
import Text from '@mattermost/compass-components/components/text'; // eslint-disable-line no-restricted-imports
|
||||||
import Icon from '@mattermost/compass-components/foundations/icon/Icon'; // eslint-disable-line no-restricted-imports
|
|
||||||
import {TUserStatus} from '@mattermost/compass-components/shared'; // eslint-disable-line no-restricted-imports
|
import {TUserStatus} from '@mattermost/compass-components/shared'; // eslint-disable-line no-restricted-imports
|
||||||
|
|
||||||
import {ActionFunc} from 'mattermost-redux/types/actions';
|
import {ActionFunc} from 'mattermost-redux/types/actions';
|
||||||
@@ -40,6 +39,7 @@ import {PulsatingDot} from '@mattermost/components';
|
|||||||
import {PreferenceType} from '@mattermost/types/preferences';
|
import {PreferenceType} from '@mattermost/types/preferences';
|
||||||
|
|
||||||
import './status_dropdown.scss';
|
import './status_dropdown.scss';
|
||||||
|
import {AccountOutlineIcon, CheckIcon, ExitToAppIcon} from '@mattermost/compass-icons/components';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
intl: IntlShape;
|
intl: IntlShape;
|
||||||
@@ -353,10 +353,9 @@ export class StatusDropdown extends React.PureComponent<Props, State> {
|
|||||||
const setCustomTimedDnd = needsConfirm ? () => this.showStatusChangeConfirmation('dnd') : this.setCustomTimedDnd;
|
const setCustomTimedDnd = needsConfirm ? () => this.showStatusChangeConfirmation('dnd') : this.setCustomTimedDnd;
|
||||||
|
|
||||||
const selectedIndicator = (
|
const selectedIndicator = (
|
||||||
<Icon
|
<CheckIcon
|
||||||
glyph={'check'}
|
|
||||||
size={16}
|
size={16}
|
||||||
color={'success'}
|
color={'var(--semantic-color-success)'}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -571,12 +570,7 @@ export class StatusDropdown extends React.PureComponent<Props, State> {
|
|||||||
dialogType={UserSettingsModal}
|
dialogType={UserSettingsModal}
|
||||||
dialogProps={{isContentProductSettings: false}}
|
dialogProps={{isContentProductSettings: false}}
|
||||||
text={localizeMessage('navbar_dropdown.profileSettings', 'Profile')}
|
text={localizeMessage('navbar_dropdown.profileSettings', 'Profile')}
|
||||||
icon={(
|
icon={<AccountOutlineIcon size={16}/>}
|
||||||
<Icon
|
|
||||||
size={16}
|
|
||||||
glyph={'account-outline'}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{this.props.showCompleteYourProfileTour && (
|
{this.props.showCompleteYourProfileTour && (
|
||||||
<div
|
<div
|
||||||
@@ -593,12 +587,7 @@ export class StatusDropdown extends React.PureComponent<Props, State> {
|
|||||||
id='logout'
|
id='logout'
|
||||||
onClick={this.handleEmitUserLoggedOutEvent}
|
onClick={this.handleEmitUserLoggedOutEvent}
|
||||||
text={localizeMessage('navbar_dropdown.logout', 'Log Out')}
|
text={localizeMessage('navbar_dropdown.logout', 'Log Out')}
|
||||||
icon={(
|
icon={<ExitToAppIcon size={16}/>}
|
||||||
<Icon
|
|
||||||
size={16}
|
|
||||||
glyph={'exit-to-app'}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
</Menu.Group>
|
</Menu.Group>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import React from 'react';
|
|||||||
|
|
||||||
import {Store} from 'redux';
|
import {Store} from 'redux';
|
||||||
|
|
||||||
import Icon from '@mattermost/compass-components/foundations/icon/Icon'; // eslint-disable-line no-restricted-imports
|
|
||||||
|
|
||||||
import {Client4} from 'mattermost-redux/client';
|
import {Client4} from 'mattermost-redux/client';
|
||||||
import {appsEnabled} from 'mattermost-redux/selectors/entities/apps';
|
import {appsEnabled} from 'mattermost-redux/selectors/entities/apps';
|
||||||
import {AutocompleteSuggestion, CommandArgs} from '@mattermost/types/integrations';
|
import {AutocompleteSuggestion, CommandArgs} from '@mattermost/types/integrations';
|
||||||
@@ -23,6 +21,7 @@ import {GlobalState} from 'types/store';
|
|||||||
|
|
||||||
import {AppCommandParser} from './app_command_parser/app_command_parser';
|
import {AppCommandParser} from './app_command_parser/app_command_parser';
|
||||||
import {intlShim} from './app_command_parser/app_command_parser_dependencies';
|
import {intlShim} from './app_command_parser/app_command_parser_dependencies';
|
||||||
|
import {DockWindowIcon} from '@mattermost/compass-icons/components';
|
||||||
|
|
||||||
const EXECUTE_CURRENT_COMMAND_ITEM_ID = Constants.Integrations.EXECUTE_CURRENT_COMMAND_ITEM_ID;
|
const EXECUTE_CURRENT_COMMAND_ITEM_ID = Constants.Integrations.EXECUTE_CURRENT_COMMAND_ITEM_ID;
|
||||||
const OPEN_COMMAND_IN_MODAL_ITEM_ID = Constants.Integrations.OPEN_COMMAND_IN_MODAL_ITEM_ID;
|
const OPEN_COMMAND_IN_MODAL_ITEM_ID = Constants.Integrations.OPEN_COMMAND_IN_MODAL_ITEM_ID;
|
||||||
@@ -45,10 +44,7 @@ export class CommandSuggestion extends Suggestion {
|
|||||||
case OPEN_COMMAND_IN_MODAL_ITEM_ID:
|
case OPEN_COMMAND_IN_MODAL_ITEM_ID:
|
||||||
symbolSpan = (
|
symbolSpan = (
|
||||||
<span className='block mt-1'>
|
<span className='block mt-1'>
|
||||||
<Icon
|
<DockWindowIcon size={28}/>
|
||||||
size={28}
|
|
||||||
glyph={'dock-window'}
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user