feat: Move notification settings to user profile and add i18n support
- Move notification config from system settings (.env) to user profile (database) - Add user-specific notification settings API endpoints (GET/PUT /api/user/notification-settings) - Add notification_settings column to qd_users table - Update portfolio and trading-assistant to use profile notification settings - Add notification settings UI in profile page with all channels (browser, telegram, email, phone, discord, webhook) - Add i18n translations for notification settings in 10 languages - Fix timestamp parsing in TradingRecords and portfolio (handle both ISO strings and Unix timestamps) - Fix header icons alignment for mobile responsive layout - Fix equity curve timestamp bug (handle datetime objects properly) - Remove unused login.js exports and clean up user.js store - Remove husky, commitlint and other dev dependencies - Clean up env.example by removing user-specific notification params - Update signal_notifier to prioritize user-specific tokens over global env vars
This commit is contained in:
@@ -125,6 +125,28 @@ export function changePassword (data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current user's notification settings
|
||||
*/
|
||||
export function getNotificationSettings () {
|
||||
return request({
|
||||
url: '/api/users/notification-settings',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Update current user's notification settings
|
||||
* @param {Object} data - { default_channels, telegram_chat_id, email, discord_webhook, webhook_url, phone }
|
||||
*/
|
||||
export function updateNotificationSettings (data) {
|
||||
return request({
|
||||
url: '/api/users/notification-settings',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current user's credits log
|
||||
* @param {Object} params - { page, page_size }
|
||||
|
||||
Reference in New Issue
Block a user