From 9af56f878cc3e22d3bce6ab53d67f3753470a7ac Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期五, 14 二月 2025 08:59:22 +0800
Subject: [PATCH] #

---
 rsf-admin/src/page/settings/BaseSettings.jsx |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/rsf-admin/src/page/settings/BaseSettings.jsx b/rsf-admin/src/page/settings/BaseSettings.jsx
index 775e0d5..0758826 100644
--- a/rsf-admin/src/page/settings/BaseSettings.jsx
+++ b/rsf-admin/src/page/settings/BaseSettings.jsx
@@ -17,6 +17,7 @@
     MenuItem,
     FormHelperText,
     CircularProgress,
+    LinearProgress,
 } from '@mui/material';
 import { updateUserInfo } from '@/api/auth';
 import avatar from '/avatar.jpg'
@@ -36,7 +37,9 @@
         formState: {
             errors,
             isDirty,
-        }
+        },
+        setError,
+        clearErrors,
     } = useForm();
 
     const [loading, setLoading] = useState(false);
@@ -79,14 +82,23 @@
     }
 
     return (
-        <Box
-            sx={{
-                p: 3,
-                flex: 1,
-                overflow: 'auto',
-            }}
-        >
-            {/* https://github.com/themeselection/materio-mui-nextjs-admin-template-free/blob/main/javascript-version/src/views/account-settings/account/AccountDetails.jsx */}
+        <Box sx={{
+            position: 'relative',
+            p: 3,
+            flex: 1,
+            overflow: 'auto',
+        }}>
+            {!userInfo && (
+                <LinearProgress
+                    sx={{
+                        height: "2px",
+                        position: 'absolute',
+                        top: 0,
+                        left: 0,
+                        right: 0,
+                    }}
+                />
+            )}
             <form onSubmit={handleSubmit(onSubmit)} noValidate>
                 <Stack
                     direction='column'

--
Gitblit v1.9.1