diff --git a/src/hooks/sound.ts b/src/hooks/sound.ts
index 78a02179..00fda8b1 100644
--- a/src/hooks/sound.ts
+++ b/src/hooks/sound.ts
@@ -89,7 +89,6 @@ export function usePlayCorrect() {
export function usePlayWordAudio() {
const settingStore = useSettingStore()
- const store = useBaseStore()
const audio = $ref(new Audio())
function playAudio(word: string) {
@@ -99,12 +98,6 @@ export function usePlayWordAudio() {
} else if (settingStore.wordSoundType === 'us') {
url = `${PronunciationApi}${word}&type=2`
}
- if (store.currentDict.language === 'ja') {
- url += '&le=jap'
- }
- if (store.currentDict.language === 'de') {
- url += '&le=de'
- }
audio.src = url
audio.volume = settingStore.wordSoundVolume / 100
audio.playbackRate = settingStore.wordSoundSpeed
@@ -160,7 +153,6 @@ export function useWatchAllSound() {
watch([
() => settingStore.wordSound,
() => settingStore.keyboardSound,
- () => settingStore.translateSound,
() => settingStore.effectSound,
], (n) => {
settingStore.allSound = n.some(v => v);
@@ -173,6 +165,5 @@ export function useChangeAllSound(e: boolean) {
settingStore.allSound = e
settingStore.wordSound = e
settingStore.keyboardSound = e
- settingStore.translateSound = e
settingStore.effectSound = e
-}
\ No newline at end of file
+}
diff --git a/src/pages/mobile/my/setting/MusicSetting.vue b/src/pages/mobile/my/setting/MusicSetting.vue
index 5d1eb939..eab50f54 100644
--- a/src/pages/mobile/my/setting/MusicSetting.vue
+++ b/src/pages/mobile/my/setting/MusicSetting.vue
@@ -228,6 +228,7 @@ const store = useBaseStore()
border-bottom: 1px solid #c4c3c3;
}
}
+
.el-option-row {
width: 100%;
display: flex;
@@ -239,4 +240,4 @@ const store = useBaseStore()
}
}
-
\ No newline at end of file
+
diff --git a/src/pages/mobile/practice/index.vue b/src/pages/mobile/practice/index.vue
index d9b5be20..dee46a48 100644
--- a/src/pages/mobile/practice/index.vue
+++ b/src/pages/mobile/practice/index.vue
@@ -18,36 +18,12 @@ defineOptions({
name: 'PracticeWord'
})
-const statisticsStore = usePracticeStore()
const store = useBaseStore()
const settingStore = useSettingStore()
const runtimeStore = useRuntimeStore()
const {toggleTheme} = useTheme()
const practiceRef: any = $ref()
-watch(statisticsStore, () => {
- if (statisticsStore.inputWordNumber < 1) {
- return statisticsStore.correctRate = -1
- }
- if (statisticsStore.wrong > statisticsStore.inputWordNumber) {
- return statisticsStore.correctRate = 0
- }
- statisticsStore.correctRate = 100 - Math.trunc(((statisticsStore.wrong) / (statisticsStore.inputWordNumber)) * 100)
-})
-
-
-function test() {
- MessageBox.confirm(
- '2您选择了“本地翻译”,但译文内容却为空白,是否修改为“不需要翻译”并保存?',
- '1提示',
- () => {
- console.log('ok')
- },
- () => {
- console.log('cencal')
- })
-}
-
function write() {
// console.log('write')
settingStore.dictation = true
@@ -83,10 +59,6 @@ function openSetting() {
runtimeStore.showSettingModal = true
}
-function openDictDetail() {
- emitter.emit(EventKey.openDictModal, 'detail')
-}
-
function toggleConciseMode() {
settingStore.showToolbar = !settingStore.showToolbar
settingStore.showPanel = settingStore.showToolbar
@@ -112,7 +84,6 @@ onMounted(() => {
emitter.on(ShortcutKey.ToggleShowTranslate, toggleShowTranslate)
emitter.on(ShortcutKey.ToggleDictation, toggleDictation)
emitter.on(ShortcutKey.OpenSetting, openSetting)
- emitter.on(ShortcutKey.OpenDictDetail, openDictDetail)
emitter.on(ShortcutKey.ToggleTheme, toggleTheme)
emitter.on(ShortcutKey.ToggleConciseMode, toggleConciseMode)
emitter.on(ShortcutKey.TogglePanel, togglePanel)
@@ -129,7 +100,6 @@ onUnmounted(() => {
emitter.off(ShortcutKey.ToggleShowTranslate, toggleShowTranslate)
emitter.off(ShortcutKey.ToggleDictation, toggleDictation)
emitter.off(ShortcutKey.OpenSetting, openSetting)
- emitter.off(ShortcutKey.OpenDictDetail, openDictDetail)
emitter.off(ShortcutKey.ToggleTheme, toggleTheme)
emitter.off(ShortcutKey.ToggleConciseMode, toggleConciseMode)
emitter.off(ShortcutKey.TogglePanel, togglePanel)
@@ -146,4 +116,4 @@ useStartKeyboardEventListener()
\ No newline at end of file
+
diff --git a/src/pages/mobile/practice/practice-word/TypingWord.vue b/src/pages/mobile/practice/practice-word/TypingWord.vue
index 34ed8025..83416d33 100644
--- a/src/pages/mobile/practice/practice-word/TypingWord.vue
+++ b/src/pages/mobile/practice/practice-word/TypingWord.vue
@@ -67,7 +67,6 @@ watch(() => props.words, () => {
data.wrongWords = []
statisticsStore.startDate = Date.now()
- statisticsStore.correctRate = -1
statisticsStore.inputWordNumber = 0
statisticsStore.wrong = 0
stat = cloneDeep(DefaultDisplayStatistics)
@@ -320,7 +319,6 @@ onMounted(() => {
@@ -455,4 +453,4 @@ onMounted(() => {
}
}
-
\ No newline at end of file
+
diff --git a/src/pages/pc/article/LearnArticle.vue b/src/pages/pc/article/LearnArticle.vue
index 8a13adc6..1be8dbbb 100644
--- a/src/pages/pc/article/LearnArticle.vue
+++ b/src/pages/pc/article/LearnArticle.vue
@@ -11,39 +11,15 @@ import {useRuntimeStore} from "@/stores/runtime.ts";
import {MessageBox} from "@/utils/MessageBox.tsx";
import PracticeArticle from "@/pages/pc/article/practice-article/index.vue";
import {ShortcutKey} from "@/types.ts";
-import DictModal from "@/pages/pc/components/dialog/DictDiglog.vue";
import {useStartKeyboardEventListener} from "@/hooks/event.ts";
import useTheme from "@/hooks/theme.ts";
-const statisticsStore = usePracticeStore()
const store = useBaseStore()
const settingStore = useSettingStore()
const runtimeStore = useRuntimeStore()
const {toggleTheme} = useTheme()
const practiceRef: any = $ref()
-watch(statisticsStore, () => {
- if (statisticsStore.inputWordNumber < 1) {
- return statisticsStore.correctRate = -1
- }
- if (statisticsStore.wrong > statisticsStore.inputWordNumber) {
- return statisticsStore.correctRate = 0
- }
- statisticsStore.correctRate = 100 - Math.trunc(((statisticsStore.wrong) / (statisticsStore.inputWordNumber)) * 100)
-})
-
-
-function test() {
- MessageBox.confirm(
- '2您选择了“本地翻译”,但译文内容却为空白,是否修改为“不需要翻译”并保存?',
- '1提示',
- () => {
- console.log('ok')
- },
- () => {
- console.log('cencal')
- })
-}
function write() {
// console.log('write')
@@ -80,10 +56,6 @@ function openSetting() {
runtimeStore.showSettingModal = true
}
-function openDictDetail() {
- emitter.emit(EventKey.openDictModal, 'detail')
-}
-
function toggleConciseMode() {
settingStore.showToolbar = !settingStore.showToolbar
settingStore.showPanel = settingStore.showToolbar
@@ -109,7 +81,6 @@ onMounted(() => {
emitter.on(ShortcutKey.ToggleShowTranslate, toggleShowTranslate)
emitter.on(ShortcutKey.ToggleDictation, toggleDictation)
emitter.on(ShortcutKey.OpenSetting, openSetting)
- emitter.on(ShortcutKey.OpenDictDetail, openDictDetail)
emitter.on(ShortcutKey.ToggleTheme, toggleTheme)
emitter.on(ShortcutKey.ToggleConciseMode, toggleConciseMode)
emitter.on(ShortcutKey.TogglePanel, togglePanel)
@@ -126,7 +97,6 @@ onUnmounted(() => {
emitter.off(ShortcutKey.ToggleShowTranslate, toggleShowTranslate)
emitter.off(ShortcutKey.ToggleDictation, toggleDictation)
emitter.off(ShortcutKey.OpenSetting, openSetting)
- emitter.off(ShortcutKey.OpenDictDetail, openDictDetail)
emitter.off(ShortcutKey.ToggleTheme, toggleTheme)
emitter.off(ShortcutKey.ToggleConciseMode, toggleConciseMode)
emitter.off(ShortcutKey.TogglePanel, togglePanel)
@@ -137,7 +107,6 @@ useStartKeyboardEventListener()
-
diff --git a/src/pages/pc/components/QuestionForm.vue b/src/pages/pc/article/components/QuestionForm.vue
similarity index 100%
rename from src/pages/pc/components/QuestionForm.vue
rename to src/pages/pc/article/components/QuestionForm.vue
diff --git a/src/pages/pc/components/QuestionItem.vue b/src/pages/pc/article/components/QuestionItem.vue
similarity index 100%
rename from src/pages/pc/components/QuestionItem.vue
rename to src/pages/pc/article/components/QuestionItem.vue
diff --git a/src/pages/pc/article/practice-article/TypingArticle.vue b/src/pages/pc/article/practice-article/TypingArticle.vue
index 7373c5ec..9f4a90f0 100644
--- a/src/pages/pc/article/practice-article/TypingArticle.vue
+++ b/src/pages/pc/article/practice-article/TypingArticle.vue
@@ -12,7 +12,7 @@ import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
import ContextMenu from '@imengyu/vue3-context-menu'
import {getTranslateText} from "@/hooks/article.ts";
import BaseButton from "@/components/BaseButton.vue";
-import QuestionForm from "@/pages/pc/components/QuestionForm.vue";
+import QuestionForm from "@/pages/pc/article/components/QuestionForm.vue";
interface IProps {
article: Article,
diff --git a/src/pages/pc/article/practice-article/index.vue b/src/pages/pc/article/practice-article/index.vue
index b2873e61..a67b25e2 100644
--- a/src/pages/pc/article/practice-article/index.vue
+++ b/src/pages/pc/article/practice-article/index.vue
@@ -2,7 +2,7 @@
import TypingArticle from "./TypingArticle.vue";
import {Article, ArticleItem, ArticleWord, DisplayStatistics, getDefaultArticle, ShortcutKey, Word} from "@/types.ts";
import {cloneDeep} from "lodash-es";
-import TypingWord from "@/pages/pc/components/TypingWord.vue";
+import TypingWord from "@/pages/pc/word/components/TypingWord.vue";
import Panel from "../../components/Panel.vue";
import {onMounted, onUnmounted} from "vue";
import {useBaseStore} from "@/stores/base.ts";
@@ -277,32 +277,16 @@ const {playSentenceAudio} = usePlaySentenceAudio()
-
-
-
- playSentenceAudio(e,audioRef,articleData.article)"
- :article="articleData.article"
- />
-
-
-
-
+
playSentenceAudio(e,audioRef,articleData.article)"
+ :article="articleData.article"
+ />
@@ -312,7 +296,6 @@ const {playSentenceAudio} = usePlaySentenceAudio()
diff --git a/src/pages/pc/components/Fireworks.vue b/src/pages/pc/components/Fireworks.vue
deleted file mode 100644
index 91392ca3..00000000
--- a/src/pages/pc/components/Fireworks.vue
+++ /dev/null
@@ -1,262 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pages/pc/components/Setting.vue b/src/pages/pc/components/Setting.vue
index adc6173b..56e262bf 100644
--- a/src/pages/pc/components/Setting.vue
+++ b/src/pages/pc/components/Setting.vue
@@ -242,26 +242,8 @@ function importData(e) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-import {useBaseStore} from "@/stores/base.ts"
-import "vue-activity-calendar/style.css";
-import WordListDialog from "@/pages/pc/components/dialog/WordListDialog.vue";
-import {emitter, EventKey, useEvent} from "@/utils/eventBus.ts";
-import BaseIcon from "@/components/BaseIcon.vue";
-import Dialog from "@/pages/pc/components/dialog/Dialog.vue";
-import {_dateFormat} from "@/utils";
-import {sumBy} from "lodash-es";
-
-const store = useBaseStore()
-
-let show = $ref(false)
-
-function showAllWordModal() {
- emitter.emit(EventKey.openWordListModal, {
- title: store.sdict.name,
- translateLanguage: store.sdict.translateLanguage,
- list: store.sdict.words
- })
-}
-
-useEvent(EventKey.openDictModal, () => {
- show = true
-})
-
-const startDate = $computed(() => {
- if (store.sdict.statistics.length) {
- return _dateFormat(store.sdict.statistics[0].startDate, 'YYYY-MM-DD')
- } else {
- return '-'
- }
-})
-
-const speedTime = $computed(() => {
- let d = Math.ceil(sumBy(store.sdict.statistics, 'speed') / 1000 / 60)
- if (d < 60) return d + '分钟'
- else return (d / 60).toFixed(1) + '小时'
-})
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/pc/components/toolbar/VolumeSetting.vue b/src/pages/pc/components/toolbar/VolumeSetting.vue
deleted file mode 100644
index 5ee67ab8..00000000
--- a/src/pages/pc/components/toolbar/VolumeSetting.vue
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 音效设置
-
-
-
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/pc/dict2/index.vue b/src/pages/pc/dict2/index.vue
deleted file mode 100644
index 51d7cd66..00000000
--- a/src/pages/pc/dict2/index.vue
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ formatLangType(item) }}
-
-
-
-
-
-
-
-
-
- 释义:
-
- {{
- formatLangType(i)
- }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/pc/word/Footer.vue b/src/pages/pc/word/Footer.vue
index 3d99b494..c936bd27 100644
--- a/src/pages/pc/word/Footer.vue
+++ b/src/pages/pc/word/Footer.vue
@@ -9,8 +9,8 @@ import {Icon} from "@iconify/vue";
import IconWrapper from "@/pages/pc/components/IconWrapper.vue";
import Tooltip from "@/pages/pc/components/Tooltip.vue";
import TranslateSetting from "@/pages/pc/components/toolbar/TranslateSetting.vue";
-import VolumeSetting from "@/pages/pc/components/toolbar/VolumeSetting.vue";
import RepeatSetting from "@/pages/pc/components/toolbar/RepeatSetting.vue";
+import {emitter, EventKey} from "@/utils/eventBus.ts";
const statisticsStore = usePracticeStore()
const settingStore = useSettingStore()
@@ -90,75 +90,64 @@ onUnmounted(() => {
错误数
-
-
{{ format(statisticsStore.correctRate, '%') }}
-
-
正确率
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
-
-
+
@@ -168,6 +157,8 @@ onUnmounted(() => {
:show-text="false"/>
+
\ No newline at end of file
diff --git a/src/pages/pc/word/Statistics.vue b/src/pages/pc/word/Statistics.vue
index 885d3ce4..73a5b773 100644
--- a/src/pages/pc/word/Statistics.vue
+++ b/src/pages/pc/word/Statistics.vue
@@ -3,11 +3,9 @@ import Dialog from "@/pages/pc/components/dialog/Dialog.vue";
import {useBaseStore} from "@/stores/base.ts";
import Ring from "@/pages/pc/components/Ring.vue";
import Tooltip from "@/pages/pc/components/Tooltip.vue";
-import Fireworks from "@/pages/pc/components/Fireworks.vue";
import BaseButton from "@/components/BaseButton.vue";
import {ShortcutKey} from "@/types.ts";
import {emitter, EventKey, useEvent, useEvents} from "@/utils/eventBus.ts";
-import {onMounted} from "vue";
import {Icon} from '@iconify/vue';
import {useSettingStore} from "@/stores/setting.ts";
import {usePracticeStore} from "@/stores/practice.ts";
@@ -19,8 +17,6 @@ const statStore = usePracticeStore()
let open = $ref(false)
useEvent(EventKey.openStatModal, () => {
- console.log('on')
-
let data = {
speed: statStore.speed,
startDate: statStore.startDate,
@@ -61,21 +57,31 @@ const isEnd = $computed(() => {
:header="false"
v-model="open">
-
- {{ store.sdict.name }}
-
-
-
-
非常棒!
-
坚持了
{{ dayjs().diff(statStore.startDate, 'm') }}
- 分钟
+
+
已完成今日任务
+
+
+
{{ statStore.newWordNumber }}
+
新词数
+
+
+
{{ statStore.newWordNumber }}
+
复习数
+
+
+
{{
+ statStore.newWordNumber
+ }}
+
+
默写数
-
+
+
+
+
非常棒! 坚持了 {{ dayjs().diff(statStore.startDate, 'm') }}
+ 分钟
+
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/pc/word/StudyWord.vue b/src/pages/pc/word/StudyWord.vue
index af6aa9d1..3f584bab 100644
--- a/src/pages/pc/word/StudyWord.vue
+++ b/src/pages/pc/word/StudyWord.vue
@@ -9,28 +9,16 @@ import {emitter, EventKey, useEvents} from "@/utils/eventBus.ts";
import {useSettingStore} from "@/stores/setting.ts";
import {useRuntimeStore} from "@/stores/runtime.ts";
import {ShortcutKey} from "@/types.ts";
-import DictModal from "@/pages/pc/components/dialog/DictDiglog.vue";
import {useStartKeyboardEventListener} from "@/hooks/event.ts";
import useTheme from "@/hooks/theme.ts";
-import TypingWord from "@/pages/pc/components/TypingWord.vue";
+import TypingWord from "@/pages/pc/word/components/TypingWord.vue";
import {getCurrentStudyWord} from "@/hooks/dict.ts";
import {cloneDeep} from "lodash-es";
-const statStore = usePracticeStore()
-const store = useBaseStore()
const settingStore = useSettingStore()
const runtimeStore = useRuntimeStore()
const {toggleTheme} = useTheme()
-watch(statStore, () => {
- if (statStore.inputWordNumber < 1) {
- return statStore.correctRate = -1
- }
- if (statStore.wrong > statStore.inputWordNumber) {
- return statStore.correctRate = 0
- }
- statStore.correctRate = 100 - Math.trunc(((statStore.wrong) / (statStore.inputWordNumber)) * 100)
-})
function next() {
emitter.emit(EventKey.resetWord)
@@ -58,10 +46,6 @@ function openSetting() {
runtimeStore.showSettingModal = true
}
-function openDictDetail() {
- emitter.emit(EventKey.openDictModal, 'detail')
-}
-
function toggleConciseMode() {
settingStore.showToolbar = !settingStore.showToolbar
settingStore.showPanel = settingStore.showToolbar
@@ -87,7 +71,6 @@ useEvents([
[ShortcutKey.ToggleShowTranslate, toggleTranslate],
[ShortcutKey.ToggleDictation, toggleDictation],
[ShortcutKey.OpenSetting, openSetting],
- [ShortcutKey.OpenDictDetail, openDictDetail],
[ShortcutKey.ToggleTheme, toggleTheme],
[ShortcutKey.ToggleConciseMode, toggleConciseMode],
[ShortcutKey.TogglePanel, togglePanel],
@@ -116,7 +99,6 @@ useStartKeyboardEventListener()
-
diff --git a/src/pages/pc/components/TypingWord.vue b/src/pages/pc/word/components/TypingWord.vue
similarity index 91%
rename from src/pages/pc/components/TypingWord.vue
rename to src/pages/pc/word/components/TypingWord.vue
index 78e63ea8..2e036853 100644
--- a/src/pages/pc/components/TypingWord.vue
+++ b/src/pages/pc/word/components/TypingWord.vue
@@ -1,15 +1,14 @@