chore: tweak naming

This commit is contained in:
Steven
2024-05-13 20:03:04 +08:00
parent 62705fed39
commit b8763905ba
35 changed files with 460 additions and 483 deletions

View File

@ -17,9 +17,7 @@ const StorageSection = () => {
const t = useTranslate();
const workspaceSettingStore = useWorkspaceSettingStore();
const [workspaceStorageSetting, setWorkspaceStorageSetting] = useState<WorkspaceStorageSetting>(
WorkspaceStorageSetting.fromPartial(
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.WORKSPACE_SETTING_STORAGE)?.storageSetting || {},
),
WorkspaceStorageSetting.fromPartial(workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.STORAGE)?.storageSetting || {}),
);
const allowSaveStorageSetting = useMemo(() => {
@ -28,7 +26,7 @@ const StorageSection = () => {
}
const origin = WorkspaceStorageSetting.fromPartial(
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.WORKSPACE_SETTING_STORAGE)?.storageSetting || {},
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.STORAGE)?.storageSetting || {},
);
if (workspaceStorageSetting.storageType === WorkspaceStorageSetting_StorageType.STORAGE_TYPE_LOCAL) {
if (workspaceStorageSetting.filepathTemplate.length === 0) {
@ -109,7 +107,7 @@ const StorageSection = () => {
const saveWorkspaceStorageSetting = async () => {
await workspaceSettingStore.setWorkspaceSetting({
name: `${WorkspaceSettingPrefix}${WorkspaceSettingKey.WORKSPACE_SETTING_STORAGE}`,
name: `${WorkspaceSettingPrefix}${WorkspaceSettingKey.STORAGE}`,
storageSetting: workspaceStorageSetting,
});
toast.success("Updated");