Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

ChangeWindows 6 #83

Open
wants to merge 78 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d652a21
Let the fun begin
Studio384 Oct 19, 2020
f565d35
Merge branch '5.3' into 6.0
Studio384 Oct 21, 2020
b1f1407
[Core] Update dependencies
Studio384 Oct 21, 2020
3283789
[Core] Update dependencies
Studio384 Oct 21, 2020
983c1a6
Start implementing API
Studio384 Oct 22, 2020
b7f054a
Merge branch '5.3' into 6.0
Studio384 Oct 22, 2020
1b78225
Update dependencies
Studio384 Nov 12, 2020
edc749a
Start implementing the Guide admin panel for Viv
Studio384 Nov 12, 2020
9a597ce
Work on translation, update search
Studio384 Nov 12, 2020
a5d24e7
Expand seeder, add routes
Studio384 Nov 12, 2020
8f9c3d1
Minor updates to support BS5 in the front-end
Studio384 Nov 13, 2020
652a0c2
Update dependencies
Studio384 Nov 15, 2020
1671319
Start implementing milestone creation UI
Studio384 Nov 15, 2020
12a92fd
Add milestone edit and delete
Studio384 Nov 15, 2020
e8b6abf
Add flight creation to admin
Studio384 Nov 15, 2020
d67bf55
Add flight edit and delete
Studio384 Nov 15, 2020
b43d432
Fix favicons
Studio384 Nov 16, 2020
20931eb
Minor styling updates
Studio384 Nov 16, 2020
0e3bf8d
Add changelog overview
Studio384 Nov 16, 2020
2a3e553
Support editing and deleting changelogs
Studio384 Nov 17, 2020
342d5fd
Revamp profile system
Studio384 Nov 17, 2020
b094e38
Fix switched titles
Studio384 Nov 17, 2020
59bb6f5
Drop the Patrons from about
Studio384 Nov 18, 2020
b1b55c4
Connect all edit entry points to the Backstage
Studio384 Nov 18, 2020
f63c43c
Fixing a bunch of create and edit bugs
Studio384 Nov 18, 2020
5535298
Simplify Settings, fix dark theme forms
Studio384 Nov 18, 2020
ca12962
Set some defaults for new flights
Studio384 Nov 19, 2020
639bb4d
Cleanup milestone fill-in
Studio384 Nov 19, 2020
54c8657
Drop legacy management view and controllers
Studio384 Nov 19, 2020
b1e2a80
Update generated files
Studio384 Nov 19, 2020
8bbd359
Update menu, show avatar in front-end
Studio384 Nov 20, 2020
9f3a1d1
Use custom scrollbar
Studio384 Nov 20, 2020
45c5c1b
Fix profile settings for BS5
Studio384 Nov 20, 2020
cd7d66d
Make Backstage searchable
Studio384 Nov 22, 2020
8922f39
Update dropdown color in dark
Studio384 Nov 22, 2020
12236c9
Update changelogs
Studio384 Nov 23, 2020
b78a18b
Fix migration errors
Studio384 Nov 23, 2020
b6971eb
ChangeWindows 6.0-alpha.1
Studio384 Nov 24, 2020
1aa575c
Merge branch 'release' into 6.0
Studio384 Nov 24, 2020
912f117
Merge branch 'release' into 6.0
Studio384 Nov 24, 2020
504cc8e
Add milestone build tracking
Studio384 Nov 27, 2020
7ec57f7
Don't make it more complex than required
Studio384 Nov 28, 2020
d591ed1
Update dependencies
Studio384 Nov 28, 2020
850fdc8
#89 Show version in timeline UI directly
Studio384 Nov 29, 2020
522676a
#87 Add platform platform create and eidt
Studio384 Nov 30, 2020
7ad6ddd
#88 Add channels management
Studio384 Dec 1, 2020
969356c
Add channel and platform to search
Studio384 Dec 1, 2020
37ac488
Fix crash when removing a flight, milestone or changelog
Studio384 Dec 1, 2020
6640656
#87 #88 Add connecting channels to platforms
Studio384 Dec 1, 2020
2ed1e39
#87 #88 Dynamically generate platform channel forms
Studio384 Dec 1, 2020
5829897
Update form consistency
Studio384 Dec 1, 2020
a817d53
Update changelogs
Studio384 Dec 1, 2020
cc11811
#87 #88 Add Platform-Channel-Milestone management
Studio384 Dec 6, 2020
ea46eb2
Update dependenceis
Studio384 Dec 6, 2020
b25da66
Update dependencies
Studio384 Dec 7, 2020
ec0525e
Full support for BS5 beta 1
Studio384 Dec 7, 2020
3862145
Updates for Bootstrap
Studio384 Dec 11, 2020
0880a2c
Update dependencies
Studio384 Dec 11, 2020
0171bcc
Revamp rings page, rename to channel
Studio384 Dec 11, 2020
23e2f1d
Support string as a version
Studio384 Dec 13, 2020
bd938b9
Fix channels sorting
Studio384 Dec 13, 2020
bc08de2
Update dependencies
Studio384 Dec 18, 2020
9a3bea0
Move Blog up to the main menu
Studio384 Dec 18, 2020
6f125b9
Add active channel status
Studio384 Dec 18, 2020
385aea1
Fix CSS issue
Studio384 Dec 18, 2020
cd2735a
Update Channels overview
Studio384 Dec 20, 2020
961472f
Remove legacy scopes
Studio384 Dec 20, 2020
228aaf2
Rename Rings to Channels
Studio384 Dec 20, 2020
1ca634c
Remove legacy milestone fields
Studio384 Dec 20, 2020
199335f
Bring Timeline sidebar in line with Channels
Studio384 Dec 20, 2020
1bb4d47
Cleanup migrations a bit
Studio384 Dec 21, 2020
b4bd817
Update changelogs
Studio384 Dec 21, 2020
4bc51b4
ChangeWindows 6.0-alpha.2
Studio384 Dec 21, 2020
7aacfb6
Fix a bunch of minor issues
Studio384 Dec 22, 2020
75008bb
#92 Horizon: database migrations and models
Studio384 Dec 27, 2020
60ebf0e
Update dependencies
Studio384 Dec 27, 2020
28d6396
Start rewriting with new table format
Studio384 Jan 10, 2021
3306d4e
#92 Hook up relations for milestones
Studio384 Jan 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ yarn-error.log
/public/css/brands.min.css
/public/css/duotone.min.css
/public/css/fontawesome.min.css
/public/img/avatars
.npmrc
14 changes: 14 additions & 0 deletions app/Ability.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Ability extends Model {
protected $table = 'abilities';
protected $fillable = ['name', 'label'];

public function roles() {
return $this->belongsToMany(Role::class);
}
}
49 changes: 49 additions & 0 deletions app/Channel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\Sluggable;
use Spatie\Searchable\Searchable;
use Spatie\Searchable\SearchResult;

