Skip to content

Commit

Permalink
🐛 fix: Fix extranetwork loading
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jan 14, 2024
1 parent 90cb669 commit 0be4a24
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
9 changes: 8 additions & 1 deletion javascript/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/features/ExtraNetworkSidebar/refreshExtraNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ export const refreshExtraNetwork = (type: 'txt' | 'img') => {
`#${type}2img_extra_tabs > .tab-nav > button`,
)[1] as HTMLButtonElement;
extraNetworkButton?.click();

const searchAll = Array.from(
document.querySelectorAll(`#${type}2img_extra_tabs button.search-all`),
) as HTMLButtonElement[];

for (const e of searchAll) e.click();
};
8 changes: 8 additions & 0 deletions src/features/ExtraNetworkSidebar/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ export const useStyles = createStyles(
}
.extra-networks {
.pending {
opacity: 1 !important;
}
.wrap.center.full.translucent {
display: none !important;
}
.tab-nav {
align-items: center;
Expand Down
1 change: 1 addition & 0 deletions src/features/ExtraNetworkSidebar/useCivitaiHelperFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const useCivitaiHelperFix = ({

onSuccess?.();
isInject.current = true;

setIsLoading(false);
if (debug) consola.success(`🤯 ${debug}`);

Expand Down

0 comments on commit 0be4a24

Please sign in to comment.