Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -228,9 +228,9 @@ def create_ui():
|
|
228 |
margin-top: 5px !important;
|
229 |
}
|
230 |
#info-output, #usage-guide, #tree-view, #list-view {
|
231 |
-
height: 400px;
|
232 |
-
overflow-y: auto;
|
233 |
-
padding-right: 10px;
|
234 |
}
|
235 |
#app-py-content {
|
236 |
height: auto !important;
|
@@ -243,6 +243,10 @@ def create_ui():
|
|
243 |
padding: 10px;
|
244 |
margin-bottom: 20px;
|
245 |
}
|
|
|
|
|
|
|
|
|
246 |
"""
|
247 |
|
248 |
with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
@@ -261,7 +265,7 @@ def create_ui():
|
|
261 |
with gr.Column(scale=2):
|
262 |
with gr.Tabs():
|
263 |
with gr.TabItem("๊ธฐ๋ณธ ์ ๋ณด"):
|
264 |
-
with gr.Group(elem_classes="output-group"):
|
265 |
info_output = gr.Textbox(label="Space ์ ๋ณด ๋ฐ ์์ฝ", elem_id="info-output", lines=20, max_lines=30)
|
266 |
url_state = gr.State("")
|
267 |
last_url_state = gr.State("")
|
@@ -270,22 +274,23 @@ def create_ui():
|
|
270 |
refresh_button = gr.Button("๐ ์๋น์ค ํ๋ฉด", elem_id="refresh-button")
|
271 |
manual_button = gr.Button("์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="manual-button")
|
272 |
|
273 |
-
with gr.Group(elem_classes="output-group"):
|
274 |
usage_guide = gr.Textbox(label="์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="usage-guide", visible=False, lines=20, max_lines=30)
|
275 |
|
276 |
-
with gr.Group(elem_classes="output-group"):
|
277 |
-
app_py_content = gr.Code(language="python", label="๋ฉ์ธ ์์ค์ฝ๋", elem_id="app-py-content", lines=
|
278 |
|
279 |
open_space_button = gr.Button("์ ํํ Space ์ด๊ธฐ", elem_id="open-space-button")
|
280 |
|
281 |
with gr.TabItem("์ฝ๋ ๊ตฌ์กฐ ๋ถ์"):
|
282 |
-
with gr.Group(elem_classes="output-group"):
|
283 |
tree_view = gr.Textbox(label="ํธ๋ฆฌ ๊ตฌ์กฐ", elem_id="tree-view", lines=30, max_lines=50)
|
284 |
-
with gr.Group(elem_classes="output-group"):
|
285 |
list_view = gr.Textbox(label="๋ฆฌ์คํธ ๊ตฌ์กฐ", elem_id="list-view", lines=30, max_lines=50)
|
286 |
|
287 |
update_trigger = gr.Button("Update Screenshot", visible=False)
|
288 |
|
|
|
289 |
def on_select_with_link(space):
|
290 |
info, app_content, url, tree, list_structure = on_select(space)
|
291 |
info += f"\n\n์ ํํ Space URL: {url}"
|
|
|
228 |
margin-top: 5px !important;
|
229 |
}
|
230 |
#info-output, #usage-guide, #tree-view, #list-view {
|
231 |
+
height: 400px !important;
|
232 |
+
overflow-y: auto !important;
|
233 |
+
padding-right: 10px !important;
|
234 |
}
|
235 |
#app-py-content {
|
236 |
height: auto !important;
|
|
|
243 |
padding: 10px;
|
244 |
margin-bottom: 20px;
|
245 |
}
|
246 |
+
.scroll-lock {
|
247 |
+
overflow: auto !important;
|
248 |
+
max-height: 400px !important;
|
249 |
+
}
|
250 |
"""
|
251 |
|
252 |
with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
|
|
265 |
with gr.Column(scale=2):
|
266 |
with gr.Tabs():
|
267 |
with gr.TabItem("๊ธฐ๋ณธ ์ ๋ณด"):
|
268 |
+
with gr.Group(elem_classes="output-group scroll-lock"):
|
269 |
info_output = gr.Textbox(label="Space ์ ๋ณด ๋ฐ ์์ฝ", elem_id="info-output", lines=20, max_lines=30)
|
270 |
url_state = gr.State("")
|
271 |
last_url_state = gr.State("")
|
|
|
274 |
refresh_button = gr.Button("๐ ์๋น์ค ํ๋ฉด", elem_id="refresh-button")
|
275 |
manual_button = gr.Button("์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="manual-button")
|
276 |
|
277 |
+
with gr.Group(elem_classes="output-group scroll-lock"):
|
278 |
usage_guide = gr.Textbox(label="์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="usage-guide", visible=False, lines=20, max_lines=30)
|
279 |
|
280 |
+
with gr.Group(elem_classes="output-group scroll-lock"):
|
281 |
+
app_py_content = gr.Code(language="python", label="๋ฉ์ธ ์์ค์ฝ๋", elem_id="app-py-content", lines=30, max_lines=None)
|
282 |
|
283 |
open_space_button = gr.Button("์ ํํ Space ์ด๊ธฐ", elem_id="open-space-button")
|
284 |
|
285 |
with gr.TabItem("์ฝ๋ ๊ตฌ์กฐ ๋ถ์"):
|
286 |
+
with gr.Group(elem_classes="output-group scroll-lock"):
|
287 |
tree_view = gr.Textbox(label="ํธ๋ฆฌ ๊ตฌ์กฐ", elem_id="tree-view", lines=30, max_lines=50)
|
288 |
+
with gr.Group(elem_classes="output-group scroll-lock"):
|
289 |
list_view = gr.Textbox(label="๋ฆฌ์คํธ ๊ตฌ์กฐ", elem_id="list-view", lines=30, max_lines=50)
|
290 |
|
291 |
update_trigger = gr.Button("Update Screenshot", visible=False)
|
292 |
|
293 |
+
|
294 |
def on_select_with_link(space):
|
295 |
info, app_content, url, tree, list_structure = on_select(space)
|
296 |
info += f"\n\n์ ํํ Space URL: {url}"
|