chore: Refactor instanceSettings() function to improve code readability
This commit is contained in:
parent
817bd9c35d
commit
4db50bd025
3 changed files with 7 additions and 3 deletions
|
|
@ -60,7 +60,7 @@ class Index extends Component
|
|||
public function mount()
|
||||
{
|
||||
if (isInstanceAdmin()) {
|
||||
$this->settings = InstanceSettings::get();
|
||||
$this->settings = instanceSettings();
|
||||
$this->do_not_track = $this->settings->do_not_track;
|
||||
$this->is_auto_update_enabled = $this->settings->is_auto_update_enabled;
|
||||
$this->is_registration_enabled = $this->settings->is_registration_enabled;
|
||||
|
|
|
|||
|
|
@ -89,12 +89,12 @@ public function getTitleDisplayName(): string
|
|||
public function helperVersion(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function () {
|
||||
get: function ($value) {
|
||||
if (isDev()) {
|
||||
return 'latest';
|
||||
}
|
||||
|
||||
return $this->helper_version;
|
||||
return $value;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3893,3 +3893,7 @@ function convertComposeEnvironmentToArray($environment)
|
|||
return $convertedServiceVariables;
|
||||
|
||||
}
|
||||
function instanceSettings()
|
||||
{
|
||||
return InstanceSettings::get();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue