-
-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): add i18n language switch, refact loading state (#777)
* feat(web): add i18n language switch * refactor(web): confirm button add loading state * fix(web): empty view
- Loading branch information
Showing
25 changed files
with
177 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
|
||
export default function IconText(props: { | ||
icon: React.ReactElement; | ||
text: string; | ||
onClick?: () => void; | ||
}) { | ||
return ( | ||
<div | ||
onClick={props.onClick} | ||
className="text-grayIron-600 flex flex-col items-center hover:text-black" | ||
> | ||
{React.cloneElement(props.icon, { | ||
height: "20px", | ||
})} | ||
{props.text} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
import { useTranslation } from "react-i18next"; | ||
|
||
import EmptyBox from "@/components/EmptyBox"; | ||
|
||
import CreateCollectionModal from "../mods/CreateCollectionModal"; | ||
import useDBMStore from "../store"; | ||
|
||
import DataPanel from "./mods/DataPanel"; | ||
|
||
export default function CollectionDataList() { | ||
return <DataPanel />; | ||
const { t } = useTranslation(); | ||
const store = useDBMStore((state) => state); | ||
return ( | ||
<> | ||
{store.currentDB === undefined ? ( | ||
<EmptyBox> | ||
<div> | ||
{t("CollectionPanel.EmptyCollectionText")} | ||
<CreateCollectionModal> | ||
<span className="ml-2 text-primary-600 hover:border-b-2 hover:border-primary-600 cursor-pointer"> | ||
{t("CreateNow")} | ||
</span> | ||
</CreateCollectionModal> | ||
</div> | ||
</EmptyBox> | ||
) : ( | ||
<DataPanel /> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.