Ezmary commited on
Commit
4b6b49f
·
verified ·
1 Parent(s): 852dbdd

Update src/App.tsx

Browse files
Files changed (1) hide show
  1. src/App.tsx +6 -5
src/App.tsx CHANGED
@@ -1,4 +1,4 @@
1
- // src/App.tsx (نسخه نهایی با اصلاح آیکون منوی شخصیت اختصاصی)
2
  import React, { useEffect, useRef, useState, FC } from "react";
3
  import './App.scss';
4
  import { AppProvider, useAppContext, PersonalityType, PersonalityInstructions } from "./contexts/AppContext";
@@ -51,8 +51,9 @@ const CustomModal: FC<CustomModalProps> = ({ isOpen, onClose, onSave, initialNam
51
  const PersonalityMenu: React.FC<{ isOpen: boolean; onClose: () => void; onSelect: (p: PersonalityType) => void; }> = ({ isOpen, onClose, onSelect }) => {
52
  const menuRef = useRef<HTMLDivElement>(null);
53
  const { selectedPersonality } = useAppContext();
54
- // ✅ تغییر اصلی اینجاست: آیکون custom تغییر کرد
55
- const personalityIcons: Record<PersonalityType, string> = { default: "person", teacher: "school", poetic: "auto_awesome", funny: "sentiment_satisfied", custom: "manage_accounts" };
 
56
  const personalityLabels: Record<PersonalityType, string> = { default: 'دستیار پیش‌فرض', teacher: 'استاد زبان', poetic: 'حس خوب', funny: 'شوخ‌طبع', custom: 'شخصیت اختصاصی' };
57
  useEffect(() => {
58
  const handleClickOutside = (e: MouseEvent) => menuRef.current && !menuRef.current.contains(e.target as Node) && onClose();
@@ -100,8 +101,8 @@ const AppInternal: React.FC = () => {
100
  <div className="main-wrapper">
101
  <div className="header-controls">
102
  <button aria-label="انتخاب شخصیت" className="header-icon-button" onClick={() => setIsPersonalityMenuOpen(v => !v)}>
103
- {/* این آیکون اصلی بدون تغییر باقی می‌ماند */}
104
- <span className="material-symbols-outlined">cognition</span>
105
  </button>
106
  <button ref={notificationButtonRef} aria-label="اطلاعات" className="header-icon-button" onClick={() => setIsNotificationOpen(v => !v)}>
107
  <span className="material-symbols-outlined">info</span>
 
1
+ // src/App.tsx (نسخه نهایی با آیکون tune برای دکمه انتخاب شخصیت)
2
  import React, { useEffect, useRef, useState, FC } from "react";
3
  import './App.scss';
4
  import { AppProvider, useAppContext, PersonalityType, PersonalityInstructions } from "./contexts/AppContext";
 
51
  const PersonalityMenu: React.FC<{ isOpen: boolean; onClose: () => void; onSelect: (p: PersonalityType) => void; }> = ({ isOpen, onClose, onSelect }) => {
52
  const menuRef = useRef<HTMLDivElement>(null);
53
  const { selectedPersonality } = useAppContext();
54
+ // ✅ تغییر اینجا اعمال نمی‌شود، چون این بخش آیکون‌های *داخل* منو را تعیین می‌کند.
55
+ // آیکون "person" برای "دستیار پیش‌فرض" همچنان سر انسان است.
56
+ const personalityIcons: Record<PersonalityType, string> = { default: "person", teacher: "school", poetic: "auto_awesome", funny: "sentiment_satisfied", custom: "tune" };
57
  const personalityLabels: Record<PersonalityType, string> = { default: 'دستیار پیش‌فرض', teacher: 'استاد زبان', poetic: 'حس خوب', funny: 'شوخ‌طبع', custom: 'شخصیت اختصاصی' };
58
  useEffect(() => {
59
  const handleClickOutside = (e: MouseEvent) => menuRef.current && !menuRef.current.contains(e.target as Node) && onClose();
 
101
  <div className="main-wrapper">
102
  <div className="header-controls">
103
  <button aria-label="انتخاب شخصیت" className="header-icon-button" onClick={() => setIsPersonalityMenuOpen(v => !v)}>
104
+ {/* تغییر اصلی اینجاست: آیکون دکمه بالا تغییر کرد */}
105
+ <span className="material-symbols-outlined">tune</span>
106
  </button>
107
  <button ref={notificationButtonRef} aria-label="اطلاعات" className="header-icon-button" onClick={() => setIsNotificationOpen(v => !v)}>
108
  <span className="material-symbols-outlined">info</span>