Commit 8b72ecb8 authored by BBeretta's avatar BBeretta

feat/language-translation (Deck Building updated)

parent e24da0e4
Pipeline #27828 failed with stages
in 8 minutes and 12 seconds
...@@ -22,6 +22,7 @@ import styles from "../index.module.scss"; ...@@ -22,6 +22,7 @@ import styles from "../index.module.scss";
import { editDeckStore } from "../store"; import { editDeckStore } from "../store";
import { CardResults } from "./CardResults"; import { CardResults } from "./CardResults";
import { DeckResults, freshMdrpoDecks } from "./DeckResults"; import { DeckResults, freshMdrpoDecks } from "./DeckResults";
import { useTranslation } from "react-i18next";
/** 卡片库,选择卡片加入正在编辑的卡组 */ /** 卡片库,选择卡片加入正在编辑的卡组 */
export const DeckDatabase: React.FC = () => { export const DeckDatabase: React.FC = () => {
...@@ -120,12 +121,12 @@ export const DeckDatabase: React.FC = () => { ...@@ -120,12 +121,12 @@ export const DeckDatabase: React.FC = () => {
const viewport = ref.current?.osInstance()?.elements().viewport; const viewport = ref.current?.osInstance()?.elements().viewport;
if (viewport) viewport.scrollTop = 0; if (viewport) viewport.scrollTop = 0;
}, []); }, []);
const { t: i18n } = useTranslation("BuildDeck");
return ( return (
<div className={styles.container} ref={dropRef}> <div className={styles.container} ref={dropRef}>
<Space className={styles.title} direction="horizontal"> <Space className={styles.title} direction="horizontal">
<Input <Input
placeholder="关键词(空格分隔)" placeholder={ i18n("KeywordsPlaceholder") }
bordered={false} bordered={false}
suffix={ suffix={
<Button <Button
...@@ -175,7 +176,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -175,7 +176,7 @@ export const DeckDatabase: React.FC = () => {
icon={<FilterOutlined />} icon={<FilterOutlined />}
onClick={showFilterModal} onClick={showFilterModal}
> >
筛选 { i18n("Filter") }
</Button> </Button>
)} )}
<Dropdown <Dropdown
...@@ -191,7 +192,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -191,7 +192,7 @@ export const DeckDatabase: React.FC = () => {
icon={<SortAscendingOutlined />} icon={<SortAscendingOutlined />}
> >
<span> <span>
排列 { i18n("SortBy") }
<span className={styles["search-count"]}> <span className={styles["search-count"]}>
({searchCardResult.length}) ({searchCardResult.length})
</span> </span>
...@@ -210,7 +211,7 @@ export const DeckDatabase: React.FC = () => { ...@@ -210,7 +211,7 @@ export const DeckDatabase: React.FC = () => {
handleSearch(emptySearchConditions); handleSearch(emptySearchConditions);
}} }}
> >
重置 { i18n("Reset") }
</Button> </Button>
</div> </div>
<ScrollableArea className={styles["search-cards-container"]} ref={ref}> <ScrollableArea className={styles["search-cards-container"]} ref={ref}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment