Merge commit 'af543ab8ecb6827cbbc151c2cff181cdc3286274'

This commit is contained in:
Laisky.Cai
2024-04-08 01:13:00 +00:00
49 changed files with 1024 additions and 335 deletions

View File

@@ -91,6 +91,13 @@ export async function onGitHubOAuthClicked(github_client_id, openInNewTab = fals
}
}
export async function onLarkOAuthClicked(lark_client_id) {
const state = await getOAuthState();
if (!state) return;
let redirect_uri = `${window.location.origin}/oauth/lark`;
window.open(`https://open.feishu.cn/open-apis/authen/v1/index?redirect_uri=${redirect_uri}&app_id=${lark_client_id}&state=${state}`);
}
export function isAdmin() {
let user = localStorage.getItem('user');
if (!user) return false;