Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevysha committed Oct 13, 2023
1 parent 50d042c commit e2612e5
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 66 deletions.
7 changes: 5 additions & 2 deletions PATCHNOTE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## Compatibility

- Automatic1111's webui 1.4.0 release.
- SD Next (Vlad's fork) Version: 3bcca6f9 06/07/2023
- Automatic1111's webui 1.6.0 release WIP.
- Not compatible with SD Next.

## Minor changes & fixes in 2.4.4
- [x] wip fixes for Automatic1111's webui 1.6.0 release

## Minor changes & fixes in 2.4.3
- [x] Fix for SD Next compatibility Version: 3bcca6f9 3bcca6f9 06/07/2023.
Expand Down
18 changes: 13 additions & 5 deletions client/assets/cozy-nest-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ button.secondary, button.primary {

.nevysha.generate-button, .nevysha.skip-interrupt-wrapper {
/*margin: 0 0 10px 0;*/
width: calc(100% - 10px);
}

.nevysha.skip-interrupt-wrapper {
Expand Down Expand Up @@ -913,21 +914,24 @@ button.secondary, button.primary {
width: calc(100% - 33px) !important;
display: flex;
flex-direction: row;
align-items: stretch;
}

.vertical-line-wrapper {
width: 10px !important;
max-width: 10px !important;
min-width: 10px !important;
height: calc(100% - 30px);
/*height: calc(100% - 30px);*/
cursor: ew-resize;
display: flex;
justify-content: center;
margin: 15px -10px 0 -10px;

z-index: 999;
}

.slide-right-browser-panel > .vertical-line-wrapper {
position: absolute;
/*position: absolute;*/
}

.slide-right-browser-panel > .slide-right-browser-panel-container {
Expand Down Expand Up @@ -1834,8 +1838,8 @@ body.nevysha-light .nevysha-button:hover {

[id$="_gallery_clear_button"] {
position: absolute;
top: 3px;
right: 10px;
top: 7px;
right: 55px;
z-index: 30;
background-color: var(--block-background-fill);
}
Expand Down Expand Up @@ -1990,4 +1994,8 @@ button#interrogate {
.nevysha.generate-button.accent {
background: var(--ae-primary-color) !important;
color: var(--nevysha-color-from-luminance) !important;
}
}

body {
overflow-x: hidden;
}
76 changes: 38 additions & 38 deletions client/assets/index.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion cozy-nest-client/main/CozyLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ class CozyLoggerClass {
console.log('CozyNest:',...args);
}

warn(...args) {
if (this.enabled) {
console.warn('CozyNest:', ...args);
}
}

error(...args) {
console.error('CozyNest:',...args);
}
Expand All @@ -45,4 +51,4 @@ const isDev = import.meta.env.VITE_CONTEXT === 'DEV'
export const CozyLogger = CozyLoggerClass.init(isDev);
export const CozyLoggerPrompt = CozyLoggerClass.init(import.meta.env.PROMPT_LOGGING === 1);

window.CozyLogger = CozyLogger;
window.CozyLogger = CozyLogger;
16 changes: 11 additions & 5 deletions cozy-nest-client/main/cozy-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,16 @@ export const hasCozyNestNo = () => {
}

export function hideNativeUiExtraNetworkElement(prefix) {
const triggerButton = document.querySelector(`button#${DOM_IDS.get('extra_networks_btn')(prefix)}`)
triggerButton.style.display = 'none'
const tabs = document.querySelector(`div#${prefix}_extra_networks`)
tabs.style.display = 'none';
const extraNetworks = document.querySelector(`#${DOM_IDS.get('extra_networks')(prefix)} > .tab-nav`)

if (!extraNetworks) {
CozyLogger.warn("hideNativeUiExtraNetworkElement: extraNetworks not found")
return;
}

extraNetworks.style.display = 'none'
// const tabs = document.querySelector(`div#${prefix}_extra_networks`)
// tabs.style.display = 'none';
}

export function checkClientEnv() {
Expand All @@ -126,4 +132,4 @@ export function checkClientEnv() {
)
}
}
}
}
10 changes: 5 additions & 5 deletions cozy-nest-client/main/dom_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ const a1111 = {
clear_prompt(prefix) {
return `${prefix}_clear_prompt`
},
extra_networks_btn(prefix) {
return `${prefix}_extra_networks`
extra_networks(prefix) {
return `${prefix}_extra_tabs`
}
}

const sdNext = {
clear_prompt(prefix) {
return `${prefix}_clear_prompt_btn`
},
extra_networks_btn(prefix) {
return `${prefix}_extra_networks_btn`
extra_networks(prefix) {
return `${prefix}_extra_tabs`
}
}
// txt2img_clear_prompt_btn
Expand Down Expand Up @@ -56,4 +56,4 @@ export default {

return _DOM_IDS[id];
}
};
};
18 changes: 14 additions & 4 deletions cozy-nest-client/main/nevysha-cozy-nest.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const addDraggable = ({prefix}) => {

const settings = document.getElementById(`${prefix}_settings`);



//change min-width to min(420px, 100%)
settings.style.minWidth = `min(${SETTINGS_MIN_WIDTH}px, 100%)`

Expand All @@ -46,6 +48,9 @@ const addDraggable = ({prefix}) => {
settings.insertAdjacentElement('afterend', lineWrapper);

const container = settings.parentElement;
//flex for parent
container.style.display = "flex";
container.style.flexDirection = "row";
container.classList.add('nevysha', 'resizable-children-container');
const results = document.getElementById(`${prefix}_results`);

Expand Down Expand Up @@ -104,6 +109,8 @@ const addDraggable = ({prefix}) => {
document.addEventListener('mouseup', () => {
isDragging = false;
});

CozyLogger.debug("addDraggable: done");
}

const tweakButtonsIcons = () => {
Expand Down Expand Up @@ -392,7 +399,7 @@ async function loadVersionData() {

//set fill color of .nevysha-btn-menu-wrapper > button > svg to red
document.querySelector('#nevyui_update_info > svg').style.fill = "red";

//add version info to the bottom-right corner with a notice about an update
document.getElementsByClassName("versions")[0].innerHTML += '⠀•⠀Cozy Nest:⠀<span style="color: #f9e02d; text-decoration: underline;" title="Nevysha\'s Cozy Nest Update Available! Latest version: v' + remote_version_data.version + '.\nView update info in the top-right corner for more details.">v' + current_version_data.version + '</span>';
}
Expand Down Expand Up @@ -629,7 +636,10 @@ function buildRightSlidePanelFor(label, buttonLabel, rightPanBtnWrapper, tab, pr
const width = window.innerWidth;
cozyImgBrowserPanelWrapper.style.width = `${Math.round(width / 2)}px`;
}
cozyImgBrowserPanelWrapper.appendChild(lineWrapper)

// cozyImgBrowserPanelWrapper.appendChild(lineWrapper)
// add lineWrapper at the begining of the div
cozyImgBrowserPanelWrapper.insertBefore(lineWrapper, cozyImgBrowserPanelWrapper.firstChild);

//add a close button inside the line
const closeCozyImgBrowser = document.createElement('button');
Expand Down Expand Up @@ -1046,10 +1056,10 @@ const onLoad = (done, error) => {
onUiTabChange(() => {
CozyLogger.debug(`onUiTabChange newTab:${get_uiCurrentTabContent().id}, lastTab:${lastTab}`);

if (lastTab === "tab_txt2img") {
if (lastTab === "tab_txt2img" && rightPanelsHandler['cozy-txt2img-extra-network']) {
rightPanelsHandler['cozy-txt2img-extra-network'].close();
}
else if (lastTab === "tab_img2img") {
else if (lastTab === "tab_img2img" && rightPanelsHandler['cozy-img2img-extra-network']) {
rightPanelsHandler['cozy-img2img-extra-network'].close();
}

Expand Down
18 changes: 13 additions & 5 deletions cozy-nest-client/static/cozy-nest-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ button.secondary, button.primary {

.nevysha.generate-button, .nevysha.skip-interrupt-wrapper {
/*margin: 0 0 10px 0;*/
width: calc(100% - 10px);
}

.nevysha.skip-interrupt-wrapper {
Expand Down Expand Up @@ -913,21 +914,24 @@ button.secondary, button.primary {
width: calc(100% - 33px) !important;
display: flex;
flex-direction: row;
align-items: stretch;
}

.vertical-line-wrapper {
width: 10px !important;
max-width: 10px !important;
min-width: 10px !important;
height: calc(100% - 30px);
/*height: calc(100% - 30px);*/
cursor: ew-resize;
display: flex;
justify-content: center;
margin: 15px -10px 0 -10px;

z-index: 999;
}

.slide-right-browser-panel > .vertical-line-wrapper {
position: absolute;
/*position: absolute;*/
}

.slide-right-browser-panel > .slide-right-browser-panel-container {
Expand Down Expand Up @@ -1834,8 +1838,8 @@ body.nevysha-light .nevysha-button:hover {

[id$="_gallery_clear_button"] {
position: absolute;
top: 3px;
right: 10px;
top: 7px;
right: 55px;
z-index: 30;
background-color: var(--block-background-fill);
}
Expand Down Expand Up @@ -1990,4 +1994,8 @@ button#interrogate {
.nevysha.generate-button.accent {
background: var(--ae-primary-color) !important;
color: var(--nevysha-color-from-luminance) !important;
}
}

body {
overflow-x: hidden;
}
2 changes: 1 addition & 1 deletion version_data.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.4.3"
"version": "2.4.4"
}

0 comments on commit e2612e5

Please sign in to comment.