refactor(profile): zero inline styles
- Add profile-card-flat, profile-edit-wrap, profile-section-spaced, profile-pricing-loading, profile-pricing-detail-list CSS classes - Profile.tsx: remove all remaining inline style attributes
This commit is contained in:
@@ -751,6 +751,34 @@
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.profile-card-flat {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.profile-edit-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.profile-section-spaced {
|
||||
margin-top: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.profile-pricing-loading {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.profile-pricing-detail-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* Avatar Clone Card - 这个就是我们要复用的样式 */
|
||||
.avatar-card {
|
||||
position: relative;
|
||||
|
||||
@@ -176,7 +176,7 @@ export default function Profile() {
|
||||
return (
|
||||
<div className="settings-page">
|
||||
{/* 个人资料卡片 */}
|
||||
<div className="card" style={{ padding: 0, overflow: 'hidden' }}>
|
||||
<div className="card profile-card-flat">
|
||||
{/* 用户区 */}
|
||||
<div className="profile-user-section">
|
||||
<img
|
||||
@@ -186,7 +186,7 @@ export default function Profile() {
|
||||
/>
|
||||
<div className="profile-user-info">
|
||||
{editing ? (
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' }}>
|
||||
<div className="profile-edit-wrap">
|
||||
<input
|
||||
type="text"
|
||||
value={nickname}
|
||||
@@ -274,7 +274,7 @@ export default function Profile() {
|
||||
</div>
|
||||
|
||||
{/* 功能入口 */}
|
||||
<div style={{ marginTop: 'var(--spacing-xl)' }}>
|
||||
<div className="profile-section-spaced">
|
||||
<h3 className="profile-section-title">更多</h3>
|
||||
<div className="card profile-menu-list">
|
||||
{menuItems.map((item) => (
|
||||
@@ -288,7 +288,7 @@ export default function Profile() {
|
||||
</div>
|
||||
|
||||
{/* 退出登录 */}
|
||||
<div style={{ marginTop: 'var(--spacing-xl)' }}>
|
||||
<div className="profile-section-spaced">
|
||||
<button className="profile-logout-btn" onClick={handleLogout}>
|
||||
退出登录
|
||||
</button>
|
||||
@@ -302,7 +302,7 @@ export default function Profile() {
|
||||
|
||||
<Modal open={showPricingModal} onClose={() => setShowPricingModal(false)} width="600px">
|
||||
{pricingLoading ? (
|
||||
<div style={{ textAlign: 'center', padding: '40px', color: 'var(--text-secondary)' }}>
|
||||
<div className="profile-pricing-loading">
|
||||
加载中...
|
||||
</div>
|
||||
) : (
|
||||
@@ -345,7 +345,7 @@ export default function Profile() {
|
||||
<ClockIcon />
|
||||
按时长计费细则
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
||||
<div className="profile-pricing-detail-list">
|
||||
{pricingRules
|
||||
.filter((r) => r.mode === 'duration')
|
||||
.map((rule) => {
|
||||
|
||||
Reference in New Issue
Block a user