fix(showcase): subtitle will not show by default to match wallpaper engine settings

This commit is contained in:
Haoyu Xu
2023-06-23 08:52:54 -04:00
parent fc0a1a5de8
commit 821970e05c
3 changed files with 8 additions and 9 deletions

View File

@@ -194,7 +194,7 @@ properties:
text: ui_subtitle_title text: ui_subtitle_title
condition: voicetitle.value == true condition: voicetitle.value == true
type: bool type: bool
value: true value: false
- key: voicesubtitlelanguage - key: voicesubtitlelanguage
value: value:
text: ui_subtitle_lang text: ui_subtitle_lang

View File

@@ -381,8 +381,8 @@ export default class Settings {
</div> </div>
<div> <div>
<label for="subtitle">Subtitle</label> <label for="subtitle">Subtitle</label>
<input type="checkbox" id="subtitle" name="subtitle" checked/> <input type="checkbox" id="subtitle" name="subtitle"/>
<div id="subtitle_realted"> <div id="subtitle_realted" hidden>
<div> <div>
<label for="subtitle_lang_select">Choose the language of subtitle:</label> <label for="subtitle_lang_select">Choose the language of subtitle:</label>
<select name="subtitle_lang" id="subtitle_lang_select"> <select name="subtitle_lang" id="subtitle_lang_select">
@@ -399,12 +399,12 @@ export default class Settings {
<input type="range" min="0" max="100" id="subtitle_padding_y_slider" value="${window.voice.subtitleY}" /> <input type="range" min="0" max="100" id="subtitle_padding_y_slider" value="${window.voice.subtitleY}" />
<input type="number" id="subtitle_padding_y_input" name="subtitle_padding_y" value="${window.voice.subtitleY}" /> <input type="number" id="subtitle_padding_y_input" name="subtitle_padding_y" value="${window.voice.subtitleY}" />
</div> </div>
<div>
<label for="voice_actor">Voice Actor</label>
<input type="checkbox" id="voice_actor" name="voice_actor"/>
</div>
</div> </div>
</div> </div>
<div>
<label for="voice_actor">Voice Actor</label>
<input type="checkbox" id="voice_actor" name="voice_actor"/>
</div>
</div> </div>
</div> </div>
<div> <div>

View File

@@ -13,7 +13,7 @@ export default class Voice {
#defaultVoiceLang = this.#voiceLanguages[0] #defaultVoiceLang = this.#voiceLanguages[0]
#voiceLang = this.#defaultVoiceLang #voiceLang = this.#defaultVoiceLang
#subtitleLang = this.#defaultRegion #subtitleLang = this.#defaultRegion
#useSubtitle = true #useSubtitle = false
#useVoice = false #useVoice = false
#useVoiceActor = false #useVoiceActor = false
#isPlaying = false #isPlaying = false
@@ -80,7 +80,6 @@ export default class Voice {
set useVoice(show) { set useVoice(show) {
window.settings.functionInsights("useVoice", window.settings.isWallpaperEngine) window.settings.functionInsights("useVoice", window.settings.isWallpaperEngine)
this.#useVoice = show this.#useVoice = show
this.#el.hidden = !show
this.#playEntryVoice() this.#playEntryVoice()
if (!show && this.#isPlaying) { if (!show && this.#isPlaying) {
this.#audioEl.pause() this.#audioEl.pause()