-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #555 from Vatsim-Scandinavia/misc/frontend-and-more
Frontend and onboarding tweaks
- Loading branch information
Showing
21 changed files
with
265 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class KeyGet extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'key:get'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Get the current application key'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
|
||
$this->info('Current application key, copy the whole next line:'); | ||
$this->info(config('app.key')); | ||
|
||
return Command::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Models\Area; | ||
use App\Models\Group; | ||
use App\Models\User; | ||
use Illuminate\Console\Command; | ||
|
||
class UserMakeAdmin extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'user:makeadmin'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Make the specified user into an admin'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
|
||
// Input user | ||
$cid = $this->ask("What is the user's CID?"); | ||
if ($user = User::find($cid)) { | ||
$this->info('User found: ' . $user->name); | ||
|
||
$areas = Area::all(); | ||
$area = $this->choice('Which area? The admin has access across areas, but an area must be selected regardless.', $areas->pluck('name')->toArray()); | ||
if ($area != null) { | ||
$area = Area::where('name', $area)->first(); | ||
|
||
// Give the user permission to the area | ||
$user->groups()->attach(Group::find(1), ['area_id' => $area->id]); | ||
$this->info('User ' . $user->name . ' has been given admin permissions for ' . $area->name . '.'); | ||
|
||
return Command::SUCCESS; | ||
} else { | ||
$this->error('No area was selected.'); | ||
|
||
return Command::FAILURE; | ||
} | ||
|
||
} else { | ||
$this->error('No records of ' . $cid . ' was found.'); | ||
|
||
return Command::FAILURE; | ||
} | ||
|
||
return Command::FAILURE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,7 @@ | |
min-height: 25px; | ||
line-height: 1.5rem; | ||
padding: 0 1rem; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover{ | ||
|
Oops, something went wrong.