sprinkle some css

This commit is contained in:
Andras Bacsai
2023-05-12 15:39:07 +02:00
parent 0731b1fe6e
commit d6dc540236
21 changed files with 285 additions and 175 deletions

View File

@@ -3,15 +3,14 @@
namespace App\Http\Livewire\PrivateKey;
use App\Models\PrivateKey;
use Illuminate\Routing\Route as RoutingRoute;
use Illuminate\Support\Facades\Route;
use Livewire\Component;
class Create extends Component
{
public $private_key_value;
public $private_key_name;
public $private_key_description;
public string $name;
public string|null $description;
public string $value;
public string $currentRoute;
public function mount()
@@ -20,14 +19,14 @@ class Create extends Component
}
public function createPrivateKey()
{
$this->private_key_value = trim($this->private_key_value);
if (!str_ends_with($this->private_key_value, "\n")) {
$this->private_key_value .= "\n";
$this->value = trim($this->value);
if (!str_ends_with($this->value, "\n")) {
$this->value .= "\n";
}
$new_private_key = PrivateKey::create([
'name' => $this->private_key_name,
'description' => $this->private_key_description,
'private_key' => $this->private_key_value,
'name' => $this->name,
'description' => $this->description,
'private_key' => $this->value,
'team_id' => session('currentTeam')->id
]);
session('currentTeam')->privateKeys = PrivateKey::where('team_id', session('currentTeam')->id)->get();