feat: 初次提交我的项目代码

This commit is contained in:
2026-01-22 17:07:39 +08:00
parent 75fad97d5d
commit 73498128dd
39 changed files with 21439 additions and 835 deletions

View File

@@ -0,0 +1,18 @@
//import AkSupa from './aksupa.uts'
//import { SUPA_URL, SUPA_KEY } from '@/ak/config.uts'
//const supa = new AkSupa(SUPA_URL, SUPA_KEY)
//const supaReady: Promise<boolean> = (async () => {
/// try {
// await supa.signIn('akoo@163.com', 'Hf2152111')
// await supa.signIn('am@163.com', 'kookoo')
// return true
// } catch (err) {
// console.error('Supabase auto sign-in failed', err)
// return false
// }
//})()
//export { supaReady }
//export default supa

View File

@@ -1,18 +1,31 @@
import AkSupa from './aksupa.uts'
import { SUPA_URL, SUPA_KEY } from '@/ak/config.uts'
// /components/supadb/aksupainstance.uts
import { createClient } from './aksupa.uts'
const supa = new AkSupa(SUPA_URL, SUPA_KEY)
// 创建并导出 Supabase 客户端实例
const supabaseUrl = 'https://your-project.supabase.co' // 替换为你的 Supabase URL
const supabaseAnonKey = 'your-anon-key' // 替换为你的匿名密钥
const supaReady: Promise<boolean> = (async () => {
try {
// await supa.signIn('akoo@163.com', 'Hf2152111')
await supa.signIn('am@163.com', 'kookoo')
return true
} catch (err) {
console.error('Supabase auto sign-in failed', err)
return false
}
})()
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
export { supaReady }
export default supa
// 导出 Supabase 实例就绪状态
export const isSupabaseReady = true
// 如果有其他需要导出的函数,可以这样导出:
export function initializeSupabase(url: string, key: string) {
return createClient(url, key)
}
// 检查连接状态的函数
export function checkConnection() {
return new Promise((resolve) => {
// 模拟连接检查
setTimeout(() => {
resolve(true)
}, 500)
})
}
// 不再使用 supaready 变量,而是提供函数
export async function ensureSupabaseReady() {
return await checkConnection()
}