Web:Client: change route from 'view/@self' to 'profile'

This commit is contained in:
Timofey Boyko 2023-06-09 14:52:25 +03:00
parent ad6904ad6f
commit 4cf3873d95
7 changed files with 8 additions and 7 deletions

View File

@ -209,7 +209,7 @@ const ArticleBodyContent = (props) => {
if (location.pathname.includes("/settings") && activeItemId !== "settings")
return setActiveItemId("settings");
if (location.pathname.includes("view/@self")) {
if (location.pathname.includes("profile")) {
if (isVisitor) {
if (activeItemId) return;
return setActiveItemId(rootFolderId || roomsFolderId);

View File

@ -457,7 +457,7 @@ const ArticleMainButtonContent = (props) => {
? !isAccountsPage
: !security?.Create;
const isProfile = location.pathname.includes("/view/@self");
const isProfile = location.pathname.includes("/profile");
if (showArticleLoader)
return isMobileArticle ? null : <Loaders.ArticleButton height="32px" />;

View File

@ -17,7 +17,7 @@ class ChangeEmail extends React.PureComponent {
tryRedirectTo(
combineUrl(
window.DocSpaceConfig?.proxy?.url,
`/accounts/view/@self?email_change=success`
`/profile?email_change=success`
)
);
})
@ -54,7 +54,7 @@ class ChangeEmail extends React.PureComponent {
tryRedirectTo(
combineUrl(
window.DocSpaceConfig?.proxy?.url,
`/accounts/view/@self?email_change=success`
`/profile?email_change=success`
)
);
})

View File

@ -89,6 +89,7 @@ const Header = (props) => {
};
const onClickBack = () => {
console.log(location.state);
if (location?.state?.fromUrl) {
return navigate(location?.state?.fromUrl);
}

View File

@ -28,7 +28,7 @@ import { showEmailActivationToast } from "SRC_DIR/helpers/people-helpers";
const PROXY_HOMEPAGE_URL = combineUrl(window.DocSpaceConfig?.proxy?.url, "/");
const PROFILE_SELF_URL = "/view/@self";
const PROFILE_SELF_URL = "/profile";
class AccountsContextOptionsStore {
authStore = null;

View File

@ -19,7 +19,7 @@ import { LIVE_CHAT_LOCAL_STORAGE_KEY } from "@docspace/common/constants";
import toastr from "@docspace/components/toast/toastr";
const PROXY_HOMEPAGE_URL = combineUrl(window.DocSpaceConfig?.proxy?.url, "/");
const PROFILE_SELF_URL = combineUrl(PROXY_HOMEPAGE_URL, "/view/@self");
const PROFILE_SELF_URL = combineUrl(PROXY_HOMEPAGE_URL, "/profile");
//const PROFILE_MY_URL = combineUrl(PROXY_HOMEPAGE_URL, "/my");
const ABOUT_URL = combineUrl(PROXY_HOMEPAGE_URL, "/about");
const PAYMENTS_URL = combineUrl(

View File

@ -242,7 +242,7 @@ class InfoPanelStore {
window.DocSpaceConfig?.proxy?.url,
config.homepage,
"/accounts",
"/view/@self",
"/profile",
];
this.selectedFolderStore.setSelectedFolder(null);
this.treeFoldersStore.setSelectedNode(["accounts", "filter"]);