MCPcopy
hub / github.com/pickle-com/glass / render

Method render

src/ui/app/MainHeader.js:606–681  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

604 }
605
606 render() {
607 const listenButtonText = this._getListenButtonText(this.listenSessionStatus);
608
609 const buttonClasses = {
610 active: listenButtonText === 'Stop',
611 done: listenButtonText === 'Done',
612 };
613 const showStopIcon = listenButtonText === 'Stop' || listenButtonText === 'Done';
614
615 return html`
616 <div class="header" @mousedown=${this.handleMouseDown}>
617 <button
618 class="listen-button ${Object.keys(buttonClasses).filter(k => buttonClasses[k]).join(' ')}"
619 @click=${this._handleListenClick}
620 ?disabled=${this.isTogglingSession}
621 >
622 ${this.isTogglingSession
623 ? html`
624 <div class="loading-dots">
625 <span></span><span></span><span></span>
626 </div>
627 `
628 : html`
629 <div class="action-text">
630 <div class="action-text-content">${listenButtonText}</div>
631 </div>
632 <div class="listen-icon">
633 ${showStopIcon
634 ? html`
635 <svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg">
636 <rect width="9" height="9" rx="1" fill="white"/>
637 </svg>
638 `
639 : html`
640 <svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
641 <path d="M1.69922 2.7515C1.69922 2.37153 2.00725 2.0635 2.38722 2.0635H2.73122C3.11119 2.0635 3.41922 2.37153 3.41922 2.7515V8.2555C3.41922 8.63547 3.11119 8.9435 2.73122 8.9435H2.38722C2.00725 8.9435 1.69922 8.63547 1.69922 8.2555V2.7515Z" fill="white"/>
642 <path d="M5.13922 1.3755C5.13922 0.995528 5.44725 0.6875 5.82722 0.6875H6.17122C6.55119 0.6875 6.85922 0.995528 6.85922 1.3755V9.6315C6.85922 10.0115 6.55119 10.3195 6.17122 10.3195H5.82722C5.44725 10.3195 5.13922 10.0115 5.13922 9.6315V1.3755Z" fill="white"/>
643 <path d="M8.57922 3.0955C8.57922 2.71553 8.88725 2.4075 9.26722 2.4075H9.61122C9.99119 2.4075 10.2992 2.71553 10.2992 3.0955V7.9115C10.2992 8.29147 9.99119 8.5995 9.61122 8.5995H9.26722C8.88725 8.5995 8.57922 8.29147 8.57922 7.9115V3.0955Z" fill="white"/>
644 </svg>
645 `}
646 </div>
647 `}
648 </button>
649
650 <div class="header-actions ask-action" @click=${() => this._handleAskClick()}>
651 <div class="action-text">
652 <div class="action-text-content">Ask</div>
653 </div>
654 <div class="icon-container">
655 ${this.renderShortcut(this.shortcuts.nextStep)}
656 </div>
657 </div>
658
659 <div class="header-actions" @click=${() => this.invoke('toggle-all-windows-visibility')}>
660 <div class="action-text">
661 <div class="action-text-content">Show/Hide</div>
662 </div>
663 <div class="icon-container">

Callers

nothing calls this directly

Calls 6

_getListenButtonTextMethod · 0.95
_handleAskClickMethod · 0.95
renderShortcutMethod · 0.95
invokeMethod · 0.95
showSettingsWindowMethod · 0.95
hideSettingsWindowMethod · 0.95

Tested by

no test coverage detected