Skip to content

Commit 7b75b1f

Browse files
authored
Merge branch 'master' into enhancement/finish-events
2 parents 2b83514 + 177706d commit 7b75b1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+188
-19970
lines changed

app/Http/Controllers/AtcTraining/ApplicationsController.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ public function submitApplication(Request $request)
7575
{
7676
$messages = [
7777
'applicant_statement.required' => 'You need to write why you wish to control at Gander.',
78-
'refereeName.required' => 'Please provide a name for your referee.',
78+
/* 'refereeName.required' => 'Please provide a name for your referee.',
7979
'refereeEmail.required' => 'Please provide an email for your referee.',
80-
'refereePosition.required' => 'Please provide your referee\'s email.'
80+
'refereePosition.required' => 'Please provide your referee\'s email.' */
8181
];
8282

8383
//Validate form
8484
$validator = Validator::make($request->all(), [
8585
'applicant_statement' => 'required',
86-
'refereeName' => 'required',
86+
/* 'refereeName' => 'required',
8787
'refereeEmail' => 'required|email',
88-
'refereePosition' => 'required'
88+
'refereePosition' => 'required' */
8989
], $messages);
9090

9191
if ($validator->fails()) {

app/Http/Controllers/Auth/LoginController.php

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ public function validateConnectLogin(Request $request)
191191
if (!UserPreferences::where('user_id', $user->id)->first()) {
192192
$prefs = new UserPreferences();
193193
$prefs->user_id = $user->id;
194+
$prefs->ui_mode = "light";
194195
$prefs->save();
195196
}
196197
return redirect('/dashboard')->with('success', 'Logged in!');

app/Http/Controllers/Users/UserController.php

+30-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use mofodojodino\ProfanityFilter\Check;
2727
use RestCord\Interfaces\AuditLog;
2828
use Illuminate\Support\Facades\Log;
29+
use Illuminate\Support\Facades\Validator;
2930
use Laravel\Socialite\Facades\Socialite;
3031
use NotificationChannels\Discord\Discord;
3132

@@ -495,8 +496,36 @@ public function unlinkDiscord()
495496
}
496497

497498
public function preferences()
498-
{
499+
{
499500
$preferences = Auth::user()->preferences;
500501
return view('dashboard.me.preferences', compact('preferences'));
501502
}
503+
504+
public function preferencesPost(Request $request)
505+
{
506+
//Define validator messages
507+
$messages = [
508+
'ui_mode.required' => 'Please select a UI mode.'
509+
];
510+
511+
//Validate
512+
$validator = Validator::make($request->all(), [
513+
'ui_mode' => 'required',
514+
], $messages);
515+
516+
//Redirect if fails
517+
if ($validator->fails()) {
518+
return redirect()->back()->withInput()->withErrors($validator, 'savePreferencesErrors');
519+
}
520+
521+
//Save preferences
522+
$preferences = Auth::user()->preferences;
523+
524+
//UI mode
525+
$preferences->ui_mode = $request->get('ui_mode');
526+
527+
//Save and redirect
528+
$preferences->save();
529+
return redirect()->back()->withInput()->with('success', 'Preferences saved!');
530+
}
502531
}

app/Models/Users/UserPreferences.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@
66

77
class UserPreferences extends Model
88
{
9-
//
9+
protected $hidden = ['id'];
10+
11+
protected $fillable = [
12+
'enable_beta_components', 'ui_mode', 'enable_discord_notifications'
13+
];
14+
15+
public function user()
16+
{
17+
return $this->belongsTo(User::class);
18+
}
1019
}

public/css/czqomd.css

+42-4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ body[data-theme="dark"] {
1919
}
2020

2121
body[data-theme="dark"] .card,
22-
body[data-theme="dark"].list-group-item {
22+
body[data-theme="dark"] .list-group-item {
2323
background-color: rgb(59, 61, 68) !important;
2424
}
2525

2626
body[data-theme="dark"] .list-group-item,
27-
body[data-theme="dark"]span.black-text,
28-
body[data-theme="dark"].text-dark,
29-
body[data-theme="dark"].text-muted {
27+
body[data-theme="dark"] span.black-text,
28+
body[data-theme="dark"] .text-dark,
29+
body[data-theme="dark"] .text-muted {
3030
color: #eee !important;
3131
}
3232

@@ -52,6 +52,15 @@ body[data-theme="dark"] #czqoHeaderLight {
5252
background: rgb(47, 49, 54) !important;
5353
}
5454

55+
56+
body[data-theme="dark"] .modal-content {
57+
background: rgb(59, 61, 68) !important;
58+
}
59+
60+
body[data-theme="dark"] .modal-content .close {
61+
color: #eee !important;
62+
}
63+
5564
#czqoHeaderImg {
5665
width: 225px;
5766
margin-bottom: 4px;
@@ -200,6 +209,19 @@ div.d-flex.flex-row > i {
200209
border-radius: .45em !important;
201210
}
202211

212+
body[data-theme="dark"] .custom-file-label, body[data-theme="dark"] .custom-file-label::after {
213+
color: #eee !important;
214+
}
215+
216+
body[data-theme="dark"] .form-control {
217+
color: #eee !important;
218+
}
219+
220+
body[data-theme="dark"] ::placeholder {
221+
color: rgb(184, 184, 184) !important;
222+
opacity: 1;
223+
}
224+
203225
.custom-file-input:lang(en) ~ .custom-file-label::after {
204226
border-left: 1px solid #E0E0DC;
205227
}
@@ -255,3 +277,19 @@ div.d-flex.flex-row > i {
255277
font-weight: 600;
256278
}
257279

280+
281+
.jarallax {
282+
position: relative;
283+
z-index: 0;
284+
}
285+
.jarallax > .jarallax-img {
286+
position: absolute;
287+
object-fit: cover;
288+
/* support for plugin https://github.com/bfred-it/object-fit-images */
289+
font-family: 'object-fit: cover;';
290+
top: 0;
291+
left: 0;
292+
width: 100%;
293+
height: 100%;
294+
z-index: -1;
295+
}

public/fullcalendar/bootstrap/main.css

-33
This file was deleted.

public/fullcalendar/bootstrap/main.js

-90
This file was deleted.

public/fullcalendar/bootstrap/main.min.css

-5
This file was deleted.

public/fullcalendar/bootstrap/main.min.js

-20
This file was deleted.

0 commit comments

Comments
 (0)