diff --git a/web/app/Http/Controllers/GamesController.php b/web/app/Http/Controllers/GamesController.php new file mode 100644 index 0000000..fb5ab2f --- /dev/null +++ b/web/app/Http/Controllers/GamesController.php @@ -0,0 +1,27 @@ +first(); + + return response()->json(['available' => $status->operational]) + ->header('Access-Control-Allow-Origin', env('APP_URL')) + ->header('Vary', 'origin') + ->header('Content-Type', 'application/json'); + } +} diff --git a/web/app/Models/Games.php b/web/app/Models/Games.php new file mode 100644 index 0000000..616ab8e --- /dev/null +++ b/web/app/Models/Games.php @@ -0,0 +1,11 @@ + 'boolean', + ]; + + use HasFactory; +} diff --git a/web/database/migrations/2021_10_02_145224_create_webstatus_table.php b/web/database/migrations/2021_10_02_145224_create_webstatus_table.php new file mode 100644 index 0000000..46bb40e --- /dev/null +++ b/web/database/migrations/2021_10_02_145224_create_webstatus_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('name'); + $table->boolean('operational')->default(false); + $table->float('responseTime')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('web_statuses'); + } +} diff --git a/web/database/migrations/2021_10_02_151112_create_games_table.php b/web/database/migrations/2021_10_02_151112_create_games_table.php new file mode 100644 index 0000000..5855d5f --- /dev/null +++ b/web/database/migrations/2021_10_02_151112_create_games_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('name'); + $table->string('description')->nullable(); + $table->unsignedInteger('creator'); + $table->enum('status', ['unmoderated', 'review', 'deleted'])->default('unmoderated'); + $table->unsignedInteger('genre')->default(0); // bitwise flags + $table->unsignedInteger('allowed_gears')->default(0); // bitwise flags + $table->unsignedInteger('players_ingame')->default(0); + $table->unsignedInteger('visits')->default(0); + $table->unsignedInteger('max_players')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('games'); + } +} diff --git a/web/database/seeders/DatabaseSeeder.php b/web/database/seeders/DatabaseSeeder.php index 57b73b5..ed4c823 100644 --- a/web/database/seeders/DatabaseSeeder.php +++ b/web/database/seeders/DatabaseSeeder.php @@ -4,6 +4,8 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; +use Database\Seeders\WebStatusSeeder; + class DatabaseSeeder extends Seeder { /** @@ -13,6 +15,8 @@ class DatabaseSeeder extends Seeder */ public function run() { - // \App\Models\User::factory(10)->create(); + $this->call([ + WebStatusSeeder::class + ]); } } diff --git a/web/database/seeders/WebStatusSeeder.php b/web/database/seeders/WebStatusSeeder.php new file mode 100644 index 0000000..1aae9e7 --- /dev/null +++ b/web/database/seeders/WebStatusSeeder.php @@ -0,0 +1,26 @@ + 'ThumbArbiter' + ]); + + WebStatus::create([ + 'name' => 'GamesArbiter' + ]); + } +} diff --git a/web/public/images/symbols/warning.png b/web/public/images/symbols/warning.png new file mode 100644 index 0000000..53b4368 Binary files /dev/null and b/web/public/images/symbols/warning.png differ diff --git a/web/resources/js/components/Footer.js b/web/resources/js/components/Footer.js index 0e0d301..28576e7 100644 --- a/web/resources/js/components/Footer.js +++ b/web/resources/js/components/Footer.js @@ -21,7 +21,7 @@ const Footer = () => {

| | | | |


Copyright © {CurrentDate.getFullYear()} Graphictoria. All rights reserved.

-

Graphictoria is not associated with ROBLOX Corporation. The usage of this website signifies your acceptance of the and our .

+

Graphictoria is not affiliated with or sponsored by Roblox Corporation. The usage of this website signifies your acceptance of the and our .

Twitter Discord diff --git a/web/resources/js/layouts/App.js b/web/resources/js/layouts/App.js index 57e8d4f..a300692 100644 --- a/web/resources/js/layouts/App.js +++ b/web/resources/js/layouts/App.js @@ -16,6 +16,8 @@ import { Auth } from '../Pages/Auth.js'; import { NotFound, InternalServerError } from '../Pages/Errors.js'; import { Maintenance } from '../Pages/Maintenance.js'; +import { Games } from '../Pages/Games.js'; + import { About } from '../Pages/Legal/About.js'; import { Copyright } from '../Pages/Legal/Copyright.js'; import { Privacy } from '../Pages/Legal/Privacy.js'; @@ -114,6 +116,10 @@ class App extends React.Component { + + + + diff --git a/web/resources/js/pages/Errors.js b/web/resources/js/pages/Errors.js index 3918677..fcdac3b 100644 --- a/web/resources/js/pages/Errors.js +++ b/web/resources/js/pages/Errors.js @@ -74,4 +74,4 @@ class InternalServerError extends React.Component { } } -export { NotFound, InternalServerError }; \ No newline at end of file +export { NotFound, InternalServerError, GenericErrorModal }; \ No newline at end of file diff --git a/web/resources/js/pages/Games.js b/web/resources/js/pages/Games.js new file mode 100644 index 0000000..01465ec --- /dev/null +++ b/web/resources/js/pages/Games.js @@ -0,0 +1,29 @@ +// © XlXi 2021 +// Graphictoria 5 + +import React from "react"; +import { Link, useHistory } from "react-router-dom"; + +import SetTitle from "../Helpers/Title.js"; + +import { GenericErrorModal } from './Errors.js'; + +class Games extends React.Component { + componentDidMount() + { + SetTitle("Games"); + } + + render() + { + return ( + + +
+ Seems like XlXi tripped over the game server's power cord again. Games are temporarily unavailable and administrators have been notified of the issue. Sorry for the inconvenience! +
+ ); + } +} + +export { Games }; \ No newline at end of file diff --git a/web/resources/js/pages/Home.js b/web/resources/js/pages/Home.js index 344f5ff..202d1bd 100644 --- a/web/resources/js/pages/Home.js +++ b/web/resources/js/pages/Home.js @@ -21,7 +21,7 @@ class Home extends React.Component {

Graphictoria

Graphictoria aims to revive the classic Roblox experience. Join 5k+ other users and relive your childhood!
-

* Graphictoria is not affiliated with Roblox Corporation.

+

* Graphictoria is not affiliated with or sponsored by Roblox Corporation.

Create your account
diff --git a/web/routes/api.php b/web/routes/api.php index 0f5cd37..7aafa4e 100644 --- a/web/routes/api.php +++ b/web/routes/api.php @@ -3,6 +3,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use App\Http\Controllers\BannerController; +use App\Http\Controllers\GamesController; /* |-------------------------------------------------------------------------- @@ -21,6 +22,8 @@ Route::get('/', function () { Route::get('/web/activebanners', [BannerController::class, 'getBanners']); +Route::get('/web/games/status', [GamesController::class, 'isAvailable']); + Route::fallback(function () { return response('{"errors":[{"code":404,"message":"NotFound"}]}', 404) ->header('Cache-Control', 'private')