feat: add ReCaptchaV2 & Turnstile

This commit is contained in:
Tony Yang
2025-04-16 16:35:24 +08:00
parent 9ac3339557
commit 037ccb5781
23 changed files with 372 additions and 176 deletions
+8
View File
@@ -3,13 +3,21 @@ import './style.css';
import App from './App.vue';
import router from './router';
import { createPinia } from 'pinia';
import { install as installRecaptcha } from "vue3-recaptcha-v2";
import { install as installDarkMode } from './lib/darkMode';
const pinia = createPinia();
const app = createApp(App);
app.use(pinia);
app.use(router);
app.use(installDarkMode);
app.use(installRecaptcha, {
sitekey: import.meta.env.VITE_RECAPTCHA_SITEKEY
});
app.config.globalProperties.$hcaptchaSitekey = import.meta.env.VITE_HCAPTCHA_SITEKEY;
app.config.globalProperties.$recaptchaSitekey = import.meta.env.VITE_RECAPTCHA_SITEKEY;
app.config.globalProperties.$turnstileSitekey = import.meta.env.VITE_TURNSTILE_SITEKEY;
app.mount('#app');