feat: show if config is not applied

This commit is contained in:
Andras Bacsai
2023-10-18 11:20:40 +02:00
parent 0b3cde44c3
commit a61a86dc3b
4 changed files with 45 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ class General extends Component
public $customLabels;
public bool $labelsChanged = false;
public bool $isConfigurationChanged = false;
public bool $is_static;
public bool $is_git_submodules_enabled;
@@ -79,6 +80,7 @@ class General extends Component
public function mount()
{
$this->isConfigurationChanged = $this->application->isConfigurationChanged();
if (is_null(data_get($this->application, 'custom_labels'))) {
$this->customLabels = str(implode(",", generateLabelsApplication($this->application)))->replace(',', "\n");
} else {
@@ -131,6 +133,7 @@ class General extends Component
$this->application->refresh();
$this->emit('success', 'Application settings updated!');
$this->checkLabelUpdates();
$this->isConfigurationChanged = $this->application->isConfigurationChanged();
}
public function getWildcardDomain()
@@ -192,6 +195,7 @@ class General extends Component
return handleError($e, $this);
} finally {
$this->checkLabelUpdates();
$this->isConfigurationChanged = $this->application->isConfigurationChanged();
}
}
}