feat: add system setting to allow user signup (#407)

This commit is contained in:
boojack
2022-11-03 21:47:36 +08:00
committed by GitHub
parent 4ed987229b
commit cf75054106
21 changed files with 755 additions and 45 deletions

View File

@ -6,11 +6,12 @@ import { generateDialog } from "./Dialog";
import MyAccountSection from "./Settings/MyAccountSection";
import PreferencesSection from "./Settings/PreferencesSection";
import MemberSection from "./Settings/MemberSection";
import SystemSection from "./Settings/SystemSection";
import "../less/setting-dialog.less";
type Props = DialogProps;
type SettingSection = "my-account" | "preferences" | "member";
type SettingSection = "my-account" | "preferences" | "member" | "system";
interface State {
selectedSection: SettingSection;
@ -61,6 +62,12 @@ const SettingDialog: React.FC<Props> = (props: Props) => {
>
<span className="icon-text">👤</span> {t("setting.member")}
</span>
<span
onClick={() => handleSectionSelectorItemClick("system")}
className={`section-item ${state.selectedSection === "system" ? "selected" : ""}`}
>
<span className="icon-text">🧑🔧</span> System Setting
</span>
</div>
</>
) : null}
@ -72,6 +79,8 @@ const SettingDialog: React.FC<Props> = (props: Props) => {
<PreferencesSection />
) : state.selectedSection === "member" ? (
<MemberSection />
) : state.selectedSection === "system" ? (
<SystemSection />
) : null}
</div>
</div>