fix: prevents outdated history log link after midnight (#1979)
* feat: update history link date after each generation prevents outdated date in link after midnight * delay importing of modules.config (#2195) * fix: disable queue for initial queue loading --------- Co-authored-by: rsl8 <138326583+rsl8@users.noreply.github.com>
This commit is contained in:
parent
ac10e51364
commit
b7715b0a0c
11
webui.py
11
webui.py
|
|
@ -255,8 +255,14 @@ with shared.gradio_root:
|
|||
seed_random.change(random_checked, inputs=[seed_random], outputs=[image_seed],
|
||||
queue=False, show_progress=False)
|
||||
|
||||
if not args_manager.args.disable_image_log:
|
||||
gr.HTML(f'<a href="file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')
|
||||
def update_history_link():
|
||||
if args_manager.args.disable_image_log:
|
||||
return gr.update(value='')
|
||||
|
||||
return gr.update(value=f'<a href="file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')
|
||||
|
||||
history_link = gr.HTML()
|
||||
shared.gradio_root.load(update_history_link, outputs=history_link, queue=False, show_progress=False)
|
||||
|
||||
with gr.Tab(label='Style'):
|
||||
style_sorter.try_load_sorted_styles(
|
||||
|
|
@ -586,6 +592,7 @@ with shared.gradio_root:
|
|||
.then(fn=generate_clicked, inputs=ctrls, outputs=[progress_html, progress_window, progress_gallery, gallery]) \
|
||||
.then(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), gr.update(visible=False, interactive=False), False),
|
||||
outputs=[generate_button, stop_button, skip_button, state_is_generating]) \
|
||||
.then(fn=update_history_link, outputs=history_link) \
|
||||
.then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
|
||||
|
||||
for notification_file in ['notification.ogg', 'notification.mp3']:
|
||||
|
|
|
|||
Loading…
Reference in New Issue