This commit is contained in:
Zyronon
2025-12-29 01:15:35 +08:00
parent 0237d2e127
commit 0997a4f7f1
2 changed files with 18 additions and 5 deletions

View File

@@ -438,6 +438,7 @@ const systemPracticeText = $computed(() => {
<BaseButton
class="w-full"
v-if="settingStore.wordPracticeMode !== WordPracticeMode.Review"
:disabled="!currentStudy.review.length && !currentStudy.write.length"
@click="startPractice(WordPracticeMode.Review,true)"
>
@@ -445,6 +446,7 @@ const systemPracticeText = $computed(() => {
</BaseButton>
<BaseButton
class="w-full"
v-if="settingStore.wordPracticeMode !== WordPracticeMode.Shuffle"
:disabled="store.sdict.lastLearnIndex < 10"
@click="check(() => (showShufflePracticeSettingDialog = true))"
>

View File

@@ -2,8 +2,13 @@
import { inject, Ref } from 'vue'
import { usePracticeStore } from '@/stores/practice.ts'
import { useSettingStore } from '@/stores/setting.ts'
import { PracticeData, ShortcutKey,
WordPracticeMode, WordPracticeModeStageMap, WordPracticeStage, WordPracticeStageNameMap } from '@/types/types.ts'
import {
PracticeData,
ShortcutKey,
WordPracticeMode,
WordPracticeModeStageMap,
WordPracticeStageNameMap,
} from '@/types/types.ts'
import BaseIcon from '@/components/BaseIcon.vue'
import Tooltip from '@/components/base/Tooltip.vue'
import Progress from '@/components/base/Progress.vue'
@@ -46,7 +51,6 @@ const progress = $computed(() => {
if (!practiceData.words.length) return 0
return (practiceData.index / practiceData.words.length) * 100
})
</script>
<template>
@@ -61,7 +65,14 @@ const progress = $computed(() => {
</Tooltip>
<div class="bottom">
<Progress :percentage="progress" :stroke-width="8" color="#69b1ff" :show-text="false" />
<div class="flex gap-1">
<Tooltip
:title="WordPracticeStageNameMap[i]"
v-for="i of WordPracticeModeStageMap[settingStore.wordPracticeMode]"
>
<Progress :percentage="progress" :stroke-width="8" color="#69b1ff" :show-text="false" />
</Tooltip>
</div>
<div class="flex justify-between items-center">
<div class="stat">
@@ -99,7 +110,7 @@ const progress = $computed(() => {
<div class="relative z-999 group">
<div
class="space-y-2 btn-no-margin pb-2 left-1/2 -transform-translate-x-1/2 absolute z-999 bottom-full scale-95 opacity-0 group-hover:opacity-100 group-hover:scale-100 transition-all duration-300 pointer-events-none group-hover:pointer-events-auto"
class="space-y-2 btn-no-margin pb-2 left-1/2 -transform-translate-x-1/2 absolute z-999 bottom-full scale-95 opacity-0 group-hover:opacity-100 group-hover:scale-100 transition-all duration-300 pointer-events-none group-hover:pointer-events-auto"
>
<BaseButton size="normal" type="info" class="w-full" @click="$emit('toggleSimple')">
<div class="flex items-center gap-2">