mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
JS-5728: fix
This commit is contained in:
parent
12bdae76ca
commit
6d70b2efae
7 changed files with 28 additions and 22 deletions
|
@ -12,6 +12,7 @@ enum Stage {
|
|||
const PageAuthOnboard = observer(forwardRef<{}, I.PageComponent>(() => {
|
||||
|
||||
const { account } = S.Auth;
|
||||
const { redirect } = S.Common;
|
||||
const nodeRef = useRef(null);
|
||||
const frameRef = useRef(null);
|
||||
const phraseRef = useRef(null);
|
||||
|
@ -61,24 +62,30 @@ const PageAuthOnboard = observer(forwardRef<{}, I.PageComponent>(() => {
|
|||
S.Common.getRef('mainAnimation')?.destroy();
|
||||
U.Space.initSpaceState();
|
||||
|
||||
const newRouteParam = { replace: true };
|
||||
|
||||
if (S.Auth.startingId) {
|
||||
U.Object.getById(S.Auth.startingId, {}, object => {
|
||||
if (object) {
|
||||
U.Object.openRoute(object, newRouteParam);
|
||||
} else {
|
||||
U.Space.openDashboard(newRouteParam);
|
||||
};
|
||||
});
|
||||
} else {
|
||||
U.Space.openDashboard(newRouteParam);
|
||||
};
|
||||
const routeParam = { replace: true };
|
||||
|
||||
Storage.set('primitivesOnboarding', true);
|
||||
Storage.setOnboarding('objectDescriptionButton');
|
||||
Storage.setOnboarding('typeResetLayout');
|
||||
|
||||
if (redirect) {
|
||||
U.Router.go(redirect, routeParam);
|
||||
S.Common.redirectSet('');
|
||||
return;
|
||||
};
|
||||
|
||||
if (S.Auth.startingId) {
|
||||
U.Object.getById(S.Auth.startingId, {}, object => {
|
||||
if (object) {
|
||||
U.Object.openRoute(object, routeParam);
|
||||
} else {
|
||||
U.Space.openDashboard(routeParam);
|
||||
};
|
||||
});
|
||||
} else {
|
||||
U.Space.openDashboard(routeParam);
|
||||
};
|
||||
|
||||
Onboarding.start('basics', false);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -35,6 +35,8 @@ const PageAuthPinCheck = observer(forwardRef<{}, I.PageComponent>(() => {
|
|||
} else {
|
||||
U.Router.go('/', routeParam);
|
||||
};
|
||||
|
||||
S.Common.redirectSet('');
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { forwardRef, useRef, useState, useImperativeHandle, useEffect } from 'react';
|
||||
import { Loader, Title, Error, Frame, Button, Footer } from 'Component';
|
||||
import { I, C, S, U, J, translate, Preview } from 'Lib';
|
||||
import { I, C, S, U, J, translate, Preview, Onboarding } from 'Lib';
|
||||
|
||||
interface PageMainInviteRefProps {
|
||||
resize: () => void;
|
||||
|
@ -8,7 +8,7 @@ interface PageMainInviteRefProps {
|
|||
|
||||
const PageMainInvite = forwardRef<PageMainInviteRefProps, I.PageComponent>((props, ref) => {
|
||||
|
||||
const { isPopup, match, location } = props;
|
||||
const { isPopup, location } = props;
|
||||
const nodeRef = useRef(null);
|
||||
const frameRef = useRef(null);
|
||||
const cidRef = useRef('');
|
||||
|
@ -27,6 +27,7 @@ const PageMainInvite = forwardRef<PageMainInviteRefProps, I.PageComponent>((prop
|
|||
|
||||
const request = (invite) => {
|
||||
S.Popup.open('inviteRequest', {
|
||||
onClose: () => Onboarding.start('basics', isPopup),
|
||||
data: {
|
||||
invite,
|
||||
cid,
|
||||
|
@ -98,6 +99,7 @@ const PageMainInvite = forwardRef<PageMainInviteRefProps, I.PageComponent>((prop
|
|||
const creatorName = message.creatorName || translate('defaultNamePage');
|
||||
|
||||
S.Popup.open('confirm', {
|
||||
onClose: () => Onboarding.start('basics', isPopup),
|
||||
data: {
|
||||
icon: 'join',
|
||||
title: U.Common.sprintf(translate('popupConfirmJoinSpaceTitle'), spaceName),
|
||||
|
|
|
@ -154,8 +154,6 @@ const SidebarLeft = observer(class SidebarLeft extends React.Component<{}, State
|
|||
};
|
||||
|
||||
this.frame = raf(() => {
|
||||
console.log('onResizeMove', e.pageX, sidebar.isAnimating);
|
||||
|
||||
if (sidebar.isAnimating) {
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -100,8 +100,6 @@ class Sidebar {
|
|||
this.resizePage(0, null, true);
|
||||
this.vaultHide();
|
||||
|
||||
console.log('CLOSE');
|
||||
|
||||
this.removeAnimation(() => {
|
||||
this.objLeft.addClass('isClosed');
|
||||
|
||||
|
@ -127,8 +125,6 @@ class Sidebar {
|
|||
this.setAnimating(true);
|
||||
this.vaultShow(width);
|
||||
|
||||
console.log('OPEN');
|
||||
|
||||
window.clearTimeout(this.timeoutAnim);
|
||||
this.timeoutAnim = window.setTimeout(() => {
|
||||
this.objLeft.removeClass('isClosed');
|
||||
|
|
|
@ -267,6 +267,8 @@ class UtilData {
|
|||
};
|
||||
};
|
||||
|
||||
S.Common.redirectSet('');
|
||||
|
||||
if (callBack) {
|
||||
callBack();
|
||||
};
|
||||
|
|
|
@ -108,7 +108,6 @@ class UtilRouter {
|
|||
|
||||
S.Menu.closeAll();
|
||||
S.Popup.closeAll();
|
||||
S.Common.redirectSet('');
|
||||
sidebar.rightPanelToggle(false, false, keyboard.isPopup());
|
||||
|
||||
if (routeParam.spaceId && ![ space ].includes(routeParam.spaceId)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue