mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
feat(sidebar): surface unlock entry
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useState, useEffect, useRef } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { useAppStore } from '../stores/appStore'
|
||||
import { useChatStore } from '../stores/chatStore'
|
||||
import { useThemeStore, themes } from '../stores/themeStore'
|
||||
@@ -45,6 +46,7 @@ interface WxidOption {
|
||||
}
|
||||
|
||||
function SettingsPage() {
|
||||
const location = useLocation()
|
||||
const {
|
||||
isDbConnected,
|
||||
setDbConnected,
|
||||
@@ -209,6 +211,12 @@ function SettingsPage() {
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const initialTab = (location.state as { initialTab?: SettingsTab } | null)?.initialTab
|
||||
if (!initialTab) return
|
||||
setActiveTab(initialTab)
|
||||
}, [location.state])
|
||||
|
||||
// 点击外部关闭下拉框
|
||||
useEffect(() => {
|
||||
const handleClickOutside = (e: MouseEvent) => {
|
||||
|
||||
Reference in New Issue
Block a user