fix: relocate information panel expand button bump:patch

This commit is contained in:
Tadashi 2024-11-18 16:45:08 +07:00
parent 74124323e8
commit db2737d309
No known key found for this signature in database
GPG Key ID: 399380A00CC9028D
3 changed files with 17 additions and 5 deletions

View File

@ -95,6 +95,7 @@ button.selected {
flex-wrap: unset;
overflow-y: scroll !important;
position: sticky;
min-width: min(305px, 100%) !important;
}
.setting-answer-mode-description {
@ -160,13 +161,13 @@ mark {
#toggle-dark-button {
position: fixed;
top: 6px;
right: 60px;
right: 30px;
}
#info-expand-button {
position: fixed;
position: absolute;
top: 6px;
right: 85px;
right: 15px;
}
#new-conv-button > img {
@ -175,6 +176,10 @@ mark {
right: -50%;
}
span.icon {
color: #cecece;
}
.upload-button {
display: none;
}

View File

@ -11,6 +11,11 @@ function run() {
version_node.style = "position: fixed; top: 10px; right: 10px;";
main_parent.appendChild(version_node);
// move info-expand-button
let info_expand_button = document.getElementById("info-expand-button");
let chat_info_panel = document.getElementById("info-expand");
chat_info_panel.insertBefore(info_expand_button, chat_info_panel.childNodes[2]);
// clpse
globalThis.clpseFn = (id) => {
var obj = document.getElementById('clpse-btn-' + id);

View File

@ -29,7 +29,7 @@ from .control import ConversationControl
from .report import ReportIssue
DEFAULT_SETTING = "(default)"
INFO_PANEL_SCALES = {True: 8, False: 4}
INFO_PANEL_SCALES = {True: 8, False: 5}
pdfview_js = """
@ -169,7 +169,9 @@ class ChatPage(BasePage):
with gr.Column(
scale=INFO_PANEL_SCALES[False], elem_id="chat-info-panel"
) as self.info_column:
with gr.Accordion(label="Information panel", open=True):
with gr.Accordion(
label="Information panel", open=True, elem_id="info-expand"
):
self.modal = gr.HTML("<div id='pdf-modal'></div>")
self.plot_panel = gr.Plot(visible=False)
self.info_panel = gr.HTML(elem_id="html-info-panel")