diff --git a/app/Livewire/Settings/Configuration.php b/app/Livewire/Settings/Configuration.php index 4dfa16e30..3b6d7cd72 100644 --- a/app/Livewire/Settings/Configuration.php +++ b/app/Livewire/Settings/Configuration.php @@ -29,6 +29,7 @@ class Configuration extends Component 'settings.public_port_min' => 'required', 'settings.public_port_max' => 'required', 'settings.custom_dns_servers' => 'nullable', + 'settings.instance_name' => 'nullable', ]; protected $validationAttributes = [ diff --git a/app/Models/InstanceSettings.php b/app/Models/InstanceSettings.php index 452c5ca22..38f79ce75 100644 --- a/app/Models/InstanceSettings.php +++ b/app/Models/InstanceSettings.php @@ -47,4 +47,14 @@ public function getRecepients($notification) return explode(',', $recipients); } + + public function getTitleDisplayName(): string + { + $instanceName = $this->instance_name; + if (! $instanceName) { + return ''; + } + + return "[{$instanceName}]"; + } } diff --git a/database/migrations/2024_06_22_081140_alter_instance_settings_add_instance_name.php b/database/migrations/2024_06_22_081140_alter_instance_settings_add_instance_name.php new file mode 100644 index 000000000..1687e047c --- /dev/null +++ b/database/migrations/2024_06_22_081140_alter_instance_settings_add_instance_name.php @@ -0,0 +1,28 @@ +string('instance_name')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('instance_settings', function (Blueprint $table) { + $table->dropColumn('instance_name'); + }); + } +}; diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index df45b19b4..7a716f266 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -15,7 +15,21 @@ -