Skip to content

Commit

Permalink
✨ feat: add README.md with information about Kitan Telegram bot guardian
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed May 13, 2024
1 parent 9db2111 commit d691d3b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
import {computed, reactive, ref, watch} from "vue";
import {useRoute} from 'vue-router';
import axios from 'axios';
const route = useRoute();
import VueTurnstile from 'vue-turnstile';
import Puzzles from "./components/Puzzles.vue";
import {useWebApp} from "vue-tg";
import {useWebAppBiometricManager} from 'vue-tg';
import {useWebAppPopup} from 'vue-tg'
import {useWebApp, useWebAppBiometricManager, useWebAppPopup} from "vue-tg";
import {useGyroscopeExists} from "./hook/useGyroscopeExists.ts";
import {useAccelerometerExists} from "./hook/useAccelerometerExists.ts";
const route = useRoute();
enum AuthType {
POW = 'pow',
BIOMETRIC = 'biometric',
Expand All @@ -20,19 +18,19 @@ enum AuthType {
const authToken = ref<string | undefined>(undefined)
const isBiometricInitialized = ref<boolean>(false)
const turnstile_token = ref<string>('')
const cloudflareSiteKey = ref(import.meta.env.VITE_CLOUDFLARE_SITE_KEY)
const verifyBackendMessage = reactive({
success: false,
message: ''
})
const isCloudflareFailed = reactive(
{
status: false,
message: '',
show_turnstile: true,
}
)
const turnstile_token = ref<string>('')
const cloudflareSiteKey = ref(import.meta.env.VITE_CLOUDFLARE_SITE_KEY)
const verifyBackendMessage = reactive({
success: false,
message: ''
})
const WebAppPopup = useWebAppPopup()
const WebApp = useWebApp();
const WebAppBiometricManager = useWebAppBiometricManager();
Expand Down Expand Up @@ -261,13 +259,13 @@ WebAppBiometricManager.onBiometricManagerUpdated(() => {
}
})
isCloudflareFailed.status = false
isCloudflareFailed.show_turnstile = true
watch(turnstile_token, () => {
// 长度大于 3 时自动验证
if (turnstile_token.value.length > 3) {
authCloudflare()
}
})
console.log(getUserAcc())
initBiometric()
WebApp.ready()
Expand Down

0 comments on commit d691d3b

Please sign in to comment.