diff --git a/public/assets/operator-avatars/webp32/char_1042_phatm2.webp b/public/assets/operator-avatars/webp32/char_1042_phatm2.webp new file mode 100644 index 00000000..c30ba54a Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_1042_phatm2.webp differ diff --git a/public/assets/operator-avatars/webp32/char_1043_leizi2.webp b/public/assets/operator-avatars/webp32/char_1043_leizi2.webp new file mode 100644 index 00000000..a39cf284 Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_1043_leizi2.webp differ diff --git a/public/assets/operator-avatars/webp32/char_4191_tippi.webp b/public/assets/operator-avatars/webp32/char_4191_tippi.webp new file mode 100644 index 00000000..fc06cdbc Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_4191_tippi.webp differ diff --git a/public/assets/operator-avatars/webp32/char_4195_radian.webp b/public/assets/operator-avatars/webp32/char_4195_radian.webp new file mode 100644 index 00000000..30f02aab Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_4195_radian.webp differ diff --git a/public/assets/operator-avatars/webp32/char_4196_reckpr.webp b/public/assets/operator-avatars/webp32/char_4196_reckpr.webp new file mode 100644 index 00000000..4cce864d Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_4196_reckpr.webp differ diff --git a/public/assets/operator-avatars/webp32/char_4198_christ.webp b/public/assets/operator-avatars/webp32/char_4198_christ.webp new file mode 100644 index 00000000..d8e7849b Binary files /dev/null and b/public/assets/operator-avatars/webp32/char_4198_christ.webp differ diff --git a/public/assets/operator-avatars/webp32/token_10051_radian_tower1.webp b/public/assets/operator-avatars/webp32/token_10051_radian_tower1.webp new file mode 100644 index 00000000..e95354b3 Binary files /dev/null and b/public/assets/operator-avatars/webp32/token_10051_radian_tower1.webp differ diff --git a/public/assets/operator-avatars/webp32/token_10052_radian_tower2.webp b/public/assets/operator-avatars/webp32/token_10052_radian_tower2.webp new file mode 100644 index 00000000..b515b605 Binary files /dev/null and b/public/assets/operator-avatars/webp32/token_10052_radian_tower2.webp differ diff --git a/public/assets/operator-avatars/webp32/token_10053_radian_tower3.webp b/public/assets/operator-avatars/webp32/token_10053_radian_tower3.webp new file mode 100644 index 00000000..e5055de2 Binary files /dev/null and b/public/assets/operator-avatars/webp32/token_10053_radian_tower3.webp differ diff --git a/public/assets/operator-avatars/webp32/token_10054_phatm2_encdool.webp b/public/assets/operator-avatars/webp32/token_10054_phatm2_encdool.webp new file mode 100644 index 00000000..2071f36b Binary files /dev/null and b/public/assets/operator-avatars/webp32/token_10054_phatm2_encdool.webp differ diff --git a/public/assets/operator-avatars/webp96/char_1042_phatm2.webp b/public/assets/operator-avatars/webp96/char_1042_phatm2.webp new file mode 100644 index 00000000..8975915f Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_1042_phatm2.webp differ diff --git a/public/assets/operator-avatars/webp96/char_1043_leizi2.webp b/public/assets/operator-avatars/webp96/char_1043_leizi2.webp new file mode 100644 index 00000000..413774a3 Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_1043_leizi2.webp differ diff --git a/public/assets/operator-avatars/webp96/char_4191_tippi.webp b/public/assets/operator-avatars/webp96/char_4191_tippi.webp new file mode 100644 index 00000000..501548b9 Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_4191_tippi.webp differ diff --git a/public/assets/operator-avatars/webp96/char_4195_radian.webp b/public/assets/operator-avatars/webp96/char_4195_radian.webp new file mode 100644 index 00000000..05d2ed58 Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_4195_radian.webp differ diff --git a/public/assets/operator-avatars/webp96/char_4196_reckpr.webp b/public/assets/operator-avatars/webp96/char_4196_reckpr.webp new file mode 100644 index 00000000..694bddbe Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_4196_reckpr.webp differ diff --git a/public/assets/operator-avatars/webp96/char_4198_christ.webp b/public/assets/operator-avatars/webp96/char_4198_christ.webp new file mode 100644 index 00000000..987a6c74 Binary files /dev/null and b/public/assets/operator-avatars/webp96/char_4198_christ.webp differ diff --git a/public/assets/operator-avatars/webp96/token_10051_radian_tower1.webp b/public/assets/operator-avatars/webp96/token_10051_radian_tower1.webp new file mode 100644 index 00000000..47d3b81c Binary files /dev/null and b/public/assets/operator-avatars/webp96/token_10051_radian_tower1.webp differ diff --git a/public/assets/operator-avatars/webp96/token_10052_radian_tower2.webp b/public/assets/operator-avatars/webp96/token_10052_radian_tower2.webp new file mode 100644 index 00000000..b7f0cfe8 Binary files /dev/null and b/public/assets/operator-avatars/webp96/token_10052_radian_tower2.webp differ diff --git a/public/assets/operator-avatars/webp96/token_10053_radian_tower3.webp b/public/assets/operator-avatars/webp96/token_10053_radian_tower3.webp new file mode 100644 index 00000000..ebefeab6 Binary files /dev/null and b/public/assets/operator-avatars/webp96/token_10053_radian_tower3.webp differ diff --git a/public/assets/operator-avatars/webp96/token_10054_phatm2_encdool.webp b/public/assets/operator-avatars/webp96/token_10054_phatm2_encdool.webp new file mode 100644 index 00000000..d93d6322 Binary files /dev/null and b/public/assets/operator-avatars/webp96/token_10054_phatm2_encdool.webp differ diff --git a/src/components/ActionCard.tsx b/src/components/ActionCard.tsx index 1baa554b..3d0b1cb2 100644 --- a/src/components/ActionCard.tsx +++ b/src/components/ActionCard.tsx @@ -1,6 +1,7 @@ import { Card, Elevation } from '@blueprintjs/core' import clsx from 'clsx' +import { useAtomValue } from 'jotai' import { FC, ReactNode } from 'react' import { FCC } from 'types' @@ -9,8 +10,12 @@ import { FactItem } from 'components/FactItem' import { CopilotDocV1 } from 'models/copilot.schema' import { findActionType } from 'models/types' -import { useTranslation } from '../i18n/i18n' -import { findOperatorDirection, getSkillUsageTitle } from '../models/operator' +import { languageAtom, useTranslation } from '../i18n/i18n' +import { + findOperatorDirection, + getLocalizedOperatorName, + getSkillUsageTitle, +} from '../models/operator' import { formatDuration } from '../utils/times' interface ActionCardProps { @@ -25,6 +30,7 @@ export const ActionCard: FC = ({ title, }) => { const t = useTranslation() + const language = useAtomValue(languageAtom) const type = findActionType(action.type) title ??= ( @@ -47,7 +53,7 @@ export const ActionCard: FC = ({ {'name' in action && action.name && ( diff --git a/src/components/editor2/LevelSelect.tsx b/src/components/editor2/LevelSelect.tsx index a9a660a5..6eaefe82 100644 --- a/src/components/editor2/LevelSelect.tsx +++ b/src/components/editor2/LevelSelect.tsx @@ -225,6 +225,10 @@ export const LevelSelect: FC = ({ }} popoverProps={{ minimal: true, + onClosed() { + // 关闭下拉框时重置输入框,防止用户在未手动选择关卡时,误以为已输入的内容就是已选择的关卡 + updateQuery('', false) + }, }} /> = memo( : skillLevels[skillNumber] ?? getDefaultRequirements(info?.rarity).skillLevel + const selectSkill = () => { + if (operator.skill !== skillNumber) { + edit(() => { + onChange?.({ + ...operator, + skill: skillNumber, + requirements: { + ...operator.requirements, + // override with the current skill level + skillLevel, + }, + }) + return { + action: 'set-operator-skill', + desc: i18n.actions.editor2.set_operator_skill, + } + }) + } + } + return (
  • = memo( '!w-8 h-8 !p-0 !leading-8 !bg-transparent text-center font-bold text-xl !text-inherit !rounded-none !border-2 !border-current [&:not(:focus)]:cursor-pointer', skillLevel > 7 && '!pl-4', )} - onFocus={() => { - if (operator.skill !== skillNumber) { - edit(() => { - onChange?.({ - ...operator, - skill: skillNumber, - requirements: { - ...operator.requirements, - // override with the current skill level - skillLevel, - }, - }) - return { - action: 'set-operator-skill', - desc: i18n.actions.editor2.set_operator_skill, - } - }) + onClick={selectSkill} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault() + selectSkill() } }} onValueChange={(_, valueStr) => { diff --git a/src/models/generated/operators.json b/src/models/generated/operators.json index f192fd49..08af5eac 100644 --- a/src/models/generated/operators.json +++ b/src/models/generated/operators.json @@ -133,7 +133,7 @@ "alias": "asikalun asikaguan asiqialun asiqiaguan esikalun esikaguan esiqialun esiqiaguan askl askg asql asqg eskl eskg esql esqg 阿斯卡綸", "rarity": 6, "alt_name": "Ascalon", - "modules": ["", "X"] + "modules": ["", "X", "Y"] }, { "id": "char_277_sqrrel", @@ -329,7 +329,7 @@ "alias": "bailianjiaweier bljwe 百煉嘉維爾", "rarity": 6, "alt_name": "Gavial the Invincible", - "modules": ["", "X"] + "modules": ["", "X", "Y"] }, { "id": "char_128_plosis", @@ -459,6 +459,16 @@ "rarity": 0, "alt_name": "The Servant of Lament" }, + { + "id": "token_10054_phatm2_encdool", + "prof": "TOKEN", + "subProf": "notchar1", + "name_en": "Blood's whisper", + "name": "本能的召唤", + "alias": "bennengdezhaohuan bennengdeshaohuan bennengdizhaohuan bennengdishaohuan bennaidezhaohuan bennaideshaohuan bennaidizhaohuan bennaidishaohuan bndzh bndsh 本能的召喚", + "rarity": 0, + "alt_name": "Blood's whisper" + }, { "id": "char_265_sophia", "prof": "WARRIOR", @@ -609,7 +619,7 @@ "alias": "chengshan dengshan cs ds 澄閃", "rarity": 6, "alt_name": "Goldenglow", - "modules": ["", "X"] + "modules": ["", "X", "Y"] }, { "id": "char_1027_greyy2", @@ -772,6 +782,16 @@ "alt_name": "Delphine", "modules": ["", "Y"] }, + { + "id": "token_10051_radian_tower1", + "prof": "TOKEN", + "subProf": "notchar1", + "name_en": "dive", + "name": "戴乌", + "alias": "daiwu dw 戴烏", + "rarity": 0, + "alt_name": "dive" + }, { "id": "char_4032_provs", "prof": "SUPPORT", @@ -805,6 +825,16 @@ "alt_name": "Texas", "modules": ["", "Y"] }, + { + "id": "char_4191_tippi", + "prof": "SPECIAL", + "subProf": "skywalker", + "name_en": "Tippi", + "name": "蒂比", + "alias": "dibi db 蒂比", + "rarity": 5, + "alt_name": "Tippi" + }, { "id": "char_1034_jesca2", "prof": "TANK", @@ -827,6 +857,17 @@ "alt_name": "Earthspirit", "modules": ["", "Y"] }, + { + "id": "char_4195_radian", + "prof": "SUPPORT", + "subProf": "summoner", + "name_en": "Raidian", + "name": "电弧", + "alias": "dianhu dh 電弧", + "rarity": 6, + "alt_name": "Raidian", + "modules": ["", "A"] + }, { "id": "char_452_bstalk", "prof": "PIONEER", @@ -912,7 +953,7 @@ "alias": "duoluoxi dlx 多蘿西", "rarity": 6, "alt_name": "Dorothy", - "modules": ["", "Y"] + "modules": ["", "X", "Y"] }, { "id": "token_10036_lasher_mcbird", @@ -1745,6 +1786,17 @@ "alt_name": "Nine-Colored Deer", "modules": ["", "X"] }, + { + "id": "char_1042_phatm2", + "prof": "SUPPORT", + "subProf": "ritualist", + "name_en": "Tragodia", + "name": "酒神", + "alias": "jiushen js 酒神", + "rarity": 6, + "alt_name": "Tragodia", + "modules": ["", "X"] + }, { "id": "char_328_cammou", "prof": "CASTER", @@ -2302,6 +2354,17 @@ "alt_name": "Lutonada", "modules": ["", "X"] }, + { + "id": "char_4196_reckpr", + "prof": "MEDIC", + "subProf": "physician", + "name_en": "Record Keeper", + "name": "录武官", + "alias": "luwuguan lwg 錄武官", + "rarity": 5, + "alt_name": "Record Keeper", + "modules": ["", "X"] + }, { "id": "char_433_windft", "prof": "SUPPORT", @@ -2476,6 +2539,16 @@ "rarity": 3, "alt_name": "Beagle" }, + { + "id": "token_10055_phatm2_mndclv", + "prof": "TOKEN", + "subProf": "notchar1", + "name_en": "Cage of chaos", + "name": "迷狂牢笼", + "alias": "mikuanglaolong mkll 迷狂牢籠", + "rarity": 0, + "alt_name": "Cage of chaos" + }, { "id": "char_344_beewax", "prof": "CASTER", @@ -2540,6 +2613,16 @@ "alt_name": "Misery", "modules": ["", "X"] }, + { + "id": "char_4198_christ", + "prof": "CASTER", + "subProf": "primcaster", + "name_en": "Miss.Christine", + "name": "Miss.Christine", + "alias": "Miss.Christine", + "rarity": 5, + "alt_name": "Miss.Christine" + }, { "id": "char_154_morgan", "prof": "WARRIOR", @@ -2957,6 +3040,16 @@ "alt_name": "Toddifons", "modules": ["", "X"] }, + { + "id": "token_10052_radian_tower2", + "prof": "TOKEN", + "subProf": "notchar1", + "name_en": "cycle", + "name": "赛柯", + "alias": "saike sk 賽柯", + "rarity": 0, + "alt_name": "cycle" + }, { "id": "char_202_demkni", "prof": "TANK", @@ -2979,6 +3072,16 @@ "alt_name": "Mulberry", "modules": ["", "X"] }, + { + "id": "token_10053_radian_tower3", + "prof": "TOKEN", + "subProf": "notchar1", + "name_en": "centre", + "name": "桑特拉", + "alias": "sangtela stl 桑特拉", + "rarity": 0, + "alt_name": "centre" + }, { "id": "char_416_zumama", "prof": "TANK", @@ -3030,7 +3133,7 @@ "alias": "shan s 山", "rarity": 6, "alt_name": "Mountain", - "modules": ["", "Y"] + "modules": ["", "X", "Y"] }, { "id": "char_457_blitz", @@ -3354,7 +3457,19 @@ "name": "死芒", "alias": "simang sm 死芒", "rarity": 6, - "alt_name": "Necrass" + "alt_name": "Necrass", + "modules": ["", "X"] + }, + { + "id": "char_1043_leizi2", + "prof": "WARRIOR", + "subProf": "librator", + "name_en": "Leizi the Thunderbringer", + "name": "司霆惊蛰", + "alias": "sitingjingzhe stjz 司霆驚蟄", + "rarity": 6, + "alt_name": "Leizi the Thunderbringer", + "modules": ["", "X"] }, { "id": "char_427_vigil", @@ -3504,7 +3619,8 @@ "name": "特克诺", "alias": "tekenuo tkn 特克諾", "rarity": 5, - "alt_name": "Tecno" + "alt_name": "Tecno", + "modules": ["", "Y"] }, { "id": "char_411_tomimi", @@ -3536,7 +3652,7 @@ "alias": "tifeng difeng tf df 提豐", "rarity": 6, "alt_name": "Typhon", - "modules": ["", "X"] + "modules": ["", "X", "Y"] }, { "id": "char_166_skfire", @@ -3574,11 +3690,11 @@ "id": "token_10056_angel2_target", "prof": "TOKEN", "subProf": "notchar1", - "name_en": "临时命名", + "name_en": "Delivery coordinates", "name": "投递坐标", "alias": "toudizuobiao tdzb 投遞坐標", "rarity": 0, - "alt_name": "临时命名" + "alt_name": "Delivery coordinates" }, { "id": "char_510_amedic", @@ -4922,7 +5038,7 @@ { "id": "chain", "name": "链术师", "name_en": "Chain Caster" }, { "id": "blastcaster", "name": "轰击术师", "name_en": "Blast Caster" }, { "id": "primcaster", "name": "本源术师", "name_en": "Primal Caster" }, - { "id": "soulcaster", "name": "塑灵术师", "name_en": "Soulcaster" } + { "id": "soulcaster", "name": "塑灵术师", "name_en": "Shaper Caster" } ] }, {