feat(env): add tag support for environment variables and task injection
- Add generic DataRelation and DataStorage models for tags - Update EnvService and EnvController to support tag assignment, querying, and filtering - Integrate EnvTagsConfig in Env settings for managing environment tags - Enhance TaskDialog environment selection to support searching and displaying env tags - Fix missing TaskLangConfig import in RepoDialog
This commit is contained in:
@@ -10,9 +10,11 @@ const props = withDefaults(defineProps<{
|
||||
icon?: any
|
||||
multiple?: boolean
|
||||
clearOnSelect?: boolean
|
||||
fetchTags?: () => Promise<string[]>
|
||||
}>(), {
|
||||
multiple: false,
|
||||
clearOnSelect: false
|
||||
clearOnSelect: false,
|
||||
fetchTags: () => api.tasks.tags()
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'enter'])
|
||||
@@ -27,10 +29,10 @@ watch(() => props.modelValue, (newVal) => {
|
||||
inputValue.value = newVal
|
||||
})
|
||||
|
||||
async function fetchTags() {
|
||||
async function fetchTagsData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await api.tasks.tags()
|
||||
const res = await props.fetchTags()
|
||||
allTags.value = res || []
|
||||
} catch (e) {
|
||||
console.error('Failed to fetch tags', e)
|
||||
@@ -101,7 +103,7 @@ function handleClickOutside(e: MouseEvent) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchTags()
|
||||
fetchTagsData()
|
||||
window.addEventListener('mousedown', handleClickOutside)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user