|
138 | 138 | </template> |
139 | 139 |
|
140 | 140 | <!-- Options (responseMode, threadHistoryLimit, etc.) --> |
141 | | - <div v-if="Object.keys(optionProperties).length" class="border border-piedra-700/50 rounded-xl p-4"> |
142 | | - <button |
143 | | - type="button" |
144 | | - @click="optionsExpanded = !optionsExpanded" |
145 | | - class="flex items-center gap-1.5 text-[11px] text-arena-500 hover:text-arena-300 transition-colors cursor-pointer" |
146 | | - > |
147 | | - <Icon name="chevronRight" size="sm" class="transition-transform" :class="{ 'rotate-90': optionsExpanded }" /> |
| 141 | + <details v-if="Object.keys(optionProperties).length" class="group border border-piedra-700/40 rounded-xl"> |
| 142 | + <summary class="flex items-center justify-between px-4 py-3 cursor-pointer select-none text-xs font-medium text-arena-400 hover:text-arena-300"> |
148 | 143 | <span>Options</span> |
149 | | - </button> |
150 | | - <div v-if="optionsExpanded" class="mt-3 space-y-4"> |
| 144 | + <Icon name="chevronDown" size="md" class="text-arena-500 transition-transform group-open:rotate-180" /> |
| 145 | + </summary> |
| 146 | + <div class="px-4 pb-4 space-y-4"> |
151 | 147 | <template v-for="(propSchema, key) in optionProperties" :key="key"> |
152 | 148 | <!-- Enum → select --> |
153 | 149 | <div v-if="propSchema.enum"> |
|
169 | 165 | </div> |
170 | 166 | </template> |
171 | 167 | </div> |
172 | | - </div> |
| 168 | + </details> |
173 | 169 |
|
174 | 170 | <!-- Permissions (allowedUsers / allowedChannels / allowedChats) --> |
175 | | - <div v-if="Object.keys(permissionProperties).length" class="border border-piedra-700/50 rounded-xl p-4"> |
176 | | - <button |
177 | | - type="button" |
178 | | - @click="permissionsExpanded = !permissionsExpanded" |
179 | | - class="flex items-center gap-1.5 text-[11px] text-arena-500 hover:text-arena-300 transition-colors cursor-pointer" |
180 | | - > |
181 | | - <Icon name="chevronRight" size="sm" class="transition-transform" :class="{ 'rotate-90': permissionsExpanded }" /> |
| 171 | + <details v-if="Object.keys(permissionProperties).length" class="group border border-piedra-700/40 rounded-xl"> |
| 172 | + <summary class="flex items-center justify-between px-4 py-3 cursor-pointer select-none text-xs font-medium text-arena-400 hover:text-arena-300"> |
182 | 173 | <span>Permissions</span> |
183 | | - </button> |
184 | | - <div v-if="permissionsExpanded" class="mt-3 space-y-4"> |
| 174 | + <Icon name="chevronDown" size="md" class="text-arena-500 transition-transform group-open:rotate-180" /> |
| 175 | + </summary> |
| 176 | + <div class="px-4 pb-4 space-y-4"> |
185 | 177 | <template v-for="(propSchema, key) in permissionProperties" :key="key"> |
186 | 178 | <div> |
187 | 179 | <FormLabel :label="propSchema.title || key" :required="isFieldRequired(key)" /> |
|
194 | 186 | </div> |
195 | 187 | </template> |
196 | 188 | </div> |
197 | | - </div> |
| 189 | + </details> |
198 | 190 |
|
199 | 191 | <!-- Token (edit only) --> |
200 | 192 | <div v-if="isEdit && form.token"> |
@@ -240,8 +232,6 @@ const editId = ref(null) |
240 | 232 | const isEdit = ref(false) |
241 | 233 | const tokenVisible = ref(false) |
242 | 234 | const showAllEntities = ref(false) |
243 | | -const permissionsExpanded = ref(false) |
244 | | -const optionsExpanded = ref(false) |
245 | 235 | const maxVisibleEntities = 6 |
246 | 236 |
|
247 | 237 | const totalEntities = computed(() => store.agents.length + store.flows.length) |
@@ -420,8 +410,6 @@ function open(client = null) { |
420 | 410 | form.token = client?.token || '' |
421 | 411 | tokenVisible.value = false |
422 | 412 | showAllEntities.value = false |
423 | | - permissionsExpanded.value = false |
424 | | - optionsExpanded.value = false |
425 | 413 | dialogRef.value?.open() |
426 | 414 | } |
427 | 415 |
|
|
0 commit comments