Skip to content

Commit 3115f4f

Browse files
committed
refactor: 更新页面骨架屏样式和移除不必要的组件
- 在多个页面中调整 Card 组件的底部外边距,以提升视觉一致性。 - 移除 Oss 组件,替换为 Storage 组件以更准确地反映功能。 - 更新 RouteList 组件中的路由配置,确保页面导航的准确性。
1 parent b8860bf commit 3115f4f

File tree

21 files changed

+455
-388
lines changed

21 files changed

+455
-388
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 项目版本号
2-
VITE_VERSION=3.3.3
2+
VITE_VERSION=3.3.4
33

44
# 项目后端API地址
55
VITE_PROJECT_API=https://你的后端域名/api

src/App.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,6 @@ function App() {
5555
getWebData();
5656
}, [token]);
5757

58-
// return loading ? (
59-
// <Loader />
60-
// ) : (
61-
// // 根据主题切换配置主题
62-
// <ConfigProvider
63-
// theme={{
64-
// token: {
65-
// colorPrimary: '#60a5fa',
66-
// borderRadius: 4,
67-
// colorBgBase: isDarkTheme ? '#24303F' : '#ffffff',
68-
// colorTextBase: isDarkTheme ? '#e0e0e0' : '#000000',
69-
// },
70-
// algorithm: isDarkTheme ? theme.darkAlgorithm : theme.defaultAlgorithm,
71-
// }}
72-
// locale={zhCN}
73-
// >
74-
// <AntdApp>
75-
// <RouteList />
76-
// </AntdApp>
77-
// </ConfigProvider>
78-
// );
79-
8058
return (
8159
<ConfigProvider
8260
theme={{

src/components/RouteList/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Work from '@/pages/work';
2121
import Draft from '@/pages/draft';
2222
import Decycle from '@/pages/decycle';
2323
import Record from '@/pages/record';
24-
import Oss from '@/pages/oss';
24+
import Storage from '@/pages/storage';
2525
import Assistant from '@/pages/assistant';
2626
import Config from '@/pages/config';
2727

@@ -52,7 +52,7 @@ export default () => {
5252
{ path: '/web', title: '网站管理', component: <Web /> },
5353
{ path: '/swiper', title: '轮播图管理', component: <Swiper /> },
5454
{ path: '/footprint', title: '足迹管理', component: <Footprint /> },
55-
{ path: '/storage', title: '存储管理', component: <Oss /> },
55+
{ path: '/storage', title: '存储管理', component: <Storage /> },
5656
{ path: '/setup', title: '项目配置', component: <Setup /> },
5757
{ path: '/file', title: '文件管理', component: <File /> },
5858
{ path: '/iter', title: '项目更新记录', component: <Iterative /> },

src/components/StatusTag/index.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
interface StatusTagProps {
2+
status: number | boolean;
3+
className?: string;
4+
}
5+
6+
export default ({ status, className }: StatusTagProps) => {
7+
const enabled = Boolean(status);
8+
9+
return (
10+
<div className={`flex items-center justify-center ${className || ''}`}>
11+
{enabled ? (
12+
<div className="w-9 h-9 flex items-center justify-center rounded-full bg-green-50 hover:bg-green-100 transition-colors relative">
13+
<span className="w-2.5 h-2.5 bg-green-500 rounded-full animate-pulse" />
14+
<span className="absolute w-2.5 h-2.5 bg-green-500 rounded-full animate-ping opacity-75" />
15+
</div>
16+
) : (
17+
<div className="w-9 h-9 flex items-center justify-center rounded-full bg-red-50 hover:bg-red-100 transition-colors relative">
18+
<span className="w-2.5 h-2.5 bg-red-500 rounded-full animate-pulse" />
19+
<span className="absolute w-2.5 h-2.5 bg-red-500 rounded-full animate-ping opacity-75" />
20+
</div>
21+
)}
22+
</div>
23+
);
24+
};

src/pages/article/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ export default () => {
645645
return (
646646
<div>
647647
{/* Title 骨架屏 */}
648-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
648+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
649649
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
650650
</Card>
651651

@@ -659,11 +659,8 @@ export default () => {
659659
<Skeleton.Input active size="default" style={{ width: 250, height: 32 }} />
660660
<Skeleton.Button active size="default" style={{ width: 80, height: 32 }} />
661661
</div>
662-
<div className="flex space-x-3 sm:pl-32 pr-10">
663-
<Skeleton.Button active size="default" style={{ width: 120, height: 32 }} />
664-
<Skeleton.Button active size="default" style={{ width: 100, height: 32 }} />
665-
<Skeleton.Button active size="default" style={{ width: 100, height: 32 }} />
666-
</div>
662+
663+
<Skeleton.Button active size="default" style={{ width: 120, height: 32 }} />
667664
</div>
668665
</Card>
669666

src/pages/assistant/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default () => {
100100
return (
101101
<div>
102102
{/* Title 骨架屏 */}
103-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
103+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
104104
<div className="flex justify-between items-center">
105105
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
106106
<Skeleton.Button active size="default" style={{ width: 100, height: 32 }} />

src/pages/cate/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default () => {
186186
return (
187187
<div>
188188
{/* Title 骨架屏 */}
189-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
189+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
190190
<div className="flex justify-between items-center">
191191
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
192192
<Skeleton.Button active size="large" style={{ width: 120, height: 40 }} />

src/pages/comment/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default () => {
224224
return (
225225
<div>
226226
{/* Title 骨架屏 */}
227-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
227+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
228228
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
229229
</Card>
230230

src/pages/config/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export default () => {
198198
return (
199199
<div>
200200
{/* Title 骨架屏 */}
201-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
201+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
202202
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
203203
</Card>
204204

src/pages/file/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default () => {
202202
return (
203203
<div>
204204
{/* Title 骨架屏 */}
205-
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-4">
205+
<Card className="[&>.ant-card-body]:!py-2 [&>.ant-card-body]:!px-5 mb-2">
206206
<Skeleton.Input active size="large" style={{ width: 150, height: 32 }} />
207207
</Card>
208208

0 commit comments

Comments
 (0)