Files
Jérémie Pardou ad80341c03 feat: add Agent subject type (#5851)
* Add workspace Agents and permission management

* fix: remove all duplicate team subject memberships

* fix: align agent team role inheritance with users

* fix: delegate workspace role storage to subject types

* fix: preserve agent team memberships through trash

* Fix migration conflict

* fix: save agent settings pages independently

* fix: preserve agent roles across license changes

* fix: stabilize agent list pagination

* fix: filter agent websocket events by list permission

* fix: authorize agent team membership changes

* fix: serialize concurrent agent team updates

* fix: refresh agent teams through realtime events

* fix: restrict personal views to user subjects

* fix: deny agents with unavailable roles

* fix: exclude agents in trashed workspaces

* test: cover permanent agent access cleanup

* fix: gate agents in team selectors

* fix: accept trash option for preview actors

* fix: set native agent form button types

* fix: ignore stale agent modal saves

* fix: show permitted agent management actions

* fix: validate subject lookup fields

* perf: optimize batched user membership checks

* perf: cache agent team feature per list

* fix: map agent nonmember API errors

* fix: document paginated agent API schema

* fix: stabilize agent API schema operations

* fix: show agent name validation errors

* fix: show total agent count

* test: cover agent creation submissions

* test: cover agent and subject UI behavior

* docs: define direct subject role contracts

* fix: clarify team access management

* fix: use standard empty agents table

* fix: align agent name column styling

* refactor: move agent trash import

* refactor: align agent extension registry naming

* fix: recover agent team selector loading

* fix: validate every subject in role batches

* fix: ignore stale agent list responses

* perf: index recent team subjects

* fix: restore role handler imports

* Fix lint

* fix: reuse prefetched user memberships

* fix: preserve low priority role fallback

* fix: preserve trashed field permission subjects

* fix: open team picker when agent loading fails

* Fix tests
2026-09-21 16:32:32 +02:00

87 lines
1.7 KiB
Vue

<template>
<Button
type="secondary"
button-type="button"
v-bind="restProps"
:loading="loading"
:disabled="disabled"
:icon="icon"
:title="title"
:active="selected"
@click.prevent="select(value)"
>
<slot></slot>
</Button>
</template>
<script>
export default {
name: 'RadioButton',
props: {
value: {
type: [String, Number, Boolean, Object],
required: false,
default: '',
},
modelValue: {
type: [String, Number, Boolean, Object],
required: false,
default: '',
},
loading: {
type: Boolean,
required: false,
default: false,
},
disabled: {
type: Boolean,
required: false,
default: false,
},
icon: {
type: String,
required: false,
default: '',
},
title: {
type: String,
required: false,
default: '',
},
allowDeselect: {
type: Boolean,
required: false,
default: false,
},
deselectedValue: {
type: [String, Number, Boolean, Object],
required: false,
default: undefined,
},
},
emits: ['input', 'update:modelValue'],
computed: {
selected() {
return this.modelValue === this.value
},
restProps() {
const { value, modelValue, ...rest } = this.$attrs
if (this.selected) {
rest.active = true
}
return rest
},
},
methods: {
select(value) {
if (this.disabled || (this.selected && !this.allowDeselect)) {
return
}
const newValue = this.selected ? this.deselectedValue : value
this.$emit('update:modelValue', newValue)
this.$emit('input', newValue)
},
},
}
</script>