|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { useState } from "react";
|
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
import { useUserStore } from "../store/module";
|
|
|
|
|
import { useGlobalStore, useUserStore } from "../store/module";
|
|
|
|
|
import Icon from "./Icon";
|
|
|
|
|
import { generateDialog } from "./Dialog";
|
|
|
|
|
import MyAccountSection from "./Settings/MyAccountSection";
|
|
|
|
@ -8,6 +8,7 @@ import PreferencesSection from "./Settings/PreferencesSection";
|
|
|
|
|
import MemberSection from "./Settings/MemberSection";
|
|
|
|
|
import SystemSection from "./Settings/SystemSection";
|
|
|
|
|
import StorageSection from "./Settings/StorageSection";
|
|
|
|
|
import BetaBadge from "./BetaBadge";
|
|
|
|
|
import "../less/setting-dialog.less";
|
|
|
|
|
|
|
|
|
|
type Props = DialogProps;
|
|
|
|
@ -21,6 +22,7 @@ interface State {
|
|
|
|
|
const SettingDialog: React.FC<Props> = (props: Props) => {
|
|
|
|
|
const { destroy } = props;
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const globalStore = useGlobalStore();
|
|
|
|
|
const userStore = useUserStore();
|
|
|
|
|
const user = userStore.state.user;
|
|
|
|
|
const [state, setState] = useState<State>({
|
|
|
|
@ -70,12 +72,14 @@ const SettingDialog: React.FC<Props> = (props: Props) => {
|
|
|
|
|
>
|
|
|
|
|
<span className="icon-text">🛠️</span> {t("setting.system")}
|
|
|
|
|
</span>
|
|
|
|
|
{globalStore.isDev() && (
|
|
|
|
|
<span
|
|
|
|
|
onClick={() => handleSectionSelectorItemClick("storage")}
|
|
|
|
|
className={`section-item ${state.selectedSection === "storage" ? "selected" : ""}`}
|
|
|
|
|
>
|
|
|
|
|
<span className="icon-text">💾</span> {t("setting.storage")}
|
|
|
|
|
<span className="icon-text">💾</span> {t("setting.storage")} <BetaBadge />
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
) : null}
|
|
|
|
|