|
|
|
|
@ -2,6 +2,7 @@ import { Select, Option, Divider, Switch } from "@mui/joy";
|
|
|
|
|
import { Button, Textarea } from "@usememos/mui";
|
|
|
|
|
import { isEqual } from "lodash-es";
|
|
|
|
|
import { ExternalLinkIcon } from "lucide-react";
|
|
|
|
|
import { observer } from "mobx-react-lite";
|
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
|
import { toast } from "react-hot-toast";
|
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
|
@ -14,7 +15,7 @@ import { WorkspaceGeneralSetting } from "@/types/proto/api/v1/workspace_setting_
|
|
|
|
|
import { useTranslate } from "@/utils/i18n";
|
|
|
|
|
import showUpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog";
|
|
|
|
|
|
|
|
|
|
const WorkspaceSection = () => {
|
|
|
|
|
const WorkspaceSection = observer(() => {
|
|
|
|
|
const t = useTranslate();
|
|
|
|
|
const originalSetting = WorkspaceGeneralSetting.fromPartial(
|
|
|
|
|
workspaceStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL)?.generalSetting || {},
|
|
|
|
|
@ -23,7 +24,7 @@ const WorkspaceSection = () => {
|
|
|
|
|
const [identityProviderList, setIdentityProviderList] = useState<IdentityProvider[]>([]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setWorkspaceGeneralSetting(originalSetting);
|
|
|
|
|
setWorkspaceGeneralSetting({ ...workspaceGeneralSetting, customProfile: originalSetting.customProfile });
|
|
|
|
|
}, [workspaceStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL)]);
|
|
|
|
|
|
|
|
|
|
const handleUpdateCustomizedProfileButtonClick = () => {
|
|
|
|
|
@ -162,6 +163,6 @@ const WorkspaceSection = () => {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default WorkspaceSection;
|
|
|
|
|
|