Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
ad6ec022
Commit
ad6ec022
authored
May 09, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent Reload UI button/link from reloading the page when it's not yet ready
parent
eb958095
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
javascript/ui.js
javascript/ui.js
+10
-1
modules/ui.py
modules/ui.py
+2
-0
No files found.
javascript/ui.js
View file @
ad6ec022
...
...
@@ -395,7 +395,16 @@ function update_token_counter(button_id) {
function
restart_reload
(){
document
.
body
.
innerHTML
=
'
<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>
'
;
setTimeout
(
function
(){
location
.
reload
()},
2000
)
var
requestPing
=
function
(){
requestGet
(
"
./internal/ping
"
,
{},
function
(
data
){
location
.
reload
();
},
function
(){
setTimeout
(
requestPing
,
500
);
})
}
setTimeout
(
requestPing
,
2000
);
return
[]
}
...
...
modules/ui.py
View file @
ad6ec022
...
...
@@ -1958,3 +1958,5 @@ def setup_ui_api(app):
return
[
QuicksettingsHint
(
name
=
k
,
label
=
v
.
label
)
for
k
,
v
in
opts
.
data_labels
.
items
()]
app
.
add_api_route
(
"/internal/quicksettings-hint"
,
quicksettings_hint
,
methods
=
[
"GET"
],
response_model
=
List
[
QuicksettingsHint
])
app
.
add_api_route
(
"/internal/ping"
,
lambda
:
{},
methods
=
[
"GET"
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment