Web: Files: Profile: add profile and settings actions
This commit is contained in:
parent
a650a8e0ca
commit
e4f9138e25
@ -8,6 +8,17 @@ import Text from "@appserver/components/text";
|
|||||||
import ContextMenuButton from "@appserver/components/context-menu-button";
|
import ContextMenuButton from "@appserver/components/context-menu-button";
|
||||||
import { isDesktop, isMobile, isMobileOnly } from "react-device-detect";
|
import { isDesktop, isMobile, isMobileOnly } from "react-device-detect";
|
||||||
import { isTablet } from "@appserver/components/utils/device";
|
import { isTablet } from "@appserver/components/utils/device";
|
||||||
|
import { combineUrl } from "@appserver/common/utils";
|
||||||
|
import { AppServerConfig } from "@appserver/common/constants";
|
||||||
|
|
||||||
|
const { proxyURL } = AppServerConfig;
|
||||||
|
|
||||||
|
const PROXY_HOMEPAGE_URL = combineUrl(proxyURL, "/");
|
||||||
|
const PROFILE_SELF_URL = combineUrl(
|
||||||
|
PROXY_HOMEPAGE_URL,
|
||||||
|
"/products/people/view/@self"
|
||||||
|
);
|
||||||
|
const PROFILE_MY_URL = combineUrl(PROXY_HOMEPAGE_URL, "/my");
|
||||||
|
|
||||||
const StyledProfile = styled.div`
|
const StyledProfile = styled.div`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -59,11 +70,15 @@ const Profile = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onProfileClick = () => {
|
const onProfileClick = () => {
|
||||||
console.log("onProfileClick");
|
peopleAvailable
|
||||||
|
? history.push(PROFILE_SELF_URL)
|
||||||
|
: history.push(PROFILE_MY_URL);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSettingsClick = () => {
|
const onSettingsClick = () => {
|
||||||
console.log("onSettingsClick");
|
const settingsUrl =
|
||||||
|
settingsModule && combineUrl(PROXY_HOMEPAGE_URL, settingsModule.link);
|
||||||
|
history.push(settingsUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onHotkeysClick = () => {
|
const onHotkeysClick = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user