diff --git a/readme.md b/readme.md index a4003608..0ff3cb49 100644 --- a/readme.md +++ b/readme.md @@ -26,6 +26,7 @@ Included adjustments: * ✨ https://github.com/lllyasviel/Fooocus/pull/1863 - image extension support (png, jpg, webp) * ✨ https://github.com/lllyasviel/Fooocus/pull/1938 - automatically describe image on uov image upload if prompt is empty * ✨ https://github.com/lllyasviel/Fooocus/pull/1940 - meta data handling, schemes: Fooocus (json) and A1111 (plain text). Compatible with Civitai. +* ✨ https://github.com/lllyasviel/Fooocus/pull/1979 - prevent outdated history log link after midnight ✨ = new feature
🐛 = bugfix
diff --git a/webui.py b/webui.py index ecb42788..e0e9fdf1 100644 --- a/webui.py +++ b/webui.py @@ -281,8 +281,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='Styles'): style_sorter.try_load_sorted_styles( @@ -688,6 +694,7 @@ with shared.gradio_root: .then(fn=generate_clicked, inputs=currentTask, 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') def trigger_describe(mode, img):