koishi-plugin-media-luna 0.0.1
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.
- package/client/README.md +558 -0
- package/client/api.ts +256 -0
- package/client/components/ChannelConfigDialog.vue +1113 -0
- package/client/components/ChannelsView.vue +698 -0
- package/client/components/ConfigRenderer.vue +164 -0
- package/client/components/EmptyState.vue +87 -0
- package/client/components/GenerateView.vue +778 -0
- package/client/components/HistoryGallery.vue +590 -0
- package/client/components/ImageLightbox.vue +510 -0
- package/client/components/ImageUpload.vue +298 -0
- package/client/components/JsonEditor.vue +68 -0
- package/client/components/LoadingState.vue +73 -0
- package/client/components/PresetsView.vue +800 -0
- package/client/components/ScrollContainer.vue +45 -0
- package/client/components/SettingsView.vue +231 -0
- package/client/components/StatusBadge.vue +55 -0
- package/client/components/TagFilter.vue +139 -0
- package/client/components/TagInput.vue +63 -0
- package/client/components/TasksView.vue +1074 -0
- package/client/components/ViewModeSwitch.vue +78 -0
- package/client/components/settings/CachePanel.vue +142 -0
- package/client/components/settings/MiddlewaresPanel.vue +480 -0
- package/client/components/settings/PluginsPanel.vue +493 -0
- package/client/index.ts +13 -0
- package/client/pages/index.vue +177 -0
- package/client/styles/shared.css +258 -0
- package/client/types.ts +158 -0
- package/client/utils/format.ts +72 -0
- package/dist/index.js +1 -0
- package/dist/style.css +1 -0
- package/lib/api/README.md +643 -0
- package/lib/api/cache-api.d.ts +6 -0
- package/lib/api/cache-api.d.ts.map +1 -0
- package/lib/api/cache-api.js +147 -0
- package/lib/api/cache-api.js.map +1 -0
- package/lib/api/channel-api.d.ts +6 -0
- package/lib/api/channel-api.d.ts.map +1 -0
- package/lib/api/channel-api.js +148 -0
- package/lib/api/channel-api.js.map +1 -0
- package/lib/api/connector-api.d.ts +6 -0
- package/lib/api/connector-api.d.ts.map +1 -0
- package/lib/api/connector-api.js +63 -0
- package/lib/api/connector-api.js.map +1 -0
- package/lib/api/generate-api.d.ts +6 -0
- package/lib/api/generate-api.d.ts.map +1 -0
- package/lib/api/generate-api.js +123 -0
- package/lib/api/generate-api.js.map +1 -0
- package/lib/api/index.d.ts +15 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/index.js +34 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/middleware-api.d.ts +6 -0
- package/lib/api/middleware-api.d.ts.map +1 -0
- package/lib/api/middleware-api.js +212 -0
- package/lib/api/middleware-api.js.map +1 -0
- package/lib/api/plugin-api.d.ts +6 -0
- package/lib/api/plugin-api.d.ts.map +1 -0
- package/lib/api/plugin-api.js +78 -0
- package/lib/api/plugin-api.js.map +1 -0
- package/lib/api/preset-api.d.ts +6 -0
- package/lib/api/preset-api.d.ts.map +1 -0
- package/lib/api/preset-api.js +256 -0
- package/lib/api/preset-api.js.map +1 -0
- package/lib/api/settings-api.d.ts +6 -0
- package/lib/api/settings-api.d.ts.map +1 -0
- package/lib/api/settings-api.js +118 -0
- package/lib/api/settings-api.js.map +1 -0
- package/lib/api/task-api.d.ts +6 -0
- package/lib/api/task-api.d.ts.map +1 -0
- package/lib/api/task-api.js +148 -0
- package/lib/api/task-api.js.map +1 -0
- package/lib/config.d.ts +6 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +8 -0
- package/lib/config.js.map +1 -0
- package/lib/connectors/builtin/chat-api.d.ts +9 -0
- package/lib/connectors/builtin/chat-api.d.ts.map +1 -0
- package/lib/connectors/builtin/chat-api.js +351 -0
- package/lib/connectors/builtin/chat-api.js.map +1 -0
- package/lib/connectors/builtin/dalle.d.ts +6 -0
- package/lib/connectors/builtin/dalle.d.ts.map +1 -0
- package/lib/connectors/builtin/dalle.js +109 -0
- package/lib/connectors/builtin/dalle.js.map +1 -0
- package/lib/connectors/builtin/flux.d.ts +7 -0
- package/lib/connectors/builtin/flux.d.ts.map +1 -0
- package/lib/connectors/builtin/flux.js +199 -0
- package/lib/connectors/builtin/flux.js.map +1 -0
- package/lib/connectors/builtin/index.d.ts +5 -0
- package/lib/connectors/builtin/index.d.ts.map +1 -0
- package/lib/connectors/builtin/index.js +6 -0
- package/lib/connectors/builtin/index.js.map +1 -0
- package/lib/connectors/builtin/sd-webui.d.ts +7 -0
- package/lib/connectors/builtin/sd-webui.d.ts.map +1 -0
- package/lib/connectors/builtin/sd-webui.js +157 -0
- package/lib/connectors/builtin/sd-webui.js.map +1 -0
- package/lib/connectors/connector-registry.d.ts +36 -0
- package/lib/connectors/connector-registry.d.ts.map +1 -0
- package/lib/connectors/connector-registry.js +66 -0
- package/lib/connectors/connector-registry.js.map +1 -0
- package/lib/connectors/index.d.ts +3 -0
- package/lib/connectors/index.d.ts.map +1 -0
- package/lib/connectors/index.js +4 -0
- package/lib/connectors/index.js.map +1 -0
- package/lib/core/api/api-utils.d.ts +46 -0
- package/lib/core/api/api-utils.d.ts.map +1 -0
- package/lib/core/api/api-utils.js +78 -0
- package/lib/core/api/api-utils.js.map +1 -0
- package/lib/core/api/cache-api.d.ts +6 -0
- package/lib/core/api/cache-api.d.ts.map +1 -0
- package/lib/core/api/cache-api.js +147 -0
- package/lib/core/api/cache-api.js.map +1 -0
- package/lib/core/api/channel-api.d.ts +6 -0
- package/lib/core/api/channel-api.d.ts.map +1 -0
- package/lib/core/api/channel-api.js +146 -0
- package/lib/core/api/channel-api.js.map +1 -0
- package/lib/core/api/connector-api.d.ts +6 -0
- package/lib/core/api/connector-api.d.ts.map +1 -0
- package/lib/core/api/connector-api.js +63 -0
- package/lib/core/api/connector-api.js.map +1 -0
- package/lib/core/api/generate-api.d.ts +6 -0
- package/lib/core/api/generate-api.d.ts.map +1 -0
- package/lib/core/api/generate-api.js +124 -0
- package/lib/core/api/generate-api.js.map +1 -0
- package/lib/core/api/index.d.ts +16 -0
- package/lib/core/api/index.d.ts.map +1 -0
- package/lib/core/api/index.js +38 -0
- package/lib/core/api/index.js.map +1 -0
- package/lib/core/api/middleware-api.d.ts +6 -0
- package/lib/core/api/middleware-api.d.ts.map +1 -0
- package/lib/core/api/middleware-api.js +196 -0
- package/lib/core/api/middleware-api.js.map +1 -0
- package/lib/core/api/plugin-api.d.ts +6 -0
- package/lib/core/api/plugin-api.d.ts.map +1 -0
- package/lib/core/api/plugin-api.js +78 -0
- package/lib/core/api/plugin-api.js.map +1 -0
- package/lib/core/api/preset-api.d.ts +6 -0
- package/lib/core/api/preset-api.d.ts.map +1 -0
- package/lib/core/api/preset-api.js +272 -0
- package/lib/core/api/preset-api.js.map +1 -0
- package/lib/core/api/settings-api.d.ts +6 -0
- package/lib/core/api/settings-api.d.ts.map +1 -0
- package/lib/core/api/settings-api.js +118 -0
- package/lib/core/api/settings-api.js.map +1 -0
- package/lib/core/api/task-api.d.ts +6 -0
- package/lib/core/api/task-api.d.ts.map +1 -0
- package/lib/core/api/task-api.js +281 -0
- package/lib/core/api/task-api.js.map +1 -0
- package/lib/core/channel.service.d.ts +44 -0
- package/lib/core/channel.service.d.ts.map +1 -0
- package/lib/core/channel.service.js +146 -0
- package/lib/core/channel.service.js.map +1 -0
- package/lib/core/config/config.service.d.ts +89 -0
- package/lib/core/config/config.service.d.ts.map +1 -0
- package/lib/core/config/config.service.js +216 -0
- package/lib/core/config/config.service.js.map +1 -0
- package/lib/core/config/index.d.ts +3 -0
- package/lib/core/config/index.d.ts.map +1 -0
- package/lib/core/config/index.js +3 -0
- package/lib/core/config/index.js.map +1 -0
- package/lib/core/error.d.ts +73 -0
- package/lib/core/error.d.ts.map +1 -0
- package/lib/core/error.js +137 -0
- package/lib/core/error.js.map +1 -0
- package/lib/core/index.d.ts +12 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/index.js +23 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/logger.d.ts +18 -0
- package/lib/core/logger.d.ts.map +1 -0
- package/lib/core/logger.js +39 -0
- package/lib/core/logger.js.map +1 -0
- package/lib/core/medialuna.service.d.ts +168 -0
- package/lib/core/medialuna.service.d.ts.map +1 -0
- package/lib/core/medialuna.service.js +423 -0
- package/lib/core/medialuna.service.js.map +1 -0
- package/lib/core/pipeline/dependency-graph.d.ts +43 -0
- package/lib/core/pipeline/dependency-graph.d.ts.map +1 -0
- package/lib/core/pipeline/dependency-graph.js +223 -0
- package/lib/core/pipeline/dependency-graph.js.map +1 -0
- package/lib/core/pipeline/generation-pipeline.d.ts +40 -0
- package/lib/core/pipeline/generation-pipeline.d.ts.map +1 -0
- package/lib/core/pipeline/generation-pipeline.js +216 -0
- package/lib/core/pipeline/generation-pipeline.js.map +1 -0
- package/lib/core/pipeline/index.d.ts +4 -0
- package/lib/core/pipeline/index.d.ts.map +1 -0
- package/lib/core/pipeline/index.js +5 -0
- package/lib/core/pipeline/index.js.map +1 -0
- package/lib/core/pipeline/middleware-registry.d.ts +33 -0
- package/lib/core/pipeline/middleware-registry.d.ts.map +1 -0
- package/lib/core/pipeline/middleware-registry.js +78 -0
- package/lib/core/pipeline/middleware-registry.js.map +1 -0
- package/lib/core/plugin-loader.d.ts +77 -0
- package/lib/core/plugin-loader.d.ts.map +1 -0
- package/lib/core/plugin-loader.js +300 -0
- package/lib/core/plugin-loader.js.map +1 -0
- package/lib/core/registry/connector.registry.d.ts +36 -0
- package/lib/core/registry/connector.registry.d.ts.map +1 -0
- package/lib/core/registry/connector.registry.js +65 -0
- package/lib/core/registry/connector.registry.js.map +1 -0
- package/lib/core/registry/index.d.ts +3 -0
- package/lib/core/registry/index.d.ts.map +1 -0
- package/lib/core/registry/index.js +4 -0
- package/lib/core/registry/index.js.map +1 -0
- package/lib/core/registry/service.registry.d.ts +27 -0
- package/lib/core/registry/service.registry.d.ts.map +1 -0
- package/lib/core/registry/service.registry.js +54 -0
- package/lib/core/registry/service.registry.js.map +1 -0
- package/lib/core/request.service.d.ts +83 -0
- package/lib/core/request.service.d.ts.map +1 -0
- package/lib/core/request.service.js +237 -0
- package/lib/core/request.service.js.map +1 -0
- package/lib/core/types.d.ts +270 -0
- package/lib/core/types.d.ts.map +1 -0
- package/lib/core/types.js +17 -0
- package/lib/core/types.js.map +1 -0
- package/lib/database.d.ts +6 -0
- package/lib/database.d.ts.map +1 -0
- package/lib/database.js +89 -0
- package/lib/database.js.map +1 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +54 -0
- package/lib/index.js.map +1 -0
- package/lib/middlewares/builtin/billing.d.ts +45 -0
- package/lib/middlewares/builtin/billing.d.ts.map +1 -0
- package/lib/middlewares/builtin/billing.js +362 -0
- package/lib/middlewares/builtin/billing.js.map +1 -0
- package/lib/middlewares/builtin/index.d.ts +6 -0
- package/lib/middlewares/builtin/index.d.ts.map +1 -0
- package/lib/middlewares/builtin/index.js +7 -0
- package/lib/middlewares/builtin/index.js.map +1 -0
- package/lib/middlewares/builtin/preset.d.ts +14 -0
- package/lib/middlewares/builtin/preset.d.ts.map +1 -0
- package/lib/middlewares/builtin/preset.js +156 -0
- package/lib/middlewares/builtin/preset.js.map +1 -0
- package/lib/middlewares/builtin/remote-preset-sync.d.ts +8 -0
- package/lib/middlewares/builtin/remote-preset-sync.d.ts.map +1 -0
- package/lib/middlewares/builtin/remote-preset-sync.js +32 -0
- package/lib/middlewares/builtin/remote-preset-sync.js.map +1 -0
- package/lib/middlewares/builtin/request.d.ts +10 -0
- package/lib/middlewares/builtin/request.d.ts.map +1 -0
- package/lib/middlewares/builtin/request.js +50 -0
- package/lib/middlewares/builtin/request.js.map +1 -0
- package/lib/middlewares/builtin/storage.d.ts +64 -0
- package/lib/middlewares/builtin/storage.d.ts.map +1 -0
- package/lib/middlewares/builtin/storage.js +715 -0
- package/lib/middlewares/builtin/storage.js.map +1 -0
- package/lib/middlewares/builtin/task-recorder.d.ts +20 -0
- package/lib/middlewares/builtin/task-recorder.d.ts.map +1 -0
- package/lib/middlewares/builtin/task-recorder.js +138 -0
- package/lib/middlewares/builtin/task-recorder.js.map +1 -0
- package/lib/middlewares/index.d.ts +2 -0
- package/lib/middlewares/index.d.ts.map +1 -0
- package/lib/middlewares/index.js +3 -0
- package/lib/middlewares/index.js.map +1 -0
- package/lib/pipeline/dependency-graph.d.ts +43 -0
- package/lib/pipeline/dependency-graph.d.ts.map +1 -0
- package/lib/pipeline/dependency-graph.js +240 -0
- package/lib/pipeline/dependency-graph.js.map +1 -0
- package/lib/pipeline/generation-pipeline.d.ts +38 -0
- package/lib/pipeline/generation-pipeline.d.ts.map +1 -0
- package/lib/pipeline/generation-pipeline.js +211 -0
- package/lib/pipeline/generation-pipeline.js.map +1 -0
- package/lib/pipeline/index.d.ts +4 -0
- package/lib/pipeline/index.d.ts.map +1 -0
- package/lib/pipeline/index.js +5 -0
- package/lib/pipeline/index.js.map +1 -0
- package/lib/pipeline/middleware-registry.d.ts +36 -0
- package/lib/pipeline/middleware-registry.d.ts.map +1 -0
- package/lib/pipeline/middleware-registry.js +83 -0
- package/lib/pipeline/middleware-registry.js.map +1 -0
- package/lib/plugins/billing/config.d.ts +19 -0
- package/lib/plugins/billing/config.d.ts.map +1 -0
- package/lib/plugins/billing/config.js +98 -0
- package/lib/plugins/billing/config.js.map +1 -0
- package/lib/plugins/billing/index.d.ts +4 -0
- package/lib/plugins/billing/index.d.ts.map +1 -0
- package/lib/plugins/billing/index.js +20 -0
- package/lib/plugins/billing/index.js.map +1 -0
- package/lib/plugins/billing/middleware.d.ts +12 -0
- package/lib/plugins/billing/middleware.d.ts.map +1 -0
- package/lib/plugins/billing/middleware.js +233 -0
- package/lib/plugins/billing/middleware.js.map +1 -0
- package/lib/plugins/cache/config.d.ts +44 -0
- package/lib/plugins/cache/config.d.ts.map +1 -0
- package/lib/plugins/cache/config.js +187 -0
- package/lib/plugins/cache/config.js.map +1 -0
- package/lib/plugins/cache/index.d.ts +6 -0
- package/lib/plugins/cache/index.d.ts.map +1 -0
- package/lib/plugins/cache/index.js +87 -0
- package/lib/plugins/cache/index.js.map +1 -0
- package/lib/plugins/cache/middleware.d.ts +12 -0
- package/lib/plugins/cache/middleware.d.ts.map +1 -0
- package/lib/plugins/cache/middleware.js +194 -0
- package/lib/plugins/cache/middleware.js.map +1 -0
- package/lib/plugins/cache/service.d.ts +106 -0
- package/lib/plugins/cache/service.d.ts.map +1 -0
- package/lib/plugins/cache/service.js +467 -0
- package/lib/plugins/cache/service.js.map +1 -0
- package/lib/plugins/cache/utils/index.d.ts +4 -0
- package/lib/plugins/cache/utils/index.d.ts.map +1 -0
- package/lib/plugins/cache/utils/index.js +5 -0
- package/lib/plugins/cache/utils/index.js.map +1 -0
- package/lib/plugins/cache/utils/mime.d.ts +9 -0
- package/lib/plugins/cache/utils/mime.d.ts.map +1 -0
- package/lib/plugins/cache/utils/mime.js +65 -0
- package/lib/plugins/cache/utils/mime.js.map +1 -0
- package/lib/plugins/cache/utils/s3.d.ts +19 -0
- package/lib/plugins/cache/utils/s3.d.ts.map +1 -0
- package/lib/plugins/cache/utils/s3.js +147 -0
- package/lib/plugins/cache/utils/s3.js.map +1 -0
- package/lib/plugins/cache/utils/webdav.d.ts +16 -0
- package/lib/plugins/cache/utils/webdav.d.ts.map +1 -0
- package/lib/plugins/cache/utils/webdav.js +69 -0
- package/lib/plugins/cache/utils/webdav.js.map +1 -0
- package/lib/plugins/connector-chat-api/index.d.ts +7 -0
- package/lib/plugins/connector-chat-api/index.d.ts.map +1 -0
- package/lib/plugins/connector-chat-api/index.js +400 -0
- package/lib/plugins/connector-chat-api/index.js.map +1 -0
- package/lib/plugins/connector-dalle/index.d.ts +7 -0
- package/lib/plugins/connector-dalle/index.d.ts.map +1 -0
- package/lib/plugins/connector-dalle/index.js +140 -0
- package/lib/plugins/connector-dalle/index.js.map +1 -0
- package/lib/plugins/connector-flux/index.d.ts +7 -0
- package/lib/plugins/connector-flux/index.d.ts.map +1 -0
- package/lib/plugins/connector-flux/index.js +232 -0
- package/lib/plugins/connector-flux/index.js.map +1 -0
- package/lib/plugins/connector-sd-webui/index.d.ts +7 -0
- package/lib/plugins/connector-sd-webui/index.d.ts.map +1 -0
- package/lib/plugins/connector-sd-webui/index.js +171 -0
- package/lib/plugins/connector-sd-webui/index.js.map +1 -0
- package/lib/plugins/index.d.ts +22 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/index.js +21 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/preset/config.d.ts +37 -0
- package/lib/plugins/preset/config.d.ts.map +1 -0
- package/lib/plugins/preset/config.js +74 -0
- package/lib/plugins/preset/config.js.map +1 -0
- package/lib/plugins/preset/index.d.ts +6 -0
- package/lib/plugins/preset/index.d.ts.map +1 -0
- package/lib/plugins/preset/index.js +58 -0
- package/lib/plugins/preset/index.js.map +1 -0
- package/lib/plugins/preset/middleware.d.ts +6 -0
- package/lib/plugins/preset/middleware.d.ts.map +1 -0
- package/lib/plugins/preset/middleware.js +126 -0
- package/lib/plugins/preset/middleware.js.map +1 -0
- package/lib/plugins/preset/remote-sync.service.d.ts +84 -0
- package/lib/plugins/preset/remote-sync.service.d.ts.map +1 -0
- package/lib/plugins/preset/remote-sync.service.js +342 -0
- package/lib/plugins/preset/remote-sync.service.js.map +1 -0
- package/lib/plugins/preset/service.d.ts +64 -0
- package/lib/plugins/preset/service.d.ts.map +1 -0
- package/lib/plugins/preset/service.js +196 -0
- package/lib/plugins/preset/service.js.map +1 -0
- package/lib/plugins/prompt-encoding/config.d.ts +25 -0
- package/lib/plugins/prompt-encoding/config.d.ts.map +1 -0
- package/lib/plugins/prompt-encoding/config.js +62 -0
- package/lib/plugins/prompt-encoding/config.js.map +1 -0
- package/lib/plugins/prompt-encoding/index.d.ts +5 -0
- package/lib/plugins/prompt-encoding/index.d.ts.map +1 -0
- package/lib/plugins/prompt-encoding/index.js +21 -0
- package/lib/plugins/prompt-encoding/index.js.map +1 -0
- package/lib/plugins/prompt-encoding/middleware.d.ts +6 -0
- package/lib/plugins/prompt-encoding/middleware.d.ts.map +1 -0
- package/lib/plugins/prompt-encoding/middleware.js +151 -0
- package/lib/plugins/prompt-encoding/middleware.js.map +1 -0
- package/lib/plugins/task/config.d.ts +15 -0
- package/lib/plugins/task/config.d.ts.map +1 -0
- package/lib/plugins/task/config.js +33 -0
- package/lib/plugins/task/config.js.map +1 -0
- package/lib/plugins/task/index.d.ts +5 -0
- package/lib/plugins/task/index.d.ts.map +1 -0
- package/lib/plugins/task/index.js +58 -0
- package/lib/plugins/task/index.js.map +1 -0
- package/lib/plugins/task/middleware.d.ts +14 -0
- package/lib/plugins/task/middleware.d.ts.map +1 -0
- package/lib/plugins/task/middleware.js +123 -0
- package/lib/plugins/task/middleware.js.map +1 -0
- package/lib/plugins/task/service.d.ts +94 -0
- package/lib/plugins/task/service.d.ts.map +1 -0
- package/lib/plugins/task/service.js +226 -0
- package/lib/plugins/task/service.js.map +1 -0
- package/lib/plugins/webui-auth/config.d.ts +12 -0
- package/lib/plugins/webui-auth/config.d.ts.map +1 -0
- package/lib/plugins/webui-auth/config.js +30 -0
- package/lib/plugins/webui-auth/config.js.map +1 -0
- package/lib/plugins/webui-auth/index.d.ts +5 -0
- package/lib/plugins/webui-auth/index.d.ts.map +1 -0
- package/lib/plugins/webui-auth/index.js +99 -0
- package/lib/plugins/webui-auth/index.js.map +1 -0
- package/lib/plugins/webui-auth/service.d.ts +42 -0
- package/lib/plugins/webui-auth/service.d.ts.map +1 -0
- package/lib/plugins/webui-auth/service.js +106 -0
- package/lib/plugins/webui-auth/service.js.map +1 -0
- package/lib/services/asset-cache.service.d.ts +133 -0
- package/lib/services/asset-cache.service.d.ts.map +1 -0
- package/lib/services/asset-cache.service.js +882 -0
- package/lib/services/asset-cache.service.js.map +1 -0
- package/lib/services/cache.service.d.ts +110 -0
- package/lib/services/cache.service.d.ts.map +1 -0
- package/lib/services/cache.service.js +333 -0
- package/lib/services/cache.service.js.map +1 -0
- package/lib/services/channel.service.d.ts +44 -0
- package/lib/services/channel.service.d.ts.map +1 -0
- package/lib/services/channel.service.js +154 -0
- package/lib/services/channel.service.js.map +1 -0
- package/lib/services/config.service.d.ts +73 -0
- package/lib/services/config.service.d.ts.map +1 -0
- package/lib/services/config.service.js +171 -0
- package/lib/services/config.service.js.map +1 -0
- package/lib/services/index.d.ts +8 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +9 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/medialuna.service.d.ts +173 -0
- package/lib/services/medialuna.service.d.ts.map +1 -0
- package/lib/services/medialuna.service.js +455 -0
- package/lib/services/medialuna.service.js.map +1 -0
- package/lib/services/preset.service.d.ts +69 -0
- package/lib/services/preset.service.d.ts.map +1 -0
- package/lib/services/preset.service.js +202 -0
- package/lib/services/preset.service.js.map +1 -0
- package/lib/services/remote-preset.service.d.ts +97 -0
- package/lib/services/remote-preset.service.d.ts.map +1 -0
- package/lib/services/remote-preset.service.js +212 -0
- package/lib/services/remote-preset.service.js.map +1 -0
- package/lib/services/task.service.d.ts +57 -0
- package/lib/services/task.service.d.ts.map +1 -0
- package/lib/services/task.service.js +138 -0
- package/lib/services/task.service.js.map +1 -0
- package/lib/types/index.d.ts +357 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +21 -0
- package/lib/types/index.js.map +1 -0
- package/package.json +66 -0
- package/readme.md +326 -0
|
@@ -0,0 +1,1074 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="view-container">
|
|
3
|
+
<!-- 固定头部区域 -->
|
|
4
|
+
<div class="view-header">
|
|
5
|
+
<div class="header-left">
|
|
6
|
+
<!-- 视图切换 -->
|
|
7
|
+
<div class="view-mode-switch">
|
|
8
|
+
<button
|
|
9
|
+
class="mode-btn"
|
|
10
|
+
:class="{ active: viewMode === 'list' }"
|
|
11
|
+
@click="viewMode = 'list'"
|
|
12
|
+
title="列表视图"
|
|
13
|
+
>
|
|
14
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
|
|
15
|
+
<rect x="3" y="4" width="18" height="3" rx="1"/>
|
|
16
|
+
<rect x="3" y="10.5" width="18" height="3" rx="1"/>
|
|
17
|
+
<rect x="3" y="17" width="18" height="3" rx="1"/>
|
|
18
|
+
</svg>
|
|
19
|
+
</button>
|
|
20
|
+
<button
|
|
21
|
+
class="mode-btn"
|
|
22
|
+
:class="{ active: viewMode === 'gallery' }"
|
|
23
|
+
@click="viewMode = 'gallery'"
|
|
24
|
+
title="画廊视图"
|
|
25
|
+
>
|
|
26
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
|
|
27
|
+
<rect x="3" y="3" width="8" height="8" rx="1"/>
|
|
28
|
+
<rect x="13" y="3" width="8" height="8" rx="1"/>
|
|
29
|
+
<rect x="3" y="13" width="8" height="8" rx="1"/>
|
|
30
|
+
<rect x="13" y="13" width="8" height="8" rx="1"/>
|
|
31
|
+
</svg>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="header-actions">
|
|
36
|
+
<k-button @click="openCleanupDialog">
|
|
37
|
+
<template #icon><k-icon name="delete"></k-icon></template>
|
|
38
|
+
清理记录
|
|
39
|
+
</k-button>
|
|
40
|
+
<k-button @click="fetchData">
|
|
41
|
+
<template #icon><k-icon name="refresh"></k-icon></template>
|
|
42
|
+
刷新
|
|
43
|
+
</k-button>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<!-- 统计信息 (固定) -->
|
|
48
|
+
<div class="stats-grid" v-if="stats">
|
|
49
|
+
<div class="stat-card">
|
|
50
|
+
<div class="stat-icon total"><k-icon name="clipboard-list"></k-icon></div>
|
|
51
|
+
<div class="stat-content">
|
|
52
|
+
<div class="stat-value">{{ stats.total }}</div>
|
|
53
|
+
<div class="stat-label">总任务数</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="stat-card">
|
|
57
|
+
<div class="stat-icon success"><k-icon name="check-circle"></k-icon></div>
|
|
58
|
+
<div class="stat-content">
|
|
59
|
+
<div class="stat-value success">{{ stats.byStatus.success }}</div>
|
|
60
|
+
<div class="stat-label">成功</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="stat-card">
|
|
64
|
+
<div class="stat-icon failed"><k-icon name="exclamation-triangle"></k-icon></div>
|
|
65
|
+
<div class="stat-content">
|
|
66
|
+
<div class="stat-value failed">{{ stats.byStatus.failed }}</div>
|
|
67
|
+
<div class="stat-label">失败</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="stat-card">
|
|
71
|
+
<div class="stat-icon processing"><k-icon name="clock"></k-icon></div>
|
|
72
|
+
<div class="stat-content">
|
|
73
|
+
<div class="stat-value pending">{{ stats.byStatus.pending + stats.byStatus.processing }}</div>
|
|
74
|
+
<div class="stat-label">进行中</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="stat-card">
|
|
78
|
+
<div class="stat-icon rate"><k-icon name="chart-pie"></k-icon></div>
|
|
79
|
+
<div class="stat-content">
|
|
80
|
+
<div class="stat-value">{{ stats.successRate }}</div>
|
|
81
|
+
<div class="stat-label">成功率</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<!-- 筛选栏 (固定) -->
|
|
87
|
+
<div class="filter-bar">
|
|
88
|
+
<div class="filter-group">
|
|
89
|
+
<el-select v-model="filter.status" placeholder="所有状态" clearable @change="fetchData" style="width: 140px">
|
|
90
|
+
<el-option label="等待中" value="pending"></el-option>
|
|
91
|
+
<el-option label="处理中" value="processing"></el-option>
|
|
92
|
+
<el-option label="成功" value="success"></el-option>
|
|
93
|
+
<el-option label="失败" value="failed"></el-option>
|
|
94
|
+
</el-select>
|
|
95
|
+
<el-input v-model="filter.channelId" placeholder="渠道 ID" clearable @change="fetchData" style="width: 140px"></el-input>
|
|
96
|
+
<el-input v-model="filter.userId" placeholder="用户 ID" clearable @change="fetchData" style="width: 140px"></el-input>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="pagination-info" v-if="total > 0">
|
|
99
|
+
共 {{ total }} 条记录
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<!-- 可滚动的内容区域 -->
|
|
104
|
+
<div class="view-content">
|
|
105
|
+
<!-- 列表视图 -->
|
|
106
|
+
<template v-if="viewMode === 'list'">
|
|
107
|
+
<el-table :data="tasks" style="width: 100%" class="task-table" @row-click="openDetailDialog">
|
|
108
|
+
<el-table-column prop="id" label="ID" width="80" align="center">
|
|
109
|
+
<template #default="{ row }">
|
|
110
|
+
<span class="mono-text">#{{ row.id }}</span>
|
|
111
|
+
</template>
|
|
112
|
+
</el-table-column>
|
|
113
|
+
|
|
114
|
+
<el-table-column label="状态" width="100" align="center">
|
|
115
|
+
<template #default="{ row }">
|
|
116
|
+
<StatusBadge :status="row.status" />
|
|
117
|
+
</template>
|
|
118
|
+
</el-table-column>
|
|
119
|
+
|
|
120
|
+
<el-table-column prop="channelId" label="渠道" width="100" align="center" />
|
|
121
|
+
|
|
122
|
+
<el-table-column label="提示词" min-width="300">
|
|
123
|
+
<template #default="{ row }">
|
|
124
|
+
<div class="prompt-cell" :title="getFinalPrompt(row)">{{ getFinalPrompt(row) }}</div>
|
|
125
|
+
</template>
|
|
126
|
+
</el-table-column>
|
|
127
|
+
|
|
128
|
+
<el-table-column label="输出" width="120" align="center">
|
|
129
|
+
<template #default="{ row }">
|
|
130
|
+
<span v-if="row.responseSnapshot && row.responseSnapshot.length">
|
|
131
|
+
{{ row.responseSnapshot.length }} 个资产
|
|
132
|
+
</span>
|
|
133
|
+
<span v-else class="text-muted">-</span>
|
|
134
|
+
</template>
|
|
135
|
+
</el-table-column>
|
|
136
|
+
|
|
137
|
+
<el-table-column label="耗时" width="100" align="right">
|
|
138
|
+
<template #default="{ row }">
|
|
139
|
+
<span v-if="row.duration">{{ formatDuration(row.duration) }}</span>
|
|
140
|
+
<span v-else>-</span>
|
|
141
|
+
</template>
|
|
142
|
+
</el-table-column>
|
|
143
|
+
|
|
144
|
+
<el-table-column label="时间" width="180" align="right">
|
|
145
|
+
<template #default="{ row }">
|
|
146
|
+
<span class="time-text">{{ formatDate(row.startTime) }}</span>
|
|
147
|
+
</template>
|
|
148
|
+
</el-table-column>
|
|
149
|
+
</el-table>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<!-- 画廊视图 (瀑布流) -->
|
|
153
|
+
<template v-else-if="viewMode === 'gallery'">
|
|
154
|
+
<div v-if="galleryItems.length === 0" class="empty-gallery">
|
|
155
|
+
<k-icon name="image" class="empty-icon"></k-icon>
|
|
156
|
+
<p>暂无成功生成的图片</p>
|
|
157
|
+
</div>
|
|
158
|
+
<div v-else class="masonry-grid">
|
|
159
|
+
<div
|
|
160
|
+
v-for="item in galleryItems"
|
|
161
|
+
:key="item.id + '-' + item.assetIndex"
|
|
162
|
+
class="masonry-item"
|
|
163
|
+
>
|
|
164
|
+
<div class="gallery-item" @click="openGalleryDetail(item)">
|
|
165
|
+
<div class="gallery-image-wrapper">
|
|
166
|
+
<img
|
|
167
|
+
v-if="item.kind === 'image'"
|
|
168
|
+
:src="item.url"
|
|
169
|
+
class="gallery-image"
|
|
170
|
+
loading="lazy"
|
|
171
|
+
@error="handleImageError"
|
|
172
|
+
/>
|
|
173
|
+
<video
|
|
174
|
+
v-else-if="item.kind === 'video'"
|
|
175
|
+
:src="item.url"
|
|
176
|
+
class="gallery-video"
|
|
177
|
+
muted
|
|
178
|
+
loop
|
|
179
|
+
@mouseenter="($event.target as HTMLVideoElement).play()"
|
|
180
|
+
@mouseleave="($event.target as HTMLVideoElement).pause()"
|
|
181
|
+
/>
|
|
182
|
+
<div class="gallery-overlay">
|
|
183
|
+
<k-icon name="zoom-in" class="zoom-icon"></k-icon>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="gallery-info">
|
|
187
|
+
<div class="gallery-prompt" :title="item.prompt">{{ item.prompt }}</div>
|
|
188
|
+
<div class="gallery-meta">
|
|
189
|
+
<span class="gallery-time">{{ formatDate(item.createdAt) }}</span>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
</template>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<!-- 分页 (固定在底部) -->
|
|
199
|
+
<div class="pagination">
|
|
200
|
+
<el-pagination
|
|
201
|
+
v-model:current-page="page"
|
|
202
|
+
v-model:page-size="pageSize"
|
|
203
|
+
:total="total"
|
|
204
|
+
:page-sizes="[20, 50, 100]"
|
|
205
|
+
layout="total, sizes, prev, pager, next"
|
|
206
|
+
@current-change="fetchData"
|
|
207
|
+
@size-change="fetchData"
|
|
208
|
+
></el-pagination>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<!-- 任务详情对话框 -->
|
|
212
|
+
<el-dialog
|
|
213
|
+
v-model="detailVisible"
|
|
214
|
+
title="任务详情"
|
|
215
|
+
width="800px"
|
|
216
|
+
>
|
|
217
|
+
<div v-if="currentTask" class="task-detail">
|
|
218
|
+
<div class="detail-section">
|
|
219
|
+
<h3>基本信息</h3>
|
|
220
|
+
<div class="detail-grid">
|
|
221
|
+
<div class="detail-item"><span class="label">ID:</span> {{ currentTask.id }}</div>
|
|
222
|
+
<div class="detail-item"><span class="label">状态:</span> <StatusBadge :status="currentTask.status" /></div>
|
|
223
|
+
<div class="detail-item"><span class="label">渠道 ID:</span> {{ currentTask.channelId }}</div>
|
|
224
|
+
<div class="detail-item"><span class="label">用户 ID:</span> {{ currentTask.userId || 'N/A' }}</div>
|
|
225
|
+
<div class="detail-item"><span class="label">创建时间:</span> {{ formatDate(currentTask.startTime) }}</div>
|
|
226
|
+
<div class="detail-item"><span class="label">耗时:</span> {{ formatDuration(currentTask.duration || 0) }}</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="detail-section">
|
|
231
|
+
<h3>Prompt</h3>
|
|
232
|
+
<div class="code-block">{{ getFinalPrompt(currentTask) }}</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
<div class="detail-section" v-if="currentTask.responseSnapshot && currentTask.responseSnapshot.length > 0">
|
|
236
|
+
<h3>生成结果 ({{ currentTask.responseSnapshot.length }} 个资产)</h3>
|
|
237
|
+
<div class="output-gallery">
|
|
238
|
+
<div
|
|
239
|
+
v-for="(asset, idx) in currentTask.responseSnapshot"
|
|
240
|
+
:key="idx"
|
|
241
|
+
class="output-item"
|
|
242
|
+
>
|
|
243
|
+
<template v-if="asset.kind === 'image' && asset.url">
|
|
244
|
+
<img :src="asset.url" class="output-image" />
|
|
245
|
+
</template>
|
|
246
|
+
<template v-else-if="asset.kind === 'video' && asset.url">
|
|
247
|
+
<video :src="asset.url" class="output-image" controls />
|
|
248
|
+
</template>
|
|
249
|
+
<template v-else-if="asset.kind === 'audio' && asset.url">
|
|
250
|
+
<audio :src="asset.url" controls style="width: 100%;" />
|
|
251
|
+
</template>
|
|
252
|
+
<template v-else-if="asset.kind === 'text' && asset.content">
|
|
253
|
+
<div class="text-asset">{{ asset.content }}</div>
|
|
254
|
+
</template>
|
|
255
|
+
<template v-else-if="asset.url">
|
|
256
|
+
<a :href="asset.url" target="_blank" class="file-link">
|
|
257
|
+
<k-icon name="file"></k-icon>
|
|
258
|
+
{{ asset.meta?.filename || asset.url }}
|
|
259
|
+
</a>
|
|
260
|
+
</template>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div class="detail-section" v-if="currentTask.middlewareLogs?.request?.error">
|
|
266
|
+
<h3>错误信息</h3>
|
|
267
|
+
<div class="code-block error">{{ currentTask.middlewareLogs.request.error }}</div>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</el-dialog>
|
|
271
|
+
|
|
272
|
+
<!-- 图片预览弹窗 -->
|
|
273
|
+
<ImageLightbox
|
|
274
|
+
v-model:visible="lightboxVisible"
|
|
275
|
+
:images="lightboxImages"
|
|
276
|
+
:initial-index="lightboxIndex"
|
|
277
|
+
:prompt="lightboxPrompt"
|
|
278
|
+
:created-at="lightboxCreatedAt"
|
|
279
|
+
:duration="lightboxDuration"
|
|
280
|
+
/>
|
|
281
|
+
|
|
282
|
+
<!-- 清理对话框 -->
|
|
283
|
+
<el-dialog
|
|
284
|
+
v-model="cleanupVisible"
|
|
285
|
+
title="清理旧任务"
|
|
286
|
+
width="400px"
|
|
287
|
+
>
|
|
288
|
+
<div class="cleanup-form">
|
|
289
|
+
<p>清理多少天前的任务?</p>
|
|
290
|
+
<el-input-number v-model="cleanupDays" :min="1" :max="365"></el-input-number>
|
|
291
|
+
</div>
|
|
292
|
+
<template #footer>
|
|
293
|
+
<span class="dialog-footer">
|
|
294
|
+
<k-button @click="cleanupVisible = false">取消</k-button>
|
|
295
|
+
<k-button type="error" @click="confirmCleanup">确认清理</k-button>
|
|
296
|
+
</span>
|
|
297
|
+
</template>
|
|
298
|
+
</el-dialog>
|
|
299
|
+
</div>
|
|
300
|
+
</template>
|
|
301
|
+
|
|
302
|
+
<script setup lang="ts">
|
|
303
|
+
import { ref, computed, onMounted } from 'vue'
|
|
304
|
+
import { message } from '@koishijs/client'
|
|
305
|
+
import { TaskData } from '../types'
|
|
306
|
+
import { taskApi } from '../api'
|
|
307
|
+
import StatusBadge from './StatusBadge.vue'
|
|
308
|
+
import ImageLightbox from './ImageLightbox.vue'
|
|
309
|
+
|
|
310
|
+
// 视图模式
|
|
311
|
+
const viewMode = ref<'list' | 'gallery'>('list')
|
|
312
|
+
|
|
313
|
+
// 状态
|
|
314
|
+
const loading = ref(false)
|
|
315
|
+
const tasks = ref<TaskData[]>([])
|
|
316
|
+
const stats = ref<any>(null)
|
|
317
|
+
const total = ref(0)
|
|
318
|
+
const page = ref(1)
|
|
319
|
+
const pageSize = ref(20)
|
|
320
|
+
|
|
321
|
+
// 筛选
|
|
322
|
+
const filter = ref({
|
|
323
|
+
status: '',
|
|
324
|
+
userId: undefined as number | undefined,
|
|
325
|
+
channelId: undefined as number | undefined
|
|
326
|
+
})
|
|
327
|
+
|
|
328
|
+
// 详情
|
|
329
|
+
const detailVisible = ref(false)
|
|
330
|
+
const currentTask = ref<TaskData | null>(null)
|
|
331
|
+
|
|
332
|
+
// 画廊详情
|
|
333
|
+
const galleryDetailVisible = ref(false)
|
|
334
|
+
const currentGalleryItem = ref<GalleryItem | null>(null)
|
|
335
|
+
|
|
336
|
+
// Lightbox 状态
|
|
337
|
+
const lightboxVisible = ref(false)
|
|
338
|
+
const lightboxImages = ref<string[]>([])
|
|
339
|
+
const lightboxIndex = ref(0)
|
|
340
|
+
const lightboxPrompt = ref('')
|
|
341
|
+
const lightboxCreatedAt = ref<string | undefined>()
|
|
342
|
+
const lightboxDuration = ref<number | undefined>()
|
|
343
|
+
|
|
344
|
+
// 清理
|
|
345
|
+
const cleanupVisible = ref(false)
|
|
346
|
+
const cleanupDays = ref(30)
|
|
347
|
+
|
|
348
|
+
// 获取任务的最终提示词
|
|
349
|
+
const getFinalPrompt = (task: TaskData): string => {
|
|
350
|
+
return (task.middlewareLogs as any)?.preset?.transformedPrompt
|
|
351
|
+
|| task.requestSnapshot?.prompt
|
|
352
|
+
|| ''
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// 画廊项目类型
|
|
356
|
+
interface GalleryItem {
|
|
357
|
+
id: number
|
|
358
|
+
assetIndex: number
|
|
359
|
+
kind: 'image' | 'video'
|
|
360
|
+
url: string
|
|
361
|
+
prompt: string
|
|
362
|
+
channelId: number
|
|
363
|
+
createdAt: string
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// 从任务列表提取画廊项目
|
|
367
|
+
const galleryItems = computed<GalleryItem[]>(() => {
|
|
368
|
+
const items: GalleryItem[] = []
|
|
369
|
+
for (const task of tasks.value) {
|
|
370
|
+
if (task.status !== 'success' || !task.responseSnapshot) continue
|
|
371
|
+
|
|
372
|
+
// 优先使用预设中间件处理后的最终提示词,如果没有则使用原始输入
|
|
373
|
+
const finalPrompt = (task.middlewareLogs as any)?.preset?.transformedPrompt
|
|
374
|
+
|| task.requestSnapshot?.prompt
|
|
375
|
+
|| ''
|
|
376
|
+
|
|
377
|
+
// 从 responseSnapshot 中提取图片/视频 URL
|
|
378
|
+
task.responseSnapshot.forEach((asset, assetIndex) => {
|
|
379
|
+
if ((asset.kind === 'image' || asset.kind === 'video') && asset.url) {
|
|
380
|
+
items.push({
|
|
381
|
+
id: task.id,
|
|
382
|
+
assetIndex,
|
|
383
|
+
kind: asset.kind,
|
|
384
|
+
url: asset.url,
|
|
385
|
+
prompt: finalPrompt,
|
|
386
|
+
channelId: task.channelId,
|
|
387
|
+
createdAt: task.startTime
|
|
388
|
+
})
|
|
389
|
+
}
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
return items
|
|
393
|
+
})
|
|
394
|
+
|
|
395
|
+
// 方法
|
|
396
|
+
const fetchData = async () => {
|
|
397
|
+
loading.value = true
|
|
398
|
+
try {
|
|
399
|
+
// 构建查询参数,过滤掉空值
|
|
400
|
+
const query: Record<string, any> = {
|
|
401
|
+
limit: pageSize.value,
|
|
402
|
+
offset: (page.value - 1) * pageSize.value
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// 只添加有值的筛选条件
|
|
406
|
+
if (filter.value.status) {
|
|
407
|
+
query.status = filter.value.status
|
|
408
|
+
}
|
|
409
|
+
if (filter.value.userId) {
|
|
410
|
+
query.userId = Number(filter.value.userId)
|
|
411
|
+
}
|
|
412
|
+
if (filter.value.channelId) {
|
|
413
|
+
query.channelId = Number(filter.value.channelId)
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const [listRes, statsRes] = await Promise.all([
|
|
417
|
+
taskApi.list(query),
|
|
418
|
+
taskApi.stats()
|
|
419
|
+
])
|
|
420
|
+
|
|
421
|
+
tasks.value = listRes.items
|
|
422
|
+
total.value = listRes.total
|
|
423
|
+
stats.value = statsRes
|
|
424
|
+
} catch (e) {
|
|
425
|
+
console.error('Failed to fetch tasks:', e)
|
|
426
|
+
message.error('加载数据失败')
|
|
427
|
+
} finally {
|
|
428
|
+
loading.value = false
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const openDetailDialog = (task: TaskData) => {
|
|
433
|
+
currentTask.value = task
|
|
434
|
+
detailVisible.value = true
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const openGalleryDetail = (item: GalleryItem) => {
|
|
438
|
+
// 使用 ImageLightbox 而不是 el-dialog
|
|
439
|
+
lightboxImages.value = [item.url]
|
|
440
|
+
lightboxIndex.value = 0
|
|
441
|
+
lightboxPrompt.value = item.prompt
|
|
442
|
+
lightboxCreatedAt.value = item.createdAt
|
|
443
|
+
lightboxDuration.value = undefined
|
|
444
|
+
lightboxVisible.value = true
|
|
445
|
+
|
|
446
|
+
// 保留旧逻辑用于兼容
|
|
447
|
+
currentGalleryItem.value = item
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const openCleanupDialog = () => {
|
|
451
|
+
cleanupVisible.value = true
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const confirmCleanup = async () => {
|
|
455
|
+
try {
|
|
456
|
+
const res = await taskApi.cleanup(cleanupDays.value)
|
|
457
|
+
message.success(`成功清理 ${res.deleted} 条任务`)
|
|
458
|
+
cleanupVisible.value = false
|
|
459
|
+
fetchData()
|
|
460
|
+
} catch (e) {
|
|
461
|
+
message.error('清理失败')
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const formatDate = (dateStr: string) => {
|
|
466
|
+
return new Date(dateStr).toLocaleString()
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
const formatDuration = (ms: number) => {
|
|
470
|
+
if (ms < 1000) return `${ms}ms`
|
|
471
|
+
return `${(ms / 1000).toFixed(2)}s`
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
const handleImageError = (e: Event) => {
|
|
475
|
+
const img = e.target as HTMLImageElement
|
|
476
|
+
img.style.display = 'none'
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
const copyToClipboard = async (text: string) => {
|
|
480
|
+
try {
|
|
481
|
+
await navigator.clipboard.writeText(text)
|
|
482
|
+
message.success('已复制到剪贴板')
|
|
483
|
+
} catch {
|
|
484
|
+
message.error('复制失败')
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const openInNewTab = (url: string) => {
|
|
489
|
+
window.open(url, '_blank')
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const getFilename = (item: GalleryItem) => {
|
|
493
|
+
const ext = item.kind === 'video' ? 'mp4' : 'png'
|
|
494
|
+
return `media-luna-${item.id}-${item.assetIndex}.${ext}`
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
onMounted(() => {
|
|
498
|
+
fetchData()
|
|
499
|
+
})
|
|
500
|
+
</script>
|
|
501
|
+
|
|
502
|
+
<style scoped>
|
|
503
|
+
.view-container {
|
|
504
|
+
height: 100%;
|
|
505
|
+
display: flex;
|
|
506
|
+
flex-direction: column;
|
|
507
|
+
min-height: 0;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.view-header {
|
|
511
|
+
flex-shrink: 0;
|
|
512
|
+
display: flex;
|
|
513
|
+
justify-content: space-between;
|
|
514
|
+
align-items: center;
|
|
515
|
+
margin-bottom: 1rem;
|
|
516
|
+
padding: 0 0.5rem;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.header-left {
|
|
520
|
+
display: flex;
|
|
521
|
+
align-items: center;
|
|
522
|
+
gap: 1rem;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.header-actions {
|
|
526
|
+
display: flex;
|
|
527
|
+
gap: 10px;
|
|
528
|
+
align-items: center;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.view-mode-switch {
|
|
532
|
+
display: flex;
|
|
533
|
+
gap: 2px;
|
|
534
|
+
background-color: var(--k-color-bg-2);
|
|
535
|
+
border: 1px solid var(--k-color-border);
|
|
536
|
+
border-radius: 6px;
|
|
537
|
+
padding: 2px;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.mode-btn {
|
|
541
|
+
display: flex;
|
|
542
|
+
align-items: center;
|
|
543
|
+
justify-content: center;
|
|
544
|
+
width: 32px;
|
|
545
|
+
height: 28px;
|
|
546
|
+
border: none;
|
|
547
|
+
background: transparent;
|
|
548
|
+
color: var(--k-color-text-description);
|
|
549
|
+
cursor: pointer;
|
|
550
|
+
border-radius: 4px;
|
|
551
|
+
transition: all 0.2s ease;
|
|
552
|
+
font-size: 16px;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.mode-btn:hover {
|
|
556
|
+
color: var(--k-color-text);
|
|
557
|
+
background-color: var(--k-color-bg-1);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.mode-btn.active {
|
|
561
|
+
color: var(--k-color-active);
|
|
562
|
+
background-color: var(--k-card-bg);
|
|
563
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.view-content {
|
|
567
|
+
flex: 1 1 0;
|
|
568
|
+
min-height: 0;
|
|
569
|
+
overflow-y: auto;
|
|
570
|
+
overflow-x: hidden;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* Stats Grid */
|
|
574
|
+
.stats-grid {
|
|
575
|
+
flex-shrink: 0;
|
|
576
|
+
display: grid;
|
|
577
|
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
578
|
+
gap: 1rem;
|
|
579
|
+
margin-bottom: 2rem;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.stat-card {
|
|
583
|
+
background: var(--k-card-bg);
|
|
584
|
+
border: 1px solid transparent;
|
|
585
|
+
border-radius: 16px;
|
|
586
|
+
padding: 1.5rem;
|
|
587
|
+
display: flex;
|
|
588
|
+
flex-direction: row; /* Layout change: row */
|
|
589
|
+
align-items: center;
|
|
590
|
+
justify-content: space-between;
|
|
591
|
+
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
592
|
+
position: relative;
|
|
593
|
+
overflow: hidden;
|
|
594
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.stat-card:hover {
|
|
598
|
+
transform: translateY(-4px);
|
|
599
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.stat-icon {
|
|
603
|
+
width: 48px;
|
|
604
|
+
height: 48px;
|
|
605
|
+
border-radius: 50%;
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
justify-content: center;
|
|
609
|
+
font-size: 1.5rem;
|
|
610
|
+
flex-shrink: 0;
|
|
611
|
+
background-color: var(--k-color-bg-2);
|
|
612
|
+
color: var(--k-color-text-description);
|
|
613
|
+
transition: all 0.3s ease;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.stat-card:hover .stat-icon {
|
|
617
|
+
transform: scale(1.1);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.stat-icon.total { background-color: rgba(var(--k-color-primary-rgb), 0.1); color: var(--k-color-primary); }
|
|
621
|
+
.stat-icon.success { background-color: rgba(var(--k-color-success-rgb), 0.1); color: var(--k-color-success); }
|
|
622
|
+
.stat-icon.failed { background-color: rgba(var(--k-color-error-rgb), 0.1); color: var(--k-color-error); }
|
|
623
|
+
.stat-icon.processing { background-color: rgba(var(--k-color-warning-rgb), 0.1); color: var(--k-color-warning); }
|
|
624
|
+
.stat-icon.rate { background-color: rgba(var(--k-color-info-rgb), 0.1); color: var(--k-color-info); }
|
|
625
|
+
|
|
626
|
+
.stat-content {
|
|
627
|
+
display: flex;
|
|
628
|
+
flex-direction: column-reverse;
|
|
629
|
+
align-items: flex-end; /* Align right */
|
|
630
|
+
flex-grow: 1;
|
|
631
|
+
margin-left: 1rem;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.stat-label {
|
|
635
|
+
font-size: 0.85rem;
|
|
636
|
+
color: var(--k-color-text-description);
|
|
637
|
+
margin-top: 0.5rem;
|
|
638
|
+
font-weight: 500;
|
|
639
|
+
text-transform: uppercase;
|
|
640
|
+
letter-spacing: 0.05em;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.stat-value {
|
|
644
|
+
font-size: 2rem;
|
|
645
|
+
font-weight: 700;
|
|
646
|
+
color: var(--k-color-text);
|
|
647
|
+
line-height: 1;
|
|
648
|
+
letter-spacing: -0.03em;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.stat-value.success { color: var(--k-color-success); }
|
|
652
|
+
.stat-value.failed { color: var(--k-color-error); }
|
|
653
|
+
.stat-value.pending { color: var(--k-color-warning); }
|
|
654
|
+
|
|
655
|
+
/* Filter Bar */
|
|
656
|
+
.filter-bar {
|
|
657
|
+
flex-shrink: 0;
|
|
658
|
+
display: flex;
|
|
659
|
+
justify-content: space-between;
|
|
660
|
+
align-items: center;
|
|
661
|
+
margin-bottom: 1rem;
|
|
662
|
+
background-color: var(--k-card-bg);
|
|
663
|
+
padding: 1rem;
|
|
664
|
+
border-radius: 12px;
|
|
665
|
+
border: 1px solid var(--k-color-border);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.filter-group {
|
|
669
|
+
display: flex;
|
|
670
|
+
gap: 1rem;
|
|
671
|
+
flex-wrap: wrap;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.pagination-info {
|
|
675
|
+
color: var(--k-color-text-description);
|
|
676
|
+
font-size: 0.9rem;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/* Task Table */
|
|
680
|
+
.task-table {
|
|
681
|
+
border: 1px solid var(--k-color-border);
|
|
682
|
+
border-radius: 12px;
|
|
683
|
+
cursor: pointer;
|
|
684
|
+
overflow: hidden;
|
|
685
|
+
--el-table-header-bg-color: var(--k-color-bg-1); /* Blend with page bg */
|
|
686
|
+
--el-table-row-hover-bg-color: var(--k-color-bg-2);
|
|
687
|
+
--el-table-border-color: var(--k-color-border);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.task-table :deep(.el-table__row) {
|
|
691
|
+
transition: background-color 0.15s ease;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.task-table :deep(th.el-table__cell) {
|
|
695
|
+
font-weight: 600;
|
|
696
|
+
color: var(--k-color-text-description);
|
|
697
|
+
text-transform: uppercase;
|
|
698
|
+
font-size: 0.75rem;
|
|
699
|
+
letter-spacing: 0.05em;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.mono-text {
|
|
703
|
+
font-family: monospace;
|
|
704
|
+
color: var(--k-color-text-description);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.prompt-cell {
|
|
708
|
+
white-space: nowrap;
|
|
709
|
+
overflow: hidden;
|
|
710
|
+
text-overflow: ellipsis;
|
|
711
|
+
color: var(--k-color-text);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.time-text {
|
|
715
|
+
font-size: 0.85rem;
|
|
716
|
+
color: var(--k-color-text-description);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.text-muted {
|
|
720
|
+
color: var(--k-color-text-description);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/* Masonry Gallery */
|
|
724
|
+
.masonry-grid {
|
|
725
|
+
columns: 5;
|
|
726
|
+
column-gap: 1rem;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
@media (max-width: 1400px) {
|
|
730
|
+
.masonry-grid { columns: 4; }
|
|
731
|
+
}
|
|
732
|
+
@media (max-width: 1100px) {
|
|
733
|
+
.masonry-grid { columns: 3; }
|
|
734
|
+
}
|
|
735
|
+
@media (max-width: 800px) {
|
|
736
|
+
.masonry-grid { columns: 2; }
|
|
737
|
+
}
|
|
738
|
+
@media (max-width: 500px) {
|
|
739
|
+
.masonry-grid { columns: 1; }
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.masonry-item {
|
|
743
|
+
break-inside: avoid;
|
|
744
|
+
margin-bottom: 1rem;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.gallery-item {
|
|
748
|
+
background: var(--k-card-bg);
|
|
749
|
+
border: 1px solid var(--k-color-border);
|
|
750
|
+
border-radius: 8px;
|
|
751
|
+
overflow: hidden;
|
|
752
|
+
cursor: pointer;
|
|
753
|
+
transition: all 0.2s ease;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.gallery-item:hover {
|
|
757
|
+
border-color: var(--k-color-active);
|
|
758
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.gallery-image-wrapper {
|
|
762
|
+
position: relative;
|
|
763
|
+
width: 100%;
|
|
764
|
+
overflow: hidden;
|
|
765
|
+
background: var(--k-color-bg-2);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.gallery-image,
|
|
769
|
+
.gallery-video {
|
|
770
|
+
width: 100%;
|
|
771
|
+
display: block;
|
|
772
|
+
transition: transform 0.3s;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.gallery-item:hover .gallery-image,
|
|
776
|
+
.gallery-item:hover .gallery-video {
|
|
777
|
+
transform: scale(1.03);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.gallery-overlay {
|
|
781
|
+
position: absolute;
|
|
782
|
+
inset: 0;
|
|
783
|
+
background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
|
|
784
|
+
display: flex;
|
|
785
|
+
flex-direction: column;
|
|
786
|
+
justify-content: flex-end;
|
|
787
|
+
padding: 1.5rem;
|
|
788
|
+
opacity: 0;
|
|
789
|
+
transition: opacity 0.3s;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.gallery-item:hover .gallery-overlay {
|
|
793
|
+
opacity: 1;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.zoom-icon {
|
|
797
|
+
font-size: 2rem;
|
|
798
|
+
color: #fff;
|
|
799
|
+
margin-bottom: auto; /* Push to center/top if needed, or remove to stay bottom */
|
|
800
|
+
align-self: center;
|
|
801
|
+
opacity: 0;
|
|
802
|
+
transform: scale(0.8);
|
|
803
|
+
transition: all 0.3s;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.gallery-item:hover .zoom-icon {
|
|
807
|
+
opacity: 1;
|
|
808
|
+
transform: scale(1);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.gallery-info {
|
|
812
|
+
padding: 0.75rem;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.gallery-prompt {
|
|
816
|
+
font-size: 0.85rem;
|
|
817
|
+
color: var(--k-color-text);
|
|
818
|
+
display: -webkit-box;
|
|
819
|
+
-webkit-line-clamp: 2;
|
|
820
|
+
line-clamp: 2;
|
|
821
|
+
-webkit-box-orient: vertical;
|
|
822
|
+
overflow: hidden;
|
|
823
|
+
line-height: 1.4;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.gallery-meta {
|
|
827
|
+
margin-top: 0.5rem;
|
|
828
|
+
font-size: 0.75rem;
|
|
829
|
+
color: var(--k-color-text-description);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.empty-gallery {
|
|
833
|
+
text-align: center;
|
|
834
|
+
padding: 4rem 2rem;
|
|
835
|
+
color: var(--k-color-text-description);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.empty-icon {
|
|
839
|
+
font-size: 3rem;
|
|
840
|
+
margin-bottom: 1rem;
|
|
841
|
+
opacity: 0.5;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/* Pagination */
|
|
845
|
+
.pagination {
|
|
846
|
+
flex-shrink: 0;
|
|
847
|
+
margin-top: 1rem;
|
|
848
|
+
padding-top: 1rem;
|
|
849
|
+
display: flex;
|
|
850
|
+
justify-content: center;
|
|
851
|
+
border-top: 1px solid var(--k-color-border);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/* Detail Modal Styles */
|
|
855
|
+
.task-detail {
|
|
856
|
+
display: flex;
|
|
857
|
+
flex-direction: column;
|
|
858
|
+
gap: 1.5rem;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.detail-section h3 {
|
|
862
|
+
font-size: 1.1rem;
|
|
863
|
+
margin-bottom: 1rem;
|
|
864
|
+
padding-bottom: 0.5rem;
|
|
865
|
+
border-bottom: 1px solid var(--k-color-border);
|
|
866
|
+
color: var(--k-color-text);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.detail-grid {
|
|
870
|
+
display: grid;
|
|
871
|
+
grid-template-columns: repeat(2, 1fr);
|
|
872
|
+
gap: 1rem;
|
|
873
|
+
background-color: var(--k-color-bg-2);
|
|
874
|
+
padding: 1rem;
|
|
875
|
+
border-radius: 8px;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.detail-item {
|
|
879
|
+
display: flex;
|
|
880
|
+
align-items: center;
|
|
881
|
+
gap: 0.5rem;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.label {
|
|
885
|
+
font-weight: 600;
|
|
886
|
+
color: var(--k-color-text-description);
|
|
887
|
+
flex-shrink: 0;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.code-block {
|
|
891
|
+
background-color: var(--k-color-bg-2);
|
|
892
|
+
padding: 1rem;
|
|
893
|
+
border-radius: 6px;
|
|
894
|
+
font-family: 'Fira Code', monospace;
|
|
895
|
+
font-size: 0.9rem;
|
|
896
|
+
white-space: pre-wrap;
|
|
897
|
+
word-break: break-all;
|
|
898
|
+
max-height: 300px;
|
|
899
|
+
overflow-y: auto;
|
|
900
|
+
border: 1px solid var(--k-color-border);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.code-block.error {
|
|
904
|
+
background-color: var(--k-color-error-bg);
|
|
905
|
+
color: var(--k-color-error);
|
|
906
|
+
border-color: var(--k-color-error);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.output-gallery {
|
|
910
|
+
display: grid;
|
|
911
|
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
912
|
+
gap: 1rem;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.output-item {
|
|
916
|
+
border: 1px solid var(--k-color-border);
|
|
917
|
+
border-radius: 8px;
|
|
918
|
+
overflow: hidden;
|
|
919
|
+
background-color: var(--k-color-bg-2);
|
|
920
|
+
transition: transform 0.2s;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.output-item:hover {
|
|
924
|
+
transform: scale(1.02);
|
|
925
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.output-image {
|
|
929
|
+
width: 100%;
|
|
930
|
+
height: 150px;
|
|
931
|
+
object-fit: cover;
|
|
932
|
+
display: block;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.text-asset {
|
|
936
|
+
padding: 0.75rem;
|
|
937
|
+
font-size: 0.85rem;
|
|
938
|
+
white-space: pre-wrap;
|
|
939
|
+
word-break: break-word;
|
|
940
|
+
max-height: 150px;
|
|
941
|
+
overflow-y: auto;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
.file-link {
|
|
945
|
+
display: flex;
|
|
946
|
+
align-items: center;
|
|
947
|
+
gap: 0.5rem;
|
|
948
|
+
padding: 1rem;
|
|
949
|
+
color: var(--k-color-active);
|
|
950
|
+
text-decoration: none;
|
|
951
|
+
font-size: 0.85rem;
|
|
952
|
+
word-break: break-all;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/* Gallery Detail Dialog */
|
|
956
|
+
.gallery-detail-dialog :deep(.el-dialog__header) {
|
|
957
|
+
display: none;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.gallery-detail-dialog :deep(.el-dialog__body) {
|
|
961
|
+
padding: 0;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.gallery-detail {
|
|
965
|
+
display: flex;
|
|
966
|
+
height: 80vh;
|
|
967
|
+
background: var(--k-card-bg);
|
|
968
|
+
border-radius: 12px;
|
|
969
|
+
overflow: hidden;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.gallery-detail-media {
|
|
973
|
+
flex: 1;
|
|
974
|
+
background: #000;
|
|
975
|
+
display: flex;
|
|
976
|
+
align-items: center;
|
|
977
|
+
justify-content: center;
|
|
978
|
+
overflow: hidden;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
.gallery-detail-media img,
|
|
982
|
+
.gallery-detail-media video {
|
|
983
|
+
max-width: 100%;
|
|
984
|
+
max-height: 100%;
|
|
985
|
+
object-fit: contain;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.gallery-detail-sidebar {
|
|
989
|
+
width: 320px;
|
|
990
|
+
display: flex;
|
|
991
|
+
flex-direction: column;
|
|
992
|
+
border-left: 1px solid var(--k-color-border);
|
|
993
|
+
background: var(--k-card-bg);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.sidebar-header {
|
|
997
|
+
padding: 1rem;
|
|
998
|
+
border-bottom: 1px solid var(--k-color-border);
|
|
999
|
+
display: flex;
|
|
1000
|
+
justify-content: space-between;
|
|
1001
|
+
align-items: center;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.sidebar-header h3 {
|
|
1005
|
+
margin: 0;
|
|
1006
|
+
font-size: 1.1rem;
|
|
1007
|
+
color: var(--k-color-text);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.sidebar-content {
|
|
1011
|
+
flex: 1;
|
|
1012
|
+
padding: 1rem;
|
|
1013
|
+
overflow-y: auto;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.info-block {
|
|
1017
|
+
margin-bottom: 1.5rem;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.info-label {
|
|
1021
|
+
font-size: 0.75rem;
|
|
1022
|
+
font-weight: 600;
|
|
1023
|
+
color: var(--k-color-text-description);
|
|
1024
|
+
text-transform: uppercase;
|
|
1025
|
+
letter-spacing: 0.05em;
|
|
1026
|
+
margin-bottom: 0.5rem;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.info-value {
|
|
1030
|
+
color: var(--k-color-text);
|
|
1031
|
+
font-size: 0.9rem;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.info-value.prompt {
|
|
1035
|
+
background: var(--k-color-bg-2);
|
|
1036
|
+
padding: 0.75rem;
|
|
1037
|
+
border-radius: 6px;
|
|
1038
|
+
font-family: monospace;
|
|
1039
|
+
font-size: 0.85rem;
|
|
1040
|
+
line-height: 1.5;
|
|
1041
|
+
white-space: pre-wrap;
|
|
1042
|
+
word-break: break-word;
|
|
1043
|
+
margin-bottom: 0.5rem;
|
|
1044
|
+
max-height: 200px;
|
|
1045
|
+
overflow-y: auto;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.sidebar-footer {
|
|
1049
|
+
padding: 1rem;
|
|
1050
|
+
border-top: 1px solid var(--k-color-border);
|
|
1051
|
+
display: flex;
|
|
1052
|
+
gap: 0.5rem;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.download-btn {
|
|
1056
|
+
text-decoration: none;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* Cleanup Form */
|
|
1060
|
+
.cleanup-form {
|
|
1061
|
+
text-align: center;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.cleanup-form p {
|
|
1065
|
+
margin-bottom: 1rem;
|
|
1066
|
+
color: var(--k-color-text);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.dialog-footer {
|
|
1070
|
+
display: flex;
|
|
1071
|
+
gap: 10px;
|
|
1072
|
+
justify-content: flex-end;
|
|
1073
|
+
}
|
|
1074
|
+
</style>
|