|
|
@@ -222,7 +222,10 @@ export const ChatBotPage = () => {
|
|
|
}, [currentState, stopRecordingTimer]);
|
|
|
|
|
|
const formatCountdown = (ms: number) => {
|
|
|
- return `${Math.max(0, Math.ceil(ms / 1000))}s`;
|
|
|
+ const totalSeconds = Math.max(0, Math.ceil(ms / 1000));
|
|
|
+ const minutes = Math.floor(totalSeconds / 60);
|
|
|
+ const seconds = totalSeconds % 60;
|
|
|
+ return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
|
|
};
|
|
|
|
|
|
// 进度动画效果(支持多圈连续动画)
|
|
|
@@ -319,12 +322,13 @@ export const ChatBotPage = () => {
|
|
|
setShowCancelTooltip(true);
|
|
|
setStorage(STORAGE_KEYS.HAS_SHOWN_CANCEL_TOOLTIP, 'true');
|
|
|
|
|
|
+ // 🔧 调试模式:注释掉自动隐藏,方便调试
|
|
|
// 3秒后自动隐藏
|
|
|
- const timer = setTimeout(() => {
|
|
|
- setShowCancelTooltip(false);
|
|
|
- }, 3000);
|
|
|
+ // const timer = setTimeout(() => {
|
|
|
+ // setShowCancelTooltip(false);
|
|
|
+ // }, 3000);
|
|
|
|
|
|
- return () => clearTimeout(timer);
|
|
|
+ // return () => clearTimeout(timer);
|
|
|
} else {
|
|
|
// 已显示过,确保隐藏
|
|
|
setShowCancelTooltip(false);
|
|
|
@@ -343,12 +347,13 @@ export const ChatBotPage = () => {
|
|
|
setShowSendTooltip(true);
|
|
|
setStorage(STORAGE_KEYS.HAS_SHOWN_SEND_TOOLTIP, 'true');
|
|
|
|
|
|
+ // 🔧 调试模式:注释掉自动隐藏,方便调试
|
|
|
// 3秒后自动隐藏
|
|
|
- const timer = setTimeout(() => {
|
|
|
- setShowSendTooltip(false);
|
|
|
- }, 3000);
|
|
|
+ // const timer = setTimeout(() => {
|
|
|
+ // setShowSendTooltip(false);
|
|
|
+ // }, 3000);
|
|
|
|
|
|
- return () => clearTimeout(timer);
|
|
|
+ // return () => clearTimeout(timer);
|
|
|
} else {
|
|
|
// 已显示过,确保隐藏
|
|
|
setShowSendTooltip(false);
|
|
|
@@ -768,7 +773,11 @@ export const ChatBotPage = () => {
|
|
|
};
|
|
|
|
|
|
const actionButtonSize = Math.round(layout.recordButtonSize * 0.58);
|
|
|
- const actionButtonTop = layout.progressRingTop + layout.recordButtonOffset;
|
|
|
+ // 计算取消/发送按钮的 top 位置,使其中心与录音按钮中心对齐
|
|
|
+ // 录音按钮中心 = recordButtonOffset + recordButtonSize / 2
|
|
|
+ // 取消/发送按钮中心 = top + actionButtonSize / 2
|
|
|
+ // 所以:top = recordButtonOffset + (recordButtonSize - actionButtonSize) / 2
|
|
|
+ const actionButtonTop = layout.recordButtonOffset + (layout.recordButtonSize - actionButtonSize) / 2;
|
|
|
const avatarHintSize = Math.round(layout.avatarCSize * 1.8);
|
|
|
const shouldShowCountdown =
|
|
|
currentState === 'recording' &&
|
|
|
@@ -1061,19 +1070,20 @@ export const ChatBotPage = () => {
|
|
|
</div>
|
|
|
|
|
|
{/* 进度条+录音按钮容器 - 设计稿:bottom 84px, 尺寸 114×114, 左右居中 */}
|
|
|
- {currentState !== 'recording' && (
|
|
|
- <div
|
|
|
- className="chatbot-progress-container absolute"
|
|
|
- style={{
|
|
|
- width: `${layout.progressRingSize}px`,
|
|
|
- height: `${layout.progressRingSize}px`,
|
|
|
- top: `${layout.progressRingTop}px`,
|
|
|
- left: '50%',
|
|
|
- transform: 'translateX(-50%)',
|
|
|
- zIndex: 20,
|
|
|
- }}
|
|
|
- >
|
|
|
- {/* 进度环 - 背景层 */}
|
|
|
+ {/* 容器在非录音状态显示进度环,在录音状态显示按钮 */}
|
|
|
+ <div
|
|
|
+ className="chatbot-progress-container absolute"
|
|
|
+ style={{
|
|
|
+ width: `${layout.progressRingSize}px`,
|
|
|
+ height: `${layout.progressRingSize}px`,
|
|
|
+ top: `${layout.progressRingTop}px`,
|
|
|
+ left: '50%',
|
|
|
+ transform: 'translateX(-50%)',
|
|
|
+ zIndex: 20,
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {/* 进度环 - 背景层 - 只在非录音状态显示 */}
|
|
|
+ {currentState !== 'recording' && (
|
|
|
<div
|
|
|
className="chatbot-progress-ring absolute"
|
|
|
style={{
|
|
|
@@ -1121,9 +1131,31 @@ export const ChatBotPage = () => {
|
|
|
}}
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ {/* 进度条提示 - 相对于进度环定位 - 首次有进度时显示 */}
|
|
|
+ {showProgressBarTooltip && isConnected && (
|
|
|
+ <img
|
|
|
+ src={tooltipsProgressBar}
|
|
|
+ alt="Progress Bar Tooltip"
|
|
|
+ className="chatbot-tooltips absolute pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.tooltips.progressBar.width}px`,
|
|
|
+ height: `${layout.tooltips.progressBar.height}px`,
|
|
|
+ top: '-100%',
|
|
|
+ left: '50%',
|
|
|
+ transform: `translateX(calc(-50% + ${layout.tooltips.progressBar.left}px))`,
|
|
|
+ opacity: 1,
|
|
|
+ zIndex: 10,
|
|
|
+ maxWidth: 'none', // 确保不被限制
|
|
|
+ maxHeight: 'none', // 确保不被限制
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
</div>
|
|
|
+ )}
|
|
|
|
|
|
- {/* 录音按钮 - 设计稿:尺寸 96×96,在进度环内居中,左右居中 */}
|
|
|
+ {/* 录音按钮 - 设计稿:尺寸 96×96,在进度环内居中,左右居中 - 只在非录音状态显示 */}
|
|
|
+ {currentState !== 'recording' && (
|
|
|
<div
|
|
|
className={`chatbot-record-button absolute touch-manipulation ${isConnected ? 'cursor-pointer' : 'cursor-not-allowed'}`}
|
|
|
onClick={handleStartRecord}
|
|
|
@@ -1145,6 +1177,7 @@ export const ChatBotPage = () => {
|
|
|
caretColor: 'transparent',
|
|
|
outline: 'none',
|
|
|
filter: isConnected ? 'none' : 'grayscale(0.25)',
|
|
|
+ overflow: 'visible', // 允许 tooltips 超出按钮边界
|
|
|
}}
|
|
|
contentEditable={false}
|
|
|
tabIndex={-1}
|
|
|
@@ -1177,9 +1210,201 @@ export const ChatBotPage = () => {
|
|
|
zIndex: 1,
|
|
|
}}
|
|
|
/>
|
|
|
+
|
|
|
+ {/* Tap to Chat 提示 - 相对于录音按钮定位 - 只显示一次 - 在按钮内部使用绝对定位 */}
|
|
|
+ {showTapToChat && isConnected && (
|
|
|
+ <img
|
|
|
+ src={tapToChat}
|
|
|
+ alt="Tap to Chat"
|
|
|
+ className="chatbot-tooltips absolute pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.tooltips.tapToChat.width}px`,
|
|
|
+ height: 'auto',
|
|
|
+ top: '-100%',
|
|
|
+ right: '-100%',
|
|
|
+ borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
+ opacity: 1,
|
|
|
+ zIndex: 10,
|
|
|
+ maxWidth: 'none', // 确保不被限制
|
|
|
+ maxHeight: 'none', // 确保不被限制
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
</div>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* 取消语音发送按钮 - 录音状态显示,与录音按钮同高度,左侧对齐 */}
|
|
|
+ {currentState === 'recording' && (
|
|
|
+ <div
|
|
|
+ className="chatbot-action-buttons absolute flex items-center justify-center cursor-pointer touch-manipulation"
|
|
|
+ onClick={handleCancel}
|
|
|
+ style={{
|
|
|
+ width: `${actionButtonSize}px`,
|
|
|
+ height: `${actionButtonSize}px`,
|
|
|
+ minWidth: '44px',
|
|
|
+ minHeight: '44px',
|
|
|
+ top: `${actionButtonTop}px`,
|
|
|
+ left: '50%',
|
|
|
+ transform: `translateX(calc(-100% - ${layout.buttonGap}px))`,
|
|
|
+ borderRadius: '100px',
|
|
|
+ opacity: 1,
|
|
|
+ background: 'rgba(255, 255, 255, 0.1)',
|
|
|
+ backdropFilter: 'blur(15px)',
|
|
|
+ zIndex: 20,
|
|
|
+ userSelect: 'none',
|
|
|
+ WebkitUserSelect: 'none',
|
|
|
+ caretColor: 'transparent',
|
|
|
+ outline: 'none',
|
|
|
+ overflow: 'visible', // 允许 tooltip 超出按钮边界
|
|
|
+ }}
|
|
|
+ contentEditable={false}
|
|
|
+ tabIndex={-1}
|
|
|
+ >
|
|
|
+ {/* 按钮背景装饰图片 */}
|
|
|
+ <img
|
|
|
+ src={audioButton}
|
|
|
+ alt="Button Background"
|
|
|
+ className="pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: 'calc(100% + 1px)',
|
|
|
+ height: 'calc(100% + 1px)',
|
|
|
+ position: 'absolute',
|
|
|
+ top: '0',
|
|
|
+ left: '0',
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* Cancel 图标 - 居中 - 响应式尺寸 */}
|
|
|
+ <img
|
|
|
+ src={cancelIcon}
|
|
|
+ alt="Cancel"
|
|
|
+ className="pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.recordButtonSize * 0.25}px`,
|
|
|
+ height: `${layout.recordButtonSize * 0.25}px`,
|
|
|
+ position: 'relative',
|
|
|
+ zIndex: 1,
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* 取消语音发送提示 - 相对于取消按钮定位 - 只在首次录音时显示 */}
|
|
|
+ {showCancelTooltip && (
|
|
|
+ <img
|
|
|
+ src={tooltipsCancel}
|
|
|
+ alt="Cancel Tooltip"
|
|
|
+ className="chatbot-tooltips absolute pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.tooltips.cancel.width}px`,
|
|
|
+ height: 'auto',
|
|
|
+ bottom: layout.tooltips.cancel.bottom,
|
|
|
+ left: layout.tooltips.cancel.left,
|
|
|
+ borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
+ opacity: 1,
|
|
|
+ zIndex: 10,
|
|
|
+ maxWidth: 'none', // 确保不被限制
|
|
|
+ maxHeight: 'none', // 确保不被限制
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* 语音发送按钮 - 录音状态显示,与录音按钮同高度,右侧对齐 */}
|
|
|
+ {currentState === 'recording' && (
|
|
|
+ <div
|
|
|
+ className="chatbot-action-buttons absolute flex items-center justify-center cursor-pointer touch-manipulation"
|
|
|
+ onClick={handleSend}
|
|
|
+ style={{
|
|
|
+ width: `${actionButtonSize}px`,
|
|
|
+ height: `${actionButtonSize}px`,
|
|
|
+ minWidth: '44px',
|
|
|
+ minHeight: '44px',
|
|
|
+ top: `${actionButtonTop}px`,
|
|
|
+ left: '50%',
|
|
|
+ transform: `translateX(${layout.buttonGap}px)`,
|
|
|
+ borderRadius: '100px',
|
|
|
+ opacity: 1,
|
|
|
+ background: 'rgba(255, 255, 255, 0.1)',
|
|
|
+ backdropFilter: 'blur(15px)',
|
|
|
+ zIndex: 20,
|
|
|
+ userSelect: 'none',
|
|
|
+ WebkitUserSelect: 'none',
|
|
|
+ caretColor: 'transparent',
|
|
|
+ outline: 'none',
|
|
|
+ overflow: 'visible', // 允许 tooltip 超出按钮边界
|
|
|
+ }}
|
|
|
+ contentEditable={false}
|
|
|
+ tabIndex={-1}
|
|
|
+ >
|
|
|
+ {/* 按钮背景装饰图片 */}
|
|
|
+ <img
|
|
|
+ src={audioButton}
|
|
|
+ alt="Button Background"
|
|
|
+ className="pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: 'calc(100% + 1px)',
|
|
|
+ height: 'calc(100% + 1px)',
|
|
|
+ position: 'absolute',
|
|
|
+ top: '0',
|
|
|
+ left: '0',
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* Send 图标 - 居中 - 响应式尺寸 */}
|
|
|
+ <img
|
|
|
+ src={sendIcon}
|
|
|
+ alt="Send"
|
|
|
+ className="pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.recordButtonSize * 0.25}px`,
|
|
|
+ height: `${layout.recordButtonSize * 0.25}px`,
|
|
|
+ position: 'relative',
|
|
|
+ zIndex: 1,
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* 语音发送提示 - 相对于发送按钮定位 - 只在首次录音时显示 */}
|
|
|
+ {showSendTooltip && (
|
|
|
+ <img
|
|
|
+ src={tooltipsSend}
|
|
|
+ alt="Send Tooltip"
|
|
|
+ className="chatbot-tooltips absolute pointer-events-none"
|
|
|
+ style={{
|
|
|
+ width: `${layout.tooltips.send.width}px`,
|
|
|
+ height: 'auto',
|
|
|
+ bottom: layout.tooltips.send.bottom,
|
|
|
+ right: layout.tooltips.send.right,
|
|
|
+ borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
+ opacity: 1,
|
|
|
+ zIndex: 10,
|
|
|
+ maxWidth: 'none', // 确保不被限制
|
|
|
+ maxHeight: 'none', // 确保不被限制
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* 倒计时组件 - 只在录音50秒后(最后10秒)显示 */}
|
|
|
+ {currentState === 'recording' &&
|
|
|
+ remainingTimeMs !== null &&
|
|
|
+ remainingTimeMs <= COUNTDOWN_THRESHOLD_MS && (
|
|
|
+ <div
|
|
|
+ className="chatbot-countdown absolute text-white font-semibold"
|
|
|
+ style={{
|
|
|
+ top: `${actionButtonTop + actionButtonSize / 2}px`,
|
|
|
+ left: '50%',
|
|
|
+ transform: 'translate(-50%, -50%)',
|
|
|
+ zIndex: 21,
|
|
|
+ fontSize: `${Math.min(18, Math.max(12, layout.recordButtonSize * 0.15))}px`,
|
|
|
+ textShadow: '0 2px 8px rgba(0,0,0,0.55)',
|
|
|
+ letterSpacing: '0.08em',
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {formatCountdown(remainingTimeMs)}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
- )}
|
|
|
|
|
|
{!isConnected && currentState !== 'recording' && (
|
|
|
<div
|
|
|
@@ -1196,200 +1421,6 @@ export const ChatBotPage = () => {
|
|
|
正在重连语音服务...
|
|
|
</div>
|
|
|
)}
|
|
|
-
|
|
|
- {/* 进度条提示 - 首次有进度时显示 */}
|
|
|
- {showProgressBarTooltip && isConnected && (
|
|
|
- <img
|
|
|
- src={tooltipsProgressBar}
|
|
|
- alt="Progress Bar Tooltip"
|
|
|
- className="chatbot-tooltips absolute pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.tooltips.progressBar.width}px`,
|
|
|
- height: `${layout.tooltips.progressBar.height}px`,
|
|
|
- top: `${layout.tooltips.progressBar.top}px`,
|
|
|
- left: `${layout.tooltips.progressBar.left}px`,
|
|
|
- opacity: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
-
|
|
|
- {/* Tap to Chat 提示 - 只显示一次 - 等比例缩放 */}
|
|
|
- {showTapToChat && isConnected && (
|
|
|
- <img
|
|
|
- src={tapToChat}
|
|
|
- alt="Tap to Chat"
|
|
|
- className="chatbot-tooltips absolute pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.tooltips.tapToChat.width}px`,
|
|
|
- height: 'auto',
|
|
|
- top: `${layout.tooltips.tapToChat.top}px`,
|
|
|
- right: `${layout.tooltips.tapToChat.right}px`,
|
|
|
- borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
- opacity: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
-
|
|
|
- {/* 取消语音发送提示 - 只在首次录音时显示 - 等比例缩放 */}
|
|
|
- {currentState === 'recording' && showCancelTooltip && (
|
|
|
- <img
|
|
|
- src={tooltipsCancel}
|
|
|
- alt="Cancel Tooltip"
|
|
|
- className="chatbot-tooltips absolute pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.tooltips.cancel.width}px`,
|
|
|
- height: 'auto',
|
|
|
- top: `${layout.tooltips.cancel.top}px`,
|
|
|
- left: `${layout.tooltips.cancel.left}px`,
|
|
|
- borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
- opacity: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
-
|
|
|
- {/* 取消语音发送按钮 - 录音状态显示,与录音按钮同高度,左侧对齐 */}
|
|
|
- {currentState === 'recording' && (
|
|
|
- <div
|
|
|
- className="chatbot-action-buttons absolute flex items-center justify-center cursor-pointer touch-manipulation"
|
|
|
- onClick={handleCancel}
|
|
|
- style={{
|
|
|
- width: `${actionButtonSize}px`,
|
|
|
- height: `${actionButtonSize}px`,
|
|
|
- minWidth: '44px',
|
|
|
- minHeight: '44px',
|
|
|
- top: `${actionButtonTop}px`,
|
|
|
- left: '50%',
|
|
|
- transform: `translateX(calc(-100% - ${layout.verticalGap}px))`,
|
|
|
- borderRadius: '100px',
|
|
|
- opacity: 1,
|
|
|
- background: 'rgba(255, 255, 255, 0.1)',
|
|
|
- backdropFilter: 'blur(15px)',
|
|
|
- zIndex: 20,
|
|
|
- userSelect: 'none',
|
|
|
- WebkitUserSelect: 'none',
|
|
|
- caretColor: 'transparent',
|
|
|
- outline: 'none',
|
|
|
- }}
|
|
|
- contentEditable={false}
|
|
|
- tabIndex={-1}
|
|
|
- >
|
|
|
- {/* 按钮背景装饰图片 */}
|
|
|
- <img
|
|
|
- src={audioButton}
|
|
|
- alt="Button Background"
|
|
|
- className="pointer-events-none"
|
|
|
- style={{
|
|
|
- width: 'calc(100% + 1px)',
|
|
|
- height: 'calc(100% + 1px)',
|
|
|
- position: 'absolute',
|
|
|
- top: '0',
|
|
|
- left: '0',
|
|
|
- }}
|
|
|
- />
|
|
|
-
|
|
|
- {/* Cancel 图标 - 居中 - 响应式尺寸 */}
|
|
|
- <img
|
|
|
- src={cancelIcon}
|
|
|
- alt="Cancel"
|
|
|
- className="pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.recordButtonSize * 0.25}px`,
|
|
|
- height: `${layout.recordButtonSize * 0.25}px`,
|
|
|
- position: 'relative',
|
|
|
- zIndex: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>
|
|
|
- )}
|
|
|
-
|
|
|
- {shouldShowCountdown && (
|
|
|
- <div
|
|
|
- className="chatbot-countdown absolute text-white font-semibold"
|
|
|
- style={{
|
|
|
- top: `${actionButtonTop + actionButtonSize / 2}px`,
|
|
|
- left: '50%',
|
|
|
- transform: 'translate(-50%, -50%)',
|
|
|
- zIndex: 21,
|
|
|
- fontSize: `${Math.max(12, layout.recordButtonSize * 0.2)}px`,
|
|
|
- textShadow: '0 2px 8px rgba(0,0,0,0.55)',
|
|
|
- letterSpacing: '0.08em',
|
|
|
- }}
|
|
|
- >
|
|
|
- {formatCountdown(remainingTimeMs ?? 0)}
|
|
|
- </div>
|
|
|
- )}
|
|
|
-
|
|
|
- {/* 语音发送提示 - 只在首次录音时显示 - 等比例缩放 */}
|
|
|
- {currentState === 'recording' && showSendTooltip && (
|
|
|
- <img
|
|
|
- src={tooltipsSend}
|
|
|
- alt="Send Tooltip"
|
|
|
- className="chatbot-tooltips absolute pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.tooltips.send.width}px`,
|
|
|
- height: 'auto',
|
|
|
- top: `${layout.tooltips.send.top}px`,
|
|
|
- left: `${layout.tooltips.send.left}px`,
|
|
|
- borderRadius: `${Math.round(8 * layout.avatarScale)}px`,
|
|
|
- opacity: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
-
|
|
|
- {/* 语音发送按钮 - 录音状态显示,与录音按钮同高度,右侧对齐 */}
|
|
|
- {currentState === 'recording' && (
|
|
|
- <div
|
|
|
- className="chatbot-action-buttons absolute flex items-center justify-center cursor-pointer touch-manipulation"
|
|
|
- onClick={handleSend}
|
|
|
- style={{
|
|
|
- width: `${actionButtonSize}px`,
|
|
|
- height: `${actionButtonSize}px`,
|
|
|
- minWidth: '44px',
|
|
|
- minHeight: '44px',
|
|
|
- top: `${actionButtonTop}px`,
|
|
|
- left: '50%',
|
|
|
- transform: `translateX(${layout.verticalGap}px)`,
|
|
|
- borderRadius: '100px',
|
|
|
- opacity: 1,
|
|
|
- background: 'rgba(255, 255, 255, 0.1)',
|
|
|
- backdropFilter: 'blur(15px)',
|
|
|
- zIndex: 20,
|
|
|
- userSelect: 'none',
|
|
|
- WebkitUserSelect: 'none',
|
|
|
- caretColor: 'transparent',
|
|
|
- outline: 'none',
|
|
|
- }}
|
|
|
- contentEditable={false}
|
|
|
- tabIndex={-1}
|
|
|
- >
|
|
|
- {/* 按钮背景装饰图片 */}
|
|
|
- <img
|
|
|
- src={audioButton}
|
|
|
- alt="Button Background"
|
|
|
- className="pointer-events-none"
|
|
|
- style={{
|
|
|
- width: 'calc(100% + 1px)',
|
|
|
- height: 'calc(100% + 1px)',
|
|
|
- position: 'absolute',
|
|
|
- top: '0',
|
|
|
- left: '0',
|
|
|
- }}
|
|
|
- />
|
|
|
-
|
|
|
- {/* Send 图标 - 居中 - 响应式尺寸 */}
|
|
|
- <img
|
|
|
- src={sendIcon}
|
|
|
- alt="Send"
|
|
|
- className="pointer-events-none"
|
|
|
- style={{
|
|
|
- width: `${layout.recordButtonSize * 0.25}px`,
|
|
|
- height: `${layout.recordButtonSize * 0.25}px`,
|
|
|
- position: 'relative',
|
|
|
- zIndex: 1,
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>
|
|
|
- )}
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|