Skip to content

Commit 4604500

Browse files
committed
Replace tabs with Spaces
I *really* wish Atom would stop doing this to me.
1 parent 6957282 commit 4604500

File tree

17 files changed

+240
-238
lines changed

17 files changed

+240
-238
lines changed

app/Http/Controllers/API/UserController.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class UserController extends BaseController
2424
* @Get("/{?page}")
2525
* @Versions({"v1"})
2626
* @Parameters({
27-
* @Parameter("page", type="integer", description="The page of results to view.", default=1)
27+
* @Parameter("page", type="integer", description="The page of results to view.", default=1)
2828
* })
2929
* @Response(200)
3030
*/
@@ -42,8 +42,8 @@ public function getUsers(Request $request)
4242
* @Get("/{id}/{fields}")
4343
* @Versions({"v1"})
4444
* @Parameters({
45-
* @Parameter("id", type="integer", required=true, description="The ID of the user to get information on."),
46-
* @Parameter("fields", type="string", required=false, description="A comma delimidated list of fields to include.")
45+
* @Parameter("id", type="integer", required=true, description="The ID of the user to get information on."),
46+
* @Parameter("fields", type="string", required=false, description="A comma delimidated list of fields to include.")
4747
* })
4848
* @Response(200)
4949
*/
@@ -68,18 +68,18 @@ public function getUserByID(Request $request, $id, $fields = null)
6868
* @Post("/")
6969
* @Versions({"v1"})
7070
* @Transaction({
71-
* @Request({
72-
* "email": "foo@example.com",
73-
* "password": "foopassword",
74-
* "admin": false
71+
* @Request({
72+
* "email": "foo@example.com",
73+
* "password": "foopassword",
74+
* "admin": false
7575
* }, headers={"Authorization": "Bearer <jwt-token>"}),
7676
* @Response(200, body={"id": 1}),
7777
* @Response(422, body{
78-
* "message": "A validation error occured.",
79-
* "errors": {
80-
* "email": ["The email field is required."],
81-
* "password": ["The password field is required."],
82-
* "admin": ["The admin field is required."]
78+
* "message": "A validation error occured.",
79+
* "errors": {
80+
* "email": ["The email field is required."],
81+
* "password": ["The password field is required."],
82+
* "admin": ["The admin field is required."]
8383
* },
8484
* "status_code": 422
8585
* })
@@ -106,9 +106,9 @@ public function postUsers(Request $request)
106106
* @Patch("/{id}")
107107
* @Versions({"v1"})
108108
* @Transaction({
109-
* @Request({
110-
* "email": "new@email.com"
111-
* }, headers={"Authorization": "Bearer <jwt-token>"}),
109+
* @Request({
110+
* "email": "new@email.com"
111+
* }, headers={"Authorization": "Bearer <jwt-token>"}),
112112
* @Response(200, body={"email": "new@email.com"}),
113113
* @Response(422)
114114
* })
@@ -127,12 +127,12 @@ public function patchUser(Request $request, $id)
127127
* @Delete("/{id}")
128128
* @Versions({"v1"})
129129
* @Transaction({
130-
* @Request(headers={"Authorization": "Bearer <jwt-token>"}),
131-
* @Response(204),
132-
* @Response(422)
130+
* @Request(headers={"Authorization": "Bearer <jwt-token>"}),
131+
* @Response(204),
132+
* @Response(422)
133133
* })
134134
* @Parameters({
135-
* @Parameter("id", type="integer", required=true, description="The ID of the user to delete.")
135+
* @Parameter("id", type="integer", required=true, description="The ID of the user to delete.")
136136
* })
137137
*/
138138
public function deleteUser(Request $request, $id)

app/Models/User.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public function toggleTotp($token)
7070

7171
/**
7272
* Set a user password to a new value assuming it meets the following requirements:
73-
* - 8 or more characters in length
74-
* - at least one uppercase character
75-
* - at least one lowercase character
76-
* - at least one number
73+
* - 8 or more characters in length
74+
* - at least one uppercase character
75+
* - at least one lowercase character
76+
* - at least one number
7777
*
7878
* @param string $password The raw password to set the account password to.
7979
* @param string $regex The regex to use when validating the password. Defaults to '((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})'.

app/Repositories/UserRepository.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public function update($id, array $user)
8484
*/
8585
public function delete($id)
8686
{
87+
// @TODO cannot delete user with associated servers!
88+
// clean up subusers!
8789
return User::destroy($id);
8890
}
8991

resources/lang/de/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'sendlink' => 'Senden Sie Passwort-Reset Link.', /* Send password reset link */
1919
'emailsent' => 'E-Mail gesendet.', /* Email Sent */
2020
'remeberme' => 'Login merken.', /* Remember my Login*/
21-
'totp_failed' => 'Die TOTP Token vorgesehen war ist ungültig.' /* The TOTP token was provided is not valid. */
21+
'totp_failed' => 'Die TOTP Token vorgesehen war ist ungültig.' /* The TOTP token was provided is not valid. */
2222
];
2323

2424
/*

resources/lang/de/validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
'array' => 'The :attribute must contain :size items.',
7070
],
7171
'string' => 'The :attribute must be a string.',
72-
'totp' => 'The totp token is invalid. Did it expire?',
72+
'totp' => 'The totp token is invalid. Did it expire?',
7373
'timezone' => 'The :attribute must be a valid zone.',
7474
'unique' => 'The :attribute has already been taken.',
7575
'url' => 'The :attribute format is invalid.',

resources/views/admin/accounts/index.blade.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@
77
@section('content')
88
<div class="col-md-12">
99
<ul class="breadcrumb">
10-
<li><a href="/admin">Admin Control</a></li>
11-
<li class="active">Accounts</li>
12-
</ul>
10+
<li><a href="/admin">Admin Control</a></li>
11+
<li class="active">Accounts</li>
12+
</ul>
1313
<h3>All Registered Users</h3><hr />
14-
<table class="table table-striped table-bordered table-hover">
15-
<thead>
16-
<tr>
17-
<th>Email</th>
14+
<table class="table table-striped table-bordered table-hover">
15+
<thead>
16+
<tr>
17+
<th>Email</th>
1818
<th>Account Created</th>
1919
<th>Account Updated</th>
20-
</tr>
21-
</thead>
22-
<tbody>
23-
@foreach ($users as $user)
24-
<tr>
25-
<td><a href="/admin/accounts/view/{{ $user->id }}"><code>{{ $user->email }}</code></a> @if($user->root_admin === 1)<span class="badge">Administrator</span>@endif</td>
20+
</tr>
21+
</thead>
22+
<tbody>
23+
@foreach ($users as $user)
24+
<tr>
25+
<td><a href="/admin/accounts/view/{{ $user->id }}"><code>{{ $user->email }}</code></a> @if($user->root_admin === 1)<span class="badge">Administrator</span>@endif</td>
2626
<td>{{ $user->created_at }}</td>
2727
<td>{{ $user->updated_at }}</td>
28-
</tr>
29-
@endforeach
30-
</tbody>
31-
</table>
28+
</tr>
29+
@endforeach
30+
</tbody>
31+
</table>
3232
<div class="row">
3333
<div class="col-md-12 text-center">{!! $users->render() !!}</div>
3434
</div>
3535
</div>
3636
<script>
3737
$(document).ready(function () {
38-
$('#sidebar_links').find("a[href='/admin/accounts']").addClass('active');
38+
$('#sidebar_links').find("a[href='/admin/accounts']").addClass('active');
3939
});
4040
</script>
4141
@endsection

resources/views/admin/accounts/new.blade.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,65 @@
1010
<li><a href="/admin">Admin Controls</a></li>
1111
<li><a href="/admin/accounts">Accounts</a></li>
1212
<li class="active">Add New Account</li>
13-
</ul>
13+
</ul>
1414
<h3>Create New Account</h3><hr />
1515
<form action="new" method="post">
16-
<fieldset>
17-
<div class="form-group">
18-
<label for="email" class="control-label">Email</label>
19-
<div>
20-
<input type="text" autocomplete="off" name="email" class="form-control" />
21-
</div>
22-
</div>
23-
<div class="row">
24-
<div class="col-md-12">
25-
<div id="gen_pass" class=" alert alert-success" style="display:none;margin-bottom: 10px;"></div>
26-
</div>
27-
<div class="form-group col-md-6">
28-
<label for="pass" class="control-label">Password</label>
29-
<div>
30-
<input type="password" name="password" class="form-control" />
31-
</div>
32-
</div>
33-
<div class="form-group col-md-6">
34-
<label for="pass_2" class="control-label">Password Again</label>
35-
<div>
36-
<input type="password" name="password_confirmation" class="form-control" />
37-
</div>
38-
</div>
39-
</div>
40-
<div class="form-group">
41-
<div>
16+
<fieldset>
17+
<div class="form-group">
18+
<label for="email" class="control-label">Email</label>
19+
<div>
20+
<input type="text" autocomplete="off" name="email" class="form-control" />
21+
</div>
22+
</div>
23+
<div class="row">
24+
<div class="col-md-12">
25+
<div id="gen_pass" class=" alert alert-success" style="display:none;margin-bottom: 10px;"></div>
26+
</div>
27+
<div class="form-group col-md-6">
28+
<label for="pass" class="control-label">Password</label>
29+
<div>
30+
<input type="password" name="password" class="form-control" />
31+
</div>
32+
</div>
33+
<div class="form-group col-md-6">
34+
<label for="pass_2" class="control-label">Password Again</label>
35+
<div>
36+
<input type="password" name="password_confirmation" class="form-control" />
37+
</div>
38+
</div>
39+
</div>
40+
<div class="form-group">
41+
<div>
4242
{!! csrf_field() !!}
43-
<button class="btn btn-primary btn-sm" type="submit">Create Account</button>
44-
<button class="btn btn-default btn-sm" id="gen_pass_bttn" type="button">Generate Password</button>
45-
</div>
46-
</div>
47-
</fieldset>
48-
</form>
43+
<button class="btn btn-primary btn-sm" type="submit">Create Account</button>
44+
<button class="btn btn-default btn-sm" id="gen_pass_bttn" type="button">Generate Password</button>
45+
</div>
46+
</div>
47+
</fieldset>
48+
</form>
4949
</div>
5050
<script>
5151
$(document).ready(function(){
52-
$("#sidebar_links").find("a[href='/admin/account/new']").addClass('active');
53-
$("#gen_pass_bttn").click(function(e){
54-
e.preventDefault();
55-
$.ajax({
56-
type: "GET",
57-
url: "/password-gen/12",
52+
$("#sidebar_links").find("a[href='/admin/account/new']").addClass('active');
53+
$("#gen_pass_bttn").click(function(e){
54+
e.preventDefault();
55+
$.ajax({
56+
type: "GET",
57+
url: "/password-gen/12",
5858
headers: {
5959
'X-CSRF-TOKEN': '{{ csrf_token() }}'
6060
},
61-
success: function(data) {
62-
$("#gen_pass").html('<strong>Generated Password:</strong> ' + data).slideDown();
63-
$('input[name="password"], input[name="password_confirmation"]').val(data);
64-
return false;
65-
}
66-
});
67-
return false;
68-
});
61+
success: function(data) {
62+
$("#gen_pass").html('<strong>Generated Password:</strong> ' + data).slideDown();
63+
$('input[name="password"], input[name="password_confirmation"]').val(data);
64+
return false;
65+
}
66+
});
67+
return false;
68+
});
6969
});
7070
$(document).ready(function () {
71-
$('#sidebar_links').find("a[href='/admin/accounts/new']").addClass('active');
71+
$('#sidebar_links').find("a[href='/admin/accounts/new']").addClass('active');
7272
});
7373
</script>
7474
@endsection

resources/views/admin/index.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
@section('content')
88
<div class="col-md-12">
99
<ul class="breadcrumb">
10-
<li class="active">Admin Control</li>
11-
</ul>
10+
<li class="active">Admin Control</li>
11+
</ul>
1212
<h3 class="nopad">Pterodactyl Admin Control Panel</h3><hr />
1313
<p>Welcome to the most advanced, lightweight, and user-friendly open source game server control panel.</p>
1414
</div>
1515
<script>
1616
$(document).ready(function () {
17-
$('#sidebar_links').find("a[href='/admin']").addClass('active');
17+
$('#sidebar_links').find("a[href='/admin']").addClass('active');
1818
});
1919
</script>
2020
@endsection

resources/views/admin/locations/index.blade.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77
@section('content')
88
<div class="col-md-12">
99
<ul class="breadcrumb">
10-
<li><a href="/admin">Admin Control</a></li>
11-
<li class="active">Locations</li>
12-
</ul>
10+
<li><a href="/admin">Admin Control</a></li>
11+
<li class="active">Locations</li>
12+
</ul>
1313
<h3>All Locations</h3><hr />
14-
<table class="table table-bordered table-hover table-striped">
15-
<thead>
16-
<tr>
17-
<th>Location</th>
14+
<table class="table table-bordered table-hover table-striped">
15+
<thead>
16+
<tr>
17+
<th>Location</th>
1818
<th>Description</th>
19-
<th class="text-center">Nodes</th>
19+
<th class="text-center">Nodes</th>
2020
<th class="text-center">Servers</th>
21-
</tr>
22-
</thead>
23-
<tbody>
24-
@foreach ($locations as $location)
25-
<tr>
26-
<td><a href="#/edit/{{ $location->id }}" data-action="edit" data-location="{{ $location->id }}"><code>{{ $location->short }}</code></td>
21+
</tr>
22+
</thead>
23+
<tbody>
24+
@foreach ($locations as $location)
25+
<tr>
26+
<td><a href="#/edit/{{ $location->id }}" data-action="edit" data-location="{{ $location->id }}"><code>{{ $location->short }}</code></td>
2727
<td>{{ $location->long }}</td>
2828
<td class="text-center">{{ $location->a_nodeCount }}</td>
2929
<td class="text-center">{{ $location->a_serverCount }}</td>
30-
</tr>
31-
@endforeach
32-
</tbody>
33-
</table>
30+
</tr>
31+
@endforeach
32+
</tbody>
33+
</table>
3434
<div class="row">
3535
<div class="col-md-12 text-center">{!! $locations->render() !!}</div>
3636
</div>
3737
</div>
3838
<script>
3939
$(document).ready(function () {
40-
$('#sidebar_links').find("a[href='/admin/locations']").addClass('active');
40+
$('#sidebar_links').find("a[href='/admin/locations']").addClass('active');
4141
});
4242
</script>
4343
@endsection

0 commit comments

Comments
 (0)