Skip to content

Commit db2737d

Browse files
committed
fix: relocate information panel expand button bump:patch
1 parent 7412432 commit db2737d

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

libs/ktem/ktem/assets/css/main.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ button.selected {
9595
flex-wrap: unset;
9696
overflow-y: scroll !important;
9797
position: sticky;
98+
min-width: min(305px, 100%) !important;
9899
}
99100

100101
.setting-answer-mode-description {
@@ -160,13 +161,13 @@ mark {
160161
#toggle-dark-button {
161162
position: fixed;
162163
top: 6px;
163-
right: 60px;
164+
right: 30px;
164165
}
165166

166167
#info-expand-button {
167-
position: fixed;
168+
position: absolute;
168169
top: 6px;
169-
right: 85px;
170+
right: 15px;
170171
}
171172

172173
#new-conv-button > img {
@@ -175,6 +176,10 @@ mark {
175176
right: -50%;
176177
}
177178

179+
span.icon {
180+
color: #cecece;
181+
}
182+
178183
.upload-button {
179184
display: none;
180185
}

libs/ktem/ktem/assets/js/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ function run() {
1111
version_node.style = "position: fixed; top: 10px; right: 10px;";
1212
main_parent.appendChild(version_node);
1313

14+
// move info-expand-button
15+
let info_expand_button = document.getElementById("info-expand-button");
16+
let chat_info_panel = document.getElementById("info-expand");
17+
chat_info_panel.insertBefore(info_expand_button, chat_info_panel.childNodes[2]);
18+
1419
// clpse
1520
globalThis.clpseFn = (id) => {
1621
var obj = document.getElementById('clpse-btn-' + id);

libs/ktem/ktem/pages/chat/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from .report import ReportIssue
3030

3131
DEFAULT_SETTING = "(default)"
32-
INFO_PANEL_SCALES = {True: 8, False: 4}
32+
INFO_PANEL_SCALES = {True: 8, False: 5}
3333

3434

3535
pdfview_js = """
@@ -169,7 +169,9 @@ def on_building_ui(self):
169169
with gr.Column(
170170
scale=INFO_PANEL_SCALES[False], elem_id="chat-info-panel"
171171
) as self.info_column:
172-
with gr.Accordion(label="Information panel", open=True):
172+
with gr.Accordion(
173+
label="Information panel", open=True, elem_id="info-expand"
174+
):
173175
self.modal = gr.HTML("<div id='pdf-modal'></div>")
174176
self.plot_panel = gr.Plot(visible=False)
175177
self.info_panel = gr.HTML(elem_id="html-info-panel")

0 commit comments

Comments
 (0)