diff --git a/app/Models/GithubApp.php b/app/Models/GithubApp.php index ff7d30fac..54e68aa63 100644 --- a/app/Models/GithubApp.php +++ b/app/Models/GithubApp.php @@ -12,6 +12,10 @@ class GithubApp extends BaseModel 'is_public' => 'boolean', 'type' => 'string' ]; + protected $hidden = [ + 'client_secret', + 'webhook_secret', + ]; protected static function booted(): void { static::deleting(function (GithubApp $github_app) { diff --git a/app/Models/GitlabApp.php b/app/Models/GitlabApp.php index 5e52dc00c..dbac3414b 100644 --- a/app/Models/GitlabApp.php +++ b/app/Models/GitlabApp.php @@ -4,6 +4,10 @@ namespace App\Models; class GitlabApp extends BaseModel { + protected $hidden = [ + 'webhook_token', + 'app_secret', + ]; public function applications() { return $this->morphMany(Application::class, 'source'); diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php index c2954201e..732157ccc 100644 --- a/app/Models/PrivateKey.php +++ b/app/Models/PrivateKey.php @@ -11,6 +11,9 @@ class PrivateKey extends BaseModel 'private_key', 'team_id', ]; + protected $hidden = [ + 'private_key', + ]; static public function ownedByCurrentTeam() { return PrivateKey::whereTeamId(session('currentTeam')->id); diff --git a/app/Models/Server.php b/app/Models/Server.php index d6d4b8e76..84596ea71 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -74,9 +74,10 @@ class Server extends BaseModel { return $this->hasOne(ServerSetting::class); } - static public function ownedByCurrentTeam() + static public function ownedByCurrentTeam(array $select = ['*']) { - return Server::whereTeamId(session('currentTeam')->id); + $selectArray = collect($select)->concat(['id']); + return Server::whereTeamId(session('currentTeam')->id)->with('settings')->select($selectArray->all()); } static public function validated() diff --git a/resources/css/app.css b/resources/css/app.css index 91012c573..bc75a7fa5 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -15,7 +15,10 @@ body { @apply pl-24 pr-10 mx-auto max-w-screen-xl pt-4; } input { - @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full read-only:bg-coolgray-200/50 read-only:text-opacity-25 border-none; + @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full read-only:bg-coolgray-200/50 read-only:text-opacity-25; +} +input && :not(input[type="checkbox"]) { + @apply border-none; } input[type="checkbox"] { @apply toggle toggle-warning toggle-xs rounded; diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php index c3c85d828..78d07a602 100644 --- a/resources/views/components/forms/input.blade.php +++ b/resources/views/components/forms/input.blade.php @@ -15,20 +15,21 @@