Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
S
Stable Diffusion Webui
管理
动态
成员
代码
仓库
分支
提交
标签
仓库图
比较修订版本
部署
模型注册表
分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
Hunter0726
Stable Diffusion Webui
提交
d023532c
未验证
提交
d023532c
编辑于
2 years ago
作者:
AUTOMATIC1111
提交者:
GitHub
2 years ago
浏览文件
操作
下载
差异文件
Merge pull request #7798 from vladmandic/extensions
add version to extensions table
上级
15f4b217
78935336
No related branches found
No related tags found
无相关合并请求
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
modules/extensions.py
+6
-0
6 个添加, 0 个删除
modules/extensions.py
modules/ui_extensions.py
+3
-5
3 个添加, 5 个删除
modules/ui_extensions.py
有
9 个添加
和
5 个删除
modules/extensions.py
+
6
−
0
浏览文件 @
d023532c
...
...
@@ -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
+
3
−
5
浏览文件 @
d023532c
...
...
@@ -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>
"""
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录