mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
feat: Enhance message content handling and improve UI components
- Updated `getShowContentParts` function to handle message content more robustly, ensuring proper display of content parts. - Refactored `GamepadViewer.vue` to use async component loading for `GamepadDisplay`, added a toggle for real-time preview. - Implemented debounced search functionality in `PointGoodsView.vue` for improved performance during keyword searches. - Enhanced `PointOrderView.vue` with order filtering capabilities and added statistics display for better user insights. - Improved `PointUserHistoryView.vue` by adding export functionality for history data and enhanced filtering options. - Updated `PointUserLayout.vue` to improve card styling and tab navigation experience. - Refined `PointUserSettings.vue` layout for better user interaction and added responsive design adjustments. - Adjusted `vite.config.mts` for better dependency management and build optimization.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import HyperDX from '@hyperdx/browser'
|
||||
import EasySpeech from 'easy-speech'
|
||||
import { createDiscreteApi, NButton, NFlex, NText } from 'naive-ui'
|
||||
import { h } from 'vue'
|
||||
@@ -50,6 +49,8 @@ export function InitVTsuru() {
|
||||
|
||||
async function InitOther() {
|
||||
if (process.env.NODE_ENV !== 'development' && !window.$route.path.startsWith('/obs')) {
|
||||
const mod = await import('@hyperdx/browser')
|
||||
const HyperDX = (mod as any).default ?? mod
|
||||
HyperDX.init({
|
||||
apiKey: '7d1eb66c-24b8-445e-a406-dc2329fa9423',
|
||||
service: 'vtsuru.live',
|
||||
@@ -58,6 +59,8 @@ async function InitOther() {
|
||||
advancedNetworkCapture: true, // Capture full HTTP request/response headers and bodies (default false)
|
||||
ignoreUrls: [/localhost/i],
|
||||
})
|
||||
// 将实例挂到窗口,便于后续设置全局属性(可选)
|
||||
;(window as any).__HyperDX__ = HyperDX
|
||||
}
|
||||
// 加载其他数据
|
||||
InitTTS()
|
||||
@@ -68,7 +71,8 @@ async function InitOther() {
|
||||
if (account.value.biliUserAuthInfo && !useAuth.currentToken) {
|
||||
useAuth.currentToken = account.value.biliUserAuthInfo.token
|
||||
}
|
||||
HyperDX.setGlobalAttributes({
|
||||
const HyperDX = (window as any).__HyperDX__
|
||||
HyperDX?.setGlobalAttributes({
|
||||
userId: account.value.id.toString(),
|
||||
userName: account.value.name,
|
||||
})
|
||||
@@ -141,7 +145,7 @@ function InitTTS() {
|
||||
} else {
|
||||
console.log('[SpeechSynthesis] 当前浏览器不支持tts服务')
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
console.log('[SpeechSynthesis] 当前浏览器不支持tts服务')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { defineAsyncComponent, markRaw, ref } from 'vue'
|
||||
import DefaultIndexTemplateVue from '@/views/view/indexTemplate/DefaultIndexTemplate.vue'
|
||||
|
||||
const debugAPI
|
||||
= import.meta.env.VITE_API == 'dev'
|
||||
@@ -126,7 +125,9 @@ export const IndexTemplateMap: TemplateMapType = {
|
||||
'': {
|
||||
name: '默认',
|
||||
// settingName: 'Template.Index.Default',
|
||||
component: markRaw(DefaultIndexTemplateVue),
|
||||
component: markRaw(defineAsyncComponent(
|
||||
async () => import('@/views/view/indexTemplate/DefaultIndexTemplate.vue'),
|
||||
)),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user