style: lint

This commit is contained in:
Haoyu Xu
2025-11-16 20:35:06 +08:00
parent da57211459
commit 7099139ceb
3 changed files with 43 additions and 37 deletions

View File

@@ -120,7 +120,7 @@ export default function Home() {
const list = navigationList.filter((item) => {
return (
item.name.toLowerCase().indexOf(searchField.toLowerCase()) !==
-1 || item.type === 'date'
-1 || item.type === 'date'
)
})
const newList = []
@@ -222,7 +222,7 @@ export default function Home() {
}
viewBox={
entry.type ===
'operator'
'operator'
? '0 0 88.969 71.469'
: '0 0 94.563 67.437'
}
@@ -234,24 +234,25 @@ export default function Home() {
}
>
{language ===
'zh-CN'
'zh-CN'
? entry.type ===
'skin'
? `${entry
.skinName[
'zh-CN'
]
} · ${entry.operatorName}`
'skin'
? `${
entry
.skinName[
'zh-CN'
]
} · ${entry.operatorName}`
: entry.operatorName
: entry
.skinName[
'en-US'
]}
.skinName[
'en-US'
]}
</section>
<section
className={
classes[
'arrow-icon'
'arrow-icon'
]
}
>
@@ -368,9 +369,9 @@ function OperatorElement({ item, hidden, handleVoicePlay }) {
<span className={classes.text}>
{
item.codename[
language.startsWith('en')
? alternateLang
: textDefaultLang
language.startsWith('en')
? alternateLang
: textDefaultLang
]
}
</span>

View File

@@ -95,7 +95,8 @@ export default class Voice {
this.#default.language.voice = this.#voice.languages[0]
this.#config.language = this.#default.language.voice
this.#voice.locations = this.#getVoiceLocations()
this.#voice.list = this.#charwordTable.availability[this.#config.language]
this.#voice.list =
this.#charwordTable.availability[this.#config.language]
}
success() {
@@ -206,7 +207,7 @@ export default class Voice {
const content = subtitle.text
const cvInfo =
this.#charwordTable.voiceLangs[this.subtitleLanguage][
this.#config.language
this.#config.language
]
document.getElementById('voice-title').innerText = title
document.getElementById('voice-subtitle').innerText = content
@@ -251,7 +252,10 @@ export default class Voice {
#nextVoice() {
const getVoiceId = () => {
const id = this.#voice.list[Math.floor(Math.random() * this.#voice.list.length)]
const id =
this.#voice.list[
Math.floor(Math.random() * this.#voice.list.length)
]
return id === this.#voice.id.last ? getVoiceId() : id
}
this.#playVoice(getVoiceId())
@@ -355,7 +359,8 @@ export default class Voice {
this.#voice.list = this.#charwordTable.availability[lang]
} else {
this.#config.language = this.#default.language.voice
this.#voice.list = this.#charwordTable.availability[this.#config.language]
this.#voice.list =
this.#charwordTable.availability[this.#config.language]
}
const availableSubtitleLang = this.#getSubtitleLanguages()
if (!availableSubtitleLang.includes(this.#config.subtitle.language)) {