feat: Vollbild-Modus für Chat-Assistent
Neuer Button zwischen Reload und Schließen. Toggled zwischen normalem Fenster und Vollbild. Icon wechselt zwischen Expand/Collapse. Schließen und Reset beenden Vollbild automatisch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -6,6 +6,7 @@ const Chat = {
|
||||
_isOpen: false,
|
||||
_isLoading: false,
|
||||
_hasGreeted: false,
|
||||
_isFullscreen: false,
|
||||
|
||||
init() {
|
||||
const btn = document.getElementById('chat-toggle-btn');
|
||||
@@ -21,6 +22,9 @@ const Chat = {
|
||||
const resetBtn = document.getElementById('chat-reset-btn');
|
||||
if (resetBtn) resetBtn.addEventListener('click', () => this.reset());
|
||||
|
||||
const fsBtn = document.getElementById('chat-fullscreen-btn');
|
||||
if (fsBtn) fsBtn.addEventListener('click', () => this.toggleFullscreen());
|
||||
|
||||
form.addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
this.send();
|
||||
@@ -74,8 +78,15 @@ const Chat = {
|
||||
const btn = document.getElementById('chat-toggle-btn');
|
||||
if (!win) return;
|
||||
win.classList.remove('open');
|
||||
win.classList.remove('fullscreen');
|
||||
btn.classList.remove('active');
|
||||
this._isOpen = false;
|
||||
this._isFullscreen = false;
|
||||
const fsBtn = document.getElementById('chat-fullscreen-btn');
|
||||
if (fsBtn) {
|
||||
fsBtn.title = 'Vollbild';
|
||||
fsBtn.innerHTML = '<svg viewBox="0 0 24 24" width="15" height="15"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" fill="currentColor"/></svg>';
|
||||
}
|
||||
},
|
||||
|
||||
reset() {
|
||||
@@ -88,6 +99,20 @@ const Chat = {
|
||||
this.open();
|
||||
},
|
||||
|
||||
toggleFullscreen() {
|
||||
const win = document.getElementById('chat-window');
|
||||
const btn = document.getElementById('chat-fullscreen-btn');
|
||||
if (!win) return;
|
||||
this._isFullscreen = !this._isFullscreen;
|
||||
win.classList.toggle('fullscreen', this._isFullscreen);
|
||||
if (btn) {
|
||||
btn.title = this._isFullscreen ? 'Vollbild beenden' : 'Vollbild';
|
||||
btn.innerHTML = this._isFullscreen
|
||||
? '<svg viewBox="0 0 24 24" width="15" height="15"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z" fill="currentColor"/></svg>'
|
||||
: '<svg viewBox="0 0 24 24" width="15" height="15"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" fill="currentColor"/></svg>';
|
||||
}
|
||||
},
|
||||
|
||||
_updateResetBtn() {
|
||||
const btn = document.getElementById('chat-reset-btn');
|
||||
if (btn) btn.style.display = this._conversationId ? '' : 'none';
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren