Ezmary commited on
Commit
ad56229
·
verified ·
1 Parent(s): 12cf694

Update src/App.tsx

Browse files
Files changed (1) hide show
  1. src/App.tsx +9 -10
src/App.tsx CHANGED
@@ -9,8 +9,6 @@ import { isIOS } from "./lib/platform";
9
  import cn from "classnames";
10
  import { LiveConfig } from "./multimodal-live-types";
11
  import Logo from "./components/logo/Logo";
12
- // BackButton از اینجا حذف شد
13
- // import BackButton from "./components/back-button/BackButton";
14
 
15
  const myCustomInstruction = `
16
  تو دستیار صوتی و تصویری پیشرفته از "اپلیکیشن هوش مصنوعی هوشان" هستی
@@ -64,7 +62,7 @@ const AppInternalLogic: React.FC<AppInternalLogicProps> = ({
64
  currentFacingMode,
65
  onFacingModeChange,
66
  }) => {
67
- const { connected, disconnect } = useLiveAPIContext();
68
 
69
  useEffect(() => {
70
  if (!isMicActive && !isCamActive && connected) {
@@ -75,17 +73,13 @@ const AppInternalLogic: React.FC<AppInternalLogicProps> = ({
75
  return (
76
  <div className="w-full flex flex-col items-center justify-center min-h-screen text-foreground antialiased">
77
  <div className="main-wrapper max-w-3xl w-full flex flex-col items-center justify-center h-full relative">
78
- {/* --- شروع تغییرات در این بخش --- */}
79
  <div className="header-controls">
80
- {/* دکمه بازگشت و div آن کاملاً حذف شد */}
81
- <div /> {/* این div خالی برای حفظ ساختار flex (justify-content: space-between) است */}
82
-
83
  <div id="notification-trigger-container">
84
  <button
85
  ref={notificationButtonRef}
86
  id="notification-button"
87
  aria-label="Notifications"
88
- // کلاس 'header-button' حذف و کلاس‌های جدید اضافه شد
89
  className="p-2 bg-transparent text-gray-600 dark:text-gray-300 hover:text-black dark:hover:text-white transition-colors"
90
  onClick={(e) => {
91
  e.stopPropagation();
@@ -96,7 +90,6 @@ const AppInternalLogic: React.FC<AppInternalLogicProps> = ({
96
  </button>
97
  </div>
98
  </div>
99
- {/* --- پایان تغییرات --- */}
100
 
101
  <div ref={notificationPopoverRef} id="notification-popover-wrapper" className="notification-popover-wrapper">
102
  <div
@@ -129,7 +122,13 @@ const AppInternalLogic: React.FC<AppInternalLogicProps> = ({
129
  id="large-logo-container"
130
  className="absolute top-0 left-0 w-full h-full flex items-center justify-center pointer-events-none"
131
  >
132
- <Logo isMini={false} isActive={true} isAi={false} />
 
 
 
 
 
 
133
  </div>
134
  )}
135
  </div>
 
9
  import cn from "classnames";
10
  import { LiveConfig } from "./multimodal-live-types";
11
  import Logo from "./components/logo/Logo";
 
 
12
 
13
  const myCustomInstruction = `
14
  تو دستیار صوتی و تصویری پیشرفته از "اپلیکیشن هوش مصنوعی هوشان" هستی
 
62
  currentFacingMode,
63
  onFacingModeChange,
64
  }) => {
65
+ const { connected, disconnect, volume } = useLiveAPIContext(); // <-- دریافت volume
66
 
67
  useEffect(() => {
68
  if (!isMicActive && !isCamActive && connected) {
 
73
  return (
74
  <div className="w-full flex flex-col items-center justify-center min-h-screen text-foreground antialiased">
75
  <div className="main-wrapper max-w-3xl w-full flex flex-col items-center justify-center h-full relative">
 
76
  <div className="header-controls">
77
+ <div />
 
 
78
  <div id="notification-trigger-container">
79
  <button
80
  ref={notificationButtonRef}
81
  id="notification-button"
82
  aria-label="Notifications"
 
83
  className="p-2 bg-transparent text-gray-600 dark:text-gray-300 hover:text-black dark:hover:text-white transition-colors"
84
  onClick={(e) => {
85
  e.stopPropagation();
 
90
  </button>
91
  </div>
92
  </div>
 
93
 
94
  <div ref={notificationPopoverRef} id="notification-popover-wrapper" className="notification-popover-wrapper">
95
  <div
 
122
  id="large-logo-container"
123
  className="absolute top-0 left-0 w-full h-full flex items-center justify-center pointer-events-none"
124
  >
125
+ {/* --- 👇 تغییر در اینجا: پاس دادن volume و تنظیم isAi 👇 --- */}
126
+ <Logo
127
+ isMini={false}
128
+ isActive={true}
129
+ isAi={true}
130
+ speakingVolume={volume}
131
+ />
132
  </div>
133
  )}
134
  </div>