Skip to content

Commit

Permalink
switch back to FileInput
Browse files Browse the repository at this point in the history
  • Loading branch information
kcpevey committed Dec 10, 2024
1 parent 8341f09 commit 18419d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 0 additions & 5 deletions ragna/deploy/_ui/css/modal_configuration/filedropper.css

This file was deleted.

5 changes: 5 additions & 0 deletions ragna/deploy/_ui/css/modal_configuration/fileinput.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:host(.file-input) .bk-input {
height: 80px;
border: var(--accent-color) dashed 2px;
border-radius: 10px;
}
6 changes: 3 additions & 3 deletions ragna/deploy/_ui/modal_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def __init__(self, api_wrapper, **params):
self.chat_name_input = pn.widgets.TextInput.from_param(
self.param.chat_name,
)
self.document_uploader = pn.widgets.FileDropper(
self.document_uploader = pn.widgets.FileInput(
multiple=True,
accepted_filetypes=['.docx', '.md', '.pdf', '.pptx', '.txt'],
css_classes=["file-dropper"],
accept='.docx,.md,.pdf,.pptx,.txt',
css_classes=["file-input"],
)

# Most widgets (including those that use from_param) should be placed after the super init call
Expand Down
1 change: 1 addition & 0 deletions ragna/deploy/_ui/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
pn.Row,
pn.widgets.Button,
pn.widgets.FileDropper,
pn.widgets.FileInput,
],
}

Expand Down

0 comments on commit 18419d2

Please sign in to comment.