feat: add magic variable detection and update UI behavior accordingly

This commit is contained in:
Andras Bacsai
2025-11-25 11:23:18 +01:00
parent 89192c9862
commit d67fcd1dff
3 changed files with 227 additions and 50 deletions
@@ -24,6 +24,8 @@ class Show extends Component
public bool $isLocked = false;
public bool $isMagicVariable = false;
public bool $isSharedVariable = false;
public string $type;
@@ -146,9 +148,13 @@ class Show extends Component
public function checkEnvs()
{
$this->isDisabled = false;
$this->isMagicVariable = false;
if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL') || str($this->env->key)->startsWith('SERVICE_NAME')) {
$this->isDisabled = true;
$this->isMagicVariable = true;
}
if ($this->env->is_shown_once) {
$this->isLocked = true;
}