mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge branch 'main' of https://github.com/hmhuming/ChatGPT-Next-Web
This commit is contained in:
		@@ -12,7 +12,7 @@ import {
 | 
			
		||||
import { useChatStore } from "../store";
 | 
			
		||||
 | 
			
		||||
import Locale from "../locales";
 | 
			
		||||
import { Link, useNavigate } from "react-router-dom";
 | 
			
		||||
import { Link, useLocation, useNavigate } from "react-router-dom";
 | 
			
		||||
import { Path } from "../constant";
 | 
			
		||||
import { MaskAvatar } from "./mask";
 | 
			
		||||
import { Mask } from "../store/mask";
 | 
			
		||||
@@ -40,12 +40,16 @@ export function ChatItem(props: {
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
  }, [props.selected]);
 | 
			
		||||
 | 
			
		||||
  const { pathname: currentPath } = useLocation();
 | 
			
		||||
  return (
 | 
			
		||||
    <Draggable draggableId={`${props.id}`} index={props.index}>
 | 
			
		||||
      {(provided) => (
 | 
			
		||||
        <div
 | 
			
		||||
          className={`${styles["chat-item"]} ${
 | 
			
		||||
            props.selected && styles["chat-item-selected"]
 | 
			
		||||
            props.selected &&
 | 
			
		||||
            (currentPath === Path.Chat || currentPath === Path.Home) &&
 | 
			
		||||
            styles["chat-item-selected"]
 | 
			
		||||
          }`}
 | 
			
		||||
          onClick={props.onClick}
 | 
			
		||||
          ref={(ele) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -404,7 +404,16 @@ export function MaskPage() {
 | 
			
		||||
  const maskStore = useMaskStore();
 | 
			
		||||
  const chatStore = useChatStore();
 | 
			
		||||
 | 
			
		||||
  const [filterLang, setFilterLang] = useState<Lang>();
 | 
			
		||||
  const [filterLang, setFilterLang] = useState<Lang | undefined>(
 | 
			
		||||
    localStorage.getItem("Mask-language") as Lang | undefined,
 | 
			
		||||
  );
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (filterLang) {
 | 
			
		||||
      localStorage.setItem("Mask-language", filterLang);
 | 
			
		||||
    } else {
 | 
			
		||||
      localStorage.removeItem("Mask-language");
 | 
			
		||||
    }
 | 
			
		||||
  }, [filterLang]);
 | 
			
		||||
 | 
			
		||||
  const allMasks = maskStore
 | 
			
		||||
    .getAll()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user