mirror of
https://github.com/outline/outline.git
synced 2025-03-28 14:34:35 +00:00
Add onLogout method to desktop bridge
This commit is contained in:
@ -10,6 +10,7 @@ import Team from "~/models/Team";
|
||||
import User from "~/models/User";
|
||||
import env from "~/env";
|
||||
import { client } from "~/utils/ApiClient";
|
||||
import Desktop from "~/utils/Desktop";
|
||||
import Storage from "~/utils/Storage";
|
||||
|
||||
const AUTH_STORE = "AUTH_STORE";
|
||||
@ -325,5 +326,8 @@ export default class AuthStore {
|
||||
this.team = null;
|
||||
this.policies = [];
|
||||
this.token = null;
|
||||
|
||||
// Tell the host application we logged out, if any – allows window cleanup.
|
||||
Desktop.bridge?.onLogout?.();
|
||||
};
|
||||
}
|
||||
|
5
app/typings/window.d.ts
vendored
5
app/typings/window.d.ts
vendored
@ -31,6 +31,11 @@ declare global {
|
||||
*/
|
||||
onTitlebarDoubleClick: () => Promise<void>;
|
||||
|
||||
/**
|
||||
* Passes log out events from the app to the main process
|
||||
*/
|
||||
onLogout: () => Promise<void>;
|
||||
|
||||
/**
|
||||
* Adds a custom host to config
|
||||
*/
|
||||
|
Reference in New Issue
Block a user