fix message provider get

This commit is contained in:
2024-10-31 14:17:40 +08:00
parent 51897133a7
commit 392a577a7e
7 changed files with 90 additions and 20 deletions

View File

@@ -287,19 +287,6 @@ onUnmounted(() => {
<template>
<NFlex justify="center" align="center" vertical>
<NAlert type="warning" title="2024.2.26">
近期逸站对开放平台直播弹幕流进行了极为严格的限制, 目前本站服务器只能连接个位数的直播间, 这使得在不使用
<NButton tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank" type="primary" text>
VtsuruEventFetcher
</NButton>
的情况下获取弹幕数据几乎不可能实现.
<br />
在这种情况下建议有相关功能需求的用户 (如直播记录, 积分等) 部署
<NButton tag="a" href="https://www.yuque.com/megghy/dez70g/vfvcyv3024xvaa1p" target="_blank" type="primary" text>
VtsuruEventFetcher
</NButton>
以获得完整的功能体验
</NAlert>
<NTabs type="segment" animated v-if="accountInfo" style="width: 100%;">
<NTabPane name="info" tab="个人信息" style="width: 100%;" display-directive="show:lazy">
<NFlex justify="center" align="center">

View File

@@ -1,12 +1,26 @@
<script setup lang="ts">
import { useAccount } from '@/api/account';
import { onMounted } from 'vue';
import { ConsumptionTypes } from '@/api/models/consumption';
import { NFlex, NIcon, NLayout, NLayoutSider, NMenu, NTabPane, NTabs } from 'naive-ui';
import { h, onMounted } from 'vue';
import { useConsumptionSettingStore } from '@/store/usePaymentSettingStore';
import { CheckmarkCircle24Filled } from '@vicons/fluent';
const accountInfo = useAccount()
const useConsumption = useConsumptionSettingStore()
const { } = defineProps<{
}>()
const enabledIcon = h(NIcon, { component: CheckmarkCircle24Filled, color: 'lightgrey' })
const disabledIcon = h(NIcon, { component: CheckmarkCircle24Filled, color: 'red' })
const tabDisplay = (type: ConsumptionTypes) => {
const setting = useConsumption.GetSetting(type)
return h(NFlex, {}, () => [
h(NIcon, { component: setting.isEnabled ? enabledIcon : disabledIcon, }),
h('span', {}, setting.isEnabled ? '已启用' : '未启用'),
])
}
async function getAccountPaymentSettings() {
try {
@@ -22,5 +36,11 @@ onMounted(() => {
</script>
<template>
WIP...
<NTabs animated type="line">
<NTabPane name="弹幕储存" tab="弹幕储存">
<template #tab>
<component :is="tabDisplay(ConsumptionTypes.DanmakuStorage)" />
</template>
</NTabPane>
</NTabs>
</template>