mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-08 11:26:56 +08:00
chore: format code style and update linting configuration
This commit is contained in:
@@ -1,134 +1,134 @@
|
||||
import DefaultIndexTemplateVue from '@/views/view/indexTemplate/DefaultIndexTemplate.vue';
|
||||
import { defineAsyncComponent, ref, markRaw } from 'vue';
|
||||
import { defineAsyncComponent, markRaw, ref } from 'vue'
|
||||
import DefaultIndexTemplateVue from '@/views/view/indexTemplate/DefaultIndexTemplate.vue'
|
||||
|
||||
const debugAPI =
|
||||
import.meta.env.VITE_API == 'dev'
|
||||
const debugAPI
|
||||
= import.meta.env.VITE_API == 'dev'
|
||||
? import.meta.env.VITE_DEBUG_DEV_API
|
||||
: import.meta.env.VITE_DEBUG_RELEASE_API;
|
||||
const releseAPI = `https://vtsuru.suki.club/`;
|
||||
const failoverAPI = `https://failover-api.vtsuru.suki.club/`;
|
||||
: import.meta.env.VITE_DEBUG_RELEASE_API
|
||||
const releseAPI = `https://vtsuru.suki.club/`
|
||||
const failoverAPI = `https://failover-api.vtsuru.suki.club/`
|
||||
|
||||
export const isBackendUsable = ref(true);
|
||||
export const isDev = import.meta.env.MODE === 'development';
|
||||
export const isBackendUsable = ref(true)
|
||||
export const isDev = import.meta.env.MODE === 'development'
|
||||
// @ts-ignore
|
||||
export const isTauri = () => window.__TAURI__ !== undefined || window.__TAURI_INTERNAL__ !== undefined || '__TAURI__' in window;
|
||||
export const isTauri = () => window.__TAURI__ !== undefined || window.__TAURI_INTERNAL__ !== undefined || '__TAURI__' in window
|
||||
|
||||
export const AVATAR_URL = 'https://workers.vrp.moe/api/bilibili/avatar/';
|
||||
export const FILE_BASE_URL = 'https://files.vtsuru.suki.club';
|
||||
export const IMGUR_URL = FILE_BASE_URL + '/imgur/';
|
||||
export const THINGS_URL = FILE_BASE_URL + '/things/';
|
||||
export const apiFail = ref(false);
|
||||
export const AVATAR_URL = 'https://workers.vrp.moe/api/bilibili/avatar/'
|
||||
export const FILE_BASE_URL = 'https://files.vtsuru.suki.club'
|
||||
export const IMGUR_URL = `${FILE_BASE_URL}/imgur/`
|
||||
export const THINGS_URL = `${FILE_BASE_URL}/things/`
|
||||
export const apiFail = ref(false)
|
||||
|
||||
export const BASE_URL =
|
||||
process.env.NODE_ENV === 'development'
|
||||
export const BASE_URL
|
||||
= process.env.NODE_ENV === 'development'
|
||||
? debugAPI
|
||||
: apiFail.value
|
||||
? failoverAPI
|
||||
: releseAPI;
|
||||
export const BASE_API_URL = BASE_URL + 'api/';
|
||||
export const FETCH_API = 'https://fetch.vtsuru.live/';
|
||||
export const BASE_HUB_URL =
|
||||
(process.env.NODE_ENV === 'development'
|
||||
: releseAPI
|
||||
export const BASE_API_URL = `${BASE_URL}api/`
|
||||
export const FETCH_API = 'https://fetch.vtsuru.live/'
|
||||
export const BASE_HUB_URL
|
||||
= `${process.env.NODE_ENV === 'development'
|
||||
? debugAPI
|
||||
: apiFail.value
|
||||
? failoverAPI
|
||||
: releseAPI) + 'hub/';
|
||||
: releseAPI}hub/`
|
||||
|
||||
export const TURNSTILE_KEY = '0x4AAAAAAAETUSAKbds019h0';
|
||||
export const TURNSTILE_KEY = '0x4AAAAAAAETUSAKbds019h0'
|
||||
|
||||
export const CURRENT_HOST = `${window.location.protocol}//${isDev ? window.location.host : 'vtsuru.live'}/`;
|
||||
export const CN_HOST = 'https://vtsuru.suki.club/';
|
||||
export const CURRENT_HOST = `${window.location.protocol}//${isDev ? window.location.host : 'vtsuru.live'}/`
|
||||
export const CN_HOST = 'https://vtsuru.suki.club/'
|
||||
|
||||
export const USER_API_URL = BASE_API_URL + 'user/';
|
||||
export const ACCOUNT_API_URL = BASE_API_URL + 'account/';
|
||||
export const BILI_API_URL = BASE_API_URL + 'bili/';
|
||||
export const SONG_API_URL = BASE_API_URL + 'song-list/';
|
||||
export const NOTIFACTION_API_URL = BASE_API_URL + 'notification/';
|
||||
export const QUESTION_API_URL = BASE_API_URL + 'qa/';
|
||||
export const LOTTERY_API_URL = BASE_API_URL + 'lottery/';
|
||||
export const HISTORY_API_URL = BASE_API_URL + 'history/';
|
||||
export const SCHEDULE_API_URL = BASE_API_URL + 'schedule/';
|
||||
export const VIDEO_COLLECT_API_URL = BASE_API_URL + 'video-collect/';
|
||||
export const OPEN_LIVE_API_URL = BASE_API_URL + 'open-live/';
|
||||
export const SONG_REQUEST_API_URL = BASE_API_URL + 'live-request/';
|
||||
export const QUEUE_API_URL = BASE_API_URL + 'queue/';
|
||||
export const EVENT_API_URL = BASE_API_URL + 'event/';
|
||||
export const LIVE_API_URL = BASE_API_URL + 'live/';
|
||||
export const FEEDBACK_API_URL = BASE_API_URL + 'feedback/';
|
||||
export const MUSIC_REQUEST_API_URL = BASE_API_URL + 'music-request/';
|
||||
export const VTSURU_API_URL = BASE_API_URL + 'vtsuru/';
|
||||
export const POINT_API_URL = BASE_API_URL + 'point/';
|
||||
export const BILI_AUTH_API_URL = BASE_API_URL + 'bili-auth/';
|
||||
export const FORUM_API_URL = BASE_API_URL + 'forum/';
|
||||
export const USER_INDEX_API_URL = BASE_API_URL + 'user-index/';
|
||||
export const ANALYZE_API_URL = BASE_API_URL + 'analyze/';
|
||||
export const CHECKIN_API_URL = BASE_API_URL + 'checkin/';
|
||||
export const USER_CONFIG_API_URL = BASE_API_URL + 'user-config/';
|
||||
export const FILE_API_URL = BASE_API_URL + 'files/';
|
||||
export const VOTE_API_URL = BASE_API_URL + 'vote/';
|
||||
export const USER_API_URL = `${BASE_API_URL}user/`
|
||||
export const ACCOUNT_API_URL = `${BASE_API_URL}account/`
|
||||
export const BILI_API_URL = `${BASE_API_URL}bili/`
|
||||
export const SONG_API_URL = `${BASE_API_URL}song-list/`
|
||||
export const NOTIFACTION_API_URL = `${BASE_API_URL}notification/`
|
||||
export const QUESTION_API_URL = `${BASE_API_URL}qa/`
|
||||
export const LOTTERY_API_URL = `${BASE_API_URL}lottery/`
|
||||
export const HISTORY_API_URL = `${BASE_API_URL}history/`
|
||||
export const SCHEDULE_API_URL = `${BASE_API_URL}schedule/`
|
||||
export const VIDEO_COLLECT_API_URL = `${BASE_API_URL}video-collect/`
|
||||
export const OPEN_LIVE_API_URL = `${BASE_API_URL}open-live/`
|
||||
export const SONG_REQUEST_API_URL = `${BASE_API_URL}live-request/`
|
||||
export const QUEUE_API_URL = `${BASE_API_URL}queue/`
|
||||
export const EVENT_API_URL = `${BASE_API_URL}event/`
|
||||
export const LIVE_API_URL = `${BASE_API_URL}live/`
|
||||
export const FEEDBACK_API_URL = `${BASE_API_URL}feedback/`
|
||||
export const MUSIC_REQUEST_API_URL = `${BASE_API_URL}music-request/`
|
||||
export const VTSURU_API_URL = `${BASE_API_URL}vtsuru/`
|
||||
export const POINT_API_URL = `${BASE_API_URL}point/`
|
||||
export const BILI_AUTH_API_URL = `${BASE_API_URL}bili-auth/`
|
||||
export const FORUM_API_URL = `${BASE_API_URL}forum/`
|
||||
export const USER_INDEX_API_URL = `${BASE_API_URL}user-index/`
|
||||
export const ANALYZE_API_URL = `${BASE_API_URL}analyze/`
|
||||
export const CHECKIN_API_URL = `${BASE_API_URL}checkin/`
|
||||
export const USER_CONFIG_API_URL = `${BASE_API_URL}user-config/`
|
||||
export const FILE_API_URL = `${BASE_API_URL}files/`
|
||||
export const VOTE_API_URL = `${BASE_API_URL}vote/`
|
||||
|
||||
export type TemplateMapType = {
|
||||
export interface TemplateMapType {
|
||||
[key: string]: {
|
||||
name: string;
|
||||
settingName?: string;
|
||||
component: any;
|
||||
};
|
||||
};
|
||||
name: string
|
||||
settingName?: string
|
||||
component: any
|
||||
}
|
||||
}
|
||||
export const ScheduleTemplateMap: TemplateMapType = {
|
||||
'': {
|
||||
name: '默认',
|
||||
//settingName: 'Template.Schedule.Default',
|
||||
// settingName: 'Template.Schedule.Default',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() => import('@/views/view/scheduleTemplate/DefaultScheduleTemplate.vue')
|
||||
))
|
||||
async () => import('@/views/view/scheduleTemplate/DefaultScheduleTemplate.vue'),
|
||||
)),
|
||||
},
|
||||
pinky: {
|
||||
'pinky': {
|
||||
name: '粉粉',
|
||||
//settingName: 'Template.Schedule.Pinky',
|
||||
// settingName: 'Template.Schedule.Pinky',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() => import('@/views/view/scheduleTemplate/PinkySchedule.vue')
|
||||
))
|
||||
async () => import('@/views/view/scheduleTemplate/PinkySchedule.vue'),
|
||||
)),
|
||||
},
|
||||
kawaii: {
|
||||
'kawaii': {
|
||||
name: '可爱手帐 (未完成',
|
||||
settingName: 'Template.Schedule.Kawaii',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() => import('@/views/view/scheduleTemplate/KawaiiSchedule.vue')
|
||||
))
|
||||
}
|
||||
};
|
||||
async () => import('@/views/view/scheduleTemplate/KawaiiSchedule.vue'),
|
||||
)),
|
||||
},
|
||||
}
|
||||
export const SongListTemplateMap: TemplateMapType = {
|
||||
'': {
|
||||
name: '默认',
|
||||
//settingName: 'Template.SongList.Default',
|
||||
// settingName: 'Template.SongList.Default',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() => import('@/views/view/songListTemplate/DefaultSongListTemplate.vue')
|
||||
))
|
||||
async () => import('@/views/view/songListTemplate/DefaultSongListTemplate.vue'),
|
||||
)),
|
||||
},
|
||||
traditional: {
|
||||
'traditional': {
|
||||
name: '列表 (较推荐',
|
||||
settingName: 'Template.SongList.Traditional',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() =>
|
||||
import('@/views/view/songListTemplate/TraditionalSongListTemplate.vue')
|
||||
))
|
||||
async () =>
|
||||
import('@/views/view/songListTemplate/TraditionalSongListTemplate.vue'),
|
||||
)),
|
||||
},
|
||||
simple: {
|
||||
'simple': {
|
||||
name: '简单',
|
||||
//settingName: 'Template.SongList.Simple',
|
||||
// settingName: 'Template.SongList.Simple',
|
||||
component: markRaw(defineAsyncComponent(
|
||||
() => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue')
|
||||
))
|
||||
async () => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue'),
|
||||
)),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const IndexTemplateMap: TemplateMapType = {
|
||||
'': {
|
||||
name: '默认',
|
||||
//settingName: 'Template.Index.Default',
|
||||
component: markRaw(DefaultIndexTemplateVue)
|
||||
}
|
||||
};
|
||||
// settingName: 'Template.Index.Default',
|
||||
component: markRaw(DefaultIndexTemplateVue),
|
||||
},
|
||||
}
|
||||
|
||||
export const defaultDanmujiCss = `@import url("https://fonts.googleapis.com/css?family=Changa%20One");
|
||||
@import url("https://fonts.googleapis.com/css?family=Imprima");
|
||||
@@ -426,4 +426,4 @@ yt-live-chat-paid-message-renderer {
|
||||
animation: anim 0ms;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
`
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user