Main Menu: Add English discussion chat link in Beta (#1838)
This commit is contained in:
parent
2cb0848b5d
commit
2a9b516142
@ -14,4 +14,7 @@ module.exports = {
|
||||
'\\.(jsx?|tsx?)$': 'babel-jest',
|
||||
'\\.txt$': 'jest-raw-loader',
|
||||
},
|
||||
globals: {
|
||||
APP_REVISION: "jest-test",
|
||||
},
|
||||
};
|
||||
|
||||
@ -62,7 +62,7 @@ export function buildMessageStatistics(stats: GramJs.stats.MessageStats): ApiMes
|
||||
}
|
||||
|
||||
export function buildGraph(
|
||||
result: GramJs.TypeStatsGraph, isPercentage?: boolean
|
||||
result: GramJs.TypeStatsGraph, isPercentage?: boolean,
|
||||
): StatisticsGraph | undefined {
|
||||
if ((result as GramJs.StatsGraphError).error) {
|
||||
return undefined;
|
||||
|
||||
@ -8,7 +8,14 @@ import { ApiChat } from '../../../api/types';
|
||||
import { GlobalState } from '../../../global/types';
|
||||
|
||||
import {
|
||||
ANIMATION_LEVEL_MAX, APP_NAME, APP_VERSION, BETA_CHANGELOG_URL, BETA_DISCUSSION_CHAT, DEBUG, FEEDBACK_URL, IS_BETA,
|
||||
ANIMATION_LEVEL_MAX,
|
||||
APP_NAME, APP_VERSION,
|
||||
BETA_CHANGELOG_URL,
|
||||
BETA_DISCUSSION_CHAT_EN,
|
||||
BETA_DISCUSSION_CHAT_RU,
|
||||
DEBUG,
|
||||
FEEDBACK_URL,
|
||||
IS_BETA,
|
||||
} from '../../../config';
|
||||
import { IS_SINGLE_COLUMN_LAYOUT } from '../../../util/environment';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
@ -174,8 +181,12 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
window.open(BETA_CHANGELOG_URL, '_blank');
|
||||
}, []);
|
||||
|
||||
const handleDiscussionClick = useCallback(() => {
|
||||
openChatByUsername({ username: BETA_DISCUSSION_CHAT });
|
||||
const handleRuDiscussionClick = useCallback(() => {
|
||||
openChatByUsername({ username: BETA_DISCUSSION_CHAT_RU });
|
||||
}, [openChatByUsername]);
|
||||
|
||||
const handleEnDiscussionClick = useCallback(() => {
|
||||
openChatByUsername({ username: BETA_DISCUSSION_CHAT_EN });
|
||||
}, [openChatByUsername]);
|
||||
|
||||
const handleSwitchToWebK = useCallback(() => {
|
||||
@ -268,10 +279,16 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon="comments"
|
||||
onClick={handleDiscussionClick}
|
||||
onClick={handleRuDiscussionClick}
|
||||
>
|
||||
Beta Discussion (ru)
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon="comments"
|
||||
onClick={handleEnDiscussionClick}
|
||||
>
|
||||
Beta Discussion (en)
|
||||
</MenuItem>
|
||||
</>
|
||||
)}
|
||||
{withOtherVersions && (
|
||||
|
||||
@ -9,7 +9,8 @@ export const IS_PERF = process.env.APP_ENV === 'perf';
|
||||
export const IS_BETA = process.env.APP_ENV === 'staging';
|
||||
|
||||
export const BETA_CHANGELOG_URL = 'https://telegra.ph/WebZ-Beta-04-01';
|
||||
export const BETA_DISCUSSION_CHAT = 'webzcommentsru';
|
||||
export const BETA_DISCUSSION_CHAT_RU = 'webzcommentsru';
|
||||
export const BETA_DISCUSSION_CHAT_EN = 'webzchat';
|
||||
|
||||
export const DEBUG_ALERT_MSG = 'Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.';
|
||||
export const DEBUG_GRAMJS = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user