pull/178/head
Nevysha 2023-05-10 09:22:05 +02:00 committed by GitHub
parent 29f81109d2
commit 3854e744d1
18 changed files with 108 additions and 27 deletions

View File

@ -1,7 +1,13 @@
## Minor changes
- [x] Added a link to my Ko-Fi page :3
## Minor changes in 1.2.3
- [x] Fix selected image border color when generating multiple images
- [x] Fix right arrow hidden by "Extra Network" button in full screen img view
- [x] Add external lib into the Cozy Nest extension folder
- [x] Fix download image link not visible
- [x] Hide the 'x' button on fullscreen inpainting
- [x] Fix background color of preview
- [x] Fix for Kryptortio/SDAtom-WebUi-client-queue-ext extension
## New features
## New features in 1.2.0
- [x] Bypass Cozy Nest by adding `CozyNest=No` in URL param (ie: http://localhost:8501/?CozyNest=No) - useful for mobile
- [x] Close Extra Network tab with escape key
@ -10,6 +16,7 @@
- [x] Fetch version from a desicated json file hosted directly in the repo. This file should contains version number as well as feature list. As its from github there is no risk of tracking from me.
- [x] Put settings panel button of prompt pan always under positive/negative prompt
- [x] Add small accent color to the selected Main Menu
- [x] Added a link to my Ko-Fi page :3
## Issues fixed
@ -21,6 +28,5 @@
- [ ] Partial compatibility with Firefox and Opera GX
- [ ] Most tweak will not support a live window resize
- [ ] Some user report a missing scrollbar in Extra network tab
- [ ] Minor bug that occurs when you delete an image in the expanded state in the Inpaint tab.
- [ ] Issue when having to many script "block" in txt2img or img2img
- [ ] Some user report an issue when having to many script "block" in txt2img or img2img
- [ ] If setting are saved and user refresh, it will revert to old setting (only visually) because webui load them at gradio launch]

View File

