mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
Formatting/cleanup (#2594)
This commit is contained in:
7
.github/workflows/eslint.yaml
vendored
7
.github/workflows/eslint.yaml
vendored
@@ -2,10 +2,7 @@ name: ESLint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- 'dev*'
|
||||
branches: [ main, master, dev* ]
|
||||
|
||||
jobs:
|
||||
eslint:
|
||||
@@ -15,6 +12,6 @@ jobs:
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
|
||||
2
.github/workflows/format.yaml
vendored
2
.github/workflows/format.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
node-version: 'lts/*'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
21
.github/workflows/i18n-custom-nodes.yaml
vendored
21
.github/workflows/i18n-custom-nodes.yaml
vendored
@@ -1,4 +1,5 @@
|
||||
name: Update Locales for given custom node repository
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -23,19 +24,19 @@ jobs:
|
||||
- name: Checkout ComfyUI
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'comfyanonymous/ComfyUI'
|
||||
path: 'ComfyUI'
|
||||
repository: comfyanonymous/ComfyUI
|
||||
path: ComfyUI
|
||||
ref: master
|
||||
- name: Checkout ComfyUI_frontend
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'Comfy-Org/ComfyUI_frontend'
|
||||
path: 'ComfyUI_frontend'
|
||||
repository: Comfy-Org/ComfyUI_frontend
|
||||
path: ComfyUI_frontend
|
||||
- name: Checkout ComfyUI_devtools
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'Comfy-Org/ComfyUI_devtools'
|
||||
path: 'ComfyUI/custom_nodes/ComfyUI_devtools'
|
||||
repository: Comfy-Org/ComfyUI_devtools
|
||||
path: ComfyUI/custom_nodes/ComfyUI_devtools
|
||||
- name: Checkout custom node repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -43,7 +44,7 @@ jobs:
|
||||
path: 'ComfyUI/custom_nodes/${{ inputs.repository }}'
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
node-version: 'lts/*'
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
@@ -53,14 +54,12 @@ jobs:
|
||||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install -r requirements.txt
|
||||
pip install wait-for-it
|
||||
shell: bash
|
||||
working-directory: ComfyUI
|
||||
- name: Install custom node requirements
|
||||
run: |
|
||||
if [ -f "requirements.txt" ]; then
|
||||
pip install -r requirements.txt
|
||||
fi
|
||||
shell: bash
|
||||
working-directory: ComfyUI/custom_nodes/${{ inputs.repository }}
|
||||
- name: Build & Install ComfyUI_frontend
|
||||
run: |
|
||||
@@ -68,14 +67,12 @@ jobs:
|
||||
npm run build
|
||||
rm -rf ../ComfyUI/web/*
|
||||
mv dist/* ../ComfyUI/web/
|
||||
shell: bash
|
||||
working-directory: ComfyUI_frontend
|
||||
- name: Start ComfyUI server
|
||||
run: |
|
||||
python main.py --cpu --multi-user &
|
||||
wait-for-it --service 127.0.0.1:8188 -t 600
|
||||
working-directory: ComfyUI
|
||||
shell: bash
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install chromium --with-deps
|
||||
working-directory: ComfyUI_frontend
|
||||
@@ -153,7 +150,7 @@ jobs:
|
||||
echo "Pushing changes to ${{ inputs.fork_owner }}/${{ inputs.repository }}"
|
||||
git push -f git@github.com:${{ inputs.fork_owner }}/${{ inputs.repository }}.git update-locales
|
||||
|
||||
- name: Create PR
|
||||
- name: Create PR
|
||||
working-directory: ComfyUI/custom_nodes/${{ inputs.repository }}
|
||||
run: |
|
||||
# Create PR using gh cli
|
||||
|
||||
1
.github/workflows/i18n.yaml
vendored
1
.github/workflows/i18n.yaml
vendored
@@ -1,4 +1,5 @@
|
||||
name: Update Locales
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main, master, dev* ]
|
||||
|
||||
18
.github/workflows/release.yaml
vendored
18
.github/workflows/release.yaml
vendored
@@ -2,12 +2,10 @@ name: Create Release Draft
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
types: [ closed ]
|
||||
branches: [ main, master ]
|
||||
paths:
|
||||
- "package.json"
|
||||
- 'package.json'
|
||||
|
||||
jobs:
|
||||
draft_release:
|
||||
@@ -20,7 +18,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
node-version: 'lts/*'
|
||||
- name: Get current version
|
||||
id: current_version
|
||||
run: echo ::set-output name=version::$(node -p "require('./package.json').version")
|
||||
@@ -42,7 +40,7 @@ jobs:
|
||||
tag_name: v${{ steps.current_version.outputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
make_latest: "true"
|
||||
make_latest: true
|
||||
generate_release_notes: true
|
||||
publish_types:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -53,12 +51,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
node-version: 'lts/*'
|
||||
registry-url: https://registry.npmjs.org
|
||||
- run: npm ci
|
||||
- run: npm run build:types
|
||||
- name: Publish package
|
||||
run: npm publish --access public
|
||||
working-directory: ./dist
|
||||
working-directory: dist
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
1
.github/workflows/test-browser-exp.yaml
vendored
1
.github/workflows/test-browser-exp.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
# Setting test expectation screenshots for Playwright
|
||||
|
||||
name: Update Playwright Expectations
|
||||
|
||||
on:
|
||||
|
||||
9
.github/workflows/test-ui.yaml
vendored
9
.github/workflows/test-ui.yaml
vendored
@@ -2,14 +2,9 @@ name: Tests CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- 'dev*'
|
||||
branches: [ main, master, dev* ]
|
||||
|
||||
jobs:
|
||||
jest-tests:
|
||||
|
||||
12
.github/workflows/vitest.yaml
vendored
12
.github/workflows/vitest.yaml
vendored
@@ -2,15 +2,9 @@ name: Vitest Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- 'dev*'
|
||||
branches: [ main, master, dev* ]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- 'dev*'
|
||||
branches: [ main, master, dev* ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -22,7 +16,7 @@ jobs:
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
node-version: 'lts/*'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -278,8 +278,8 @@ export class ComfyPage {
|
||||
await this.page.addStyleTag({
|
||||
content: `
|
||||
* {
|
||||
font-family: 'Roboto Mono', 'Noto Color Emoji';
|
||||
}`
|
||||
font-family: 'Roboto Mono', 'Noto Color Emoji';
|
||||
}`
|
||||
})
|
||||
await this.page.waitForFunction(() => document.fonts.ready)
|
||||
await this.page.waitForFunction(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
A refresh button that disables and shows a progress spinner whilst active.
|
||||
|
||||
|
||||
Usage:
|
||||
```vue
|
||||
<RefreshButton
|
||||
|
||||
@@ -280,7 +280,7 @@ watch(activeCategory, (_, oldValue) => {
|
||||
|
||||
<style>
|
||||
.settings-tab-panels {
|
||||
padding-top: 0px !important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ const truncateDefaultValue = (value: any, charLimit: number = 32): string => {
|
||||
}
|
||||
|
||||
._sb_col {
|
||||
border: 0px solid #000;
|
||||
border: 0 solid #000;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
@@ -254,7 +254,7 @@ useEventListener(document, 'litegraph:canvas', canvasEventHandler)
|
||||
}
|
||||
@media all and (max-width: 768px) {
|
||||
.invisible-dialog-root {
|
||||
margin-left: 0px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ const props = defineProps<{
|
||||
color: var(--p-primary-contrast-color);
|
||||
font-weight: bold;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0rem 0.125rem;
|
||||
padding: 0 0.125rem;
|
||||
margin: -0.125rem 0.125rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
v-if="['in_progress', 'paused', 'completed'].includes(download.status)"
|
||||
>
|
||||
<!-- Temporary fix for issue when % only comes into view only if the progress bar is large enough
|
||||
https://comfy-organization.slack.com/archives/C07H3GLKDPF/p1731551013385499
|
||||
https://comfy-organization.slack.com/archives/C07H3GLKDPF/p1731551013385499
|
||||
-->
|
||||
<ProgressBar
|
||||
class="flex-1"
|
||||
|
||||
@@ -133,7 +133,7 @@ onUnmounted(() => {
|
||||
left: 0;
|
||||
height: 1.5rem;
|
||||
vertical-align: top;
|
||||
width: 0px;
|
||||
width: 0;
|
||||
}
|
||||
.model-lib-model-icon {
|
||||
background-size: cover;
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
.comfy-group-manage {
|
||||
background: var(--bg-color);
|
||||
color: var(--fg-color);
|
||||
padding: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-color: black;
|
||||
margin: 20vh auto;
|
||||
max-height: 60vh;
|
||||
background: var(--bg-color);
|
||||
color: var(--fg-color);
|
||||
padding: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-color: black;
|
||||
margin: 20vh auto;
|
||||
max-height: 60vh;
|
||||
}
|
||||
.comfy-group-manage-outer {
|
||||
max-height: 60vh;
|
||||
min-width: 500px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 60vh;
|
||||
min-width: 500px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.comfy-group-manage-outer > header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
justify-content: space-between;
|
||||
background: var(--comfy-menu-bg);
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
justify-content: space-between;
|
||||
background: var(--comfy-menu-bg);
|
||||
padding: 15px 20px;
|
||||
}
|
||||
.comfy-group-manage-outer > header select {
|
||||
background: var(--comfy-input-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--input-text);
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
background: var(--comfy-input-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--input-text);
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.comfy-group-manage h2 {
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
.comfy-group-manage main {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
.comfy-group-manage .drag-handle {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
.comfy-group-manage-list {
|
||||
border-right: 1px solid var(--comfy-menu-bg);
|
||||
border-right: 1px solid var(--comfy-menu-bg);
|
||||
}
|
||||
.comfy-group-manage-list ul {
|
||||
margin: 40px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
margin: 40px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.comfy-group-manage-list-items {
|
||||
max-height: calc(100% - 40px);
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
max-height: calc(100% - 40px);
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.comfy-group-manage-list li {
|
||||
display: flex;
|
||||
padding: 10px 20px 10px 10px;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
display: flex;
|
||||
padding: 10px 20px 10px 10px;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.comfy-group-manage-list div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.comfy-group-manage-list li:not(.selected):hover div {
|
||||
text-decoration: underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.comfy-group-manage-list li.selected {
|
||||
background: var(--border-color);
|
||||
background: var(--border-color);
|
||||
}
|
||||
.comfy-group-manage-list li span {
|
||||
opacity: 0.7;
|
||||
font-size: smaller;
|
||||
opacity: 0.7;
|
||||
font-size: smaller;
|
||||
}
|
||||
.comfy-group-manage-node {
|
||||
flex: auto;
|
||||
background: var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: auto;
|
||||
background: var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.comfy-group-manage-node > div {
|
||||
overflow: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.comfy-group-manage-node header {
|
||||
display: flex;
|
||||
background: var(--bg-color);
|
||||
height: 40px;
|
||||
display: flex;
|
||||
background: var(--bg-color);
|
||||
height: 40px;
|
||||
}
|
||||
.comfy-group-manage-node header a {
|
||||
text-align: center;
|
||||
flex: auto;
|
||||
border-right: 1px solid var(--comfy-menu-bg);
|
||||
border-bottom: 1px solid var(--comfy-menu-bg);
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
flex: auto;
|
||||
border-right: 1px solid var(--comfy-menu-bg);
|
||||
border-bottom: 1px solid var(--comfy-menu-bg);
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
}
|
||||
.comfy-group-manage-node header a:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.comfy-group-manage-node header a:not(.active):hover {
|
||||
text-decoration: underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.comfy-group-manage-node header a.active {
|
||||
background: var(--border-color);
|
||||
border-bottom: none;
|
||||
background: var(--border-color);
|
||||
border-bottom: none;
|
||||
}
|
||||
.comfy-group-manage-node-page {
|
||||
display: none;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.comfy-group-manage-node-page.active {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
.comfy-group-manage-node-page div {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.comfy-group-manage-node-page input {
|
||||
border: none;
|
||||
color: var(--input-text);
|
||||
background: var(--comfy-input-bg);
|
||||
padding: 5px 10px;
|
||||
border: none;
|
||||
color: var(--input-text);
|
||||
background: var(--comfy-input-bg);
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.comfy-group-manage-node-page input[type="text"] {
|
||||
flex: auto;
|
||||
flex: auto;
|
||||
}
|
||||
.comfy-group-manage-node-page label {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
.comfy-group-manage footer {
|
||||
border-top: 1px solid var(--comfy-menu-bg);
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
border-top: 1px solid var(--comfy-menu-bg);
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.comfy-group-manage footer button {
|
||||
font-size: 14px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 0;
|
||||
font-size: 14px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.comfy-group-manage footer button:first-child {
|
||||
margin-right: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@@ -198,8 +198,8 @@ class Load3d {
|
||||
this.previewContainer = document.createElement('div')
|
||||
this.previewContainer.style.cssText = `
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
display: block;
|
||||
`
|
||||
|
||||
@@ -475,7 +475,7 @@ var styles = `
|
||||
#maskEditor_sidePanelColorSelectSettings {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
.maskEditor_sidePanel_paintBucket_Container {
|
||||
width: 180px;
|
||||
display: flex;
|
||||
@@ -490,7 +490,7 @@ var styles = `
|
||||
gap: 5px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
|
||||
#maskEditor_sidePanelVisibilityToggle {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
bottom: var(--bottom);
|
||||
z-index: 2000;
|
||||
max-height: calc(100vh - var(--limit) - 10px);
|
||||
box-shadow: 3px 3px 5px 0px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 3px 3px 5px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.comfyui-popup:not(.open) {
|
||||
@@ -295,4 +295,3 @@
|
||||
.comfyui-body-bottom .lt-sm.comfyui-menu > .comfyui-menu-button{
|
||||
bottom: 41px;
|
||||
}
|
||||
|
||||
|
||||
2
src/types/litegraph-core-augmentation.d.ts
vendored
2
src/types/litegraph-core-augmentation.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
Extended types for litegraph, to be merged upstream once it has stabilized.
|
||||
Augmenting the LiteGraph type really didn't want to work, however doing it like this seems to allow it.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @ts-strict-ignore
|
||||
/*
|
||||
Script to generate test API json from the ComfyUI_examples repo.
|
||||
/*
|
||||
Script to generate test API json from the ComfyUI_examples repo.
|
||||
Requires the repo to be cloned to the tests-ui directory or specified via the EXAMPLE_REPO_PATH env var.
|
||||
*/
|
||||
import chalk from 'chalk'
|
||||
|
||||
Reference in New Issue
Block a user