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,698 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="view-container">
|
|
3
|
+
<div class="view-header">
|
|
4
|
+
<div class="header-left">
|
|
5
|
+
<k-button solid type="primary" @click="openCreateDialog" class="create-btn">
|
|
6
|
+
<template #icon><k-icon name="add"></k-icon></template>
|
|
7
|
+
新建渠道
|
|
8
|
+
</k-button>
|
|
9
|
+
<TagFilter
|
|
10
|
+
v-model="selectedTags"
|
|
11
|
+
:all-tags="allTags"
|
|
12
|
+
:preset-tags="presetTags"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="header-right">
|
|
16
|
+
<ViewModeSwitch v-model="viewMode" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="view-content">
|
|
21
|
+
<LoadingState v-if="loading" />
|
|
22
|
+
|
|
23
|
+
<!-- 卡片视图 -->
|
|
24
|
+
<div v-else-if="viewMode === 'card'" class="channel-grid">
|
|
25
|
+
<div v-for="channel in filteredChannels" :key="channel.id" class="channel-card-wrapper">
|
|
26
|
+
<div class="channel-card" @click="openEditDialog(channel)">
|
|
27
|
+
<div class="card-header">
|
|
28
|
+
<div class="header-main">
|
|
29
|
+
<div class="channel-name">
|
|
30
|
+
{{ channel.name }}
|
|
31
|
+
</div>
|
|
32
|
+
<el-switch v-model="channel.enabled" size="small" @change="toggleEnable(channel)" @click.stop />
|
|
33
|
+
</div>
|
|
34
|
+
<div class="header-meta">
|
|
35
|
+
<span class="connector-badge">
|
|
36
|
+
<k-icon name="link"></k-icon> {{ getConnectorName(channel.connectorId) }}
|
|
37
|
+
</span>
|
|
38
|
+
<!-- 中间件字段(如费用)显示在标题旁 -->
|
|
39
|
+
<template v-for="field in middlewareCardFields" :key="`mw-${field.key}`">
|
|
40
|
+
<span class="cost-badge" v-if="field.key === 'cost'">
|
|
41
|
+
{{ formatFieldValue(getCardFieldValue(channel, field), field.format, getCurrencySuffix(channel, field)) }}
|
|
42
|
+
</span>
|
|
43
|
+
</template>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="card-body">
|
|
48
|
+
<!-- 配置字段列表 -->
|
|
49
|
+
<div class="field-list" v-if="getCardFields(channel).length">
|
|
50
|
+
<div v-for="field in getCardFields(channel)" :key="field.key" class="field-item">
|
|
51
|
+
<span class="field-label">{{ field.label }}</span>
|
|
52
|
+
<span class="field-value">{{ formatFieldValue(channel.connectorConfig[field.key], field.format) }}</span>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- 标签 -->
|
|
57
|
+
<div class="tags-list" v-if="channel.tags && channel.tags.length">
|
|
58
|
+
<span v-for="tag in channel.tags" :key="tag" class="tag-pill">{{ tag }}</span>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="card-footer" @click.stop>
|
|
63
|
+
<k-button size="mini" class="copy-btn" @click="copyChannel(channel)">
|
|
64
|
+
<template #icon><k-icon name="copy"></k-icon></template>
|
|
65
|
+
复制
|
|
66
|
+
</k-button>
|
|
67
|
+
<div class="spacer"></div>
|
|
68
|
+
<k-button size="mini" class="delete-btn" @click="confirmDelete(channel)">
|
|
69
|
+
<template #icon><k-icon name="delete"></k-icon></template>
|
|
70
|
+
删除
|
|
71
|
+
</k-button>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<!-- 列表视图 -->
|
|
78
|
+
<div v-else class="list-view">
|
|
79
|
+
<table class="channel-table">
|
|
80
|
+
<thead>
|
|
81
|
+
<tr>
|
|
82
|
+
<th class="col-name">名称</th>
|
|
83
|
+
<th class="col-connector">连接器</th>
|
|
84
|
+
<th class="col-tags">标签</th>
|
|
85
|
+
<th class="col-cost">费用</th>
|
|
86
|
+
<th class="col-status">状态</th>
|
|
87
|
+
<th class="col-actions">操作</th>
|
|
88
|
+
</tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody>
|
|
91
|
+
<tr
|
|
92
|
+
v-for="channel in filteredChannels"
|
|
93
|
+
:key="channel.id"
|
|
94
|
+
class="channel-row"
|
|
95
|
+
@click="openEditDialog(channel)"
|
|
96
|
+
>
|
|
97
|
+
<td class="col-name">
|
|
98
|
+
<span class="name-text">{{ channel.name }}</span>
|
|
99
|
+
</td>
|
|
100
|
+
<td class="col-connector">
|
|
101
|
+
<span class="connector-badge">{{ getConnectorName(channel.connectorId) }}</span>
|
|
102
|
+
</td>
|
|
103
|
+
<td class="col-tags">
|
|
104
|
+
<div class="tags-wrapper">
|
|
105
|
+
<span v-for="tag in (channel.tags || []).slice(0, 2)" :key="tag" class="mini-tag">{{ tag }}</span>
|
|
106
|
+
<span v-if="channel.tags && channel.tags.length > 2" class="mini-tag more">+{{ channel.tags.length - 2 }}</span>
|
|
107
|
+
</div>
|
|
108
|
+
</td>
|
|
109
|
+
<td class="col-cost">
|
|
110
|
+
<template v-for="field in middlewareCardFields" :key="`mw-${field.key}`">
|
|
111
|
+
<span v-if="field.key === 'cost'" class="cost-value">
|
|
112
|
+
{{ formatFieldValue(getCardFieldValue(channel, field), field.format, getCurrencySuffix(channel, field)) }}
|
|
113
|
+
</span>
|
|
114
|
+
</template>
|
|
115
|
+
</td>
|
|
116
|
+
<td class="col-status" @click.stop>
|
|
117
|
+
<el-switch v-model="channel.enabled" size="small" @change="toggleEnable(channel)" />
|
|
118
|
+
</td>
|
|
119
|
+
<td class="col-actions" @click.stop>
|
|
120
|
+
<div class="action-btns">
|
|
121
|
+
<k-button size="mini" class="copy-btn" @click="copyChannel(channel)">
|
|
122
|
+
<template #icon><k-icon name="copy"></k-icon></template>
|
|
123
|
+
复制
|
|
124
|
+
</k-button>
|
|
125
|
+
<k-button size="mini" class="delete-btn" @click="confirmDelete(channel)">
|
|
126
|
+
<template #icon><k-icon name="delete"></k-icon></template>
|
|
127
|
+
删除
|
|
128
|
+
</k-button>
|
|
129
|
+
</div>
|
|
130
|
+
</td>
|
|
131
|
+
</tr>
|
|
132
|
+
</tbody>
|
|
133
|
+
</table>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<!-- 编辑/创建对话框 -->
|
|
138
|
+
<ChannelConfigDialog
|
|
139
|
+
v-model="dialogVisible"
|
|
140
|
+
:channel="editingChannel"
|
|
141
|
+
@saved="handleDialogSaved"
|
|
142
|
+
/>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<script setup lang="ts">
|
|
147
|
+
import { ref, computed, onMounted } from 'vue'
|
|
148
|
+
import { message } from '@koishijs/client'
|
|
149
|
+
import { ChannelConfig, ConfigField, ConnectorDefinition, CardField } from '../types'
|
|
150
|
+
import { channelApi, connectorApi, middlewareApi } from '../api'
|
|
151
|
+
import TagFilter from './TagFilter.vue'
|
|
152
|
+
import ViewModeSwitch, { type ViewMode } from './ViewModeSwitch.vue'
|
|
153
|
+
import ChannelConfigDialog from './ChannelConfigDialog.vue'
|
|
154
|
+
import LoadingState from './LoadingState.vue'
|
|
155
|
+
|
|
156
|
+
// 预置标签
|
|
157
|
+
const presetTags = ['text2img', 'img2img', 'NSFW']
|
|
158
|
+
|
|
159
|
+
// 状态
|
|
160
|
+
const loading = ref(false)
|
|
161
|
+
const viewMode = ref<ViewMode>('card')
|
|
162
|
+
const channels = ref<ChannelConfig[]>([])
|
|
163
|
+
const connectors = ref<ConnectorDefinition[]>([])
|
|
164
|
+
const middlewareCardFields = ref<CardField[]>([])
|
|
165
|
+
const middlewareGlobalConfigs = ref<Record<string, Record<string, any>>>({})
|
|
166
|
+
const dialogVisible = ref(false)
|
|
167
|
+
const editingChannel = ref<ChannelConfig | null>(null)
|
|
168
|
+
const selectedTags = ref<string[]>([])
|
|
169
|
+
|
|
170
|
+
// 从所有渠道中提取标签
|
|
171
|
+
const allTags = computed(() => {
|
|
172
|
+
const tagSet = new Set<string>()
|
|
173
|
+
channels.value.forEach(c => {
|
|
174
|
+
(c.tags || []).forEach(t => tagSet.add(t))
|
|
175
|
+
})
|
|
176
|
+
return Array.from(tagSet).sort()
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
// 计算属性
|
|
180
|
+
const filteredChannels = computed(() => {
|
|
181
|
+
if (selectedTags.value.length === 0) return channels.value
|
|
182
|
+
return channels.value.filter(c =>
|
|
183
|
+
selectedTags.value.every(tag => (c.tags || []).includes(tag))
|
|
184
|
+
)
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
// 方法
|
|
188
|
+
const getConnectorName = (id: string) => {
|
|
189
|
+
const c = connectors.value.find(x => x.id === id)
|
|
190
|
+
return c ? c.name : id
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** 获取渠道卡片需要展示的字段 */
|
|
194
|
+
const getCardFields = (channel: ChannelConfig) => {
|
|
195
|
+
const connector = connectors.value.find(c => c.id === channel.connectorId)
|
|
196
|
+
if (!connector?.cardFields?.length) return []
|
|
197
|
+
|
|
198
|
+
return connector.cardFields.map(cf => {
|
|
199
|
+
const fieldDef = connector.fields.find(f => f.key === cf.key)
|
|
200
|
+
return {
|
|
201
|
+
key: cf.key,
|
|
202
|
+
label: cf.label || fieldDef?.label || cf.key,
|
|
203
|
+
format: cf.format || 'text'
|
|
204
|
+
}
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** 获取卡片展示字段的值 */
|
|
209
|
+
const getCardFieldValue = (channel: ChannelConfig, field: CardField): any => {
|
|
210
|
+
const groupId = field.configGroup
|
|
211
|
+
|
|
212
|
+
switch (field.source) {
|
|
213
|
+
case 'channel':
|
|
214
|
+
if (groupId) {
|
|
215
|
+
const overrideValue = channel.pluginOverrides?.[groupId]?.[field.key]
|
|
216
|
+
if (overrideValue !== undefined) {
|
|
217
|
+
return overrideValue
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return (channel as any)[field.key]
|
|
221
|
+
|
|
222
|
+
case 'connectorConfig':
|
|
223
|
+
return channel.connectorConfig?.[field.key]
|
|
224
|
+
|
|
225
|
+
case 'pluginOverride':
|
|
226
|
+
if (groupId) {
|
|
227
|
+
return channel.pluginOverrides?.[groupId]?.[field.key]
|
|
228
|
+
}
|
|
229
|
+
return undefined
|
|
230
|
+
|
|
231
|
+
default:
|
|
232
|
+
return undefined
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** 获取货币后缀 */
|
|
237
|
+
const getCurrencySuffix = (channel: ChannelConfig, field: CardField): string => {
|
|
238
|
+
const groupId = field.configGroup
|
|
239
|
+
if (!groupId) return field.suffix || ''
|
|
240
|
+
|
|
241
|
+
const overrideLabel = channel.pluginOverrides?.[groupId]?.currencyLabel
|
|
242
|
+
if (overrideLabel) {
|
|
243
|
+
return ` ${overrideLabel}${field.suffix || ''}`
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const globalLabel = middlewareGlobalConfigs.value[groupId]?.currencyLabel
|
|
247
|
+
if (globalLabel) {
|
|
248
|
+
return ` ${globalLabel}${field.suffix || ''}`
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return ` 积分${field.suffix || ''}`
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** 格式化字段值用于展示 */
|
|
255
|
+
const formatFieldValue = (value: any, format?: string, suffix?: string): string => {
|
|
256
|
+
if (value === undefined || value === null || value === '') {
|
|
257
|
+
return '-'
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
let result: string
|
|
261
|
+
switch (format) {
|
|
262
|
+
case 'password-mask':
|
|
263
|
+
result = '••••••'
|
|
264
|
+
break
|
|
265
|
+
case 'boolean':
|
|
266
|
+
result = value ? '是' : '否'
|
|
267
|
+
break
|
|
268
|
+
case 'number':
|
|
269
|
+
result = String(value)
|
|
270
|
+
break
|
|
271
|
+
case 'size':
|
|
272
|
+
result = String(value)
|
|
273
|
+
break
|
|
274
|
+
case 'currency':
|
|
275
|
+
result = value === 0 ? '免费' : String(value)
|
|
276
|
+
break
|
|
277
|
+
default:
|
|
278
|
+
result = String(value)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return suffix ? `${result} ${suffix}` : result
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const fetchData = async () => {
|
|
285
|
+
loading.value = true
|
|
286
|
+
try {
|
|
287
|
+
const [channelsData, connectorsData, mwCardFieldsResponse] = await Promise.all([
|
|
288
|
+
channelApi.list(),
|
|
289
|
+
connectorApi.list(),
|
|
290
|
+
middlewareApi.cardFields()
|
|
291
|
+
])
|
|
292
|
+
channels.value = channelsData
|
|
293
|
+
connectors.value = connectorsData
|
|
294
|
+
middlewareCardFields.value = mwCardFieldsResponse.fields
|
|
295
|
+
middlewareGlobalConfigs.value = mwCardFieldsResponse.globalConfigs
|
|
296
|
+
} catch (e) {
|
|
297
|
+
message.error('加载数据失败')
|
|
298
|
+
} finally {
|
|
299
|
+
loading.value = false
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const openCreateDialog = () => {
|
|
304
|
+
editingChannel.value = null
|
|
305
|
+
dialogVisible.value = true
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const openEditDialog = (channel: ChannelConfig) => {
|
|
309
|
+
editingChannel.value = channel
|
|
310
|
+
dialogVisible.value = true
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const handleDialogSaved = () => {
|
|
314
|
+
fetchData()
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const confirmDelete = async (channel: ChannelConfig) => {
|
|
318
|
+
if (!confirm(`确定要删除渠道 "${channel.name}" 吗?`)) return
|
|
319
|
+
try {
|
|
320
|
+
await channelApi.delete(channel.id)
|
|
321
|
+
message.success('删除成功')
|
|
322
|
+
fetchData()
|
|
323
|
+
} catch (e) {
|
|
324
|
+
message.error('删除失败')
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const toggleEnable = async (channel: ChannelConfig) => {
|
|
329
|
+
try {
|
|
330
|
+
await channelApi.toggle(channel.id, channel.enabled)
|
|
331
|
+
} catch (e) {
|
|
332
|
+
channel.enabled = !channel.enabled
|
|
333
|
+
message.error('操作失败')
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const copyChannel = (channel: ChannelConfig) => {
|
|
338
|
+
const copied = JSON.parse(JSON.stringify(channel))
|
|
339
|
+
delete copied.id
|
|
340
|
+
copied.name = `${channel.name} (副本)`
|
|
341
|
+
editingChannel.value = copied
|
|
342
|
+
dialogVisible.value = true
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
onMounted(() => {
|
|
346
|
+
fetchData()
|
|
347
|
+
})
|
|
348
|
+
</script>
|
|
349
|
+
|
|
350
|
+
<style scoped>
|
|
351
|
+
.view-container {
|
|
352
|
+
height: 100%;
|
|
353
|
+
display: flex;
|
|
354
|
+
flex-direction: column;
|
|
355
|
+
min-height: 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.view-header {
|
|
359
|
+
flex-shrink: 0;
|
|
360
|
+
display: flex;
|
|
361
|
+
justify-content: space-between;
|
|
362
|
+
align-items: center;
|
|
363
|
+
margin-bottom: 1rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.header-left {
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: center;
|
|
369
|
+
gap: 1.5rem;
|
|
370
|
+
flex-wrap: wrap;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.view-content {
|
|
374
|
+
flex: 1 1 0;
|
|
375
|
+
min-height: 0;
|
|
376
|
+
overflow-y: auto;
|
|
377
|
+
overflow-x: hidden;
|
|
378
|
+
padding: 0.5rem 0;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.channel-grid {
|
|
382
|
+
display: grid;
|
|
383
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
384
|
+
gap: 1.5rem;
|
|
385
|
+
padding: 0.5rem;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.channel-card {
|
|
389
|
+
height: 100%;
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-direction: column;
|
|
392
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
393
|
+
border: 1px solid var(--k-color-border);
|
|
394
|
+
border-radius: 8px; /* Slightly tighter radius */
|
|
395
|
+
background-color: var(--k-card-bg);
|
|
396
|
+
position: relative;
|
|
397
|
+
overflow: hidden;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.channel-card:hover {
|
|
401
|
+
border-color: var(--k-color-active);
|
|
402
|
+
box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.05); /* Modern subtle shadow */
|
|
403
|
+
transform: translateY(-1px);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Seamless Header Concept */
|
|
407
|
+
.card-header {
|
|
408
|
+
padding: 1rem 1.25rem 0.75rem;
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
gap: 0.5rem;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.header-main {
|
|
415
|
+
display: flex;
|
|
416
|
+
justify-content: space-between;
|
|
417
|
+
align-items: center;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.header-meta {
|
|
421
|
+
display: flex;
|
|
422
|
+
align-items: center;
|
|
423
|
+
gap: 0.5rem;
|
|
424
|
+
flex-wrap: wrap;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.channel-name {
|
|
428
|
+
font-size: 1.1rem;
|
|
429
|
+
font-weight: 600;
|
|
430
|
+
color: var(--k-color-text);
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
gap: 0.5rem;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.channel-id {
|
|
437
|
+
font-size: 0.8rem;
|
|
438
|
+
color: var(--k-color-text-description);
|
|
439
|
+
font-weight: normal;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.connector-badge {
|
|
443
|
+
display: inline-flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
gap: 0.35rem;
|
|
446
|
+
padding: 2px 8px;
|
|
447
|
+
background-color: var(--k-color-bg-2);
|
|
448
|
+
border-radius: 4px;
|
|
449
|
+
font-size: 0.8rem;
|
|
450
|
+
color: var(--k-color-text-description);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.cost-badge {
|
|
454
|
+
display: inline-flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
padding: 2px 8px;
|
|
457
|
+
background-color: var(--k-color-success-light, rgba(103, 194, 58, 0.1));
|
|
458
|
+
color: var(--k-color-success, #67c23a);
|
|
459
|
+
border-radius: 4px;
|
|
460
|
+
font-size: 0.8rem;
|
|
461
|
+
font-weight: 500;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.card-body {
|
|
465
|
+
flex-grow: 1;
|
|
466
|
+
padding: 0 1.25rem 1rem;
|
|
467
|
+
min-height: 40px;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* 字段列表样式 */
|
|
471
|
+
.field-list {
|
|
472
|
+
display: flex;
|
|
473
|
+
flex-direction: column;
|
|
474
|
+
gap: 0.25rem;
|
|
475
|
+
margin-bottom: 0.75rem;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.field-item {
|
|
479
|
+
display: flex;
|
|
480
|
+
justify-content: space-between;
|
|
481
|
+
align-items: center;
|
|
482
|
+
font-size: 0.85rem;
|
|
483
|
+
padding: 0.25rem 0;
|
|
484
|
+
border-bottom: 1px dashed var(--k-color-border);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.field-item:last-child {
|
|
488
|
+
border-bottom: none;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.field-label {
|
|
492
|
+
color: var(--k-color-text-description);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.field-value {
|
|
496
|
+
font-weight: 500;
|
|
497
|
+
color: var(--k-color-text);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.tags-list {
|
|
501
|
+
display: flex;
|
|
502
|
+
flex-wrap: wrap;
|
|
503
|
+
gap: 6px;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.tag-pill {
|
|
507
|
+
font-size: 0.75rem;
|
|
508
|
+
padding: 1px 6px;
|
|
509
|
+
color: var(--k-color-text-description);
|
|
510
|
+
border: 1px solid var(--k-color-border); /* Outline style */
|
|
511
|
+
border-radius: 12px;
|
|
512
|
+
background-color: transparent;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.no-tags {
|
|
516
|
+
color: var(--k-color-text-description);
|
|
517
|
+
font-size: 0.85rem;
|
|
518
|
+
font-style: italic;
|
|
519
|
+
opacity: 0.7;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.card-footer {
|
|
523
|
+
padding: 0.75rem 1.25rem;
|
|
524
|
+
border-top: 1px solid var(--k-color-border);
|
|
525
|
+
display: flex;
|
|
526
|
+
align-items: center;
|
|
527
|
+
gap: 0.5rem;
|
|
528
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.spacer {
|
|
532
|
+
flex-grow: 1;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/* List View - Table Style */
|
|
536
|
+
.list-view {
|
|
537
|
+
background-color: var(--k-card-bg);
|
|
538
|
+
border: 1px solid var(--k-color-border);
|
|
539
|
+
border-radius: 8px;
|
|
540
|
+
overflow: hidden;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.channel-table {
|
|
544
|
+
width: 100%;
|
|
545
|
+
border-collapse: collapse;
|
|
546
|
+
table-layout: fixed;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.channel-table thead {
|
|
550
|
+
background-color: var(--k-color-bg-2);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.channel-table th {
|
|
554
|
+
padding: 0.875rem 1rem;
|
|
555
|
+
font-size: 0.8rem;
|
|
556
|
+
font-weight: 600;
|
|
557
|
+
color: var(--k-color-text-description);
|
|
558
|
+
text-align: left;
|
|
559
|
+
border-bottom: 1px solid var(--k-color-border);
|
|
560
|
+
white-space: nowrap;
|
|
561
|
+
overflow: hidden;
|
|
562
|
+
text-overflow: ellipsis;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.channel-table .channel-row {
|
|
566
|
+
cursor: pointer;
|
|
567
|
+
transition: background-color 0.15s ease;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.channel-table .channel-row:hover {
|
|
571
|
+
background-color: var(--k-color-bg-1);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.channel-table .channel-row td {
|
|
575
|
+
padding: 0.75rem 1rem;
|
|
576
|
+
border-bottom: 1px solid var(--k-color-border);
|
|
577
|
+
vertical-align: middle;
|
|
578
|
+
text-align: left;
|
|
579
|
+
overflow: hidden;
|
|
580
|
+
text-overflow: ellipsis;
|
|
581
|
+
white-space: nowrap;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.channel-table .channel-row:last-child td {
|
|
585
|
+
border-bottom: none;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* 表格列宽定义 */
|
|
589
|
+
.channel-table .col-name {
|
|
590
|
+
width: 20%;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.channel-table .col-connector {
|
|
594
|
+
width: 15%;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.channel-table .col-tags {
|
|
598
|
+
width: auto;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.channel-table .col-cost {
|
|
602
|
+
width: 12%;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.channel-table .col-status {
|
|
606
|
+
width: 8%;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.channel-table .col-actions {
|
|
610
|
+
width: 15%;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.channel-table .name-text {
|
|
614
|
+
font-weight: 600;
|
|
615
|
+
color: var(--k-color-text);
|
|
616
|
+
display: block;
|
|
617
|
+
overflow: hidden;
|
|
618
|
+
text-overflow: ellipsis;
|
|
619
|
+
white-space: nowrap;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.channel-table .connector-badge {
|
|
623
|
+
display: inline-flex;
|
|
624
|
+
align-items: center;
|
|
625
|
+
gap: 0.35rem;
|
|
626
|
+
padding: 2px 8px;
|
|
627
|
+
background-color: var(--k-color-bg-2);
|
|
628
|
+
border-radius: 4px;
|
|
629
|
+
font-size: 0.8rem;
|
|
630
|
+
color: var(--k-color-text-description);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.tags-wrapper {
|
|
634
|
+
display: flex;
|
|
635
|
+
flex-wrap: wrap;
|
|
636
|
+
gap: 4px;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.mini-tag {
|
|
640
|
+
font-size: 0.7rem;
|
|
641
|
+
padding: 1px 6px;
|
|
642
|
+
color: var(--k-color-text-description);
|
|
643
|
+
border: 1px solid var(--k-color-border);
|
|
644
|
+
border-radius: 10px;
|
|
645
|
+
background-color: transparent;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.mini-tag.more {
|
|
649
|
+
background-color: var(--k-color-bg-2);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.cost-value {
|
|
653
|
+
font-size: 0.85rem;
|
|
654
|
+
color: var(--k-color-success, #67c23a);
|
|
655
|
+
font-weight: 500;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.action-btns {
|
|
659
|
+
display: flex;
|
|
660
|
+
gap: 0.5rem;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.view-header {
|
|
664
|
+
display: flex;
|
|
665
|
+
justify-content: space-between;
|
|
666
|
+
align-items: center;
|
|
667
|
+
margin-bottom: 1.5rem;
|
|
668
|
+
padding: 0 0.5rem;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.header-right {
|
|
672
|
+
display: flex;
|
|
673
|
+
align-items: center;
|
|
674
|
+
gap: 1rem;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* 复制按钮样式 */
|
|
678
|
+
.copy-btn {
|
|
679
|
+
color: var(--k-color-active) !important;
|
|
680
|
+
border-color: var(--k-color-active) !important;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.copy-btn:hover {
|
|
684
|
+
background-color: var(--k-color-active) !important;
|
|
685
|
+
color: white !important;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* 删除按钮样式 */
|
|
689
|
+
.delete-btn {
|
|
690
|
+
color: var(--k-color-error, #f56c6c) !important;
|
|
691
|
+
border-color: var(--k-color-error, #f56c6c) !important;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.delete-btn:hover {
|
|
695
|
+
background-color: var(--k-color-error, #f56c6c) !important;
|
|
696
|
+
color: white !important;
|
|
697
|
+
}
|
|
698
|
+
</style>
|