mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-08-02 22:58:43 +08:00
chore: remove locale switch
This commit is contained in:
@ -9,7 +9,6 @@ import Tooltip from "./kit/Tooltip";
|
||||
import Dropdown, { DropdownItem } from "./kit/Dropdown";
|
||||
import Icon from "./Icon";
|
||||
import EngineIcon from "./EngineIcon";
|
||||
import LocaleSwitch from "./LocaleSwitch";
|
||||
import DarkModeSwitch from "./DarkModeSwitch";
|
||||
import CreateConnectionModal from "./CreateConnectionModal";
|
||||
import SettingModal from "./SettingModal";
|
||||
@ -206,7 +205,6 @@ const ConnectionSidebar = () => {
|
||||
</div>
|
||||
<div className="w-full flex flex-col justify-end items-center">
|
||||
<DarkModeSwitch />
|
||||
<LocaleSwitch />
|
||||
<Tooltip title={t("common.setting")} side="right">
|
||||
<button
|
||||
className=" w-10 h-10 p-1 rounded-full flex flex-row justify-center items-center hover:bg-gray-100 dark:hover:bg-zinc-700"
|
||||
|
@ -1,32 +0,0 @@
|
||||
import { useSettingStore } from "@/store";
|
||||
import Icon from "./Icon";
|
||||
|
||||
const LocaleSwitch = () => {
|
||||
const settingStore = useSettingStore();
|
||||
const locale = settingStore.setting.locale;
|
||||
|
||||
const handleLocaleChange = () => {
|
||||
if (locale === "en") {
|
||||
settingStore.setLocale("zh");
|
||||
} else if (locale === "zh") {
|
||||
settingStore.setLocale("es");
|
||||
} else if (locale === "es") {
|
||||
settingStore.setLocale("jp");
|
||||
} else if (locale === "jp") {
|
||||
settingStore.setLocale("de");
|
||||
} else {
|
||||
settingStore.setLocale("en");
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<button
|
||||
className="w-10 h-10 p-1 rounded-full flex flex-row justify-center items-center hover:bg-gray-100 dark:hover:bg-zinc-700"
|
||||
onClick={handleLocaleChange}
|
||||
>
|
||||
<Icon.IoLanguage className="text-gray-600 dark:text-gray-300 w-6 h-auto" />
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default LocaleSwitch;
|
Reference in New Issue
Block a user