Spaces:
Running
Running
Download webui/components/plugins/toggle/plugin-toggles.html from Leon4gr45/openoperator: direct link, hf CLI and curl.
- Browser
- Download file 6.09 kB
-
https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/webui/components/plugins/toggle/plugin-toggles.html
- Command line
-
hf download hf://spaces/Leon4gr45/openoperator/webui/components/plugins/toggle/plugin-toggles.html
-
curl -L -o plugin-toggles.html https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/webui/components/plugins/toggle/plugin-toggles.html
6.09 kB
| <html> | |
| <head> | |
| <title>Plugin Switch Configuration</title> | |
| <script type="module"> | |
| import { store } from "/components/plugins/toggle/plugin-toggle-store.js"; | |
| </script> | |
| </head> | |
| <body> | |
| <div x-data> | |
| <template x-if="$store.pluginToggle"> | |
| <div x-create="$store.pluginToggle.loadConfigs()" class="plugin-configs-container"> | |
| <div x-show="$store.pluginToggle.error" class="plugin-configs-error"> | |
| <x-icon name="error"></x-icon> | |
| <span x-text="$store.pluginToggle.error"></span> | |
| </div> | |
| <div x-show="$store.pluginToggle.isLoading" class="plugin-configs-loading"> | |
| <x-icon class="spinning" name="progress_activity"></x-icon> | |
| <span>Loading configurations...</span> | |
| </div> | |
| <div x-show="!$store.pluginToggle.isLoading" class="plugin-configs-list"> | |
| <template x-if="($store.pluginToggle.configs || []).length === 0"> | |
| <div class="plugin-configs-empty">No activation rules found. This plugin is currently using its default ON state.</div> | |
| </template> | |
| <template x-for="cfg in ($store.pluginToggle.configs || [])" :key="(cfg.project_name || '') + '|' + (cfg.agent_profile || '')"> | |
| <div class="plugin-configs-row"> | |
| <div class="plugin-configs-scope"> | |
| <div class="plugin-configs-scope-top"> | |
| <div class="plugin-configs-scope-line"> | |
| <span class="plugin-configs-scope-key">Project:</span> | |
| <span x-text="$store.pluginToggle.projectLabel(cfg.project_name || '')"></span> | |
| </div> | |
| <div class="plugin-configs-scope-line"> | |
| <span class="plugin-configs-scope-key">Agent profile:</span> | |
| <span x-text="$store.pluginToggle.agentProfileLabel(cfg.agent_profile || '')"></span> | |
| </div> | |
| </div> | |
| <div class="plugin-configs-scope-sub"> | |
| <span x-text="cfg.path.endsWith('.toggle-1') ? 'ON' : 'OFF'" | |
| :class="cfg.path.endsWith('.toggle-1') ? 'text-success' : 'text-error'"></span> | |
| <span class="path-detail" x-text="cfg.path"></span> | |
| </div> | |
| </div> | |
| <div class="plugin-configs-actions"> | |
| <button type="button" class="button" @click="$store.pluginToggle.switchToConfig(cfg.project_name || '', cfg.agent_profile || '')"> | |
| <x-icon class="icon" name="edit"></x-icon> | |
| Edit | |
| </button> | |
| <button type="button" class="button cancel icon-button" title="Delete" @click="$confirmClick($event, () => $store.pluginToggle.deleteConfig(cfg.path))"> | |
| <x-icon class="icon" name="delete"></x-icon> | |
| </button> | |
| </div> | |
| </div> | |
| </template> | |
| </div> | |
| </div> | |
| </template> | |
| </div> | |
| <style> | |
| .plugin-configs-loading, | |
| .plugin-configs-error { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.5rem 0.75rem; | |
| margin-bottom: 0.75rem; | |
| font-size: var(--font-size-small); | |
| } | |
| .plugin-configs-container { | |
| padding: 0.75rem; | |
| } | |
| .plugin-configs-error { | |
| color: var(--color-error); | |
| background: rgba(255, 0, 0, 0.07); | |
| border: 1px solid rgba(255, 0, 0, 0.2); | |
| border-radius: 4px; | |
| } | |
| .plugin-configs-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .plugin-configs-row { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 0.75rem; | |
| padding: 0.75rem; | |
| border: 1px solid var(--color-border); | |
| border-radius: 6px; | |
| background: var(--color-surface); | |
| } | |
| .plugin-configs-scope { | |
| flex: 1 1 auto; | |
| min-width: 0; | |
| } | |
| .plugin-configs-scope-top { | |
| display: flex; | |
| gap: 1rem; | |
| flex-wrap: wrap; | |
| align-items: baseline; | |
| } | |
| .plugin-configs-scope-line { | |
| display: flex; | |
| gap: 0.35rem; | |
| align-items: baseline; | |
| } | |
| .plugin-configs-scope-key { | |
| font-weight: 600; | |
| color: var(--color-text-secondary); | |
| white-space: nowrap; | |
| } | |
| .plugin-configs-scope-sub { | |
| font-size: var(--font-size-small); | |
| color: var(--color-text-secondary); | |
| margin-top: 0.2rem; | |
| display: flex; | |
| gap: 0.5rem; | |
| align-items: center; | |
| } | |
| .path-detail { | |
| opacity: 0.5; | |
| font-size: 0.8em; | |
| } | |
| .text-success { color: var(--color-success, #2ecc71); font-weight: 600; } | |
| .text-error { color: var(--color-error, #e74c3c); font-weight: 600; } | |
| .plugin-configs-actions { | |
| display: flex; | |
| gap: 0.5rem; | |
| flex-wrap: nowrap; | |
| justify-content: flex-end; | |
| flex: 0 0 auto; | |
| } | |
| .plugin-configs-empty { | |
| padding: 0.75rem; | |
| color: var(--color-text-secondary); | |
| font-size: var(--font-size-small); | |
| } | |
| </style> | |
| </body> | |
| </html> | |