Skip to content

Commit 9d8830a

Browse files
committed
Get initial mockup of new server list up
1 parent 64175ce commit 9d8830a

File tree

12 files changed

+201
-64
lines changed

12 files changed

+201
-64
lines changed

app/Http/Controllers/Base/IndexController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ public function __construct(
5353
* @param \Illuminate\Http\Request $request
5454
* @return \Illuminate\View\View
5555
*/
56-
public function getIndex(Request $request)
56+
public function index(Request $request)
5757
{
5858
$servers = $this->repository->setSearchTerm($request->input('query'))->filterUserAccessServers(
5959
$request->user(), User::FILTER_LEVEL_ALL
6060
);
6161

62-
return view('base.index', ['servers' => $servers]);
62+
return view('templates/base.core', ['servers' => $servers]);
6363
}
6464

6565
/**

resources/assets/scripts/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { flash } from './mixins/flash';
1010

1111
// Base Vuejs Templates
1212
import Login from './components/auth/Login';
13+
import Base from './components/base/Base';
1314
import ResetPassword from './components/auth/ResetPassword';
1415

1516
window.events = new Vue;
@@ -44,7 +45,10 @@ const router = new VueRouter({
4445
return { token: route.params.token, email: route.query.email || '' };
4546
}
4647
},
47-
{ path: '*', redirect: '/auth/login' }
48+
{ name : 'index', path: '/', component: Base },
49+
{ name : 'account', path: '/account', component: Base },
50+
{ name : 'account-api', path: '/account/api', component: Base },
51+
{ name : 'account-security', path: '/account/security', component: Base },
4852
]
4953
});
5054

resources/assets/scripts/components/base/Base.vue

Whitespace-only changes.

resources/assets/scripts/components/errors/Flash.template.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

resources/assets/styles/components/animations.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,21 @@
1616
from { opacity: 0; }
1717
to { opacity: 1; }
1818
}
19+
20+
@keyframes onlineblink {
21+
0% {
22+
@apply .bg-green;
23+
}
24+
100% {
25+
@apply .bg-green-dark;
26+
}
27+
}
28+
29+
@keyframes offlineblink {
30+
0% {
31+
@apply .bg-red;
32+
}
33+
100% {
34+
@apply .bg-red-dark;
35+
}
36+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
code {
2+
@apply .font-mono .px-2 .py-1;
3+
background-color: #eef1f6;
4+
color: #596981;
5+
border-radius: 2px;
6+
border: 1px solid rgba(0, 0, 0, .1);
7+
display: inline-block;
8+
}
9+
10+
/**
11+
* Indicators for server online status.
12+
*/
13+
.indicator {
14+
@apply .bg-grey-darker .border .border-grey;
15+
border-radius: 50%;
16+
width: 16px;
17+
height: 16px;
18+
19+
&.online {
20+
@apply .bg-green-dark .border-green;
21+
animation: onlineblink 2s infinite alternate;
22+
}
23+
24+
&.offline {
25+
@apply .bg-green-dark .border-red;
26+
animation: offlineblink 2s infinite alternate;
27+
}
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.nav {
2+
@apply .bg-blue;
3+
height: 48px;
4+
5+
& > .logo {
6+
@apply .mx-8 .font-sans .font-thin .text-2xl .text-white .inline-block .pt-2;
7+
}
8+
9+
& > .menu {
10+
@apply .float-right .mx-8 .inline-block;
11+
12+
& > ul {
13+
@apply .list-reset;
14+
& > li {
15+
@apply .inline-block;
16+
& > a {
17+
@apply .block .h-full .no-underline .text-grey-lighter .font-light .text-sm;
18+
padding: 15px;
19+
20+
&:hover {
21+
@apply .bg-blue-dark;
22+
23+
}
24+
}
25+
}
26+
}
27+
}
28+
}

resources/assets/styles/main.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
@import "components/authentication.css";
1212
@import "components/buttons.css";
1313
@import "components/forms.css";
14+
@import "components/miscellaneous.css";
15+
@import "components/navigation.css";
1416
@import "components/notifications.css";
1517
@import "components/spinners.css";
1618

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,15 @@
1-
<html>
2-
<head>
3-
<title>{{ config('app.name', 'Pterodactyl') }}</title>
1+
@extends('templates/wrapper', [
2+
'css' => ['body' => 'bg-grey-darkest']
3+
])
44

5-
@section('meta')
6-
<meta charset="utf-8">
7-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
8-
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
9-
<meta name="csrf-token" content="{{ csrf_token() }}">
10-
@show
11-
12-
@section('assets')
13-
{!! $asset->css('assets/css/bundle.css') !!}
14-
@show
15-
16-
@include('layouts.scripts')
17-
</head>
18-
<body class="bg-grey-darkest">
19-
<div class="container" id="pterodactyl">
20-
<div class="w-full max-w-xs sm:max-w-sm m-auto mt-8">
21-
<div class="text-center">
22-
<img src="/favicons/android-chrome-512x512.png" class="max-w-xxs">
23-
</div>
24-
<router-view></router-view>
25-
<p class="text-center text-grey text-xs">
26-
{!! trans('strings.copyright', ['year' => date('Y')]) !!}
27-
</p>
28-
</div>
5+
@section('container')
6+
<div class="w-full max-w-xs sm:max-w-sm m-auto mt-8">
7+
<div class="text-center">
8+
<img src="/favicons/android-chrome-512x512.png" class="max-w-xxs">
299
</div>
30-
@section('scripts')
31-
{!! $asset->js('assets/scripts/bundle.js') !!}
32-
@show
33-
</body>
34-
</html>
10+
<router-view></router-view>
11+
<p class="text-center text-grey text-xs">
12+
{!! trans('strings.copyright', ['year' => date('Y')]) !!}
13+
</p>
14+
</div>
15+
@endsection
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@extends('templates/wrapper')
2+
3+
@section('above-container')
4+
<div class="nav">
5+
<div class="logo">
6+
Pterodactyl
7+
</div>
8+
<div class="menu">
9+
<ul>
10+
<li>
11+
<a href="#">
12+
<span>Your Servers</span>
13+
</a>
14+
</li>
15+
<li>
16+
<a href="#">
17+
<span>Admin</span>
18+
</a>
19+
</li>
20+
<li>
21+
<a href="#">
22+
<span>dane</span>
23+
</a>
24+
</li>
25+
<li>
26+
<a href="{{ route('auth.logout') }}">
27+
<span>L</span>
28+
</a>
29+
</li>
30+
</ul>
31+
</div>
32+
</div>
33+
@endsection
34+
35+
@section('container')
36+
<div class="w-full m-auto mt-8 animate fadein sm:block md:flex">
37+
@foreach($servers as $server)
38+
<div class="w-full mr-4 flex flex-col">
39+
<div class="border border-grey-light bg-white rounded p-4 justify-between leading-normal">
40+
<div class="float-right">
41+
<div class="indicator {{ ['online', 'offline'][rand(0, 1)] }}"></div>
42+
</div>
43+
<div class="mb-4">
44+
{{--@if ($server->owner_id !== Auth::user()->id)--}}
45+
{{--<p class="text-sm text-grey-dark flex items-center">--}}
46+
{{--<svg class="fill-current text-grey w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">--}}
47+
{{--<path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z" ></path>--}}
48+
{{--</svg>--}}
49+
{{--Restricted Access--}}
50+
{{--</p>--}}
51+
{{--@endif--}}
52+
<div class="text-black font-bold text-xl">{{ $server->name }}</div>
53+
{{--<div class="flex text-center">--}}
54+
{{--<div class="flex-1">68%</div>--}}
55+
{{--<div class="flex-1">124 / 1024 Mb</div>--}}
56+
{{--</div>--}}
57+
</div>
58+
<div class="flex items-center">
59+
<div class="text-sm">
60+
<p class="text-grey">{{ $server->node->name }}</p>
61+
<p class="text-grey-dark">{{ $server->allocation->ip }}:{{ $server->allocation->port }}</p>
62+
</div>
63+
</div>
64+
</div>
65+
</div>
66+
@endforeach
67+
</div>
68+
<div class="w-full m-auto mt-4">
69+
<p class="text-right text-grey-dark text-xs">
70+
{!! trans('strings.copyright', ['year' => date('Y')]) !!}
71+
</p>
72+
</div>
73+
@endsection

0 commit comments

Comments
 (0)