25 lines
974 B
Plaintext
25 lines
974 B
Plaintext
render() {
|
|||
|
|
const root = document.getElementById('app-root');
|
||
|
|
if (root) {
|
||
|
|
// Reset base class first to prevent layout/theme clashing
|
||
|
|
root.className = 'workspace';
|
||
|
|
|
||
|
|
if (this.state.bulk.results.length > 0 || this.state.bulk.running) {
|
||
|
|
root.classList.add('bulk-active');
|
||
|
|
}
|
||
|
|
if (this.state.gridMaximized || !this.state.activeSpaceId) {
|
||
|
|
root.classList.add('grid-maximized');
|
||
|
|
}
|
||
|
|
|
||
|
|
// Add theme class for active space
|
||
|
|
if (this.state.activeSpaceId) {
|
||
|
|
const activeSpace = this.state.spaces.find(s => s.id === this.state.activeSpaceId);
|
||
|
|
const theme = activeSpace && activeSpace.theme ? activeSpace.theme : 'violet';
|
||
|
|
root.classList.add(`theme-${theme}`);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
this.renderSidebar();
|
||
|
|
this.renderMain();
|
||
|
|
this.renderResponse();
|
||
|
|
}
|