feat: 新增设置页面,包含通用、安全、数据管理功能,并引入相关类型定义。
This commit is contained in:
@@ -455,6 +455,40 @@ function Settings() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="settings-item">
|
||||||
|
<div className="settings-item-info">
|
||||||
|
<label className="settings-item__label">通知方式</label>
|
||||||
|
<p className="settings-item__description">选择接收相关通知的方式</p>
|
||||||
|
</div>
|
||||||
|
<CustomSelect
|
||||||
|
className="settings-custom-select"
|
||||||
|
value={userSettings?.notificationChannel || 'sms'}
|
||||||
|
onChange={(value) => handleUserSettingChange('notificationChannel', value)}
|
||||||
|
options={[
|
||||||
|
{ value: 'sms', label: '仅短信' },
|
||||||
|
{ value: 'email', label: '仅邮件' },
|
||||||
|
{ value: 'both', label: '短信和邮件' },
|
||||||
|
{ value: 'none', label: '不通知' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="settings-item">
|
||||||
|
<div className="settings-item-info">
|
||||||
|
<label className="settings-item__label">邮箱地址</label>
|
||||||
|
<p className="settings-item__description">用于接收邮件通知</p>
|
||||||
|
</div>
|
||||||
|
<div className="settings-input-container">
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
className="settings-text-input"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
value={userSettings?.email || ''}
|
||||||
|
onChange={(e) => handleUserSettingChange('email', e.target.value)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ export interface UserSettings {
|
|||||||
defaultExpenseAccount?: Account | null;
|
defaultExpenseAccount?: Account | null;
|
||||||
defaultIncomeAccount?: Account | null;
|
defaultIncomeAccount?: Account | null;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
|
email?: string;
|
||||||
|
notificationChannel?: 'sms' | 'email' | 'both' | 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tag Interface
|
// Tag Interface
|
||||||
|
|||||||
Reference in New Issue
Block a user