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
d88424ef
Commit
d88424ef
authored
Jan 15, 2024
by
Sj-Si
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs. introduce new ones.
parent
019f6e3c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
207 additions
and
194 deletions
+207
-194
html/extra-networks-tree-button.html
html/extra-networks-tree-button.html
+17
-6
javascript/extraNetworks.js
javascript/extraNetworks.js
+5
-5
modules/ui_extra_networks.py
modules/ui_extra_networks.py
+95
-92
style.css
style.css
+90
-91
No files found.
html/extra-networks-tree-button.html
View file @
d88424ef
<span
data-filterable-item-text
hidden
>
{search_terms}
</span>
<span
data-filterable-item-text
hidden
>
{search_terms}
</span>
<button
class=
"action-list-content action-list-content-file"
<button
class=
"tree-list-content {subclass}"
expanded=
"false"
type=
"button"
type=
"button"
onclick=
"extraNetworksTreeOnClick(event, '{tabname}', '{tab_id}');"
onclick=
"extraNetworksTreeOnClick(event, '{tabname}', '{tab_id}');
{onclick_extra}
"
>
>
<span
class=
"action-list-item-visual action-list-item-visual--leading"
>
🗎
</span>
<span
class=
'tree-list-item-action tree-list-item-action--leading'
>
<span
class=
"action-list-item-label action-list-item-label--truncate"
>
{name}
</span>
{action_list_item_action_leading}
<span
class=
"action-list-item-action action-list-item-action--trailing"
>
</span>
<div
class=
"button-row"
>
{copy_path_button}{metadata_button}{edit_button}
</div>
<span
class=
"tree-list-item-visual tree-list-item-visual--leading"
>
{action_list_item_visual_leading}
</span>
<span
class=
"tree-list-item-label tree-list-item-label--truncate"
>
{action_list_item_label}
</span>
<span
class=
"tree-list-item-visual tree-list-item-visual--trailing"
>
{action_list_item_visual_trailing}
</span>
<span
class=
"tree-list-item-action tree-list-item-action--trailing"
>
{action_list_item_action_trailing}
</span>
</span>
</button>
</button>
\ No newline at end of file
javascript/extraNetworks.js
View file @
d88424ef
...
@@ -267,7 +267,7 @@ function extraNetworksTreeProcessFileClick(event, btn, tabname, tab_id) {
...
@@ -267,7 +267,7 @@ function extraNetworksTreeProcessFileClick(event, btn, tabname, tab_id) {
* Processes `onclick` events when user clicks on files in tree.
* Processes `onclick` events when user clicks on files in tree.
*
*
* @param event The generated event.
* @param event The generated event.
* @param btn The clicked `
action
-list-item` button.
* @param btn The clicked `
tree
-list-item` button.
* @param tabname The name of the active tab in the sd webui. Ex: txt2img, img2img, etc.
* @param tabname The name of the active tab in the sd webui. Ex: txt2img, img2img, etc.
* @param tab_id The id of the active extraNetworks tab. Ex: lora, checkpoints, etc.
* @param tab_id The id of the active extraNetworks tab. Ex: lora, checkpoints, etc.
*/
*/
...
@@ -288,7 +288,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
...
@@ -288,7 +288,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
* chevron is clicked: Directory is expanded or collapsed. Selected state unchanged.
* chevron is clicked: Directory is expanded or collapsed. Selected state unchanged.
*
*
* @param event The generated event.
* @param event The generated event.
* @param btn The clicked `
action
-list-item` button.
* @param btn The clicked `
tree
-list-item` button.
* @param tabname The name of the active tab in the sd webui. Ex: txt2img, img2img, etc.
* @param tabname The name of the active tab in the sd webui. Ex: txt2img, img2img, etc.
* @param tab_id The id of the active extraNetworks tab. Ex: lora, checkpoints, etc.
* @param tab_id The id of the active extraNetworks tab. Ex: lora, checkpoints, etc.
*/
*/
...
@@ -310,7 +310,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
...
@@ -310,7 +310,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
function
_remove_selected_from_all
()
{
function
_remove_selected_from_all
()
{
// Removes the `selected` attribute from all buttons.
// Removes the `selected` attribute from all buttons.
var
sels
=
document
.
querySelectorAll
(
"
button.
action
-list-content
"
);
var
sels
=
document
.
querySelectorAll
(
"
button.
tree
-list-content
"
);
[...
sels
].
forEach
(
el
=>
{
[...
sels
].
forEach
(
el
=>
{
el
.
removeAttribute
(
"
selected
"
);
el
.
removeAttribute
(
"
selected
"
);
});
});
...
@@ -331,7 +331,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
...
@@ -331,7 +331,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
// If user clicks on the chevron, then we do not select the folder.
// If user clicks on the chevron, then we do not select the folder.
if
(
true_targ
.
matches
(
"
.
action-list-item-action--leading, .action
-list-item-action-chevron
"
))
{
if
(
true_targ
.
matches
(
"
.
tree-list-item-action--leading, .tree
-list-item-action-chevron
"
))
{
_expand_or_collapse
(
ul
,
btn
);
_expand_or_collapse
(
ul
,
btn
);
}
else
{
}
else
{
// User clicked anywhere else on the button.
// User clicked anywhere else on the button.
...
@@ -356,7 +356,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
...
@@ -356,7 +356,7 @@ function extraNetworksTreeProcessDirectoryClick(event, btn, tabname, tab_id) {
function
extraNetworksTreeOnClick
(
event
,
tabname
,
tab_id
)
{
function
extraNetworksTreeOnClick
(
event
,
tabname
,
tab_id
)
{
/**
/**
* Handles `onclick` events for buttons within an `extra-network-tree .
action
-list--tree`.
* Handles `onclick` events for buttons within an `extra-network-tree .
tree
-list--tree`.
*
*
* Determines whether the clicked button in the tree is for a file entry or a directory
* Determines whether the clicked button in the tree is for a file entry or a directory
* then calls the appropriate function.
* then calls the appropriate function.
...
...
modules/ui_extra_networks.py
View file @
d88424ef
This diff is collapsed.
Click to expand it.
style.css
View file @
d88424ef
This diff is collapsed.
Click to expand it.
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