feat(core): open in app for self-hosted (#9231)

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/545994dd-6f7d-468d-a90c-45cb382fdb9d.mp4">20241222-1456-24.5006677.mp4</video>

fix AF-1815
This commit is contained in:
pengx17
2024-12-24 03:04:01 +00:00
parent 884bbd2ada
commit 17c2293986
14 changed files with 140 additions and 43 deletions

View File

@@ -1,4 +1,6 @@
import { SignInPanel } from '@affine/core/components/sign-in';
import type { AuthSessionStatus } from '@affine/core/modules/cloud/entities/session';
import { useCallback } from 'react';
import { MobileSignInLayout } from './layout';
@@ -9,9 +11,22 @@ export const MobileSignInPanel = ({
onClose: () => void;
server?: string;
}) => {
const onAuthenticated = useCallback(
(status: AuthSessionStatus) => {
if (status === 'authenticated') {
onClose();
}
},
[onClose]
);
return (
<MobileSignInLayout>
<SignInPanel onClose={onClose} server={server} />
<SignInPanel
onSkip={onClose}
onAuthenticated={onAuthenticated}
server={server}
/>
</MobileSignInLayout>
);
};