mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
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:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user