Skip to content

Commit

Permalink
fix: relocate information panel expand button bump:patch
Browse files Browse the repository at this point in the history
  • Loading branch information
taprosoft committed Nov 18, 2024
1 parent 7412432 commit db2737d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
11 changes: 8 additions & 3 deletions libs/ktem/ktem/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -175,6 +176,10 @@ mark {
right: -50%;
}

span.icon {
color: #cecece;
}

.upload-button {
display: none;
}
Expand Down
5 changes: 5 additions & 0 deletions libs/ktem/ktem/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions libs/ktem/ktem/pages/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .report import ReportIssue

DEFAULT_SETTING = "(default)"
INFO_PANEL_SCALES = {True: 8, False: 4}
INFO_PANEL_SCALES = {True: 8, False: 5}


pdfview_js = """
Expand Down Expand Up @@ -169,7 +169,9 @@ def on_building_ui(self):
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")
Expand Down

0 comments on commit db2737d

Please sign in to comment.