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:
@@ -2505,6 +2505,41 @@ const locale = {
|
||||
'profile.referral.noReferrals': 'No referrals yet',
|
||||
'profile.referral.shareNow': 'Share Now',
|
||||
|
||||
// Profile - Notification Settings
|
||||
'profile.notifications.title': 'Notification Settings',
|
||||
'profile.notifications.hint': 'Configure your default notification methods, which will be used automatically when creating asset monitors and alerts',
|
||||
'profile.notifications.defaultChannels': 'Default Notification Channels',
|
||||
'profile.notifications.browser': 'In-App Notification',
|
||||
'profile.notifications.email': 'Email',
|
||||
'profile.notifications.phone': 'SMS',
|
||||
'profile.notifications.telegramBotToken': 'Telegram Bot Token',
|
||||
'profile.notifications.telegramBotTokenPlaceholder': 'Enter your Telegram Bot Token',
|
||||
'profile.notifications.telegramBotTokenHint': 'Get Token by creating a bot via @BotFather',
|
||||
'profile.notifications.telegramChatId': 'Telegram Chat ID',
|
||||
'profile.notifications.telegramPlaceholder': 'Enter your Telegram Chat ID (e.g. 123456789)',
|
||||
'profile.notifications.telegramHint': 'Send /start to @userinfobot to get your Chat ID',
|
||||
'profile.notifications.notifyEmail': 'Notification Email',
|
||||
'profile.notifications.emailPlaceholder': 'Email address to receive notifications',
|
||||
'profile.notifications.emailHint': 'Uses your account email by default, or set a different one',
|
||||
'profile.notifications.phonePlaceholder': 'Enter phone number (e.g. +1234567890)',
|
||||
'profile.notifications.phoneHint': 'Requires admin to configure Twilio service',
|
||||
'profile.notifications.discordWebhook': 'Discord Webhook',
|
||||
'profile.notifications.discordPlaceholder': 'https://discord.com/api/webhooks/...',
|
||||
'profile.notifications.discordHint': 'Create Webhook in Discord server settings',
|
||||
'profile.notifications.webhookUrl': 'Webhook URL',
|
||||
'profile.notifications.webhookPlaceholder': 'https://your-server.com/webhook',
|
||||
'profile.notifications.webhookHint': 'Custom Webhook URL, notifications sent via POST JSON',
|
||||
'profile.notifications.webhookToken': 'Webhook Token (Optional)',
|
||||
'profile.notifications.webhookTokenPlaceholder': 'Bearer Token for request authentication',
|
||||
'profile.notifications.webhookTokenHint': 'Sent as Authorization: Bearer Token to Webhook',
|
||||
'profile.notifications.testBtn': 'Send Test Notification',
|
||||
'profile.notifications.saveSuccess': 'Notification settings saved successfully',
|
||||
'profile.notifications.selectChannel': 'Please select at least one notification channel',
|
||||
'profile.notifications.fillTelegramToken': 'Please fill in Telegram Bot Token',
|
||||
'profile.notifications.fillTelegram': 'Please fill in Telegram Chat ID',
|
||||
'profile.notifications.fillEmail': 'Please fill in notification email',
|
||||
'profile.notifications.testSent': 'Test notification sent, please check your notification channels',
|
||||
|
||||
// User Manage - Credits & VIP
|
||||
'userManage.credits': 'Credits',
|
||||
'userManage.adjustCredits': 'Adjust Credits',
|
||||
|
||||
Reference in New Issue
Block a user