class Channel extends Model implements Searchable {
use Sluggable;
use HasFactory;

public $searchableType = 'Channels';

protected $table = 'channels';
protected $fillable = ['name', 'color', 'position', 'slug'];

public function getBgColorAttribute() {
return 'background-color: '.$this->color;
}

public function getTextColorAttribute() {
return 'color: '.$this->color;
}

public function getRouteKeyName() {
return 'slug';
}

public function sluggable() {
return [
'slug' => [
'source' => 'name'
]
];
}

public function getSearchResult(): SearchResult {
$url = route('admin.channels.edit', $this);

return new SearchResult(
$this,
$this->name,
$url
);
}
}
21 changes: 21 additions & 0 deletions app/ChannelMilestonePlatform.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ChannelMilestonePlatform extends Model {
use HasFactory;

protected $table = 'channel_milestone_platforms';
protected $fillable = ['channel_platform_id', 'milestone_platform_id', 'active'];

public function channelPlatform() {
return $this->belongsTo(ChannelPlatform::class);
}

public function milestonePlatform() {
return $this->belongsTo(MilestonePlatform::class);
}
}
21 changes: 21 additions & 0 deletions app/ChannelPlatform.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ChannelPlatform extends Model {
use HasFactory;

protected $table = 'channel_platforms';
protected $fillable = ['channel_id', 'platform_id', 'name', 'short_name', 'active'];

public function channel() {
return $this->belongsTo(Channel::class);
}

public function platform() {
return $this->belongsTo(Platform::class);
}
}
6 changes: 6 additions & 0 deletions app/Helpers/GlobalHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