@ -52,24 +52,24 @@ It's made by being a bit hacky on the DOM to tweaks Gradio default features and
# Looks
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-2%20(1).png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/Screenshot%202023-05-03%20100850.png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-2%20(1).png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/Screenshot%202023-05-03%20100850.png?raw=true)
## Video
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-1.gif?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-2.gif?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-1.gif?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-2.gif?raw=true)
## Screenshots
### Main look
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-1.png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-1%20(1).png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-1.png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-1%20(1).png?raw=true)
### Resizable Panels (txt2img and img2img)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-2.png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-2.png?raw=true)
### Full Screen Inpainting
![](https://github.com/Nevysha/Cozy-Nest/blob/main/assets/chrome-capture-2023-4-1%20(3).png?raw=true)
![](https://github.com/Nevysha/Cozy-Nest/blob/main/screenshots/chrome-capture-2023-4-1%20(3).png?raw=true)
# Contribution

7
assets/animate-4.1.1.min.css vendored Normal file

File diff suppressed because one or more lines are too long

2
assets/jquery-3.6.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
assets/kofi-cup-border.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

3
assets/showdown-1.9.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -251,6 +251,11 @@ function tweakInpainting() {
inpaintTab.style.height = "calc(100vh - 10px)";
inpaintTab.style.overflow = "";
//hide button to delete image
//this button is inside #img2maskimg > .image-container
//it's the third button
document.querySelector('#img2maskimg > .image-container').querySelector("button:nth-child(3)").style.display = "none"
//apply to canvas
const nodesCanvas = document.querySelectorAll("canvas")
nodesCanvasData = [];
@ -274,6 +279,8 @@ function tweakInpainting() {
expendBtn.style.position = "absolute";
inpaintTab.setAttribute("style", defaultStyle);
document.querySelector('#img2maskimg > .image-container').querySelector("button:nth-child(3)").style.display = "block"
//revert canvas
nodesCanvasData.forEach((canvasData) => {
const canvas = document.getElementById(canvasData.id)
@ -484,7 +491,7 @@ const addCozyNestCustomBtn = () => {
//add kofi image :blush:
const kofiImg = document.createElement('button')
kofiImg.id = 'kofi_nevysha_support'
kofiImg.innerHTML = `<img height="15" src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Consider a donation on ko-fi! :3">`
kofiImg.innerHTML = `<img height="15" src="file=extensions/Cozy-Nest/assets/kofi-cup-border.png" alt="Consider a donation on ko-fi! :3">`
kofiImg.title = "Consider a donation on ko-fi! :3"
nevySettingstabMenuWrapper.insertAdjacentElement('beforeend', kofiImg);
@ -522,6 +529,31 @@ const addCozyNestCustomBtn = () => {
}
});
//if AWQ-container is present in body, create a button to show/hide it
if (document.querySelector("#AWQ-container")) {
const awqContainer = document.querySelector("#AWQ-container")
awqContainer.style.zIndex = "9999"
awqContainer.style.display = "none"
awqContainer.style.position = "fixed"
awqContainer.style.bottom = "30px"
const btnAWQ = document.createElement("button")
btnAWQ.classList.add("nevysha-btn-menu", "nevysha-btn-menu-awq", "gradio-button", "primary", "nevysha")
btnAWQ.id = "nevyui_awq_btn"
btnAWQ.innerHTML = 'Show/Hide AWQ'
btnAWQ.title = "Show/Hide AWQ"
btnAWQ.setAttribute("style", "position: fixed; bottom: 0; left: calc(50% - 75px); width: 150px;")
document.querySelector('div.app').insertAdjacentElement('beforeend', btnAWQ)
btnAWQ.addEventListener("click", () => {
if (awqContainer.style.display === "none") {
awqContainer.style.display = "block"
} else {
awqContainer.style.display = "none"
}
});
}
//fetch version_data.json
loadVersionData().then(ignored => ignored)
}
@ -1347,7 +1379,8 @@ document.addEventListener("DOMContentLoaded", async function() {
try {
// dynamically import jQuery library
await import('https://code.jquery.com/jquery-3.6.4.min.js')
await loadJQuery();
// jQuery is now loaded and ready to use
console.log("jQuery library loaded successfully");
}
@ -1357,7 +1390,7 @@ document.addEventListener("DOMContentLoaded", async function() {
}
// load showdown library
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js", function() {
$.getScript("file=extensions/Cozy-Nest/assets/showdown-1.9.1.min.js", function() {
console.log("showdown library loaded successfully");
});
@ -1370,11 +1403,29 @@ document.addEventListener("DOMContentLoaded", async function() {
SimpleTimer.end(COZY_NEST_DOM_TWEAK_LOAD_DURATION);
SimpleTimer.end(COZY_NEST_GRADIO_LOAD_DURATION);
});
});
/**
* While jQuery has not been loaded we have to manually handle script load the old way
* @returns {Promise<unknown>}
*/
function loadJQuery() {
return new Promise(function(resolve, reject) {
const script = document.createElement('script');
script.src = 'file=extensions/Cozy-Nest/assets/jquery-3.6.4.min.js';
script.onload = function() {
resolve();
};
script.onerror = function() {
reject(new Error('Failed to load script jQuery'));
};
document.head.appendChild(script);
});
}
// create a SimpleTimer class
class SimpleTimer {
@ -1445,7 +1496,7 @@ async function fetchCozyNestConfig() {
const animateCssLink = document.createElement('link');
animateCssLink.rel = 'stylesheet';
animateCssLink.type = 'text/css';
animateCssLink.href = 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css';
animateCssLink.href = 'file=extensions/Cozy-Nest/assets/animate_4.1.1.min.css';
// Append the link element to the document head
document.head.appendChild(animateCssLink);
@ -1465,7 +1516,7 @@ async function fetchCozyNestConfig() {
})();
//dummy method
const dummy = () => {
const dummyLoraCard = () => {
const container = document.querySelector("#txt2img_lora_cards");
// Get the first child element of the container
@ -1476,5 +1527,17 @@ const dummy = () => {
const clone = container.querySelector('.card').cloneNode(true);
container.insertBefore(clone, firstChild);
}
};
const dummyControlNetBloc = () => {
const container = document.querySelector("#txt2img_controlnet");
// Get the parent element of the container
const parent = container.parentElement;
// Duplicate the first child element 100 times and append them to the fragment
for (let i = 0; i < 100; i++) {
const clone = parent.cloneNode(true);
parent.parentElement.insertBefore(clone, parent);
}
}

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 435 KiB

After

Width:  |  Height:  |  Size: 435 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 26 MiB

After

Width:  |  Height:  |  Size: 26 MiB

View File

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 416 KiB

View File

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 388 KiB

View File

Before

Width:  |  Height:  |  Size: 23 MiB

After

Width:  |  Height:  |  Size: 23 MiB

View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@ -109,6 +109,8 @@
--button-secondary-background-fill-hover: var(--nevysha-dark);
--checkbox-border-color: var(--nevysha-white);
--checkbox-border-color-hover: var(--ae-primary-color);
--color-accent: var(--ae-primary-color);
--link-text-color: var(--nevysha-white);
/*default dark*/
@ -118,11 +120,9 @@
--border-color-accent: var(--neutral-600);
--border-color-primary: var(--neutral-700);
--link-text-color-active: var(--secondary-500);
--link-text-color: var(--secondary-500);
--link-text-color-hover: var(--secondary-400);
--link-text-color-visited: var(--secondary-600);
--body-text-color-subdued: var(--neutral-400);
--color-accent: var(--primary-500);
--shadow-drop: rgba(0,0,0,0.05) 0px 1px 2px 0px;
--shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--shadow-inset: rgba(0,0,0,0.05) 0px 2px 4px 0px inset;
@ -959,7 +959,7 @@ canvas.nevysha {
position: fixed;
right: 0;
top: calc(75px + var(--nevysha-menu-fix-top-height-less));
z-index: 9999;
z-index: 999;
height: calc(100vh - (100px + var(--nevysha-menu-fix-top-height-less)));
width: 25px;
min-width: 25px !important;
@ -1356,7 +1356,7 @@ canvas.nevysha {
/*quickfix*/
.livePreview {
background-color: initial;
background-color: var(--background-fill-primary) !important;
}

View File

@ -1,3 +1,3 @@
{
"version": "1.2.2"
"version": "1.2.3"
}