Refactor URL and agent list rendering in Compose.vue

This commit is contained in:
cmcooper1980
2026-04-13 18:50:27 -05:00
committed by GitHub
parent 3b9f0b9a4f
commit f16b00908d

View File

@@ -63,8 +63,8 @@
<!-- URLs --> <!-- URLs -->
<div v-if="urls.length > 0" class="mb-3"> <div v-if="urls.length > 0" class="mb-3">
<a v-for="(url, index) in urls" :key="index" target="_blank" :href="url.url"> <a v-for="(urlItem, index) in urls" :key="index" target="_blank" :href="urlItem.url">
<span class="badge bg-secondary me-2">{{ url.display }}</span> <span class="badge bg-secondary me-2">{{ urlItem.display }}</span>
</a> </a>
</div> </div>
@@ -98,8 +98,8 @@
<div class="mt-3"> <div class="mt-3">
<label for="name" class="form-label">{{ $t("dockgeAgent") }}</label> <label for="name" class="form-label">{{ $t("dockgeAgent") }}</label>
<select v-model="stack.endpoint" class="form-select"> <select v-model="stack.endpoint" class="form-select">
<option v-for="(agent, endpoint) in $root.agentList" :key="endpoint" :value="endpoint" :disabled="$root.agentStatusList[endpoint] != 'online'"> <option v-for="(agent, agentEndpoint) in $root.agentList" :key="agentEndpoint" :value="agentEndpoint" :disabled="$root.agentStatusList[agentEndpoint] != 'online'">
({{ $root.agentStatusList[endpoint] }}) {{ (agent.name !== '') ? agent.name : agent.url || $t("Current") }} ({{ $root.agentStatusList[agentEndpoint] }}) {{ (agent.name !== '') ? agent.name : agent.url || $t("Current") }}
</option> </option>
</select> </select>
</div> </div>
@@ -310,7 +310,7 @@ const variableHighlight = ViewPlugin.fromClass(class {
}, { }, {
decorations: v => v.decorations decorations: v => v.decorations
}); });
export default { export default {
components: { components: {
NetworkInput, NetworkInput,