feat: 更新组件和配置,增强功能和用户体验, 添加签到功能

- 在 .editorconfig 中调整文件格式设置,统一代码风格。
- 在 default.d.ts 中为 naive-ui 添加 TabPaneSlots 接口声明,增强类型支持。
- 在多个组件中优化了模板和样式,提升用户交互体验。
- 在 ClientAutoAction.vue 中新增签到设置标签页,丰富功能选项。
- 在 Utils.ts 中增强 GUID 处理逻辑,增加输入验证和错误处理。
- 更新多个组件的逻辑,简化代码结构,提升可读性和维护性。
This commit is contained in:
2025-04-26 01:35:59 +08:00
parent e48b3df236
commit 8bed5bbc1a
24 changed files with 2004 additions and 328 deletions

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { TURNSTILE_KEY } from '@/data/constants'
import { isDarkMode } from '@/Utils';
import { onUnmounted, ref } from 'vue'
import { onMounted } from 'vue'
@@ -9,6 +10,11 @@ const turnstile = ref()
const token = defineModel<string>('token', {
default: '',
})
// Set theme based on dark mode status
const theme = computed(() => {
return isDarkMode ? 'dark' : 'light'
})
onUnmounted(() => {
turnstile.value?.remove()
})
@@ -27,7 +33,7 @@ function reset() {
ref="turnstile"
v-model="token"
:site-key="TURNSTILE_KEY"
theme="auto"
:theme="theme"
style="text-align: center"
/>
</template>