Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
78935336
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
11 个月 前同步成功
通知
1767
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
78935336
编写于
2月 13, 2023
作者:
V
Vladimir Mandic
提交者:
GitHub
2月 13, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add version to extensions table
上级
3715ece0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
5 deletion
+9
-5
modules/extensions.py
modules/extensions.py
+6
-0
modules/ui_extensions.py
modules/ui_extensions.py
+3
-5
未找到文件。
modules/extensions.py
浏览文件 @
78935336
...
...
@@ -2,6 +2,7 @@ import os
import
sys
import
traceback
import
time
import
git
from
modules
import
paths
,
shared
...
...
@@ -25,6 +26,7 @@ class Extension:
self
.
status
=
''
self
.
can_update
=
False
self
.
is_builtin
=
is_builtin
self
.
version
=
''
repo
=
None
try
:
...
...
@@ -40,6 +42,10 @@ class Extension:
try
:
self
.
remote
=
next
(
repo
.
remote
().
urls
,
None
)
self
.
status
=
'unknown'
head
=
repo
.
head
.
commit
ts
=
time
.
asctime
(
time
.
gmtime
(
repo
.
head
.
commit
.
committed_date
))
self
.
version
=
f
'
{
head
.
hexsha
[:
7
]
}
(
{
ts
}
)'
except
Exception
:
self
.
remote
=
None
...
...
modules/ui_extensions.py
浏览文件 @
78935336
...
...
@@ -80,6 +80,7 @@ def extension_table():
<tr>
<th><abbr title="Use checkbox to enable the extension; it will be enabled or disabled when you click apply button">Extension</abbr></th>
<th>URL</th>
<th><abbr title="Extension version">Version</abbr></th>
<th><abbr title="Use checkbox to mark the extension for update; it will be updated when you click apply button">Update</abbr></th>
</tr>
</thead>
...
...
@@ -87,11 +88,7 @@ def extension_table():
"""
for
ext
in
extensions
.
extensions
:
remote
=
""
if
ext
.
is_builtin
:
remote
=
"built-in"
elif
ext
.
remote
:
remote
=
f
"""<a href="
{
html
.
escape
(
ext
.
remote
or
''
)
}
" target="_blank">
{
html
.
escape
(
"built-in"
if
ext
.
is_builtin
else
ext
.
remote
or
''
)
}
</a>"""
remote
=
f
"""<a href="
{
html
.
escape
(
ext
.
remote
or
''
)
}
" target="_blank">
{
html
.
escape
(
"built-in"
if
ext
.
is_builtin
else
ext
.
remote
or
''
)
}
</a>"""
if
ext
.
can_update
:
ext_status
=
f
"""<label><input class="gr-check-radio gr-checkbox" name="update_
{
html
.
escape
(
ext
.
name
)
}
" checked="checked" type="checkbox">
{
html
.
escape
(
ext
.
status
)
}
</label>"""
...
...
@@ -102,6 +99,7 @@ def extension_table():
<tr>
<td><label><input class="gr-check-radio gr-checkbox" name="enable_
{
html
.
escape
(
ext
.
name
)
}
" type="checkbox"
{
'checked="checked"'
if
ext
.
enabled
else
''
}
>
{
html
.
escape
(
ext
.
name
)
}
</label></td>
<td>
{
remote
}
</td>
<td>
{
ext
.
version
}
</td>
<td
{
' class="extension_status"'
if
ext
.
remote
is
not
None
else
''
}
>
{
ext_status
}
</td>
</tr>
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录