Ports the button, buttongroup, and popup as ComfyUI is removing the ability to call these soon. Fixes #600.
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
|
||||
$borderRadius: 0.33rem;
|
||||
|
||||
:not(#fakeid) .rgthree-button {
|
||||
--padding-top: 7px;
|
||||
--padding-bottom: 9px;
|
||||
@@ -16,7 +18,7 @@
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
border-radius: 0.25rem;
|
||||
border-radius: $borderRadius;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
color: white;
|
||||
font-family: system-ui, sans-serif;
|
||||
@@ -39,7 +41,7 @@
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
border-radius: 0.25rem;
|
||||
border-radius: $borderRadius;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
@@ -103,4 +105,52 @@
|
||||
&[disabled]::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
:not(#fakeid) .rgthree-comfybar-top-button-group {
|
||||
font-size: 0;
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
|
||||
.rgthree-comfybar-top-button {
|
||||
margin: 0;
|
||||
flex: 1 1;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
border-radius: 0;
|
||||
background: var(--p-button-secondary-background);
|
||||
color: var(--p-button-secondary-color);
|
||||
|
||||
&.-primary {
|
||||
background: var(--p-button-primary-background);
|
||||
color: var(--p-button-primary-color);
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
||||
svg {
|
||||
fill: currentColor;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.rgthree-comfybar-top-button:first-of-type,
|
||||
.rgthree-comfybar-top-button:first-of-type::before,
|
||||
.rgthree-comfybar-top-button:first-of-type::after {
|
||||
border-top-left-radius: 0.33rem;
|
||||
border-bottom-left-radius: 0.33rem;
|
||||
|
||||
}
|
||||
.rgthree-comfybar-top-button:last-of-type,
|
||||
.rgthree-comfybar-top-button:last-of-type::before,
|
||||
.rgthree-comfybar-top-button:last-of-type::after {
|
||||
border-top-right-radius: 0.33rem;
|
||||
border-bottom-right-radius: 0.33rem;
|
||||
}
|
||||
}
|
||||
@@ -50,59 +50,73 @@
|
||||
color: var(--content-fg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
* {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
menu {
|
||||
|
||||
> li:not(#fakeid) {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
> li:not(#fakeid) {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
> button {
|
||||
cursor: pointer;
|
||||
padding: 8px 12px 8px 8px;
|
||||
width: 100%;
|
||||
text-align: start;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
|
||||
> button {
|
||||
cursor: pointer;
|
||||
padding: 8px 12px 8px 8px;
|
||||
width: 100%;
|
||||
text-align: start;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--comfy-input-bg);
|
||||
}
|
||||
|
||||
svg {
|
||||
height: 16px;
|
||||
width: auto;
|
||||
margin-inline-end: 0.6em;
|
||||
|
||||
&.github-star {
|
||||
fill: rgb(227, 179, 65);
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--comfy-input-bg);
|
||||
}
|
||||
|
||||
&.rgthree-message {
|
||||
// ComfyUI's code has strange behavior that that always puts the popupat to if its less than
|
||||
// 30px... we'll force our message to be at least 32px tall so it won't do that unless it's
|
||||
// actually on the bottom.
|
||||
min-height: 32px;
|
||||
> span {
|
||||
padding: 8px 12px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
font-size: 12px;
|
||||
svg {
|
||||
height: 16px;
|
||||
width: auto;
|
||||
margin-inline-end: 0.6em;
|
||||
|
||||
&.github-star {
|
||||
fill: rgb(227, 179, 65);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.rgthree-message {
|
||||
// ComfyUI's code has strange behavior that that always puts the popupat to if its less than
|
||||
// 30px... we'll force our message to be at least 32px tall so it won't do that unless it's
|
||||
// actually on the bottom.
|
||||
min-height: 32px;
|
||||
> span {
|
||||
padding: 8px 12px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.-modal::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
inset: 0;
|
||||
background: #0001;
|
||||
}
|
||||
}
|
||||
|
||||
body.rgthree-modal-menu-open > *:not(.rgthree-menu):not(.rgthree-top-messages-container) {
|
||||
filter: blur(2px);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user