c5d000e1c9
- 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
59 lines
1.9 KiB
JavaScript
59 lines
1.9 KiB
JavaScript
// with polyfills
|
|
import 'core-js/stable'
|
|
import 'regenerator-runtime/runtime'
|
|
|
|
import Vue from 'vue'
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import store from './store/'
|
|
import i18n from './locales'
|
|
import { VueAxios } from './utils/request'
|
|
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
|
|
import themePluginConfig from '../config/themePluginConfig'
|
|
|
|
// mock
|
|
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
|
|
import './mock'
|
|
|
|
import bootstrap from './core/bootstrap'
|
|
import './core/lazy_use' // use lazy load components
|
|
import './permission' // permission control
|
|
import './utils/filter' // global filter
|
|
import './global.less' // global style
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
// Suppress noisy ResizeObserver loop errors (harmless in most cases on responsive layouts)
|
|
if (typeof window !== 'undefined') {
|
|
const ignoreResizeObserverError = (e) => {
|
|
const msg = (e && (e.reason && e.reason.message || e.message)) || ''
|
|
if (msg.includes('ResizeObserver loop') || msg.includes('ResizeObserver loop limit exceeded')) {
|
|
e.preventDefault && e.preventDefault()
|
|
e.stopImmediatePropagation && e.stopImmediatePropagation()
|
|
return false
|
|
}
|
|
}
|
|
window.addEventListener('error', ignoreResizeObserverError)
|
|
window.addEventListener('unhandledrejection', ignoreResizeObserverError)
|
|
}
|
|
|
|
// mount axios to `Vue.$http` and `this.$http`
|
|
Vue.use(VueAxios)
|
|
// use pro-layout components
|
|
/* eslint-disable vue/component-definition-name-casing */
|
|
Vue.component('pro-layout', ProLayout)
|
|
Vue.component('page-container', PageHeaderWrapper)
|
|
Vue.component('page-header-wrapper', PageHeaderWrapper)
|
|
/* eslint-enable vue/component-definition-name-casing */
|
|
|
|
window.umi_plugin_ant_themeVar = themePluginConfig.theme
|
|
|
|
new Vue({
|
|
router,
|
|
store,
|
|
i18n,
|
|
// init localstorage, vuex, Logo message
|
|
created: bootstrap,
|
|
render: h => h(App)
|
|
}).$mount('#app')
|