Spaces:
Running
Running
Update src/components/icons.tsx
Browse files- src/components/icons.tsx +9 -10
src/components/icons.tsx
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import React from 'react';
|
4 |
|
5 |
-
// ... (آیکونهای pauseIcon, microphoneIcon, cameraIcon, stopCamIcon بدون تغییر باقی میمانند) ...
|
6 |
export const PauseIconWithSurroundPulse = ({ userVolume = 0 }: { userVolume: number }) => {
|
7 |
const waveScale = 1 + userVolume * 2;
|
8 |
const waveOpacity = Math.min(1, userVolume * 5);
|
@@ -20,32 +20,31 @@ export const cameraIcon = ( <svg width="40" height="40" viewBox="0 0 40 40" fill
|
|
20 |
export const stopCamIcon = ( <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> <path opacity="0.4" d="M29.0785 10.8076L6.91966 32.9665C4.61316 31.5002 3.70703 28.8807 3.70703 26.36V13.18C3.70703 7.54555 5.89821 5.35437 11.5327 5.35437H21.4177C26.1789 5.35437 28.4854 6.9195 29.0785 10.8076Z" fill="#2252A0"/> <path opacity="0.4" d="M29.2427 15.2394V26.36C29.2427 26.4918 29.2262 26.5907 29.2262 26.706C29.2262 26.8213 29.2097 26.9366 29.2097 27.052H29.2262C29.045 32.1757 26.8208 34.1856 21.417 34.1856H11.532C11.1202 34.1856 10.7412 34.1692 10.3623 34.1197L29.2427 15.2394Z" fill="#2252A0"/> <path opacity="0.4" d="M29.21 27.052C29.21 26.9366 29.2264 26.8213 29.2264 26.706C29.2429 26.8213 29.2429 26.9366 29.2264 27.052H29.21Z" fill="#2252A0"/> <path opacity="0.4" d="M29.2264 12.4716C29.2429 12.5869 29.2429 12.7187 29.2264 12.834C29.2264 12.7187 29.21 12.6034 29.21 12.488L29.2264 12.4716Z" fill="#2252A0"/> <path d="M37.4804 13.8061V25.734C37.4804 28.0899 36.3436 29.029 35.6682 29.3749C35.3551 29.5397 34.8774 29.7209 34.2678 29.7209C33.5594 29.7209 32.6697 29.4903 31.6483 28.7654L29.2264 27.052H29.21C29.21 26.9366 29.2264 26.8213 29.2264 26.706C29.2264 26.5907 29.2429 26.4918 29.2429 26.36V15.2394L34.6302 9.85205C35.0751 9.885 35.421 10.0168 35.6682 10.1651C36.3436 10.5111 37.4804 11.4501 37.4804 13.8061Z" fill="#2252A0"/> <path d="M35.8666 3.67393C35.3723 3.17968 34.565 3.17968 34.0708 3.67393L3.6744 34.0868C3.18015 34.581 3.18015 35.3883 3.6744 35.8826C3.92152 36.1132 4.23455 36.245 4.56405 36.245C4.89355 36.245 5.20657 36.1132 5.4537 35.8661L35.8666 5.45323C36.3773 4.95898 36.3773 4.16818 35.8666 3.67393Z" fill="#2252A0"/> </svg> );
|
21 |
|
22 |
|
23 |
-
// --- 👇 تغییر اصلی اینجاست 👇 ---
|
24 |
export const humanAiIcon = ({ size, isUserSpeaking, isAiSpeaking }: {
|
25 |
size: number,
|
26 |
isUserSpeaking?: boolean,
|
27 |
isAiSpeaking?: boolean
|
28 |
}) => {
|
29 |
-
// استایل انیمیشن برای آدمک
|
30 |
const humanStyle: React.CSSProperties = {
|
31 |
-
transition: 'transform 0.2s ease-
|
32 |
-
transform: isUserSpeaking ? 'scale(1.
|
|
|
33 |
transformOrigin: 'center'
|
34 |
};
|
35 |
-
// استایل انیمیشن برای ربات
|
36 |
const aiStyle: React.CSSProperties = {
|
37 |
-
transition: 'transform 0.2s ease-
|
38 |
-
transform: isAiSpeaking ? 'scale(1.
|
|
|
39 |
transformOrigin: 'center'
|
40 |
};
|
41 |
|
42 |
return (
|
43 |
<svg width={2 * size} height={size} viewBox="0 0 116 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
44 |
-
<g style={aiStyle}>
|
45 |
<path d="M109.765 51.9037H69.8939C67.8054 51.9037 66.0967 50.1966 66.0967 48.1102V37.0855C66.0967 36.4928 66.0967 36.1846 66.3815 35.6155C67.2833 33.5291 69.9414 31.7747 74.0947 30.281C77.0613 35.9238 82.9945 39.7646 89.8059 39.7646C96.6172 39.7646 102.574 35.9238 105.517 30.281C109.67 31.751 112.352 33.5529 113.23 35.6155C113.515 35.9001 113.515 36.5165 113.515 37.0855V48.1102C113.515 50.1966 111.806 51.9037 109.718 51.9037H109.765Z" stroke="white" strokeWidth="4.1148" strokeLinecap="round" strokeLinejoin="round"/>
|
46 |
<path d="M89.8284 31.751C83.3018 31.751 77.9619 26.4165 77.9619 19.8965V16.3401C77.9619 9.82014 83.3018 4.4856 89.8284 4.4856C96.3549 4.4856 101.695 9.82014 101.695 16.3401V19.8965C101.695 26.4165 96.3549 31.751 89.8284 31.751Z" stroke="white" strokeWidth="4.1148" strokeLinecap="round" strokeLinejoin="round"/>
|
47 |
</g>
|
48 |
-
<g style={humanStyle}>
|
49 |
<path d="M31.7164 5.74306C31.7164 6.78618 31.263 7.72357 30.5417 8.36965V12.7912H42.2886C44.1578 12.7912 45.9505 13.5337 47.2723 14.8555C48.5941 16.1773 49.3367 17.97 49.3367 19.8392V43.3329C49.3367 45.2022 48.5941 46.9949 47.2723 48.3166C45.9505 49.6384 44.1578 50.381 42.2886 50.381H14.0962C12.2269 50.381 10.4342 49.6384 9.11243 48.3166C7.79066 46.9949 7.04809 45.2022 7.04809 43.3329V19.8392C7.04809 17.97 7.79066 16.1773 9.11243 14.8555C10.4342 13.5337 12.2269 12.7912 14.0962 12.7912H25.843V8.36965C25.4049 7.97776 25.0717 7.48249 24.8739 6.92894C24.6761 6.37539 24.6198 5.78115 24.7104 5.20032C24.8009 4.6195 25.0353 4.07054 25.3921 3.60344C25.749 3.13634 26.2171 2.76594 26.7537 2.52596C27.2903 2.28599 27.8785 2.18406 28.4646 2.22946C29.0506 2.27486 29.616 2.46615 30.1093 2.78591C30.6026 3.10567 31.008 3.54374 31.2887 4.06023C31.5694 4.57672 31.7164 5.15522 31.7164 5.74306ZM14.0962 17.4899C13.4731 17.4899 12.8755 17.7374 12.4349 18.178C11.9943 18.6186 11.7468 19.2162 11.7468 19.8392V43.3329C11.7468 43.956 11.9943 44.5536 12.4349 44.9941C12.8755 45.4347 13.4731 45.6823 14.0962 45.6823H42.2886C42.9116 45.6823 43.5092 45.4347 43.9498 44.9941C44.3904 44.5536 44.6379 43.956 44.6379 43.3329V19.8392C44.6379 19.2162 44.3904 18.6186 43.9498 18.178C43.5092 17.7374 42.9116 17.4899 42.2886 17.4899H14.0962ZM4.69873 24.538H0V38.6342H4.69873V24.538ZM51.686 24.538H56.3847V38.6342H51.686V24.538ZM21.1443 35.1101C22.0789 35.1101 22.9753 34.7388 23.6362 34.0779C24.297 33.4171 24.6683 32.5207 24.6683 31.5861C24.6683 30.6514 24.297 29.7551 23.6362 29.0942C22.9753 28.4333 22.0789 28.062 21.1443 28.062C20.2096 28.062 19.3133 28.4333 18.6524 29.0942C17.9915 29.7551 17.6202 30.6514 17.6202 31.5861C17.6202 32.5207 17.9915 33.4171 18.6524 34.0779C19.3133 34.7388 20.2096 35.1101 21.1443 35.1101ZM35.2405 35.1101C36.1751 35.1101 37.0715 34.7388 37.7323 34.0779C38.3932 33.4171 38.7645 32.5207 38.7645 31.5861C38.7645 30.6514 38.3932 29.7551 37.7323 29.0942C37.0715 28.4333 36.1751 28.062 35.2405 28.062C34.3058 28.062 33.4095 28.4333 32.7486 29.0942C32.0877 29.7551 31.7164 30.6514 31.7164 31.5861C31.7164 32.5207 32.0877 33.4171 32.7486 34.0779C33.4095 34.7388 34.3058 35.1101 35.2405 35.1101Z" fill="white"/>
|
50 |
</g>
|
51 |
</svg>
|
|
|
2 |
|
3 |
import React from 'react';
|
4 |
|
5 |
+
// ... (آیکونهای pauseIcon, microphoneIcon, cameraIcon, stopCamIcon بدون تغییر باقی میمانند و از پاسخ قبلی صحیح هستند) ...
|
6 |
export const PauseIconWithSurroundPulse = ({ userVolume = 0 }: { userVolume: number }) => {
|
7 |
const waveScale = 1 + userVolume * 2;
|
8 |
const waveOpacity = Math.min(1, userVolume * 5);
|
|
|
20 |
export const stopCamIcon = ( <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> <path opacity="0.4" d="M29.0785 10.8076L6.91966 32.9665C4.61316 31.5002 3.70703 28.8807 3.70703 26.36V13.18C3.70703 7.54555 5.89821 5.35437 11.5327 5.35437H21.4177C26.1789 5.35437 28.4854 6.9195 29.0785 10.8076Z" fill="#2252A0"/> <path opacity="0.4" d="M29.2427 15.2394V26.36C29.2427 26.4918 29.2262 26.5907 29.2262 26.706C29.2262 26.8213 29.2097 26.9366 29.2097 27.052H29.2262C29.045 32.1757 26.8208 34.1856 21.417 34.1856H11.532C11.1202 34.1856 10.7412 34.1692 10.3623 34.1197L29.2427 15.2394Z" fill="#2252A0"/> <path opacity="0.4" d="M29.21 27.052C29.21 26.9366 29.2264 26.8213 29.2264 26.706C29.2429 26.8213 29.2429 26.9366 29.2264 27.052H29.21Z" fill="#2252A0"/> <path opacity="0.4" d="M29.2264 12.4716C29.2429 12.5869 29.2429 12.7187 29.2264 12.834C29.2264 12.7187 29.21 12.6034 29.21 12.488L29.2264 12.4716Z" fill="#2252A0"/> <path d="M37.4804 13.8061V25.734C37.4804 28.0899 36.3436 29.029 35.6682 29.3749C35.3551 29.5397 34.8774 29.7209 34.2678 29.7209C33.5594 29.7209 32.6697 29.4903 31.6483 28.7654L29.2264 27.052H29.21C29.21 26.9366 29.2264 26.8213 29.2264 26.706C29.2264 26.5907 29.2429 26.4918 29.2429 26.36V15.2394L34.6302 9.85205C35.0751 9.885 35.421 10.0168 35.6682 10.1651C36.3436 10.5111 37.4804 11.4501 37.4804 13.8061Z" fill="#2252A0"/> <path d="M35.8666 3.67393C35.3723 3.17968 34.565 3.17968 34.0708 3.67393L3.6744 34.0868C3.18015 34.581 3.18015 35.3883 3.6744 35.8826C3.92152 36.1132 4.23455 36.245 4.56405 36.245C4.89355 36.245 5.20657 36.1132 5.4537 35.8661L35.8666 5.45323C36.3773 4.95898 36.3773 4.16818 35.8666 3.67393Z" fill="#2252A0"/> </svg> );
|
21 |
|
22 |
|
|
|
23 |
export const humanAiIcon = ({ size, isUserSpeaking, isAiSpeaking }: {
|
24 |
size: number,
|
25 |
isUserSpeaking?: boolean,
|
26 |
isAiSpeaking?: boolean
|
27 |
}) => {
|
|
|
28 |
const humanStyle: React.CSSProperties = {
|
29 |
+
transition: 'transform 0.2s ease-out, filter 0.2s ease-out',
|
30 |
+
transform: isUserSpeaking ? 'scale(1.15)' : 'scale(1)',
|
31 |
+
filter: isUserSpeaking ? 'drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))' : 'none',
|
32 |
transformOrigin: 'center'
|
33 |
};
|
|
|
34 |
const aiStyle: React.CSSProperties = {
|
35 |
+
transition: 'transform 0.2s ease-out, filter 0.2s ease-out',
|
36 |
+
transform: isAiSpeaking ? 'scale(1.15)' : 'scale(1)',
|
37 |
+
filter: isAiSpeaking ? 'drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))' : 'none',
|
38 |
transformOrigin: 'center'
|
39 |
};
|
40 |
|
41 |
return (
|
42 |
<svg width={2 * size} height={size} viewBox="0 0 116 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
43 |
+
<g style={aiStyle}>
|
44 |
<path d="M109.765 51.9037H69.8939C67.8054 51.9037 66.0967 50.1966 66.0967 48.1102V37.0855C66.0967 36.4928 66.0967 36.1846 66.3815 35.6155C67.2833 33.5291 69.9414 31.7747 74.0947 30.281C77.0613 35.9238 82.9945 39.7646 89.8059 39.7646C96.6172 39.7646 102.574 35.9238 105.517 30.281C109.67 31.751 112.352 33.5529 113.23 35.6155C113.515 35.9001 113.515 36.5165 113.515 37.0855V48.1102C113.515 50.1966 111.806 51.9037 109.718 51.9037H109.765Z" stroke="white" strokeWidth="4.1148" strokeLinecap="round" strokeLinejoin="round"/>
|
45 |
<path d="M89.8284 31.751C83.3018 31.751 77.9619 26.4165 77.9619 19.8965V16.3401C77.9619 9.82014 83.3018 4.4856 89.8284 4.4856C96.3549 4.4856 101.695 9.82014 101.695 16.3401V19.8965C101.695 26.4165 96.3549 31.751 89.8284 31.751Z" stroke="white" strokeWidth="4.1148" strokeLinecap="round" strokeLinejoin="round"/>
|
46 |
</g>
|
47 |
+
<g style={humanStyle}>
|
48 |
<path d="M31.7164 5.74306C31.7164 6.78618 31.263 7.72357 30.5417 8.36965V12.7912H42.2886C44.1578 12.7912 45.9505 13.5337 47.2723 14.8555C48.5941 16.1773 49.3367 17.97 49.3367 19.8392V43.3329C49.3367 45.2022 48.5941 46.9949 47.2723 48.3166C45.9505 49.6384 44.1578 50.381 42.2886 50.381H14.0962C12.2269 50.381 10.4342 49.6384 9.11243 48.3166C7.79066 46.9949 7.04809 45.2022 7.04809 43.3329V19.8392C7.04809 17.97 7.79066 16.1773 9.11243 14.8555C10.4342 13.5337 12.2269 12.7912 14.0962 12.7912H25.843V8.36965C25.4049 7.97776 25.0717 7.48249 24.8739 6.92894C24.6761 6.37539 24.6198 5.78115 24.7104 5.20032C24.8009 4.6195 25.0353 4.07054 25.3921 3.60344C25.749 3.13634 26.2171 2.76594 26.7537 2.52596C27.2903 2.28599 27.8785 2.18406 28.4646 2.22946C29.0506 2.27486 29.616 2.46615 30.1093 2.78591C30.6026 3.10567 31.008 3.54374 31.2887 4.06023C31.5694 4.57672 31.7164 5.15522 31.7164 5.74306ZM14.0962 17.4899C13.4731 17.4899 12.8755 17.7374 12.4349 18.178C11.9943 18.6186 11.7468 19.2162 11.7468 19.8392V43.3329C11.7468 43.956 11.9943 44.5536 12.4349 44.9941C12.8755 45.4347 13.4731 45.6823 14.0962 45.6823H42.2886C42.9116 45.6823 43.5092 45.4347 43.9498 44.9941C44.3904 44.5536 44.6379 43.956 44.6379 43.3329V19.8392C44.6379 19.2162 44.3904 18.6186 43.9498 18.178C43.5092 17.7374 42.9116 17.4899 42.2886 17.4899H14.0962ZM4.69873 24.538H0V38.6342H4.69873V24.538ZM51.686 24.538H56.3847V38.6342H51.686V24.538ZM21.1443 35.1101C22.0789 35.1101 22.9753 34.7388 23.6362 34.0779C24.297 33.4171 24.6683 32.5207 24.6683 31.5861C24.6683 30.6514 24.297 29.7551 23.6362 29.0942C22.9753 28.4333 22.0789 28.062 21.1443 28.062C20.2096 28.062 19.3133 28.4333 18.6524 29.0942C17.9915 29.7551 17.6202 30.6514 17.6202 31.5861C17.6202 32.5207 17.9915 33.4171 18.6524 34.0779C19.3133 34.7388 20.2096 35.1101 21.1443 35.1101ZM35.2405 35.1101C36.1751 35.1101 37.0715 34.7388 37.7323 34.0779C38.3932 33.4171 38.7645 32.5207 38.7645 31.5861C38.7645 30.6514 38.3932 29.7551 37.7323 29.0942C37.0715 28.4333 36.1751 28.062 35.2405 28.062C34.3058 28.062 33.4095 28.4333 32.7486 29.0942C32.0877 29.7551 31.7164 30.6514 31.7164 31.5861C31.7164 32.5207 32.0877 33.4171 32.7486 34.0779C33.4095 34.7388 34.3058 35.1101 35.2405 35.1101Z" fill="white"/>
|
49 |
</g>
|
50 |
</svg>
|