diff --git a/webui.py b/webui.py index 581e3101..18543e00 100644 --- a/webui.py +++ b/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'\U0001F4DA History Log') + def update_history_link(): + if args_manager.args.disable_image_log: + return gr.update(value='') + + return gr.update(value=f'\U0001F4DA History Log') + + history_link = gr.HTML() + shared.gradio_root.load(update_history_link,outputs=history_link) 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']: