mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Fix AI sidebar overflow when user hasn't enabled or created a chat yet (#2044)
This commit is contained in:
@@ -30,6 +30,7 @@ export default class extends Controller {
|
||||
this.contentTarget.style.maxWidth = `${this.#contentMaxWidth()}px`;
|
||||
this.leftPanelTarget.style.width = `${this.#leftPanelWidth()}px`;
|
||||
this.rightPanelTarget.style.width = `${this.#rightPanelWidth()}px`;
|
||||
this.rightPanelTarget.style.overflow = this.#rightPanelOverflow();
|
||||
}
|
||||
|
||||
#leftPanelWidth() {
|
||||
@@ -52,6 +53,14 @@ export default class extends Controller {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#rightPanelOverflow() {
|
||||
if (this.rightPanelOpen) {
|
||||
return "auto";
|
||||
}
|
||||
|
||||
return "hidden";
|
||||
}
|
||||
|
||||
#contentMaxWidth() {
|
||||
if (!this.leftPanelOpen && !this.rightPanelOpen) {
|
||||
return 1024;
|
||||
|
||||
Reference in New Issue
Block a user