Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<link rel="manifest" href="/site.webmanifest?v=1" />
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=1" color="#101010" />
<link rel="shortcut icon" href="/favicon.ico?v=1" />
<link rel="preconnect" href="https://cdnjs.cloudflare.com" />
<meta name="msapplication-TileColor" content="#101010" />
<meta name="theme-color" content="#101010" />
</head>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions src/components/operation-set/OperationSetEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,18 @@ function OperationSetForm({ operationSet, onSubmit }: FormProps) {

const localOnSubmit = handleSubmit(async (values) => {
try {

// 方便以后拓展关键字
const titleHasPersonal = values.name.includes('自用')

// 标题含“自用”,但未勾选“自用”(status !== PRIVATE) → 提示
if (titleHasPersonal && values.status !== 'PRIVATE') {
setGlobalError(
t.components.operationSet.OperationSetEditor.personal_use_warning
)
return
}

await onSubmit(
{
...values,
Expand Down Expand Up @@ -288,17 +300,15 @@ function OperationSetForm({ operationSet, onSubmit }: FormProps) {
<Checkbox
{...field}
value={undefined}
checked={field.value === 'PUBLIC'}
checked={field.value === 'PRIVATE'}
onChange={(e) =>
field.onChange(
(e.target as HTMLInputElement).checked
? 'PUBLIC'
: 'PRIVATE',
? 'PRIVATE'
: 'PUBLIC'
)
}
label={
t.components.operationSet.OperationSetEditor.visible_to_all
}
label={t.components.operationSet.OperationSetEditor.for_personal_use}
/>
)}
/>
Expand Down
18 changes: 15 additions & 3 deletions src/i18n/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2498,9 +2498,13 @@
"cn": "描述",
"en": "Description"
},
"visible_to_all": {
"cn": "对所有人可见",
"en": "Visible to everyone"
"for_personal_use": {
"cn": "仅对自己可见(自用)",
"en": "For Personal Use"
},
"personal_use_warning": {
"cn": "自用作业集请勾选「仅对自己可见(自用)」哦",
"en": "Personal use job sets should be marked as 'For Personal Use'"
},
"click_save": {
"cn": "修改后请点击保存按钮",
Expand Down Expand Up @@ -2545,6 +2549,14 @@
"reverse_list": {
"cn": "反转列表",
"en": "Reverse List"
},
"private_usage_warning": {
"cn": "自用作业集请勾选「自用」哦",
"en": "Personal use job sets should be marked as 'For Personal Use'"
},
"private_usage_public_warning": {
"cn": "标题含有「自用」关键字且勾选了公开,请取消勾选公开再次提交",
"en": "Title contains 'personal use' keyword and is marked as public, please uncheck public and submit again"
}
}
},
Expand Down
50 changes: 43 additions & 7 deletions src/models/generated/operators.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"alias": "aiyafala yiyafala ayfl yyfl 艾雅法拉",
"rarity": 6,
"alt_name": "Eyjafjalla",
"modules": ["", "X"]
"modules": ["", "X", "Y"]
},
{
"id": "char_302_glaze",
Expand Down Expand Up @@ -879,6 +879,17 @@
"alt_name": "Raidian",
"modules": ["", "A"]
},
{
"id": "char_4208_wintim",
"prof": "PIONEER",
"subProf": "agent",
"name_en": "Снегyрочка",
"name": "冬时",
"alias": "dongshi ds 冬時",
"rarity": 4,
"alt_name": "Снегyрочка",
"modules": ["", "X"]
},
{
"id": "char_452_bstalk",
"prof": "PIONEER",
Expand Down Expand Up @@ -2782,7 +2793,8 @@
"name": "娜仁图亚",
"alias": "narentuya nuorentuya nrty 娜仁圖亞",
"rarity": 6,
"alt_name": "Narantuya"
"alt_name": "Narantuya",
"modules": ["", "X"]
},
{
"id": "char_103_angel",
Expand Down Expand Up @@ -3310,7 +3322,7 @@
"alias": "shengyuesongzangren shengyaosongzangren syszr 聖約送葬人",
"rarity": 6,
"alt_name": "Executor the Ex Foedere",
"modules": ["", "X"]
"modules": ["", "X", "Y"]
},
{
"id": "char_210_stward",
Expand Down Expand Up @@ -3472,7 +3484,8 @@
"name": "水灯心",
"alias": "shuidengxin sdx 水燈心",
"rarity": 5,
"alt_name": "Brigid"
"alt_name": "Brigid",
"modules": ["", "X"]
},
{
"id": "char_437_mizuki",
Expand Down Expand Up @@ -4060,7 +4073,7 @@
"id": "token_10045_alanna_crane",
"prof": "TOKEN",
"subProf": "notchar1",
"name_en": "Nutlet",
"name_en": "Nutty",
"name": "小螺帽",
"alias": "xiaoluomao xlm 小螺帽",
"rarity": 0,
Expand Down Expand Up @@ -4820,7 +4833,8 @@
"name": "跃跃",
"alias": "yueyue yy 躍躍",
"rarity": 4,
"alt_name": "Caper"
"alt_name": "Caper",
"modules": ["", "X"]
},
{
"id": "char_4165_ctrail",
Expand Down Expand Up @@ -4886,6 +4900,17 @@
"alt_name": "Diamante",
"modules": ["", "X"]
},
{
"id": "char_4207_branch",
"prof": "TANK",
"subProf": "unyield",
"name_en": "Веточки",
"name": "折桠",
"alias": "zheya sheya zy sy 折椏",
"rarity": 5,
"alt_name": "Веточки",
"modules": ["", "X"]
},
{
"id": "char_195_glassb",
"prof": "SUPPORT",
Expand All @@ -4897,6 +4922,17 @@
"alt_name": "Истина",
"modules": ["", "Y"]
},
{
"id": "char_4204_mantra",
"prof": "CASTER",
"subProf": "primcaster",
"name_en": "Mantra",
"name": "真言",
"alias": "zhenyan zy 真言",
"rarity": 6,
"alt_name": "Mantra",
"modules": ["", "X"]
},
{
"id": "char_4000_jnight",
"prof": "SNIPER",
Expand Down Expand Up @@ -4943,7 +4979,7 @@
"id": "token_10050_monstr_prosts",
"prof": "TOKEN",
"subProf": "notchar1",
"name_en": "Reconstruct",
"name_en": "Reconstruction",
"name": "重构体",
"alias": "zhonggouti chonggouti zgt cgt 重構體",
"rarity": 0,
Expand Down
30 changes: 30 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,36 @@ export default defineConfig(({ command, mode }) => {
},
build: {
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
maacopilot: ['maa-copilot-client'],
react: ["react", "react-dom", "react-router-dom"],
reactplugins: ["react-use", "react-rating", "react-markdown", "react-ga-neo", "react-hook-form"],
blueprint: ["@blueprintjs/core"],
blueprintaddon: ["@blueprintjs/select", "@blueprintjs/popover2"],
sentry: ["@sentry/react", "@sentry/tracing"],
dnd: ["@dnd-kit/core", "@dnd-kit/sortable", "@dnd-kit/utilities"],
jotai: ["jotai", "jotai-immer", "jotai-devtools", "immer"],
remark: ["remark-gfm", "remark-breaks"],
iconify: ["@iconify/react"],
ajv: ["ajv", "ajv-i18n"],
linkify: ['linkify-react', 'linkifyjs'],
utils: [
"lodash-es",
"clsx",
"dayjs",
"fuse.js",
"mitt",
"swr",
"swr/infinite",
"camelcase-keys",
"snakecase-keys",
"zod"
],
},
}
}
},
}
})
Loading