From 50e6579116d3588026de1b2e5185c9e67d2012f4 Mon Sep 17 00:00:00 2001 From: IndieKKY Date: Sun, 6 Oct 2024 17:51:07 +0800 Subject: [PATCH] fix --- src/consts/const.ts | 2 ++ src/main.tsx | 3 +-- src/utils/bizUtil.ts | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/consts/const.ts b/src/consts/const.ts index 09b910b..d1daf7d 100644 --- a/src/consts/const.ts +++ b/src/consts/const.ts @@ -20,6 +20,8 @@ export const MESSAGE_TO_APP_SET_VIDEO_INFO = 'setVideoInfo' export const EVENT_EXPAND = 'expand' +export const APP_DOM_ID = 'bilibili-subtitle' + export const IFRAME_ID = 'bilibili-subtitle-iframe' export const STORAGE_ENV = 'bilibili-subtitle_env' diff --git a/src/main.tsx b/src/main.tsx index 6205274..1896e64 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,8 +4,7 @@ import './index.less' import store from './store' import {Provider} from 'react-redux' import Router from './Router' - -export const APP_DOM_ID = 'bilibili-subtitle' +import { APP_DOM_ID } from './consts/const' const body = document.querySelector('body') const app = document.createElement('div') diff --git a/src/utils/bizUtil.ts b/src/utils/bizUtil.ts index 191174d..00f3a1c 100644 --- a/src/utils/bizUtil.ts +++ b/src/utils/bizUtil.ts @@ -1,8 +1,7 @@ -import {CUSTOM_MODEL_TOKENS, MODEL_DEFAULT, MODEL_MAP, SUMMARIZE_TYPES} from '../consts/const' +import {APP_DOM_ID, CUSTOM_MODEL_TOKENS, MODEL_DEFAULT, MODEL_MAP, SUMMARIZE_TYPES} from '../consts/const' import {isDarkMode} from '@kky002/kky-util' import toast from 'react-hot-toast' import {findIndex} from 'lodash-es' -import {APP_DOM_ID} from '../Main' export const debug = (...args: any[]) => { console.debug('[APP]', ...args) }