mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 21:20:29 +00:00
fix: show shared env scopes dropdown even when no variables exist
Previously, when no shared environment variables existed in any scope (team, project, environment), the dropdown would not appear at all when users typed '{{'. This made the feature appear broken.
Now the dropdown always shows the available scopes, and when a user selects a scope with no variables, they see a helpful "No shared variables found in {scope} scope" message with a link to add variables.
Changes:
- Removed isAutocompleteDisabled() method that blocked dropdown
- Removed early return check that prevented showing scopes
- Existing empty state handling already works correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,22 +20,12 @@
|
||||
availableVars: @js($availableVars),
|
||||
scopeUrls: @js($scopeUrls),
|
||||
|
||||
isAutocompleteDisabled() {
|
||||
const hasAnyVars = Object.values(this.availableVars).some(vars => vars.length > 0);
|
||||
return !hasAnyVars;
|
||||
},
|
||||
|
||||
handleInput() {
|
||||
const input = this.$refs.input;
|
||||
if (!input) return;
|
||||
|
||||
const value = input.value || '';
|
||||
|
||||
if (this.isAutocompleteDisabled()) {
|
||||
this.showDropdown = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.cursorPosition = input.selectionStart || 0;
|
||||
const textBeforeCursor = value.substring(0, this.cursorPosition);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user