u
This commit is contained in:
@@ -59,18 +59,12 @@ export default class ChatFab extends PureComponent {
|
|||||||
const { isOpen, conversationState, streamPhase, isSending, hasPendingAsk, pendingAsk } = this.state;
|
const { isOpen, conversationState, streamPhase, isSending, hasPendingAsk, pendingAsk } = this.state;
|
||||||
const isBusy = conversationState === 'busy' || streamPhase === 'thinking' || streamPhase === 'working' || isSending;
|
const isBusy = conversationState === 'busy' || streamPhase === 'thinking' || streamPhase === 'working' || isSending;
|
||||||
|
|
||||||
let tooltipTitle = 'KI-Chat öffnen';
|
|
||||||
let ariaLabel = 'KI-Chat';
|
let ariaLabel = 'KI-Chat';
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
tooltipTitle = 'KI-Chat schließen';
|
|
||||||
ariaLabel = 'KI-Chat schließen';
|
ariaLabel = 'KI-Chat schließen';
|
||||||
} else if (hasPendingAsk) {
|
} else if (hasPendingAsk) {
|
||||||
tooltipTitle = pendingAsk?.question
|
|
||||||
? `Antwort erforderlich: „${pendingAsk.question}“`
|
|
||||||
: 'Antwort erforderlich: Das Modell wartet auf Ihre Eingabe';
|
|
||||||
ariaLabel = 'KI-Chat: Antwort erforderlich';
|
ariaLabel = 'KI-Chat: Antwort erforderlich';
|
||||||
} else if (isBusy) {
|
} else if (isBusy) {
|
||||||
tooltipTitle = 'Modell antwortet gerade…';
|
|
||||||
ariaLabel = 'KI-Chat: Modell antwortet';
|
ariaLabel = 'KI-Chat: Modell antwortet';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +137,6 @@ export default class ChatFab extends PureComponent {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Tooltip title={tooltipTitle} placement="right" arrow>
|
|
||||||
<Badge
|
<Badge
|
||||||
badgeContent={hasPendingAsk ? '?' : undefined}
|
badgeContent={hasPendingAsk ? '?' : undefined}
|
||||||
color={hasPendingAsk ? 'error' : isBusy ? 'warning' : 'default'}
|
color={hasPendingAsk ? 'error' : isBusy ? 'warning' : 'default'}
|
||||||
@@ -213,7 +206,6 @@ export default class ChatFab extends PureComponent {
|
|||||||
)}
|
)}
|
||||||
</Fab>
|
</Fab>
|
||||||
</Badge>
|
</Badge>
|
||||||
</Tooltip>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user