feat: migrate analytics

This commit is contained in:
Haoyu Xu
2024-12-20 00:16:43 +08:00
parent 41bab8d693
commit 8b1e3d465d
12 changed files with 50 additions and 147 deletions

View File

@@ -67,7 +67,6 @@ export default class Voice {
set useSubtitle(show) {
this.#useSubtitle = show
this.#el.hidden = !show
window.settings.functionInsights("useSubtitle", window.settings.isWallpaperEngine)
}
get useSubtitle() {
@@ -78,7 +77,6 @@ export default class Voice {
* @param {boolean} show
*/
set useVoice(show) {
window.settings.functionInsights("useVoice", window.settings.isWallpaperEngine)
this.#useVoice = show
this.#playEntryVoice()
if (!show && this.#isPlaying) {
@@ -96,7 +94,6 @@ export default class Voice {
set useVoiceActor(show) {
this.#useVoiceActor = show
document.getElementById('voice_actor_box').hidden = !show
window.settings.functionInsights("useVoiceActor", window.settings.isWallpaperEngine)
}
get useVoiceActor() {
@@ -112,7 +109,6 @@ export default class Voice {
} else {
this.#subtitleLang = this.#defaultRegion
}
window.settings.functionInsights("subtitleLanguage", window.settings.isWallpaperEngine)
}
get subtitleLanguage() {
@@ -149,7 +145,6 @@ export default class Voice {
#updateSubtitlePosition() {
window.settings.elementPosition(this.#el, this.#subtitleX, this.#subtitleY)
window.settings.functionInsights("subtitlePosition", window.settings.isWallpaperEngine)
}
/**
@@ -161,7 +156,6 @@ export default class Voice {
} else {
this.#voiceLang = this.#defaultVoiceLang
}
window.settings.functionInsights("language", window.settings.isWallpaperEngine)
const availableSubtitleLang = this.#getSubtitleLanguages()
if (!availableSubtitleLang.includes(this.#subtitleLang)) {
this.#subtitleLang = availableSubtitleLang[0]
@@ -185,7 +179,6 @@ export default class Voice {
this.#idleDuration = duration * 60 * 1000
this.#initIdleVoiceTimer()
}
window.settings.functionInsights("idleDuration", window.settings.isWallpaperEngine)
}
get idleDuration() {
@@ -201,7 +194,6 @@ export default class Voice {
this.#nextDuration = duration * 60 * 1000
this.#initNextVoiceTimer()
}
window.settings.functionInsights("nextDuration", window.settings.isWallpaperEngine)
}
get nextDuration() {