mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
fix message provider get
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user