refactor: move task components to components/task/

This commit is contained in:
2026-04-01 03:55:01 -06:00
parent e4359e8093
commit 6fb3bc0198
8 changed files with 38 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import { ref } from "vue"
import { useStorage } from "@vueuse/core"
import { TASK_TYPE } from "../utils/const"
const currentTask = window.location.pathname.startsWith("/challenge")
@@ -7,4 +8,4 @@ const currentTask = window.location.pathname.startsWith("/challenge")
export const taskTab = ref(currentTask)
export const taskId = ref(0)
export const challengeDisplay = ref(0)
export const challengeDisplay = useStorage("challenge-display", 0)

View File

@@ -1,9 +1,7 @@
import { useStorage } from "@vueuse/core"
import { ref } from "vue"
const urlParams = new URLSearchParams(window.location.search)
const currentStep = urlParams.get("step") ?? "1"
export const step = ref(Number(currentStep))
export const step = useStorage("tutorial-step", 1)
export const tutorialIds = ref<number[]>([])
export function prevDisabled(): boolean {