mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
add cn host
This commit is contained in:
@@ -3,7 +3,7 @@ import { useAccount } from '@/api/account'
|
||||
import { BiliAuthCodeStatusType, BiliAuthModel } from '@/api/api-models'
|
||||
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
|
||||
import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue'
|
||||
import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
|
||||
import { ACCOUNT_API_URL, CN_HOST, TURNSTILE_KEY } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { Info24Filled, Mic24Filled, Question24Regular } from '@vicons/fluent'
|
||||
import { useLocalStorage } from '@vueuse/core'
|
||||
@@ -286,8 +286,13 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NFlex justify="center" align="center" vertical>
|
||||
<NTabs type="segment" animated v-if="accountInfo" style="width: 100%;" :default-value="$route.query.tab?.toString() ?? 'info'">
|
||||
<NAlert type="success" style="width: 100%; ">
|
||||
本站新增国内镜像: {{ CN_HOST }}, 访问更快
|
||||
</NAlert>
|
||||
<NDivider />
|
||||
<NFlex justify="center" align="center" vertical style="margin: 0 auto; max-width: 1500px;">
|
||||
<NTabs type="segment" animated v-if="accountInfo" style="width: 100%;"
|
||||
:default-value="$route.query.tab?.toString() ?? 'info'">
|
||||
<NTabPane name="info" tab="个人信息" style="width: 100%;" display-directive="show:lazy">
|
||||
<NFlex justify="center" align="center">
|
||||
<NCard embedded style="width: 100%;max-width: 800px;">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { copyToClipboard, downloadImage } from '@/Utils'
|
||||
import { DisableFunction, EnableFunction, SaveSetting, useAccount } from '@/api/account'
|
||||
import { FunctionTypes, QAInfo, Setting_QuestionDisplay } from '@/api/api-models'
|
||||
import { CURRENT_HOST } from '@/data/constants'
|
||||
import { CN_HOST, CURRENT_HOST } from '@/data/constants'
|
||||
import router from '@/router'
|
||||
import { Heart, HeartOutline, TrashBin } from '@vicons/ionicons5'
|
||||
import QuestionItem from '@/components/QuestionItem.vue'
|
||||
@@ -62,6 +62,8 @@ const shareModalVisiable = ref(false)
|
||||
const replyMessage = ref()
|
||||
const addTagName = ref('')
|
||||
|
||||
const useCNUrl = useStorage('Settings.UseCNUrl', false)
|
||||
|
||||
const showSettingCard = ref(true)
|
||||
const showOBSModal = ref(false)
|
||||
const defaultSettings = {} as Setting_QuestionDisplay
|
||||
@@ -81,6 +83,7 @@ const setting = computed({
|
||||
|
||||
const shareCardRef = ref()
|
||||
const shareUrl = computed(() => `${CURRENT_HOST}@` + accountInfo.value?.name + '/question-box')
|
||||
const shareUrlCN = computed(() => CN_HOST + accountInfo.value?.name + '/question-box')
|
||||
|
||||
const ps = ref(20)
|
||||
const pn = ref(1)
|
||||
@@ -239,6 +242,17 @@ onMounted(() => {
|
||||
</NTooltip>
|
||||
</NAlert>
|
||||
</NSpace>
|
||||
<NDivider style="margin: 16px 0 16px 0" title-placement="left">
|
||||
提问页链接
|
||||
</NDivider>
|
||||
<NFlex align="center">
|
||||
<NInputGroup style="max-width: 400px;">
|
||||
<NInput :value="`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/question-box`" readonly />
|
||||
<NButton secondary @click="copyToClipboard(`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/question-box`)">
|
||||
复制 </NButton>
|
||||
</NInputGroup>
|
||||
<NCheckbox v-model:checked="useCNUrl"> 使用国内镜像(访问更快) </NCheckbox>
|
||||
</NFlex>
|
||||
<NDivider style="margin: 10px 0 10px 0" />
|
||||
<template v-if="useQB.reviewing > 0">
|
||||
<NAlert type="warning" title="有提问正在审核中">
|
||||
@@ -506,9 +520,14 @@ onMounted(() => {
|
||||
</div>
|
||||
<NDivider style="margin: 10px" />
|
||||
<NInputGroup>
|
||||
<NInput :value="shareUrl" />
|
||||
<NInput :value="shareUrl" readonly/>
|
||||
<NButton secondary @click="copyToClipboard(shareUrl)"> 复制 </NButton>
|
||||
</NInputGroup>
|
||||
<NDivider style="margin: 10px"> 国内镜像 (访问更快) </NDivider>
|
||||
<NInputGroup>
|
||||
<NInput :value="shareUrlCN" readonly />
|
||||
<NButton secondary @click="copyToClipboard(shareUrlCN)"> 复制 </NButton>
|
||||
</NInputGroup>
|
||||
<br /><br />
|
||||
<NSpace justify="center">
|
||||
<NButton type="primary" @click="saveShareImage"> 保存卡片 </NButton>
|
||||
|
||||
@@ -3,14 +3,18 @@ import { DisableFunction, EnableFunction, useAccount } from '@/api/account'
|
||||
import { FunctionTypes, ScheduleWeekInfo } from '@/api/api-models'
|
||||
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
|
||||
import ScheduleList from '@/components/ScheduleList.vue'
|
||||
import { SCHEDULE_API_URL } from '@/data/constants'
|
||||
import { CN_HOST, CURRENT_HOST, SCHEDULE_API_URL } from '@/data/constants'
|
||||
import { copyToClipboard } from '@/Utils'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { addWeeks, endOfWeek, endOfYear, format, isBefore, startOfWeek, startOfYear } from 'date-fns'
|
||||
import {
|
||||
NAlert,
|
||||
NBadge,
|
||||
NButton,
|
||||
NCheckbox,
|
||||
NColorPicker,
|
||||
NDivider,
|
||||
NFlex,
|
||||
NInput,
|
||||
NInputGroup,
|
||||
NInputGroupLabel,
|
||||
@@ -130,6 +134,8 @@ const showCopyModal = ref(false)
|
||||
const updateScheduleModel = ref<ScheduleWeekInfo>({} as ScheduleWeekInfo)
|
||||
const selectedExistTag = ref()
|
||||
|
||||
const useCNUrl = useStorage('Settings.UseCNUrl', false)
|
||||
|
||||
const selectedDay = ref(0)
|
||||
const selectedScheduleYear = ref(new Date().getFullYear())
|
||||
const selectedScheduleWeek = ref(Number(format(Date.now(), 'w')) + 1)
|
||||
@@ -277,7 +283,17 @@ onMounted(() => {
|
||||
<NButton @click="$router.push({ name: 'manage-index', query: { tab: 'template', template: 'schedule' } })">
|
||||
修改模板
|
||||
</NButton>
|
||||
</NSpace>
|
||||
</NSpace><NDivider style="margin: 16px 0 16px 0" title-placement="left">
|
||||
日程表展示页链接
|
||||
</NDivider>
|
||||
<NFlex align="center">
|
||||
<NInputGroup style="max-width: 400px;">
|
||||
<NInput :value="`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/schedule`" readonly />
|
||||
<NButton secondary @click="copyToClipboard(`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/schedule`)">
|
||||
复制 </NButton>
|
||||
</NInputGroup>
|
||||
<NCheckbox v-model:checked="useCNUrl"> 使用国内镜像(访问更快) </NCheckbox>
|
||||
</NFlex>
|
||||
<NDivider />
|
||||
<NModal v-model:show="showAddModal" style="width: 600px; max-width: 90vw" preset="card" title="添加周程">
|
||||
<NSpace vertical>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { objectsToCSV } from '@/Utils'
|
||||
import { copyToClipboard, objectsToCSV } from '@/Utils'
|
||||
import { DisableFunction, EnableFunction, useAccount } from '@/api/account'
|
||||
import { FunctionTypes, SongFrom, SongLanguage, SongRequestOption, SongsInfo } from '@/api/api-models'
|
||||
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
|
||||
import SongList from '@/components/SongList.vue'
|
||||
import { FETCH_API, SONG_API_URL } from '@/data/constants'
|
||||
import { CN_HOST, CURRENT_HOST, FETCH_API, SONG_API_URL } from '@/data/constants'
|
||||
import { Info24Filled } from '@vicons/fluent'
|
||||
import { ArchiveOutline } from '@vicons/ionicons5'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { format } from 'date-fns'
|
||||
// @ts-ignore
|
||||
import { saveAs } from 'file-saver'
|
||||
@@ -58,6 +59,8 @@ const neteaseIdInput = ref()
|
||||
const fivesingSearchInput = ref()
|
||||
const isModalLoading = ref(false)
|
||||
|
||||
const useCNUrl = useStorage('Settings.UseCNUrl', false)
|
||||
|
||||
const onlyResetNameOnAdded = ref(true)
|
||||
|
||||
const neteaseSongListId = computed(() => {
|
||||
@@ -600,15 +603,15 @@ onMounted(async () => {
|
||||
</NAlert>
|
||||
<NButton @click="showModal = true" type="primary"> 添加歌曲 </NButton>
|
||||
<NButton @click="exportData" type="primary" secondary> 导出为 CSV </NButton>
|
||||
<NButton @click="$router.push({ name: 'manage-liveRequest' })" secondary> 前往点歌页 </NButton>
|
||||
<NButton @click="$router.push({ name: 'manage-liveRequest' })" secondary> 前往点播管理页 </NButton>
|
||||
<NButton @click="$router.push({ name: 'user-songList', params: { id: accountInfo?.name } })" secondary>
|
||||
前往展示页
|
||||
前往歌单展示页
|
||||
</NButton>
|
||||
<NButton :loading="isLoading" @click="() => {
|
||||
getSongs()
|
||||
message.success('完成')
|
||||
}
|
||||
">
|
||||
getSongs()
|
||||
message.success('完成')
|
||||
}
|
||||
">
|
||||
刷新
|
||||
</NButton>
|
||||
<NButton
|
||||
@@ -616,6 +619,17 @@ onMounted(async () => {
|
||||
修改模板
|
||||
</NButton>
|
||||
</NSpace>
|
||||
<NDivider style="margin: 16px 0 16px 0" title-placement="left">
|
||||
歌单展示页链接
|
||||
</NDivider>
|
||||
<NFlex align="center">
|
||||
<NInputGroup style="max-width: 400px;">
|
||||
<NInput :value="`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/song-list`" readonly />
|
||||
<NButton secondary @click="copyToClipboard(`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/song-list`)">
|
||||
复制 </NButton>
|
||||
</NInputGroup>
|
||||
<NCheckbox v-model:checked="useCNUrl"> 使用国内镜像(访问更快) </NCheckbox>
|
||||
</NFlex>
|
||||
<NDivider style="margin: 16px 0 16px 0" />
|
||||
<NModal v-model:show="showModal" style="max-width: 1000px" preset="card" :key="showModalRenderKey">
|
||||
<template #header> 添加歌曲 </template>
|
||||
@@ -659,15 +673,15 @@ onMounted(async () => {
|
||||
</template>
|
||||
<NSpace vertical>
|
||||
<NCheckbox :checked="addSongModel.options != undefined" @update:checked="(checked: boolean) => {
|
||||
addSongModel.options = checked
|
||||
? ({
|
||||
needJianzhang: false,
|
||||
needTidu: false,
|
||||
needZongdu: false,
|
||||
} as SongRequestOption)
|
||||
: undefined
|
||||
}
|
||||
">
|
||||
addSongModel.options = checked
|
||||
? ({
|
||||
needJianzhang: false,
|
||||
needTidu: false,
|
||||
needZongdu: false,
|
||||
} as SongRequestOption)
|
||||
: undefined
|
||||
}
|
||||
">
|
||||
是否启用
|
||||
</NCheckbox>
|
||||
<template v-if="addSongModel.options != undefined">
|
||||
@@ -678,9 +692,9 @@ onMounted(async () => {
|
||||
</NSpace>
|
||||
<NSpace align="center">
|
||||
<NCheckbox :checked="addSongModel.options.scMinPrice != undefined" @update:checked="(checked: boolean) => {
|
||||
if (addSongModel.options) addSongModel.options.scMinPrice = checked ? 30 : undefined
|
||||
}
|
||||
">
|
||||
if (addSongModel.options) addSongModel.options.scMinPrice = checked ? 30 : undefined
|
||||
}
|
||||
">
|
||||
需要SC
|
||||
</NCheckbox>
|
||||
<NInputGroup v-if="addSongModel.options?.scMinPrice" style="width: 200px">
|
||||
@@ -690,9 +704,9 @@ onMounted(async () => {
|
||||
</NSpace>
|
||||
<NSpace align="center">
|
||||
<NCheckbox :checked="addSongModel.options.fanMedalMinLevel != undefined" @update:checked="(checked: boolean) => {
|
||||
if (addSongModel.options) addSongModel.options.fanMedalMinLevel = checked ? 5 : undefined
|
||||
}
|
||||
">
|
||||
if (addSongModel.options) addSongModel.options.fanMedalMinLevel = checked ? 5 : undefined
|
||||
}
|
||||
">
|
||||
需要粉丝牌
|
||||
<NTooltip>
|
||||
<template #trigger>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { getImageUploadModel } from '@/Utils'
|
||||
import { copyToClipboard, getImageUploadModel } from '@/Utils'
|
||||
import { DisableFunction, EnableFunction, useAccount } from '@/api/account'
|
||||
import { FunctionTypes, GoodsStatus, GoodsTypes, PointGoodsModel, ResponsePointGoodModel } from '@/api/api-models'
|
||||
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
|
||||
import EventFetcherStatusCard from '@/components/EventFetcherStatusCard.vue'
|
||||
import PointGoodsItem from '@/components/manage/PointGoodsItem.vue'
|
||||
import { FILE_BASE_URL, POINT_API_URL } from '@/data/constants'
|
||||
import { CN_HOST, CURRENT_HOST, FILE_BASE_URL, POINT_API_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { Info24Filled } from '@vicons/fluent'
|
||||
import { useRouteHash } from '@vueuse/router'
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
NImage,
|
||||
NInput,
|
||||
NInputNumber,
|
||||
NInputGroup,
|
||||
NModal,
|
||||
NPopconfirm,
|
||||
NRadioButton,
|
||||
@@ -45,6 +46,7 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import PointOrderManage from './PointOrderManage.vue'
|
||||
import PointSettings from './PointSettings.vue'
|
||||
import PointUserManage from './PointUserManage.vue'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
|
||||
const message = useMessage()
|
||||
const accountInfo = useAccount()
|
||||
@@ -83,6 +85,8 @@ const showAddGoodsModal = ref(false)
|
||||
const isAllowedPrivacyPolicy = ref(false)
|
||||
const isUpdating = ref(false)
|
||||
|
||||
const useCNUrl = useStorage('Settings.UseCNUrl', false)
|
||||
|
||||
const allowedYearOptions = computed(() => {
|
||||
//从2024到现在的年份
|
||||
return Array.from({ length: new Date().getFullYear() - 2024 + 1 }, (_, i) => 2024 + i).map((item) => {
|
||||
@@ -377,6 +381,17 @@ onMounted(() => { })
|
||||
</NAlert>
|
||||
<EventFetcherStatusCard />
|
||||
</NFlex>
|
||||
<NDivider style="margin: 16px 0 16px 0" title-placement="left">
|
||||
礼物展示页链接
|
||||
</NDivider>
|
||||
<NFlex align="center">
|
||||
<NInputGroup style="max-width: 400px;">
|
||||
<NInput :value="`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/point`" readonly />
|
||||
<NButton secondary @click="copyToClipboard(`${useCNUrl ? CN_HOST : CURRENT_HOST}@${accountInfo.name}/point`)">
|
||||
复制 </NButton>
|
||||
</NInputGroup>
|
||||
<NCheckbox v-model:checked="useCNUrl"> 使用国内镜像(访问更快) </NCheckbox>
|
||||
</NFlex>
|
||||
<NDivider />
|
||||
<NTabs animated v-model:value="hash">
|
||||
<NTabPane name="goods" tab="礼物">
|
||||
|
||||
Reference in New Issue
Block a user