comfyui-frontend-package 1.10.16__py3-none-any.whl → 1.11.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- comfyui_frontend_package/static/assets/BaseViewTemplate--LOH-rtG.js +51 -0
- comfyui_frontend_package/static/assets/BaseViewTemplate--LOH-rtG.js.map +1 -0
- comfyui_frontend_package/static/assets/CREDIT.txt +1 -0
- comfyui_frontend_package/static/assets/DesktopStartView-DhFg_-WV.js +19 -0
- comfyui_frontend_package/static/assets/DesktopStartView-DhFg_-WV.js.map +1 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-B2ahA--K.js +59 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-B2ahA--K.js.map +1 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-CoZUcBzh.css +20 -0
- comfyui_frontend_package/static/assets/DownloadGitView-C11P67fb.js +58 -0
- comfyui_frontend_package/static/assets/DownloadGitView-C11P67fb.js.map +1 -0
- comfyui_frontend_package/static/assets/ExtensionPanel-CXFlxUSQ.js +182 -0
- comfyui_frontend_package/static/assets/ExtensionPanel-CXFlxUSQ.js.map +1 -0
- comfyui_frontend_package/static/assets/GraphView-BK1pQvbk.js +5362 -0
- comfyui_frontend_package/static/assets/GraphView-BK1pQvbk.js.map +1 -0
- comfyui_frontend_package/static/assets/GraphView-D3oOJ76s.css +404 -0
- comfyui_frontend_package/static/assets/InstallView-1bbt62og.js +971 -0
- comfyui_frontend_package/static/assets/InstallView-1bbt62og.js.map +1 -0
- comfyui_frontend_package/static/assets/InstallView-B5n3tAa3.css +81 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-BxEJxxOC.js +292 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-BxEJxxOC.js.map +1 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-CwPLIgAf.css +8 -0
- comfyui_frontend_package/static/assets/MaintenanceView-Cu_e206A.css +87 -0
- comfyui_frontend_package/static/assets/MaintenanceView-D4JI2WFp.js +770 -0
- comfyui_frontend_package/static/assets/MaintenanceView-D4JI2WFp.js.map +1 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-Cq3hPfap.css +7 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-DK79zT46.js +74 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-DK79zT46.js.map +1 -0
- comfyui_frontend_package/static/assets/MetricsConsentView-BiHGP4XO.js +86 -0
- comfyui_frontend_package/static/assets/MetricsConsentView-BiHGP4XO.js.map +1 -0
- comfyui_frontend_package/static/assets/NotSupportedView-BiyVuLfX.css +19 -0
- comfyui_frontend_package/static/assets/NotSupportedView-CaASlgg3.js +86 -0
- comfyui_frontend_package/static/assets/NotSupportedView-CaASlgg3.js.map +1 -0
- comfyui_frontend_package/static/assets/ServerConfigPanel-DvcXNRqp.js +156 -0
- comfyui_frontend_package/static/assets/ServerConfigPanel-DvcXNRqp.js.map +1 -0
- comfyui_frontend_package/static/assets/ServerStartView-BLlSvhJ0.css +5 -0
- comfyui_frontend_package/static/assets/ServerStartView-Cnfs01qI.js +100 -0
- comfyui_frontend_package/static/assets/ServerStartView-Cnfs01qI.js.map +1 -0
- comfyui_frontend_package/static/assets/TerminalOutputDrawer-BIo0jnWo.js +676 -0
- comfyui_frontend_package/static/assets/TerminalOutputDrawer-BIo0jnWo.js.map +1 -0
- comfyui_frontend_package/static/assets/UserSelectView-BTlXdLHz.js +101 -0
- comfyui_frontend_package/static/assets/UserSelectView-BTlXdLHz.js.map +1 -0
- comfyui_frontend_package/static/assets/WelcomeView-CmbTXsg3.js +39 -0
- comfyui_frontend_package/static/assets/WelcomeView-CmbTXsg3.js.map +1 -0
- comfyui_frontend_package/static/assets/WelcomeView-aCH40CSK.css +36 -0
- comfyui_frontend_package/static/assets/images/Git-Logo-White.svg +1 -0
- comfyui_frontend_package/static/assets/images/apple-mps-logo.png +0 -0
- comfyui_frontend_package/static/assets/images/manual-configuration.svg +5 -0
- comfyui_frontend_package/static/assets/images/nvidia-logo.svg +6 -0
- comfyui_frontend_package/static/assets/images/sad_girl.png +0 -0
- comfyui_frontend_package/static/assets/index-AvZodD-Y.js +618 -0
- comfyui_frontend_package/static/assets/index-AvZodD-Y.js.map +1 -0
- comfyui_frontend_package/static/assets/index-B3IfdwoO.css +166 -0
- comfyui_frontend_package/static/assets/index-BbmkkEvb.js +27 -0
- comfyui_frontend_package/static/assets/index-BbmkkEvb.js.map +1 -0
- comfyui_frontend_package/static/assets/index-Bdy4Ebj5.js +539 -0
- comfyui_frontend_package/static/assets/index-Bdy4Ebj5.js.map +1 -0
- comfyui_frontend_package/static/assets/index-BsBSowr8.js +55812 -0
- comfyui_frontend_package/static/assets/index-BsBSowr8.js.map +1 -0
- comfyui_frontend_package/static/assets/index-C4MmAha5.js +225173 -0
- comfyui_frontend_package/static/assets/index-C4MmAha5.js.map +1 -0
- comfyui_frontend_package/static/assets/index-CDFcdZLR.js +4993 -0
- comfyui_frontend_package/static/assets/index-CDFcdZLR.js.map +1 -0
- comfyui_frontend_package/static/assets/index-CfhNTyds.js +8790 -0
- comfyui_frontend_package/static/assets/index-CfhNTyds.js.map +1 -0
- comfyui_frontend_package/static/assets/index-DIKvkpu7.js +24875 -0
- comfyui_frontend_package/static/assets/index-DIKvkpu7.js.map +1 -0
- comfyui_frontend_package/static/assets/index-memhI4xy.js +392 -0
- comfyui_frontend_package/static/assets/index-memhI4xy.js.map +1 -0
- comfyui_frontend_package/static/assets/index-vE6pZhFv.css +4989 -0
- comfyui_frontend_package/static/assets/keybindingService-CjdvrYgE.js +250 -0
- comfyui_frontend_package/static/assets/keybindingService-CjdvrYgE.js.map +1 -0
- comfyui_frontend_package/static/assets/primeicons-C6QP2o4f.woff2 +0 -0
- comfyui_frontend_package/static/assets/primeicons-DMOk5skT.eot +0 -0
- comfyui_frontend_package/static/assets/primeicons-Dr5RGzOO.svg +345 -0
- comfyui_frontend_package/static/assets/primeicons-MpK4pl85.ttf +0 -0
- comfyui_frontend_package/static/assets/primeicons-WjwUDZjB.woff +0 -0
- comfyui_frontend_package/static/assets/serverConfigStore-YaL-KzUL.js +90 -0
- comfyui_frontend_package/static/assets/serverConfigStore-YaL-KzUL.js.map +1 -0
- comfyui_frontend_package/static/assets/sorted-custom-node-map.json +2602 -0
- comfyui_frontend_package/static/assets/uvMirrors-B-HKMf6X.js +16 -0
- comfyui_frontend_package/static/assets/uvMirrors-B-HKMf6X.js.map +1 -0
- comfyui_frontend_package/static/cursor/colorSelect.png +0 -0
- comfyui_frontend_package/static/cursor/paintBucket.png +0 -0
- comfyui_frontend_package/static/extensions/core/clipspace.js +2 -0
- comfyui_frontend_package/static/extensions/core/groupNode.js +3 -0
- comfyui_frontend_package/static/extensions/core/groupNodeManage.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/AnimationManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/CameraManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ControlsManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/EventManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/LightingManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/LoaderManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ModelManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/NodeStorage.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/PreviewManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/SceneManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ViewHelperManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/maskEditorOld.js +2 -0
- comfyui_frontend_package/static/extensions/core/widgetInputs.js +6 -0
- comfyui_frontend_package/static/fonts/materialdesignicons-webfont.woff2 +0 -0
- comfyui_frontend_package/static/index.html +15 -0
- comfyui_frontend_package/static/materialdesignicons.min.css +3 -0
- comfyui_frontend_package/static/scripts/api.js +3 -0
- comfyui_frontend_package/static/scripts/app.js +4 -0
- comfyui_frontend_package/static/scripts/changeTracker.js +2 -0
- comfyui_frontend_package/static/scripts/defaultGraph.js +4 -0
- comfyui_frontend_package/static/scripts/domWidget.js +2 -0
- comfyui_frontend_package/static/scripts/metadata/ebml.js +2 -0
- comfyui_frontend_package/static/scripts/metadata/flac.js +3 -0
- comfyui_frontend_package/static/scripts/metadata/png.js +3 -0
- comfyui_frontend_package/static/scripts/pnginfo.js +6 -0
- comfyui_frontend_package/static/scripts/ui/components/asyncDialog.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/button.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/buttonGroup.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/popup.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/splitButton.js +2 -0
- comfyui_frontend_package/static/scripts/ui/dialog.js +2 -0
- comfyui_frontend_package/static/scripts/ui/draggableList.js +2 -0
- comfyui_frontend_package/static/scripts/ui/imagePreview.js +3 -0
- comfyui_frontend_package/static/scripts/ui/menu/index.js +2 -0
- comfyui_frontend_package/static/scripts/ui/settings.js +2 -0
- comfyui_frontend_package/static/scripts/ui/toggleSwitch.js +2 -0
- comfyui_frontend_package/static/scripts/ui/utils.js +3 -0
- comfyui_frontend_package/static/scripts/ui.js +4 -0
- comfyui_frontend_package/static/scripts/utils.js +9 -0
- comfyui_frontend_package/static/scripts/widgets.js +6 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship-1.webp +0 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship-2.webp +0 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship.json +673 -0
- comfyui_frontend_package/static/templates/area_composition-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition.json +966 -0
- comfyui_frontend_package/static/templates/area_composition_reversed-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition_reversed.json +967 -0
- comfyui_frontend_package/static/templates/area_composition_square_area_for_subject-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition_square_area_for_subject.json +620 -0
- comfyui_frontend_package/static/templates/controlnet_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/controlnet_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/controlnet_example.json +385 -0
- comfyui_frontend_package/static/templates/default-1.webp +0 -0
- comfyui_frontend_package/static/templates/default.json +373 -0
- comfyui_frontend_package/static/templates/depth_controlnet-1.webp +0 -0
- comfyui_frontend_package/static/templates/depth_controlnet-2.webp +0 -0
- comfyui_frontend_package/static/templates/depth_controlnet.json +378 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter-1.webp +0 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter-2.webp +0 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter.json +371 -0
- comfyui_frontend_package/static/templates/embedding_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/embedding_example.json +267 -0
- comfyui_frontend_package/static/templates/esrgan_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/esrgan_example.json +329 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example.json +474 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example.json +454 -0
- comfyui_frontend_package/static/templates/flux_dev_checkpoint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_dev_checkpoint_example.json +332 -0
- comfyui_frontend_package/static/templates/flux_dev_example.json +771 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example.json +458 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example.json +491 -0
- comfyui_frontend_package/static/templates/flux_redux_model_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_redux_model_example.json +951 -0
- comfyui_frontend_package/static/templates/flux_schnell-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_schnell.json +302 -0
- comfyui_frontend_package/static/templates/gligen_textbox_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/gligen_textbox_example.json +376 -0
- comfyui_frontend_package/static/templates/hiresfix_esrgan_workflow-1.webp +0 -0
- comfyui_frontend_package/static/templates/hiresfix_esrgan_workflow.json +607 -0
- comfyui_frontend_package/static/templates/hiresfix_latent_workflow-1.webp +0 -0
- comfyui_frontend_package/static/templates/hiresfix_latent_workflow.json +442 -0
- comfyui_frontend_package/static/templates/hunyuan_video_text_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/hunyuan_video_text_to_video.json +553 -0
- comfyui_frontend_package/static/templates/image2image-1.webp +0 -0
- comfyui_frontend_package/static/templates/image2image.json +447 -0
- comfyui_frontend_package/static/templates/image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/image_to_video.json +314 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting-1.webp +0 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting-2.webp +0 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting.json +360 -0
- comfyui_frontend_package/static/templates/inpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/inpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/inpaint_example.json +323 -0
- comfyui_frontend_package/static/templates/latent_upscale_different_prompt_model-1.webp +0 -0
- comfyui_frontend_package/static/templates/latent_upscale_different_prompt_model.json +528 -0
- comfyui_frontend_package/static/templates/lora-1.webp +0 -0
- comfyui_frontend_package/static/templates/lora.json +311 -0
- comfyui_frontend_package/static/templates/lora_multiple-1.webp +0 -0
- comfyui_frontend_package/static/templates/lora_multiple.json +357 -0
- comfyui_frontend_package/static/templates/ltxv_image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/ltxv_image_to_video.json +482 -0
- comfyui_frontend_package/static/templates/ltxv_text_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/ltxv_text_to_video.json +419 -0
- comfyui_frontend_package/static/templates/mixing_controlnets-1.webp +0 -0
- comfyui_frontend_package/static/templates/mixing_controlnets-2.webp +0 -0
- comfyui_frontend_package/static/templates/mixing_controlnets.json +492 -0
- comfyui_frontend_package/static/templates/mochi_text_to_video_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/mochi_text_to_video_example.json +308 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur.json +582 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example.json +470 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth.json +713 -0
- comfyui_frontend_package/static/templates/sd3.5_simple_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_simple_example.json +278 -0
- comfyui_frontend_package/static/templates/sdxl_refiner_prompt_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_refiner_prompt_example.json +728 -0
- comfyui_frontend_package/static/templates/sdxl_revision_text_prompts-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_revision_text_prompts.json +490 -0
- comfyui_frontend_package/static/templates/sdxl_revision_zero_positive-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_revision_zero_positive.json +494 -0
- comfyui_frontend_package/static/templates/sdxl_simple_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_simple_example.json +896 -0
- comfyui_frontend_package/static/templates/sdxlturbo_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxlturbo_example.json +372 -0
- comfyui_frontend_package/static/templates/stable_audio_example-1.flac +0 -0
- comfyui_frontend_package/static/templates/stable_audio_example.json +302 -0
- comfyui_frontend_package/static/templates/stable_zero123_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/stable_zero123_example.json +273 -0
- comfyui_frontend_package/static/templates/txt_to_image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/txt_to_image_to_video.json +535 -0
- comfyui_frontend_package/static/user.css +1 -0
- {comfyui_frontend_package-1.10.16.dist-info → comfyui_frontend_package-1.11.6.dist-info}/METADATA +1 -1
- comfyui_frontend_package-1.11.6.dist-info/RECORD +235 -0
- comfyui_frontend_package-1.11.6.dist-info/top_level.txt +1 -0
- comfyui_frontend_package-1.10.16.dist-info/RECORD +0 -5
- comfyui_frontend_package-1.10.16.dist-info/top_level.txt +0 -1
- {comfyui_frontend → comfyui_frontend_package}/__init__.py +0 -0
- {comfyui_frontend_package-1.10.16.dist-info → comfyui_frontend_package-1.11.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,770 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
3
|
+
import { d as defineComponent, bF as mergeModels, bz as useModel, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, Z as normalizeClass, i as withDirectives, v as vShow, k as createVNode, j as unref, bN as script, l as script$1, c as computed, bO as PrimeIcons, bp as t, ah as script$2, bi as electronAPI, ad as defineStore, T as ref, bP as useTimeout, N as watch, f as createElementBlock, B as createCommentVNode, ak as createTextVNode, E as toDisplayString, aD as mergeProps, bQ as script$3, _ as _export_sfc, r as resolveDirective, bR as script$4, b3 as useToast, bS as useConfirm, F as Fragment, bu as script$5, D as renderList, bT as script$6, p as onMounted, bU as onUnmounted, a2 as script$7, as as isRef } from "./index-C4MmAha5.js";
|
4
|
+
import { s as script$8 } from "./index-AvZodD-Y.js";
|
5
|
+
import "./index-DIKvkpu7.js";
|
6
|
+
import { _ as _sfc_main$7 } from "./TerminalOutputDrawer-BIo0jnWo.js";
|
7
|
+
import { _ as _sfc_main$8 } from "./BaseViewTemplate--LOH-rtG.js";
|
8
|
+
import "./index-CDFcdZLR.js";
|
9
|
+
import "./index-BbmkkEvb.js";
|
10
|
+
import "./index-CfhNTyds.js";
|
11
|
+
import "./index-memhI4xy.js";
|
12
|
+
import "./index-Bdy4Ebj5.js";
|
13
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
14
|
+
__name: "RefreshButton",
|
15
|
+
props: /* @__PURE__ */ mergeModels({
|
16
|
+
outlined: { type: Boolean, default: true },
|
17
|
+
disabled: { type: Boolean },
|
18
|
+
severity: { default: "secondary" }
|
19
|
+
}, {
|
20
|
+
"modelValue": { type: Boolean, ...{ required: true } },
|
21
|
+
"modelModifiers": {}
|
22
|
+
}),
|
23
|
+
emits: /* @__PURE__ */ mergeModels(["refresh"], ["update:modelValue"]),
|
24
|
+
setup(__props) {
|
25
|
+
const props = __props;
|
26
|
+
const active = useModel(__props, "modelValue");
|
27
|
+
return (_ctx, _cache) => {
|
28
|
+
return openBlock(), createBlock(unref(script$1), {
|
29
|
+
class: "relative p-button-icon-only",
|
30
|
+
outlined: props.outlined,
|
31
|
+
severity: props.severity,
|
32
|
+
disabled: active.value || props.disabled,
|
33
|
+
onClick: _cache[0] || (_cache[0] = (event) => _ctx.$emit("refresh", event))
|
34
|
+
}, {
|
35
|
+
default: withCtx(() => [
|
36
|
+
createBaseVNode("span", {
|
37
|
+
class: normalizeClass(["p-button-icon pi pi-refresh transition-all", { "opacity-0": active.value }]),
|
38
|
+
"data-pc-section": "icon"
|
39
|
+
}, null, 2),
|
40
|
+
_cache[1] || (_cache[1] = createBaseVNode("span", {
|
41
|
+
class: "p-button-label",
|
42
|
+
"data-pc-section": "label"
|
43
|
+
}, " ", -1)),
|
44
|
+
withDirectives(createVNode(unref(script), { class: "absolute w-1/2 h-1/2" }, null, 512), [
|
45
|
+
[vShow, active.value]
|
46
|
+
])
|
47
|
+
]),
|
48
|
+
_: 1
|
49
|
+
}, 8, ["outlined", "severity", "disabled"]);
|
50
|
+
};
|
51
|
+
}
|
52
|
+
});
|
53
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
54
|
+
__name: "StatusTag",
|
55
|
+
props: {
|
56
|
+
error: { type: Boolean },
|
57
|
+
refreshing: { type: Boolean }
|
58
|
+
},
|
59
|
+
setup(__props) {
|
60
|
+
const props = __props;
|
61
|
+
const icon = computed(() => {
|
62
|
+
if (props.refreshing) return PrimeIcons.QUESTION;
|
63
|
+
if (props.error) return PrimeIcons.TIMES;
|
64
|
+
return PrimeIcons.CHECK;
|
65
|
+
});
|
66
|
+
const severity = computed(() => {
|
67
|
+
if (props.refreshing) return "info";
|
68
|
+
if (props.error) return "danger";
|
69
|
+
return "success";
|
70
|
+
});
|
71
|
+
const value = computed(() => {
|
72
|
+
if (props.refreshing) return t("maintenance.refreshing");
|
73
|
+
if (props.error) return t("g.error");
|
74
|
+
return t("maintenance.OK");
|
75
|
+
});
|
76
|
+
return (_ctx, _cache) => {
|
77
|
+
return openBlock(), createBlock(unref(script$2), {
|
78
|
+
icon: icon.value,
|
79
|
+
severity: severity.value,
|
80
|
+
value: value.value
|
81
|
+
}, null, 8, ["icon", "severity", "value"]);
|
82
|
+
};
|
83
|
+
}
|
84
|
+
});
|
85
|
+
const electron = electronAPI();
|
86
|
+
const openUrl = /* @__PURE__ */ __name((url) => {
|
87
|
+
window.open(url, "_blank");
|
88
|
+
return true;
|
89
|
+
}, "openUrl");
|
90
|
+
const DESKTOP_MAINTENANCE_TASKS = [
|
91
|
+
{
|
92
|
+
id: "basePath",
|
93
|
+
execute: /* @__PURE__ */ __name(async () => await electron.setBasePath(), "execute"),
|
94
|
+
name: "Base path",
|
95
|
+
shortDescription: "Change the application base path.",
|
96
|
+
errorDescription: "Unable to open the base path. Please select a new one.",
|
97
|
+
description: "The base path is the default location where ComfyUI stores data. It is the location fo the python environment, and may also contain models, custom nodes, and other extensions.",
|
98
|
+
isInstallationFix: true,
|
99
|
+
button: {
|
100
|
+
icon: PrimeIcons.QUESTION,
|
101
|
+
text: "Select"
|
102
|
+
}
|
103
|
+
},
|
104
|
+
{
|
105
|
+
id: "git",
|
106
|
+
headerImg: "assets/images/Git-Logo-White.svg",
|
107
|
+
execute: /* @__PURE__ */ __name(() => openUrl("https://git-scm.com/downloads/"), "execute"),
|
108
|
+
name: "Download git",
|
109
|
+
shortDescription: "Open the git download page.",
|
110
|
+
errorDescription: "Git is missing. Please download and install git, then restart ComfyUI Desktop.",
|
111
|
+
description: "Git is required to download and manage custom nodes and other extensions. This task opens the download page in your default browser, where you can download the latest version of git. Once you have installed git, please restart ComfyUI Desktop.",
|
112
|
+
button: {
|
113
|
+
icon: PrimeIcons.EXTERNAL_LINK,
|
114
|
+
text: "Download"
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{
|
118
|
+
id: "vcRedist",
|
119
|
+
execute: /* @__PURE__ */ __name(() => openUrl("https://aka.ms/vs/17/release/vc_redist.x64.exe"), "execute"),
|
120
|
+
name: "Download VC++ Redist",
|
121
|
+
shortDescription: "Download the latest VC++ Redistributable runtime.",
|
122
|
+
description: "The Visual C++ runtime libraries are required to run ComfyUI. You will need to download and install this file.",
|
123
|
+
button: {
|
124
|
+
icon: PrimeIcons.EXTERNAL_LINK,
|
125
|
+
text: "Download"
|
126
|
+
}
|
127
|
+
},
|
128
|
+
{
|
129
|
+
id: "reinstall",
|
130
|
+
severity: "danger",
|
131
|
+
requireConfirm: true,
|
132
|
+
execute: /* @__PURE__ */ __name(async () => {
|
133
|
+
await electron.reinstall();
|
134
|
+
return true;
|
135
|
+
}, "execute"),
|
136
|
+
name: "Reinstall ComfyUI",
|
137
|
+
shortDescription: "Deletes the desktop app config and load the welcome screen.",
|
138
|
+
description: "Delete the desktop app config, restart the app, and load the installation screen.",
|
139
|
+
confirmText: "Delete all saved config and reinstall?",
|
140
|
+
button: {
|
141
|
+
icon: PrimeIcons.EXCLAMATION_TRIANGLE,
|
142
|
+
text: "Reinstall"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
{
|
146
|
+
id: "pythonPackages",
|
147
|
+
requireConfirm: true,
|
148
|
+
execute: /* @__PURE__ */ __name(async () => {
|
149
|
+
try {
|
150
|
+
await electron.uv.installRequirements();
|
151
|
+
return true;
|
152
|
+
} catch (error) {
|
153
|
+
return false;
|
154
|
+
}
|
155
|
+
}, "execute"),
|
156
|
+
name: "Install python packages",
|
157
|
+
shortDescription: "Installs the base python packages required to run ComfyUI.",
|
158
|
+
errorDescription: "Python packages that are required to run ComfyUI are not installed.",
|
159
|
+
description: "This will install the python packages required to run ComfyUI. This includes torch, torchvision, and other dependencies.",
|
160
|
+
usesTerminal: true,
|
161
|
+
isInstallationFix: true,
|
162
|
+
button: {
|
163
|
+
icon: PrimeIcons.DOWNLOAD,
|
164
|
+
text: "Install"
|
165
|
+
}
|
166
|
+
},
|
167
|
+
{
|
168
|
+
id: "uv",
|
169
|
+
execute: /* @__PURE__ */ __name(() => openUrl("https://docs.astral.sh/uv/getting-started/installation/"), "execute"),
|
170
|
+
name: "uv executable",
|
171
|
+
shortDescription: "uv installs and maintains the python environment.",
|
172
|
+
description: "This will open the download page for Astral's uv tool. uv is used to install python and manage python packages.",
|
173
|
+
button: {
|
174
|
+
icon: "pi pi-asterisk",
|
175
|
+
text: "Download"
|
176
|
+
}
|
177
|
+
},
|
178
|
+
{
|
179
|
+
id: "uvCache",
|
180
|
+
severity: "danger",
|
181
|
+
requireConfirm: true,
|
182
|
+
execute: /* @__PURE__ */ __name(async () => await electron.uv.clearCache(), "execute"),
|
183
|
+
name: "uv cache",
|
184
|
+
shortDescription: "Remove the Astral uv cache of python packages.",
|
185
|
+
description: "This will remove the uv cache directory and its contents. All downloaded python packages will need to be downloaded again.",
|
186
|
+
confirmText: "Delete uv cache of python packages?",
|
187
|
+
usesTerminal: true,
|
188
|
+
isInstallationFix: true,
|
189
|
+
button: {
|
190
|
+
icon: PrimeIcons.TRASH,
|
191
|
+
text: "Clear cache"
|
192
|
+
}
|
193
|
+
},
|
194
|
+
{
|
195
|
+
id: "venvDirectory",
|
196
|
+
severity: "danger",
|
197
|
+
requireConfirm: true,
|
198
|
+
execute: /* @__PURE__ */ __name(async () => await electron.uv.resetVenv(), "execute"),
|
199
|
+
name: "Reset virtual environment",
|
200
|
+
shortDescription: "Remove and recreate the .venv directory. This removes all python packages.",
|
201
|
+
description: "The python environment is where ComfyUI installs python and python packages. It is used to run the ComfyUI server.",
|
202
|
+
confirmText: "Delete the .venv directory?",
|
203
|
+
usesTerminal: true,
|
204
|
+
isInstallationFix: true,
|
205
|
+
button: {
|
206
|
+
icon: PrimeIcons.FOLDER,
|
207
|
+
text: "Recreate"
|
208
|
+
}
|
209
|
+
}
|
210
|
+
];
|
211
|
+
class MaintenanceTaskRunner {
|
212
|
+
static {
|
213
|
+
__name(this, "MaintenanceTaskRunner");
|
214
|
+
}
|
215
|
+
constructor(task) {
|
216
|
+
this.task = task;
|
217
|
+
}
|
218
|
+
_state;
|
219
|
+
/** The current state of the task. Setter also controls {@link resolved} as a side-effect. */
|
220
|
+
get state() {
|
221
|
+
return this._state;
|
222
|
+
}
|
223
|
+
/** Updates the task state and {@link resolved} status. */
|
224
|
+
setState(value) {
|
225
|
+
if (this._state === "error" && value === "OK") this.resolved = true;
|
226
|
+
if (value === "error") this.resolved &&= false;
|
227
|
+
this._state = value;
|
228
|
+
}
|
229
|
+
/** `true` if the task has been resolved (was `error`, now `OK`). This is a side-effect of the {@link state} setter. */
|
230
|
+
resolved;
|
231
|
+
/** Whether the task state is currently being refreshed. */
|
232
|
+
refreshing;
|
233
|
+
/** Whether the task is currently running. */
|
234
|
+
executing;
|
235
|
+
/** The error message that occurred when the task failed. */
|
236
|
+
error;
|
237
|
+
update(update) {
|
238
|
+
const state = update[this.task.id];
|
239
|
+
this.refreshing = state === void 0;
|
240
|
+
if (state) this.setState(state);
|
241
|
+
}
|
242
|
+
finaliseUpdate(update) {
|
243
|
+
this.refreshing = false;
|
244
|
+
this.setState(update[this.task.id] ?? "skipped");
|
245
|
+
}
|
246
|
+
/** Wraps the execution of a maintenance task, updating state and rethrowing errors. */
|
247
|
+
async execute(task) {
|
248
|
+
try {
|
249
|
+
this.executing = true;
|
250
|
+
const success = await task.execute();
|
251
|
+
if (!success) return false;
|
252
|
+
this.error = void 0;
|
253
|
+
return true;
|
254
|
+
} catch (error) {
|
255
|
+
this.error = error?.message;
|
256
|
+
throw error;
|
257
|
+
} finally {
|
258
|
+
this.executing = false;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
const useMaintenanceTaskStore = defineStore("maintenanceTask", () => {
|
263
|
+
const electron2 = electronAPI();
|
264
|
+
const isRefreshing = ref(false);
|
265
|
+
const isRunningTerminalCommand = computed(
|
266
|
+
() => tasks.value.filter((task) => task.usesTerminal).some((task) => getRunner(task)?.executing)
|
267
|
+
);
|
268
|
+
const isRunningInstallationFix = computed(
|
269
|
+
() => tasks.value.filter((task) => task.isInstallationFix).some((task) => getRunner(task)?.executing)
|
270
|
+
);
|
271
|
+
const tasks = ref(DESKTOP_MAINTENANCE_TASKS);
|
272
|
+
const taskRunners = ref(
|
273
|
+
new Map(
|
274
|
+
DESKTOP_MAINTENANCE_TASKS.map((x) => [x.id, new MaintenanceTaskRunner(x)])
|
275
|
+
)
|
276
|
+
);
|
277
|
+
const anyErrors = computed(
|
278
|
+
() => tasks.value.some((task) => getRunner(task).state === "error")
|
279
|
+
);
|
280
|
+
const getRunner = /* @__PURE__ */ __name((task) => taskRunners.value.get(task.id), "getRunner");
|
281
|
+
const processUpdate = /* @__PURE__ */ __name((validationUpdate) => {
|
282
|
+
const update = validationUpdate;
|
283
|
+
isRefreshing.value = true;
|
284
|
+
for (const task of tasks.value) {
|
285
|
+
getRunner(task).update(update);
|
286
|
+
}
|
287
|
+
if (!update.inProgress && isRefreshing.value) {
|
288
|
+
isRefreshing.value = false;
|
289
|
+
for (const task of tasks.value) {
|
290
|
+
getRunner(task).finaliseUpdate(update);
|
291
|
+
}
|
292
|
+
}
|
293
|
+
}, "processUpdate");
|
294
|
+
const clearResolved = /* @__PURE__ */ __name(() => {
|
295
|
+
for (const task of tasks.value) {
|
296
|
+
getRunner(task).resolved &&= false;
|
297
|
+
}
|
298
|
+
}, "clearResolved");
|
299
|
+
const refreshDesktopTasks = /* @__PURE__ */ __name(async () => {
|
300
|
+
isRefreshing.value = true;
|
301
|
+
console.log("Refreshing desktop tasks");
|
302
|
+
await electron2.Validation.validateInstallation(processUpdate);
|
303
|
+
}, "refreshDesktopTasks");
|
304
|
+
const execute = /* @__PURE__ */ __name(async (task) => {
|
305
|
+
return getRunner(task).execute(task);
|
306
|
+
}, "execute");
|
307
|
+
return {
|
308
|
+
tasks,
|
309
|
+
isRefreshing,
|
310
|
+
isRunningTerminalCommand,
|
311
|
+
isRunningInstallationFix,
|
312
|
+
execute,
|
313
|
+
getRunner,
|
314
|
+
processUpdate,
|
315
|
+
clearResolved,
|
316
|
+
/** True if any tasks are in an error state. */
|
317
|
+
anyErrors,
|
318
|
+
refreshDesktopTasks
|
319
|
+
};
|
320
|
+
});
|
321
|
+
function useMinLoadingDurationRef(value, minDuration = 250) {
|
322
|
+
const current = ref(value.value);
|
323
|
+
const { ready, start } = useTimeout(minDuration, {
|
324
|
+
controls: true,
|
325
|
+
immediate: false
|
326
|
+
});
|
327
|
+
watch(value, (newValue) => {
|
328
|
+
if (newValue && !current.value) start();
|
329
|
+
current.value = newValue;
|
330
|
+
});
|
331
|
+
return computed(() => current.value || !ready.value);
|
332
|
+
}
|
333
|
+
__name(useMinLoadingDurationRef, "useMinLoadingDurationRef");
|
334
|
+
const _hoisted_1$3 = {
|
335
|
+
key: 0,
|
336
|
+
class: "pi pi-exclamation-triangle text-red-500 absolute m-2 top-0 -right-14 opacity-15",
|
337
|
+
style: { "font-size": "10rem" }
|
338
|
+
};
|
339
|
+
const _hoisted_2$3 = ["src"];
|
340
|
+
const _hoisted_3$3 = { class: "flex gap-4 mt-1" };
|
341
|
+
const _hoisted_4$3 = {
|
342
|
+
key: 0,
|
343
|
+
class: "task-card-ok pi pi-check"
|
344
|
+
};
|
345
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
346
|
+
__name: "TaskCard",
|
347
|
+
props: {
|
348
|
+
task: {}
|
349
|
+
},
|
350
|
+
emits: ["execute"],
|
351
|
+
setup(__props) {
|
352
|
+
const taskStore = useMaintenanceTaskStore();
|
353
|
+
const runner = computed(() => taskStore.getRunner(props.task));
|
354
|
+
const props = __props;
|
355
|
+
const description = computed(
|
356
|
+
() => runner.value.state === "error" ? props.task.errorDescription ?? props.task.shortDescription : props.task.shortDescription
|
357
|
+
);
|
358
|
+
const reactiveLoading = computed(() => runner.value.refreshing);
|
359
|
+
const reactiveExecuting = computed(() => runner.value.executing);
|
360
|
+
const isLoading = useMinLoadingDurationRef(reactiveLoading, 250);
|
361
|
+
const isExecuting = useMinLoadingDurationRef(reactiveExecuting, 250);
|
362
|
+
return (_ctx, _cache) => {
|
363
|
+
return openBlock(), createElementBlock("div", {
|
364
|
+
class: normalizeClass(["task-div max-w-48 min-h-52 grid relative", { "opacity-75": unref(isLoading) }])
|
365
|
+
}, [
|
366
|
+
createVNode(unref(script$3), mergeProps({
|
367
|
+
class: ["max-w-48 relative h-full overflow-hidden", { "opacity-65": runner.value.state !== "error" }]
|
368
|
+
}, (({ onClick, ...rest }) => rest)(_ctx.$attrs)), {
|
369
|
+
header: withCtx(() => [
|
370
|
+
runner.value.state === "error" ? (openBlock(), createElementBlock("i", _hoisted_1$3)) : createCommentVNode("", true),
|
371
|
+
_ctx.task.headerImg ? (openBlock(), createElementBlock("img", {
|
372
|
+
key: 1,
|
373
|
+
src: _ctx.task.headerImg,
|
374
|
+
class: "object-contain w-full h-full opacity-25 pt-4 px-4"
|
375
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true)
|
376
|
+
]),
|
377
|
+
title: withCtx(() => [
|
378
|
+
createTextVNode(toDisplayString(_ctx.task.name), 1)
|
379
|
+
]),
|
380
|
+
content: withCtx(() => [
|
381
|
+
createTextVNode(toDisplayString(description.value), 1)
|
382
|
+
]),
|
383
|
+
footer: withCtx(() => [
|
384
|
+
createBaseVNode("div", _hoisted_3$3, [
|
385
|
+
createVNode(unref(script$1), {
|
386
|
+
icon: _ctx.task.button?.icon,
|
387
|
+
label: _ctx.task.button?.text,
|
388
|
+
class: "w-full",
|
389
|
+
raised: "",
|
390
|
+
"icon-pos": "right",
|
391
|
+
onClick: _cache[0] || (_cache[0] = (event) => _ctx.$emit("execute", event)),
|
392
|
+
loading: unref(isExecuting)
|
393
|
+
}, null, 8, ["icon", "label", "loading"])
|
394
|
+
])
|
395
|
+
]),
|
396
|
+
_: 1
|
397
|
+
}, 16, ["class"]),
|
398
|
+
!unref(isLoading) && runner.value.state === "OK" ? (openBlock(), createElementBlock("i", _hoisted_4$3)) : createCommentVNode("", true)
|
399
|
+
], 2);
|
400
|
+
};
|
401
|
+
}
|
402
|
+
});
|
403
|
+
const TaskCard = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c3bd7658"]]);
|
404
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
405
|
+
__name: "TaskListStatusIcon",
|
406
|
+
props: {
|
407
|
+
state: {},
|
408
|
+
loading: {}
|
409
|
+
},
|
410
|
+
setup(__props) {
|
411
|
+
const tooltip = computed(() => {
|
412
|
+
if (props.state === "error") {
|
413
|
+
return t("g.error");
|
414
|
+
} else if (props.state === "OK") {
|
415
|
+
return t("maintenance.OK");
|
416
|
+
} else {
|
417
|
+
return t("maintenance.Skipped");
|
418
|
+
}
|
419
|
+
});
|
420
|
+
const cssClasses = computed(() => {
|
421
|
+
let classes;
|
422
|
+
if (props.state === "error") {
|
423
|
+
classes = `${PrimeIcons.EXCLAMATION_TRIANGLE} text-red-500`;
|
424
|
+
} else if (props.state === "OK") {
|
425
|
+
classes = `${PrimeIcons.CHECK} text-green-500`;
|
426
|
+
} else {
|
427
|
+
classes = PrimeIcons.MINUS;
|
428
|
+
}
|
429
|
+
return `text-3xl pi ${classes}`;
|
430
|
+
});
|
431
|
+
const props = __props;
|
432
|
+
return (_ctx, _cache) => {
|
433
|
+
const _directive_tooltip = resolveDirective("tooltip");
|
434
|
+
return !_ctx.state || _ctx.loading ? (openBlock(), createBlock(unref(script), {
|
435
|
+
key: 0,
|
436
|
+
class: "h-8 w-8"
|
437
|
+
})) : withDirectives((openBlock(), createElementBlock("i", {
|
438
|
+
key: 1,
|
439
|
+
class: normalizeClass(cssClasses.value)
|
440
|
+
}, null, 2)), [
|
441
|
+
[
|
442
|
+
_directive_tooltip,
|
443
|
+
{ value: tooltip.value, showDelay: 250 },
|
444
|
+
void 0,
|
445
|
+
{ top: true }
|
446
|
+
]
|
447
|
+
]);
|
448
|
+
};
|
449
|
+
}
|
450
|
+
});
|
451
|
+
const _hoisted_1$2 = { class: "text-center w-16" };
|
452
|
+
const _hoisted_2$2 = { class: "inline-block" };
|
453
|
+
const _hoisted_3$2 = { class: "whitespace-pre-line" };
|
454
|
+
const _hoisted_4$2 = { class: "text-right px-4" };
|
455
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
456
|
+
__name: "TaskListItem",
|
457
|
+
props: {
|
458
|
+
task: {}
|
459
|
+
},
|
460
|
+
emits: ["execute"],
|
461
|
+
setup(__props) {
|
462
|
+
const taskStore = useMaintenanceTaskStore();
|
463
|
+
const runner = computed(() => taskStore.getRunner(props.task));
|
464
|
+
const props = __props;
|
465
|
+
const severity = computed(
|
466
|
+
() => runner.value.state === "error" || runner.value.state === "warning" ? "primary" : "secondary"
|
467
|
+
);
|
468
|
+
const reactiveLoading = computed(() => runner.value.refreshing);
|
469
|
+
const reactiveExecuting = computed(() => runner.value.executing);
|
470
|
+
const isLoading = useMinLoadingDurationRef(reactiveLoading, 250);
|
471
|
+
const isExecuting = useMinLoadingDurationRef(reactiveExecuting, 250);
|
472
|
+
const infoPopover = ref();
|
473
|
+
const toggle = /* @__PURE__ */ __name((event) => {
|
474
|
+
infoPopover.value.toggle(event);
|
475
|
+
}, "toggle");
|
476
|
+
return (_ctx, _cache) => {
|
477
|
+
return openBlock(), createElementBlock("tr", {
|
478
|
+
class: normalizeClass(["border-neutral-700 border-solid border-y", {
|
479
|
+
"opacity-50": runner.value.resolved,
|
480
|
+
"opacity-75": unref(isLoading) && runner.value.resolved
|
481
|
+
}])
|
482
|
+
}, [
|
483
|
+
createBaseVNode("td", _hoisted_1$2, [
|
484
|
+
createVNode(_sfc_main$3, {
|
485
|
+
state: runner.value.state,
|
486
|
+
loading: unref(isLoading)
|
487
|
+
}, null, 8, ["state", "loading"])
|
488
|
+
]),
|
489
|
+
createBaseVNode("td", null, [
|
490
|
+
createBaseVNode("p", _hoisted_2$2, toDisplayString(_ctx.task.name), 1),
|
491
|
+
createVNode(unref(script$1), {
|
492
|
+
class: "inline-block mx-2",
|
493
|
+
type: "button",
|
494
|
+
icon: unref(PrimeIcons).INFO_CIRCLE,
|
495
|
+
severity: "secondary",
|
496
|
+
text: true,
|
497
|
+
onClick: toggle
|
498
|
+
}, null, 8, ["icon"]),
|
499
|
+
createVNode(unref(script$4), {
|
500
|
+
ref_key: "infoPopover",
|
501
|
+
ref: infoPopover,
|
502
|
+
class: "block m-1 max-w-64 min-w-32"
|
503
|
+
}, {
|
504
|
+
default: withCtx(() => [
|
505
|
+
createBaseVNode("span", _hoisted_3$2, toDisplayString(_ctx.task.description), 1)
|
506
|
+
]),
|
507
|
+
_: 1
|
508
|
+
}, 512)
|
509
|
+
]),
|
510
|
+
createBaseVNode("td", _hoisted_4$2, [
|
511
|
+
createVNode(unref(script$1), {
|
512
|
+
icon: _ctx.task.button?.icon,
|
513
|
+
label: _ctx.task.button?.text,
|
514
|
+
severity: severity.value,
|
515
|
+
"icon-pos": "right",
|
516
|
+
onClick: _cache[0] || (_cache[0] = (event) => _ctx.$emit("execute", event)),
|
517
|
+
loading: unref(isExecuting)
|
518
|
+
}, null, 8, ["icon", "label", "severity", "loading"])
|
519
|
+
])
|
520
|
+
], 2);
|
521
|
+
};
|
522
|
+
}
|
523
|
+
});
|
524
|
+
const _hoisted_1$1 = { class: "my-4" };
|
525
|
+
const _hoisted_2$1 = { class: "text-neutral-400 w-full text-center" };
|
526
|
+
const _hoisted_3$1 = {
|
527
|
+
key: 0,
|
528
|
+
class: "w-full border-collapse border-hidden"
|
529
|
+
};
|
530
|
+
const _hoisted_4$1 = {
|
531
|
+
key: 1,
|
532
|
+
class: "flex flex-wrap justify-evenly gap-8 pad-y my-4"
|
533
|
+
};
|
534
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
535
|
+
__name: "TaskListPanel",
|
536
|
+
props: {
|
537
|
+
displayAsList: {},
|
538
|
+
filter: {},
|
539
|
+
isRefreshing: { type: Boolean }
|
540
|
+
},
|
541
|
+
setup(__props) {
|
542
|
+
const toast = useToast();
|
543
|
+
const confirm = useConfirm();
|
544
|
+
const taskStore = useMaintenanceTaskStore();
|
545
|
+
const props = __props;
|
546
|
+
const executeTask = /* @__PURE__ */ __name(async (task) => {
|
547
|
+
let message;
|
548
|
+
try {
|
549
|
+
if (await taskStore.execute(task) === true) return;
|
550
|
+
message = t("maintenance.error.taskFailed");
|
551
|
+
} catch (error) {
|
552
|
+
message = error?.message;
|
553
|
+
}
|
554
|
+
toast.add({
|
555
|
+
severity: "error",
|
556
|
+
summary: t("maintenance.error.toastTitle"),
|
557
|
+
detail: message ?? t("maintenance.error.defaultDescription"),
|
558
|
+
life: 1e4
|
559
|
+
});
|
560
|
+
}, "executeTask");
|
561
|
+
const confirmButton = /* @__PURE__ */ __name(async (event, task) => {
|
562
|
+
if (!task.requireConfirm) {
|
563
|
+
await executeTask(task);
|
564
|
+
return;
|
565
|
+
}
|
566
|
+
confirm.require({
|
567
|
+
target: event.currentTarget,
|
568
|
+
message: task.confirmText ?? t("maintenance.confirmTitle"),
|
569
|
+
icon: "pi pi-exclamation-circle",
|
570
|
+
rejectProps: {
|
571
|
+
label: t("g.cancel"),
|
572
|
+
severity: "secondary",
|
573
|
+
outlined: true
|
574
|
+
},
|
575
|
+
acceptProps: {
|
576
|
+
label: task.button?.text ?? t("g.save"),
|
577
|
+
severity: task.severity ?? "primary"
|
578
|
+
},
|
579
|
+
// TODO: Not awaited.
|
580
|
+
accept: /* @__PURE__ */ __name(async () => {
|
581
|
+
await executeTask(task);
|
582
|
+
}, "accept")
|
583
|
+
});
|
584
|
+
}, "confirmButton");
|
585
|
+
return (_ctx, _cache) => {
|
586
|
+
return openBlock(), createElementBlock("section", _hoisted_1$1, [
|
587
|
+
_ctx.filter.tasks.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
588
|
+
createVNode(unref(script$5)),
|
589
|
+
createBaseVNode("p", _hoisted_2$1, toDisplayString(_ctx.$t("maintenance.allOk")), 1)
|
590
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
591
|
+
_ctx.displayAsList === unref(PrimeIcons).LIST ? (openBlock(), createElementBlock("table", _hoisted_3$1, [
|
592
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filter.tasks, (task) => {
|
593
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
594
|
+
key: task.id,
|
595
|
+
task,
|
596
|
+
onExecute: /* @__PURE__ */ __name((event) => confirmButton(event, task), "onExecute")
|
597
|
+
}, null, 8, ["task", "onExecute"]);
|
598
|
+
}), 128))
|
599
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
600
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filter.tasks, (task) => {
|
601
|
+
return openBlock(), createBlock(TaskCard, {
|
602
|
+
key: task.id,
|
603
|
+
task,
|
604
|
+
onExecute: /* @__PURE__ */ __name((event) => confirmButton(event, task), "onExecute")
|
605
|
+
}, null, 8, ["task", "onExecute"]);
|
606
|
+
}), 128))
|
607
|
+
]))
|
608
|
+
], 64)),
|
609
|
+
createVNode(unref(script$6))
|
610
|
+
]);
|
611
|
+
};
|
612
|
+
}
|
613
|
+
});
|
614
|
+
const _hoisted_1 = { class: "min-w-full min-h-full font-sans w-screen h-screen grid justify-around text-neutral-300 bg-neutral-900 dark-theme overflow-y-auto" };
|
615
|
+
const _hoisted_2 = { class: "max-w-screen-sm w-screen m-8 relative" };
|
616
|
+
const _hoisted_3 = { class: "backspan pi-wrench text-4xl font-bold" };
|
617
|
+
const _hoisted_4 = { class: "w-full flex flex-wrap gap-4 items-center" };
|
618
|
+
const _hoisted_5 = { class: "grow" };
|
619
|
+
const _hoisted_6 = { class: "flex gap-4 items-center" };
|
620
|
+
const _hoisted_7 = { class: "max-sm:hidden" };
|
621
|
+
const _hoisted_8 = { class: "flex justify-between gap-4 flex-row" };
|
622
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
623
|
+
__name: "MaintenanceView",
|
624
|
+
setup(__props) {
|
625
|
+
const electron2 = electronAPI();
|
626
|
+
const toast = useToast();
|
627
|
+
const taskStore = useMaintenanceTaskStore();
|
628
|
+
const { clearResolved, processUpdate, refreshDesktopTasks } = taskStore;
|
629
|
+
const terminalVisible = ref(false);
|
630
|
+
const reactiveIsRefreshing = computed(() => taskStore.isRefreshing);
|
631
|
+
const isRefreshing = useMinLoadingDurationRef(reactiveIsRefreshing, 250);
|
632
|
+
const anyErrors = computed(() => taskStore.anyErrors);
|
633
|
+
const displayAsList = ref(PrimeIcons.TH_LARGE);
|
634
|
+
const errorFilter = computed(
|
635
|
+
() => taskStore.tasks.filter((x) => {
|
636
|
+
const { state, resolved } = taskStore.getRunner(x);
|
637
|
+
return state === "error" || resolved;
|
638
|
+
})
|
639
|
+
);
|
640
|
+
const filterOptions = ref([
|
641
|
+
{ icon: PrimeIcons.FILTER_FILL, value: "All", tasks: taskStore.tasks },
|
642
|
+
{ icon: PrimeIcons.EXCLAMATION_TRIANGLE, value: "Errors", tasks: errorFilter }
|
643
|
+
]);
|
644
|
+
const filter = ref(filterOptions.value[0]);
|
645
|
+
const completeValidation = /* @__PURE__ */ __name(async () => {
|
646
|
+
const isValid = await electron2.Validation.complete();
|
647
|
+
if (!isValid) {
|
648
|
+
toast.add({
|
649
|
+
severity: "error",
|
650
|
+
summary: t("g.error"),
|
651
|
+
detail: t("maintenance.error.cannotContinue"),
|
652
|
+
life: 5e3
|
653
|
+
});
|
654
|
+
}
|
655
|
+
}, "completeValidation");
|
656
|
+
const toggleConsoleDrawer = /* @__PURE__ */ __name(() => {
|
657
|
+
terminalVisible.value = !terminalVisible.value;
|
658
|
+
}, "toggleConsoleDrawer");
|
659
|
+
watch(
|
660
|
+
() => taskStore.isRunningTerminalCommand,
|
661
|
+
(value) => {
|
662
|
+
terminalVisible.value = value;
|
663
|
+
}
|
664
|
+
);
|
665
|
+
onMounted(async () => {
|
666
|
+
electron2.Validation.onUpdate(processUpdate);
|
667
|
+
const update = await electron2.Validation.getStatus();
|
668
|
+
if (Object.values(update).some((x) => x === "error")) {
|
669
|
+
filter.value = filterOptions.value[1];
|
670
|
+
}
|
671
|
+
processUpdate(update);
|
672
|
+
});
|
673
|
+
onUnmounted(() => electron2.Validation.dispose());
|
674
|
+
return (_ctx, _cache) => {
|
675
|
+
return openBlock(), createBlock(_sfc_main$8, { dark: "" }, {
|
676
|
+
default: withCtx(() => [
|
677
|
+
createBaseVNode("div", _hoisted_1, [
|
678
|
+
createBaseVNode("div", _hoisted_2, [
|
679
|
+
createBaseVNode("h1", _hoisted_3, toDisplayString(unref(t)("maintenance.title")), 1),
|
680
|
+
createBaseVNode("div", _hoisted_4, [
|
681
|
+
createBaseVNode("span", _hoisted_5, [
|
682
|
+
createTextVNode(toDisplayString(unref(t)("maintenance.status")) + ": ", 1),
|
683
|
+
createVNode(_sfc_main$5, {
|
684
|
+
refreshing: unref(isRefreshing),
|
685
|
+
error: anyErrors.value
|
686
|
+
}, null, 8, ["refreshing", "error"])
|
687
|
+
]),
|
688
|
+
createBaseVNode("div", _hoisted_6, [
|
689
|
+
createVNode(unref(script$7), {
|
690
|
+
modelValue: displayAsList.value,
|
691
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => displayAsList.value = $event),
|
692
|
+
options: [unref(PrimeIcons).LIST, unref(PrimeIcons).TH_LARGE],
|
693
|
+
"allow-empty": false
|
694
|
+
}, {
|
695
|
+
option: withCtx((opts) => [
|
696
|
+
createBaseVNode("i", {
|
697
|
+
class: normalizeClass(opts.option)
|
698
|
+
}, null, 2)
|
699
|
+
]),
|
700
|
+
_: 1
|
701
|
+
}, 8, ["modelValue", "options"]),
|
702
|
+
createVNode(unref(script$7), {
|
703
|
+
modelValue: filter.value,
|
704
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value = $event),
|
705
|
+
options: filterOptions.value,
|
706
|
+
"allow-empty": false,
|
707
|
+
optionLabel: "value",
|
708
|
+
dataKey: "value",
|
709
|
+
"area-labelledby": "custom",
|
710
|
+
onChange: unref(clearResolved)
|
711
|
+
}, {
|
712
|
+
option: withCtx((opts) => [
|
713
|
+
createBaseVNode("i", {
|
714
|
+
class: normalizeClass(opts.option.icon)
|
715
|
+
}, null, 2),
|
716
|
+
createBaseVNode("span", _hoisted_7, toDisplayString(opts.option.value), 1)
|
717
|
+
]),
|
718
|
+
_: 1
|
719
|
+
}, 8, ["modelValue", "options", "onChange"]),
|
720
|
+
createVNode(_sfc_main$6, {
|
721
|
+
modelValue: unref(isRefreshing),
|
722
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(isRefreshing) ? isRefreshing.value = $event : null),
|
723
|
+
severity: "secondary",
|
724
|
+
onRefresh: unref(refreshDesktopTasks)
|
725
|
+
}, null, 8, ["modelValue", "onRefresh"])
|
726
|
+
])
|
727
|
+
]),
|
728
|
+
createVNode(_sfc_main$1, {
|
729
|
+
class: "border-neutral-700 border-solid border-x-0 border-y",
|
730
|
+
filter: filter.value,
|
731
|
+
displayAsList: displayAsList.value,
|
732
|
+
isRefreshing: unref(isRefreshing)
|
733
|
+
}, null, 8, ["filter", "displayAsList", "isRefreshing"]),
|
734
|
+
createBaseVNode("div", _hoisted_8, [
|
735
|
+
createVNode(unref(script$1), {
|
736
|
+
label: unref(t)("maintenance.consoleLogs"),
|
737
|
+
icon: "pi pi-desktop",
|
738
|
+
"icon-pos": "left",
|
739
|
+
severity: "secondary",
|
740
|
+
onClick: toggleConsoleDrawer
|
741
|
+
}, null, 8, ["label"]),
|
742
|
+
createVNode(unref(script$1), {
|
743
|
+
label: unref(t)("g.continue"),
|
744
|
+
icon: "pi pi-arrow-right",
|
745
|
+
"icon-pos": "left",
|
746
|
+
severity: anyErrors.value ? "secondary" : "primary",
|
747
|
+
onClick: _cache[3] || (_cache[3] = () => completeValidation()),
|
748
|
+
loading: unref(isRefreshing)
|
749
|
+
}, null, 8, ["label", "severity", "loading"])
|
750
|
+
])
|
751
|
+
]),
|
752
|
+
createVNode(_sfc_main$7, {
|
753
|
+
modelValue: terminalVisible.value,
|
754
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => terminalVisible.value = $event),
|
755
|
+
header: unref(t)("g.terminal"),
|
756
|
+
"default-message": unref(t)("maintenance.terminalDefaultMessage")
|
757
|
+
}, null, 8, ["modelValue", "header", "default-message"]),
|
758
|
+
createVNode(unref(script$8))
|
759
|
+
])
|
760
|
+
]),
|
761
|
+
_: 1
|
762
|
+
});
|
763
|
+
};
|
764
|
+
}
|
765
|
+
});
|
766
|
+
const MaintenanceView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1073ace1"]]);
|
767
|
+
export {
|
768
|
+
MaintenanceView as default
|
769
|
+
};
|
770
|
+
//# sourceMappingURL=MaintenanceView-D4JI2WFp.js.map
|