mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Improve the file saving/deletion menus
This commit is contained in:
parent
123f27a3c5
commit
953343cced
@ -193,11 +193,11 @@ button {
|
|||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
background-color: var(--input-background-fill);
|
background-color: var(--input-background-fill);
|
||||||
border: var(--input-border-width) solid var(--input-border-color) !important;
|
border: var(--input-border-width) solid var(--input-border-color) !important;
|
||||||
padding: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-saver > :first-child > :nth-child(2) {
|
.file-saver > :first-child > :last-child {
|
||||||
background: var(--block-background-fill);
|
background: var(--block-background-fill);
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxgroup-table label {
|
.checkboxgroup-table label {
|
||||||
|
@ -13,23 +13,23 @@ def create_ui():
|
|||||||
shared.gradio['save_root'] = gr.Textbox(lines=1, label='File folder', info='For reference. Unchangeable.', interactive=False)
|
shared.gradio['save_root'] = gr.Textbox(lines=1, label='File folder', info='For reference. Unchangeable.', interactive=False)
|
||||||
shared.gradio['save_contents'] = gr.Textbox(lines=10, label='File contents')
|
shared.gradio['save_contents'] = gr.Textbox(lines=10, label='File contents')
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
shared.gradio['save_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
|
||||||
shared.gradio['save_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
shared.gradio['save_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
||||||
|
shared.gradio['save_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
||||||
|
|
||||||
# Text file deleter
|
# Text file deleter
|
||||||
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['file_deleter']:
|
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['file_deleter']:
|
||||||
shared.gradio['delete_filename'] = gr.Textbox(lines=1, label='File name')
|
shared.gradio['delete_filename'] = gr.Textbox(lines=1, label='File name')
|
||||||
shared.gradio['delete_root'] = gr.Textbox(lines=1, label='File folder', info='For reference. Unchangeable.', interactive=False)
|
shared.gradio['delete_root'] = gr.Textbox(lines=1, label='File folder', info='For reference. Unchangeable.', interactive=False)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
shared.gradio['delete_confirm'] = gr.Button('Delete', elem_classes="small-button", variant='stop', interactive=not mu)
|
|
||||||
shared.gradio['delete_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
shared.gradio['delete_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
||||||
|
shared.gradio['delete_confirm'] = gr.Button('Delete', elem_classes="small-button", variant='stop', interactive=not mu)
|
||||||
|
|
||||||
# Character saver/deleter
|
# Character saver/deleter
|
||||||
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['character_saver']:
|
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['character_saver']:
|
||||||
shared.gradio['save_character_filename'] = gr.Textbox(lines=1, label='File name', info='The character will be saved to your characters/ folder with this base filename.')
|
shared.gradio['save_character_filename'] = gr.Textbox(lines=1, label='File name', info='The character will be saved to your characters/ folder with this base filename.')
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
shared.gradio['save_character_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
|
||||||
shared.gradio['save_character_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
shared.gradio['save_character_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
||||||
|
shared.gradio['save_character_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
||||||
|
|
||||||
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['character_deleter']:
|
with gr.Group(visible=False, elem_classes='file-saver') as shared.gradio['character_deleter']:
|
||||||
gr.Markdown('Confirm the character deletion?')
|
gr.Markdown('Confirm the character deletion?')
|
||||||
@ -42,8 +42,8 @@ def create_ui():
|
|||||||
shared.gradio['save_preset_filename'] = gr.Textbox(lines=1, label='File name', info='The preset will be saved to your presets/ folder with this base filename.')
|
shared.gradio['save_preset_filename'] = gr.Textbox(lines=1, label='File name', info='The preset will be saved to your presets/ folder with this base filename.')
|
||||||
shared.gradio['save_preset_contents'] = gr.Textbox(lines=10, label='File contents')
|
shared.gradio['save_preset_contents'] = gr.Textbox(lines=10, label='File contents')
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
shared.gradio['save_preset_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
|
||||||
shared.gradio['save_preset_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
shared.gradio['save_preset_cancel'] = gr.Button('Cancel', elem_classes="small-button")
|
||||||
|
shared.gradio['save_preset_confirm'] = gr.Button('Save', elem_classes="small-button", variant='primary', interactive=not mu)
|
||||||
|
|
||||||
|
|
||||||
def create_event_handlers():
|
def create_event_handlers():
|
||||||
|
Loading…
Reference in New Issue
Block a user