diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index 3ca77f7..886c772 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -19,12 +19,15 @@ class DomainController extends Controller public function add_edit(Request $request,Domain $o) { if ($request->post()) { - // @todo Add validation that we can only have 1 "default" domain for a zone. - // The default domain is used when a node connects and doesnt use a full 5D address, eg: 10:999/1 vs 10:999/1@private + $request->validate([ + 'name' => 'required|unique:domains|max:8', + 'dnsdomain' => 'nullable|unique:domains|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i', + 'active' => 'required', + ]); + foreach (['name','dnsdomain','active','notes'] as $key) $o->{$key} = $request->post($key); - $o->active = TRUE; $o->save(); return redirect()->action([self::class,'home']); diff --git a/app/Models/Domain.php b/app/Models/Domain.php index b3a8371..f5bbfe6 100644 --- a/app/Models/Domain.php +++ b/app/Models/Domain.php @@ -9,4 +9,11 @@ use App\Traits\ScopeActive; class Domain extends Model { use ScopeActive; + + /* RELATIONS */ + + public function zones() + { + return $this->hasMany(Zone::class); + } } \ No newline at end of file diff --git a/public/oldschool/css/main.css b/public/oldschool/css/main.css index bebbc02..5363d12 100644 --- a/public/oldschool/css/main.css +++ b/public/oldschool/css/main.css @@ -46,8 +46,8 @@ a:link { text-transform:uppercase } -div p:last-child { - margin-bottom:0 +strong.highlight { + color: #eee; } body { @@ -88,7 +88,6 @@ sup:after { z-index: 4; box-sizing: content-box } - #nav-menu { color:#aaa; padding:0; @@ -273,7 +272,7 @@ ul#navlist-desktop { margin:24px auto 40px auto; box-shadow:8px 9px 0 0 #333 } -#content>h2:first-child { +#content h2:first-child { margin-top:8px } #content h3, @@ -299,6 +298,13 @@ ul#navlist-desktop { color:#c60; } +#content>div.row:first-child { + padding-top: 0px; +} +#content>div.row { + padding-top: 20px; +} + #content ul { margin:0 1ch; padding-left:1ch; @@ -402,6 +408,10 @@ form div.row { .greyframe h2.cap+p { margin-top:1em } +.greyframe>div.row:last-child, +.greyframe>form>div.row:last-child { + padding-bottom: 15px; +} label.form-label { font-size: 75%; @@ -414,6 +424,22 @@ p { text-align:left; word-break:break-word } +p>small { + color: #bbb; +} +p>small:before { + content: '['; +} +p>small:after { + content: ']'; +} +p>small:before, +p>small:after { + color: #eee; +} +div p:last-child { + margin-bottom:0 +} .pad { padding:1em 1.5ch; @@ -450,6 +476,78 @@ p { transition:all .1s ease-in-out } +table { + border-collapse:collapse; + color:#fff; +} +th { + font-weight:400 +} +td { + padding:0 4px +} +thead { + background-color:#222; + border-top:1px solid #555; + border-bottom:3px double #555; + border-left:2px solid #555; + border-right:2px solid #555 +} +tbody { + border-left:2px solid #555; + border-right:2px solid #555; + border-bottom:1px solid #555 +} +.monotable { + background-color:#1e1e1e; + margin-top:.5em; + margin-bottom:1.5em; + text-indent:0 +} +.monotable.sbm { + margin-bottom:.5em +} +.monotable thead { + border-top:1px solid #666; + border-left:2px solid #666; + border-right:2px solid #666; + border-bottom:0; + color:#fff; + background-color:#000 +} +.monotable th { + padding:.5em 1.5ch .4em; + border-right:2px solid #666 +} +.monotable tbody { + border-top:3px double #666; + border-left:2px solid #666; + border-right:2px solid #666; + border-bottom:1px solid #666; + color: #eee; +} +.monotable tbody td { + padding-left:1.5ch!important; + padding-right:1.5ch!important; + vertical-align:middle!important +} +.monotable tbody tr:first-child td { + padding-top:9px!important +} +.monotable tbody tr:last-child td { + padding-bottom:7px!important +} +.monotable tr td:not(:last-child) { + border-right:2px solid #666 +} +.monotable.cozy { + text-align:left +} +.monotable.cozy td { + padding-top:8px!important; + padding-bottom:7px!important; + border-bottom:1px solid #666 +} .text-center { text-align:center; diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php index 3fd0434..6821138 100644 --- a/resources/views/about.blade.php +++ b/resources/views/about.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('main-content') +@section('content')
Welcome to the FTN Clearing House.
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 8b48b6d..52f221c 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -26,7 +26,7 @@