refactor(stage-*): analytics and telemetry, including consent (#1414)

---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
This commit is contained in:
Rin
2026-03-24 13:01:39 +08:00
committed by GitHub
co-authored by autofix-ci[bot] RainbowBird Neko
parent 8baaff7778
commit f85a809d7c
37 changed files with 425 additions and 191 deletions
@@ -1,12 +1,17 @@
<script setup lang="ts">
import { SwitchRoot, SwitchThumb } from 'reka-ui'
const props = defineProps<{
disabled?: boolean
}>()
const modelValue = defineModel<boolean>({ required: true })
</script>
<template>
<SwitchRoot
v-model="modelValue"
:disabled="props.disabled"
:class="[
'duration-250 ease-in-out',
'focus-within:outline-none',
@@ -16,6 +21,7 @@ const modelValue = defineModel<boolean>({ required: true })
'data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-neutral-300 data-[state=checked]:dark:bg-primary-400/80 dark:data-[state=unchecked]:bg-neutral-800',
'relative h-7 w-12.5 rounded-full',
'shadow-sm focus-within:shadow-none',
props.disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
]"
>
<SwitchThumb
@@ -4,6 +4,7 @@ import { Checkbox } from '../checkbox'
const props = defineProps<{
label?: string
description?: string
disabled?: boolean
}>()
const modelValue = defineModel<boolean>({ required: true })
@@ -24,7 +25,7 @@ const modelValue = defineModel<boolean>({ required: true })
</slot>
</div>
</div>
<Checkbox v-model="modelValue" />
<Checkbox v-model="modelValue" :disabled="props.disabled" />
</div>
</label>
</template>