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
d47324b8
Commit
d47324b8
authored
Jun 29, 2023
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add stars
parent
fab73f2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
modules/ui_extensions.py
modules/ui_extensions.py
+4
-2
No files found.
modules/ui_extensions.py
View file @
d47324b8
...
...
@@ -424,6 +424,7 @@ sort_ordering = [
(
False
,
lambda
x
:
x
.
get
(
'name'
,
'z'
)),
(
True
,
lambda
x
:
x
.
get
(
'name'
,
'z'
)),
(
False
,
lambda
x
:
'z'
),
(
True
,
lambda
x
:
x
.
get
(
'stars'
,
0
)),
]
...
...
@@ -451,6 +452,7 @@ def refresh_available_extensions_from_data(hide_tags, sort_column, filter_text="
for
ext
in
sorted
(
extlist
,
key
=
sort_function
,
reverse
=
sort_reverse
):
name
=
ext
.
get
(
"name"
,
"noname"
)
stars
=
int
(
ext
.
get
(
"stars"
,
0
))
added
=
ext
.
get
(
'added'
,
'unknown'
)
url
=
ext
.
get
(
"url"
,
None
)
description
=
ext
.
get
(
"description"
,
""
)
...
...
@@ -478,7 +480,7 @@ def refresh_available_extensions_from_data(hide_tags, sort_column, filter_text="
code
+=
f
"""
<tr>
<td><a href="{html.escape(url)}" target="_blank">{html.escape(name)}</a><br />{tags_text}</td>
<td>{html.escape(description)}<p class="info"><span class="date_added">Added: {html.escape(added)}</span></p></td>
<td>{html.escape(description)}<p class="info"><span class="date_added">Added: {html.escape(added)}</span><
span class="star_count">stars: <b>{stars:,}</b></a><
/p></td>
<td>{install_code}</td>
</tr>
...
...
@@ -562,7 +564,7 @@ def create_ui():
with
gr
.
Row
():
hide_tags
=
gr
.
CheckboxGroup
(
value
=
[
"ads"
,
"localization"
,
"installed"
],
label
=
"Hide extensions with tags"
,
choices
=
[
"script"
,
"ads"
,
"localization"
,
"installed"
])
sort_column
=
gr
.
Radio
(
value
=
"newest first"
,
label
=
"Order"
,
choices
=
[
"newest first"
,
"oldest first"
,
"a-z"
,
"z-a"
,
"internal order"
,
],
type
=
"index"
)
sort_column
=
gr
.
Radio
(
value
=
"newest first"
,
label
=
"Order"
,
choices
=
[
"newest first"
,
"oldest first"
,
"a-z"
,
"z-a"
,
"internal order"
,
"stars"
],
type
=
"index"
)
with
gr
.
Row
():
search_extensions_text
=
gr
.
Text
(
label
=
"Search"
)
.
style
(
container
=
False
)
...
...
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