function getSetting($name) {
return 'ChangeWindows';
// return Cache::get('settings')->where('name', $name)->first()->value;
}
16 changes: 16 additions & 0 deletions app/Helpers/PlatformHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ function getPlatformIcon($id) {
}
}

function getPlatformIconAdmin($id) {
switch ($id) {
case 1: return '<i class="far fa-fw fa-desktop pc"></i>';
case 2: return '<i class="far fa-fw fa-mobile mobile"></i>';
case 3: return '<i class="far fa-fw fa-gamepad-alt xbox"></i>';
case 4: return '<i class="far fa-fw fa-server server"></i>';
case 5: return '<i class="far fa-fw fa-head-vr holographic"></i>';
case 6: return '<i class="far fa-fw fa-microchip iot"></i>';
case 7: return '<i class="far fa-fw fa-tv-alt team"></i>';
case 8: return '<i class="far fa-fw fa-compact-disc iso"></i>';
case 9: return '<i class="far fa-fw fa-code sdk"></i>';
case 10: return '<i class="far fa-fw fa-tablet-android tenx"></i>';
default: return '<i class="fab fa-fw fa-windows generic"></i>';
}
}

function getPlatformIconNoStyle($id) {
switch ($id) {
case 1: return '<i class="far fa-fw fa-desktop"></i>';
Expand Down
13 changes: 13 additions & 0 deletions app/Helpers/TileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ function getTile( $flight ) {
</a>
<?php
}

function getChannelTile($flight, $channelMilestonePlatform) {
?>
<a
href="<?php echo '/milestones/'.$flight->milestone.'/'.$channelMilestonePlatform->channelPlatform->platform->slug ?>"
class="tile <?php echo $flight->class ?> <?php echo $channelMilestonePlatform->active === "0" ? 'channel-inactive' : '' ?>"
>
<span class="ring"><?php echo $channelMilestonePlatform->channelPlatform->name ?></span>
<span class="build"><?php echo $flight->build ?>.<?php echo $flight->delta ?></span>
<span class="date"><?php echo $flight->format ?></span>
</a>
<?php
}
106 changes: 106 additions & 0 deletions app/Http/Controllers/Admin/ChannelController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?php

namespace App\Http\Controllers\Admin;

use App\Channel;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Str;

class ChannelController extends Controller {
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() {
$this->authorize('show_channels');

$channels = Channel::orderBy('position')->get();

return view('core.channels.index', compact('channels'));
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request) {
$this->authorize('create_channel');

$this->validate(request(), [
'name' => ['required'],
'color' => ['required'],
'position' => ['required']
], [
'name.required' => 'The name is required.',
'color.required' => 'The color is required.',
'position.required' => 'The position is required.'
]);

$channel = Channel::create([
'name' => request('name'),
'color' => '#'.request('color'),
'position' => request('position')
]);

return redirect()->route('admin.channels.edit', $channel)->with('status', 'The channel <b>'.$channel->name.'</b> has been added.');
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Channel $channel
* @return \Illuminate\Http\Response
*/
public function edit(Channel $channel) {
$this->authorize('edit_channel');

return view('core.channels.edit', compact('channel'));
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Channel $channel
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Channel $channel) {
$this->authorize('edit_channel');

$this->validate(request(), [
'name' => ['required'],
'color' => ['required'],
'position' => ['required']
], [
'name.required' => 'The name is required.',
'color.required' => 'The color is required.',
'position.required' => 'The position is required.'
]);

$channel->update([
'name' => request('name'),
'color' => '#'.request('color'),
'position' => request('position')
]);

return redirect()->route('admin.channels')->with('status', 'The changes to <b>'.$channel->name.'</b> have been saved.');
}

/**
* Remove the specified resource from storage.
*
* @param \App\Channel $channel
* @return \Illuminate\Http\Response
*/
public function destroy(Channel $channel) {
$this->authorize('delete_channel');

$channel->delete();

return redirect()->route('admin.channels')->with('status', 'The channel <b>'.$channel->name.'</b> has been removed.');
}
}
41 changes: 41 additions & 0 deletions app/Http/Controllers/Admin/ChannelMilestonePlatformController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\ChannelMilestonePlatform;
use App\MilestonePlatform;
use App\ChannelPlatform;

class ChannelMilestonePlatformController extends Controller {
public function store(MilestonePlatform $milestonePlatform, ChannelPlatform $channelPlatform) {
$this->authorize('edit_milestone');

$channelMilestonePlatform = ChannelMilestonePlatform::create([
'milestone_platform_id' => $milestonePlatform->id,
'channel_platform_id' => $channelPlatform->id,
'active' => 1
]);

return redirect()->back()->with('status', '<b>'.$channelPlatform->name.'</b> has been added to <b>'.$milestonePlatform->platform->name.'</b> for <b>'.$milestonePlatform->milestone->name.'</b>.');
}

public function toggle(ChannelMilestonePlatform $channelMilestonePlatform) {
$this->authorize('edit_milestone');

$channelMilestonePlatform->update([
'active' => $channelMilestonePlatform->active === 1 ? 0 : 1
]);

return redirect()->back()->with('status', '<b>'.$channelMilestonePlatform->channelPlatform->name.'</b> has been toggled for <b>'.$channelMilestonePlatform->milestonePlatform->platform->name.'</b> for <b>'.$channelMilestonePlatform->milestonePlatform->milestone->name.'</b>.');
}

public function destroy(ChannelMilestonePlatform $channelMilestonePlatform) {
$this->authorize('edit_milestone');

$channelMilestonePlatform->delete();

return redirect()->back()->with('status', '<b>'.$channelMilestonePlatform->channelPlatform->name.'</b> has been removed from <b>'.$channelMilestonePlatform->milestonePlatform->platform->name.'</b> for <b>'.$channelMilestonePlatform->milestonePlatform->milestone->name.'</b>.');
}
}
52 changes: 52 additions & 0 deletions app/Http/Controllers/Admin/ChannelPlatformController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\ChannelPlatform;

class ChannelPlatformController extends Controller {
public function store() {
$this->authorize('edit_platform');

$this->validate(request(), [
'channel' => ['required'],
'platform' => ['required'],
'name' => ['required'],
'short_name' => ['required']
], [
'channel.required' => 'A channel is required.',
'platform.required' => 'A platform is required.',
'name.required' => 'A platform is required.',
'short_name.required' => 'A platform is required.'
]);

$channelPlatform = ChannelPlatform::create([
'channel_id' => request('channel'),
'platform_id' => request('platform'),
'name' => request('name'),
'short_name' => request('short_name')
]);

return redirect()->back()->with('status', '<b>'.$channelPlatform->channel->name.'</b> has been added to <b>'.$channelPlatform->platform->name.'</b>.');
}

public function toggle(ChannelPlatform $channelPlatform) {
$this->authorize('edit_platform');

$channelPlatform->update([
'active' => $channelPlatform->active === 1 ? 0 : 1
]);

return redirect()->back()->with('status', '<b>'.$channelPlatform->channel->name.'</b> has been toggled.');
}

public function destroy(ChannelPlatform $channelPlatform) {
$this->authorize('edit_platform');

$channelPlatform->delete();

return redirect()->back()->with('status', '<b>'.$channelPlatform->channel->name.'</b> has been removed from <b>'.$channelPlatform->platform->name.'</b>.');
}
}
30 changes: 30 additions & 0 deletions app/Http/Controllers/Admin/MilestonePlatformController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\MilestonePlatform;
use App\Milestone;
use App\Platform;

class MilestonePlatformController extends Controller {
public function store(Milestone $milestone, Platform $platform) {
$this->authorize('edit_milestone');

$milestonePlatform = MilestonePlatform::create([
'milestone_id' => $milestone->id,
'platform_id' => $platform->id
]);

return redirect()->back()->with('status', '<b>'.$milestonePlatform->platform->name.'</b> has been added to <b>'.$milestonePlatform->milestone->name.'</b>.');
}

public function destroy(MilestonePlatform $milestonePlatform) {
$this->authorize('edit_milestone');

$milestonePlatform->delete();

return redirect()->back()->with('status', '<b>'.$milestonePlatform->platform->name.'</b> has been removed from <b>'.$milestonePlatform->milestone->name.'</b>.');
}
}
Loading