Update success messages

This commit is contained in:
Andras Bacsai
2024-02-22 14:53:42 +01:00
parent 592221b4bf
commit c7218f2856
32 changed files with 67 additions and 57 deletions

View File

@@ -43,7 +43,7 @@ class NewDynamicConfiguration extends Component
$this->fileName = "{$this->fileName}.yaml";
}
if ($this->fileName === 'coolify.yaml') {
$this->dispatch('error', 'Error', 'File name is reserved.');
$this->dispatch('error', 'File name is reserved.');
return;
}
$proxy_path = get_proxy_path();
@@ -51,7 +51,7 @@ class NewDynamicConfiguration extends Component
if ($this->newFile) {
$exists = instant_remote_process(["test -f $file && echo 1 || echo 0"], $this->server);
if ($exists == 1) {
$this->dispatch('error', 'Error', 'File already exists');
$this->dispatch('error', 'File already exists');
return;
}
}
@@ -62,7 +62,7 @@ class NewDynamicConfiguration extends Component
instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server);
$this->dispatch('loadDynamicConfigurations');
$this->dispatch('dynamic-configuration-added');
$this->dispatch('success', 'Success', 'Dynamic configuration saved.');
$this->dispatch('success', 'Dynamic configuration saved.');
} catch (\Throwable $e) {
return handleError($e, $this);
}