aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_extensions.py
diff options
context:
space:
mode:
authorspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-03-29 19:26:52 -0500
committerspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-03-29 19:26:52 -0500
commit3ccf6f5ae8e57233200f9cac52da8d5d88ecee93 (patch)
treef78d356749d764f19b7b6ef0f5c8377e66f40d85 /modules/ui_extensions.py
parent563d048780790fb9e7e9a5fc54a86bdf1ee65d58 (diff)
Add webui link
Diffstat (limited to 'modules/ui_extensions.py')
-rw-r--r--modules/ui_extensions.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py
index 0843a7c0..af9e92cc 100644
--- a/modules/ui_extensions.py
+++ b/modules/ui_extensions.py
@@ -202,6 +202,10 @@ def update_config_states_table(state_name):
else:
webui_commit_date = "<unknown>"
+ remote = f"""<a href="{html.escape(webui_remote)}" target="_blank">{html.escape(webui_remote or '')}</a>"""
+ commit_link = make_commit_link(webui_commit_hash, webui_remote)
+ date_link = make_commit_link(webui_commit_hash, webui_remote, webui_commit_date)
+
current_webui = config_states.get_webui_config()
style_remote = ""
@@ -214,9 +218,6 @@ def update_config_states_table(state_name):
if current_webui["commit_hash"] != webui_commit_hash:
style_commit = STYLE_PRIMARY
- commit_link = make_commit_link(webui_commit_hash, webui_remote)
- date_link = make_commit_link(webui_commit_hash, webui_remote, webui_commit_date)
-
code += f"""<h2>Config Backup: {config_name}</h2>
<div><b>Filepath:</b> {filepath}</div>
<div><b>Created at:</b> {created_date}</div>"""
@@ -233,7 +234,7 @@ def update_config_states_table(state_name):
</thead>
<tbody>
<tr>
- <td><label{style_remote}>{webui_remote}</label></td>
+ <td><label{style_remote}>{remote}</label></td>
<td><label{style_branch}>{webui_branch}</label></td>
<td><label{style_commit}>{commit_link}</label></td>
<td><label{style_commit}>{date_link}</label></td>
@@ -270,6 +271,8 @@ def update_config_states_table(state_name):
ext_commit_date = "<unknown>"
remote = f"""<a href="{html.escape(ext_remote)}" target="_blank">{html.escape(ext_remote or '')}</a>"""
+ commit_link = make_commit_link(ext_commit_hash, ext_remote)
+ date_link = make_commit_link(ext_commit_hash, ext_remote, ext_commit_date)
style_enabled = ""
style_remote = ""
@@ -287,9 +290,6 @@ def update_config_states_table(state_name):
if current_ext.commit_hash != ext_commit_hash:
style_commit = STYLE_PRIMARY
- commit_link = make_commit_link(ext_commit_hash, ext_remote)
- date_link = make_commit_link(ext_commit_hash, ext_remote, ext_commit_date)
-
code += f"""
<tr>
<td><label{style_enabled}><input class="gr-check-radio gr-checkbox" type="checkbox" disabled="true" {'checked="checked"' if ext_enabled else ''}>{html.escape(ext_name)}</label></td>