Small anal-retentive spacing/indenting tweaks

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-03-21 21:00:43 -07:00
parent 2d3ddd1c7a
commit e40762cf7f
3 changed files with 12 additions and 7 deletions

View file

@ -64,10 +64,12 @@ class SlackSettingsForm extends Component
}
public function updated($field) {
if($this->webhook_selected != 'general') {
$this->validateOnly($field, $this->rules);
}
}
public function updatedWebhookSelected() {
$this->webhook_name = $this->webhook_text[$this->webhook_selected]['name'];
$this->webhook_icon = $this->webhook_text[$this->webhook_selected]["icon"]; ;
@ -92,6 +94,7 @@ class SlackSettingsForm extends Component
}
}
public function render()
{
$this->isButtonDisabled();
@ -116,12 +119,14 @@ class SlackSettingsForm extends Component
]);
try {
$webhook->post($this->webhook_endpoint, ['body' => $payload]);
$this->isDisabled='';
$this->save_button = trans('general.save');
return session()->flash('success' , 'Your '.$this->webhook_name.' Integration works!');
} catch (\Exception $e) {
$this->isDisabled= 'disabled';
return session()->flash('error' , trans('admin/settings/message.webhook.error', ['error_message' => $e->getMessage(), 'app' => $this->webhook_name]));
}
@ -131,6 +136,7 @@ class SlackSettingsForm extends Component
}
public function clearSettings(){
if (Helper::isDemoMode()) {
session()->flash('error',trans('general.feature_disabled'));
} else {

View file

@ -151,7 +151,6 @@ class SettingsServiceProvider extends ServiceProvider
setlocale(LC_MONETARY, config('app.locale'));
setlocale(LC_NUMERIC, config('app.locale'));
}
/**