You've already forked bilibili-subtitle
优化
This commit is contained in:
@@ -8,15 +8,15 @@ import {EventBusContext} from '../Router'
|
||||
import useTranslateService from '../hooks/useTranslateService'
|
||||
import {setTheme} from '../utils/bizUtil'
|
||||
import useSearchService from '../hooks/useSearchService'
|
||||
import useMessaging from '../messaging/layer2/useMessaging'
|
||||
import {setFold} from '../redux/envReducer'
|
||||
import { useMessage } from '@/hooks/message'
|
||||
|
||||
function App() {
|
||||
const dispatch = useAppDispatch()
|
||||
const fold = useAppSelector(state => state.env.fold)
|
||||
const eventBus = useContext(EventBusContext)
|
||||
const totalHeight = useAppSelector(state => state.env.totalHeight)
|
||||
const {sendInject} = useMessaging()
|
||||
const {sendInject} = useMessage()
|
||||
const envData = useAppSelector(state => state.env.envData)
|
||||
|
||||
const foldCallback = useCallback(() => {
|
||||
|
@@ -27,6 +27,7 @@ import toast from 'react-hot-toast'
|
||||
import {useBoolean, useEventTarget} from 'ahooks'
|
||||
import {useEventChecked} from '@kky002/kky-hooks'
|
||||
import useMessaging from '@/messaging/layer2/useMessaging'
|
||||
import { useMessage } from '@/hooks/message'
|
||||
|
||||
const Section = (props: {
|
||||
title: ShowElement
|
||||
@@ -58,7 +59,7 @@ const FormItem = (props: {
|
||||
const OptionsPage = () => {
|
||||
const dispatch = useAppDispatch()
|
||||
const envData = useAppSelector(state => state.env.envData)
|
||||
const {sendExtension} = useMessaging()
|
||||
const {sendExtension} = useMessage()
|
||||
const {value: sidePanelValue, onChange: setSidePanelValue} = useEventChecked(envData.sidePanel)
|
||||
const {value: autoInsertValue, onChange: setAutoInsertValue} = useEventChecked(!envData.manualInsert)
|
||||
const {value: autoExpandValue, onChange: setAutoExpandValue} = useEventChecked(envData.autoExpand)
|
||||
|
Reference in New Issue
Block a user