feat: add message center
This commit is contained in:
1 parent
ecec2d6efe
commit
31d3a012f9
8 files changed
+65
-15
No files matched your search
@@ -11,6 +11,7 @@ import { WebsocketProvider } from './sync.js';
|
||||
import { getApis } from './apis/index.js';
|
||||
import type { Apis, WorkspaceDetail, Callback } from './apis';
|
||||
import { setDefaultAvatar } from '../utils.js';
|
||||
import { MessageCode } from 'src/message/code.js';
|
||||
|
||||
export interface AffineProviderConstructorParams
|
||||
extends ProviderConstructorParams {
|
||||
@@ -196,7 +197,10 @@ export class AffineProvider extends BaseProvider {
|
||||
return;
|
||||
}
|
||||
}
|
||||
await this._apis.signInWithGoogle?.();
|
||||
const user = await this._apis.signInWithGoogle?.();
|
||||
if (!user) {
|
||||
this._messageCenter.send(MessageCode.loginError);
|
||||
}
|
||||
}
|
||||
|
||||
public override async getUserInfo(): Promise<User | undefined> {
|
||||
|
||||
Reference in new issue
Block a user