Fix Bug 57840: add community forum and help center buttons
This commit is contained in:
parent
24ff817701
commit
942030614f
@ -6,5 +6,7 @@
|
||||
"RecoverDescribeYourProblemPlaceholder": "Describe your problem",
|
||||
"RecoverTextBody": "If you can't log in with your existing account or want to be registered as a new user, contact the portal administrator.",
|
||||
"RecoverTitle": "Access recovery",
|
||||
"TurnOnDesktopVersion": "Turn on desktop version"
|
||||
"TurnOnDesktopVersion": "Turn on desktop version",
|
||||
"CommunityForum": "Community forum",
|
||||
"HelpCenter": "Help center"
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ const PROFILE_SELF_URL = combineUrl(
|
||||
"/products/people/view/@self"
|
||||
);
|
||||
const PROFILE_MY_URL = combineUrl(PROXY_HOMEPAGE_URL, "/my");
|
||||
const COMMUNITY_URL = "https://forum.onlyoffice.com/c/personal/43";
|
||||
const HELP_URL =
|
||||
"https://helpcenter.onlyoffice.com/userguides/workspace-personal.aspx";
|
||||
|
||||
const StyledNav = styled.nav`
|
||||
display: flex;
|
||||
@ -101,6 +104,14 @@ const HeaderNav = ({
|
||||
setHotkeyPanelVisible(true);
|
||||
}, []);
|
||||
|
||||
const onCommunityClick = useCallback(() => {
|
||||
window.open(COMMUNITY_URL, "_blank");
|
||||
}, []);
|
||||
|
||||
const onHelpClick = useCallback(() => {
|
||||
window.open(HELP_URL, "_blank");
|
||||
}, []);
|
||||
|
||||
const onCloseDialog = () => setVisibleDialog(false);
|
||||
const onDebugClick = useCallback(() => {
|
||||
setVisibleDebugDialog(true);
|
||||
@ -154,6 +165,21 @@ const HeaderNav = ({
|
||||
}
|
||||
}
|
||||
|
||||
const communityForum = isPersonal
|
||||
? {
|
||||
key: "CommunityBtn",
|
||||
label: t("CommunityForum"),
|
||||
onClick: onCommunityClick,
|
||||
}
|
||||
: null;
|
||||
|
||||
const helpCenter = isPersonal
|
||||
? {
|
||||
key: "HelpBtn",
|
||||
label: t("HelpCenter"),
|
||||
onClick: onHelpClick,
|
||||
}
|
||||
: null;
|
||||
const actions = [
|
||||
{
|
||||
key: "ProfileBtn",
|
||||
@ -172,6 +198,8 @@ const HeaderNav = ({
|
||||
}),
|
||||
},
|
||||
hotkeys,
|
||||
communityForum,
|
||||
helpCenter,
|
||||
{
|
||||
key: "AboutBtn",
|
||||
label: t("AboutCompanyTitle"),
|
||||
|
Loading…
Reference in New Issue
Block a user