More shop stuff, settings stuff, and gameserver stuff.
This commit is contained in:
parent
a680360ef7
commit
4900679f01
|
|
@ -5,6 +5,9 @@ APP_DEBUG=true
|
||||||
APP_URL=http://gtoria.net
|
APP_URL=http://gtoria.net
|
||||||
MIX_APP_URL=http://gtoria.net
|
MIX_APP_URL=http://gtoria.net
|
||||||
|
|
||||||
|
GAMESERVER_IP=127.0.0.1
|
||||||
|
THUMBNAILER_IP=127.0.0.1
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_DEPRECATIONS_CHANNEL=null
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Web;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class SettingsController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('web.user.settings');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Graphictoria Arbiter Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file holds various IP configurations for the games relay/thumbnail
|
||||||
|
| relay arbiters.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'gameserver_ip' => env('GAMESERVER_IP'),
|
||||||
|
|
||||||
|
'thumbnailer_ip' => env('THUMBNAILER_IP'),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -36,6 +36,11 @@ img.twemoji {
|
||||||
|
|
||||||
// Shop
|
// Shop
|
||||||
|
|
||||||
|
.graphictoria-item-page {
|
||||||
|
max-width: 1096px;
|
||||||
|
margin: 0 auto 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.graphictoria-list-dropdown::after {
|
.graphictoria-list-dropdown::after {
|
||||||
@include caret-down();
|
@include caret-down();
|
||||||
|
|
||||||
|
|
@ -145,7 +150,9 @@ img.twemoji {
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #222 !important;
|
html.gtoria-dark & {
|
||||||
|
background-color: #222 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-right {
|
.float-right {
|
||||||
|
|
@ -959,6 +966,37 @@ input {
|
||||||
|
|
||||||
// Containers
|
// Containers
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.container-small {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
.container-large {
|
||||||
|
width: 970px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.container-small {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
.container-large {
|
||||||
|
width: 1170px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.container-small {
|
||||||
|
width: 700px;
|
||||||
|
}
|
||||||
|
.container-large {
|
||||||
|
width: 1500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-small, .container-large {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
a.list-group-item {
|
a.list-group-item {
|
||||||
&-success {
|
&-success {
|
||||||
&.active {
|
&.active {
|
||||||
|
|
|
||||||
|
|
@ -6,68 +6,114 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container pt-5">
|
{{-- XlXi: MOVE THESE TO JS --}}
|
||||||
|
@if(false)
|
||||||
|
<div class="modal fade" id="purchase-modal" aria-hidden="true" tabindex="-1">
|
||||||
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
|
<div class="modal-content text-center">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Purchase Item</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body d-flex flex-column">
|
||||||
|
<p>Would you like to purchase the {{ $asset->typeString() }} "<strong>{{ $asset->name }}</strong>" from {{ $asset->user->username }} for <strong style="color:#e59800!important;font-weight:bold"><img src="{{ asset('images/symbols/token.svg') }}" height="16" width="16" class="img-fluid" style="margin-top:-1px" />{{ number_format($asset->priceInTokens) }}</strong>?</p>
|
||||||
|
<img src={{ asset('images/testing/hat.png') }} width="240" height="240" alt="{{ $asset->name }}" class="mx-auto my-2 img-fluid" />
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer flex-column">
|
||||||
|
<div class="mx-auto">
|
||||||
|
<button class="btn btn-success" data-bs-dismiss="modal">Purchase</button>
|
||||||
|
<button class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||||
|
</div>
|
||||||
|
<p class="text-muted pt-1">You will have <strong style="color:#e59800!important;font-weight:bold"><img src="{{ asset('images/symbols/token.svg') }}" height="16" width="16" class="img-fluid" style="margin-top:-1px" />{{ max(0, number_format(Auth::user()->tokens - $asset->priceInTokens)) }}</strong> after this purchase.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="purchase-modal" aria-hidden="true" tabindex="-1">
|
||||||
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
|
<div class="modal-content text-center">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Insufficient Funds</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>You don't have enough tokens to buy this item.</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-secondary" data-bs-dismiss="modal">Ok</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="container mx-auto py-5">
|
||||||
@if(!$asset->approved)
|
@if(!$asset->approved)
|
||||||
<div class="alert alert-danger text-center"><strong>This asset is pending approval.</strong> It will not appear in-game and cannot be voted on or purchased at this time.</div>
|
<div class="alert alert-danger text-center"><strong>This asset is pending approval.</strong> It will not appear in-game and cannot be voted on or purchased at this time.</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="card shadow-sm">
|
<div class="graphictoria-item-page">
|
||||||
<div class="card-body">
|
<div class="card shadow-sm">
|
||||||
<div class="row">
|
<div class="card-body">
|
||||||
<div class="col-5">
|
<div class="d-flex">
|
||||||
<img src={{ asset('images/testing/hat.png') }} alt="{{ $asset->name }}" class="border img-fluid" />
|
<div class="pe-4">
|
||||||
</div>
|
<img src={{ asset('images/testing/hat.png') }} alt="{{ $asset->name }}" class="border img-fluid" />
|
||||||
<div class="col-7">
|
</div>
|
||||||
<h3 class="mb-0">{{ $asset->name }}</h3>
|
<div class="flex-fill">
|
||||||
{{-- TODO: XlXi: url to user's profile --}}
|
<h3 class="mb-0">{{ $asset->name }}</h3>
|
||||||
<p>By {{ $asset->user->username }}</p>
|
{{-- TODO: XlXi: url to user's profile --}}
|
||||||
<hr />
|
<p>By {{ $asset->user->username }}</p>
|
||||||
{{-- TODO: XlXi: limiteds/trading --}}
|
<hr />
|
||||||
<div class="row mt-2">
|
{{-- TODO: XlXi: limiteds/trading --}}
|
||||||
<div class="col-3 fw-bold">
|
<div class="row mt-2">
|
||||||
<p>Price</p>
|
<div class="col-3 fw-bold">
|
||||||
</div>
|
<p>Price</p>
|
||||||
<div class="col-9 d-flex">
|
</div>
|
||||||
@if( $asset->onSale )
|
<div class="col-9 d-flex">
|
||||||
<h4 class="my-auto" style="color:#e59800!important;font-weight:bold">
|
@if( $asset->onSale )
|
||||||
<img src="{{ asset('images/symbols/token.svg') }}" height="32" width="32" class="img-fluid me-1" style="margin-top:-1px" />{{ \App\Helpers\NumberHelper::Abbreviate(Auth::user()->tokens) }}</h4>
|
<h4 class="my-auto" style="color:#e59800!important;font-weight:bold">
|
||||||
</h4>
|
<img src="{{ asset('images/symbols/token.svg') }}" height="32" width="32" class="img-fluid me-1" style="margin-top:-1px" />{{ number_format($asset->priceInTokens) }}</h4>
|
||||||
@endif
|
</h4>
|
||||||
@php
|
@endif
|
||||||
$buttonText = 'Buy';
|
@auth
|
||||||
$buttonClass = 'success';
|
@php
|
||||||
|
$buttonText = 'Buy';
|
||||||
|
$buttonClass = 'success';
|
||||||
|
|
||||||
// TODO: XlXi: Owned items
|
// TODO: XlXi: Owned items
|
||||||
if(!$asset->onSale) {
|
if(!$asset->onSale) {
|
||||||
$buttonText = 'Offsale';
|
$buttonText = 'Offsale';
|
||||||
$buttonClass = 'secondary';
|
$buttonClass = 'secondary';
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<button class="ms-auto px-5 btn btn-lg btn-{{ $buttonClass }}" {{ !$asset->onSale ? 'disabled' : '' }}>{{ $buttonText }}</button>
|
<button id="purchase-button" class="ms-auto px-5 btn btn-lg btn-{{ $buttonClass }}" disabled>{{ $buttonText }}</button>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row mt-2">
|
||||||
<div class="row mt-2">
|
<div class="col-3 fw-bold">
|
||||||
<div class="col-3 fw-bold">
|
<p>Type</p>
|
||||||
<p>Type</p>
|
</div>
|
||||||
|
<div class="col-9">
|
||||||
|
<p>{{ $asset->typeString() }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="row mt-2">
|
||||||
<p>{{ $asset->typeString() }}</p>
|
<div class="col-3 fw-bold">
|
||||||
</div>
|
<p>Description</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-2">
|
<div class="col-9">
|
||||||
<div class="col-3 fw-bold">
|
@if ( $asset->description )
|
||||||
<p>Description</p>
|
<p>{{ $asset->description }}</p>
|
||||||
</div>
|
@else
|
||||||
<div class="col-9">
|
<p class="text-muted">This item has no description.</p>
|
||||||
@if ( $asset->description )
|
@endif
|
||||||
<p>{{ $asset->description }}</p>
|
</div>
|
||||||
@else
|
|
||||||
<p class="text-muted">This item has no description.</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="gt-comments"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('title', 'Settings')
|
||||||
|
|
||||||
|
@section('page-specific')
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div id="gt-settings-main" class="container mx-auto my-2">
|
||||||
|
<h4 class="my-auto">Settings</h4>
|
||||||
|
<x-loader />
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
@ -12,6 +12,12 @@ Route::group(['as' => 'shop.', 'prefix' => 'shop'], function() {
|
||||||
Route::get('/{asset}/{assetName:slug?}', 'ShopController@showAsset')->name('asset');
|
Route::get('/{asset}/{assetName:slug?}', 'ShopController@showAsset')->name('asset');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::middleware('auth')->group(function () {
|
||||||
|
Route::group(['as' => 'user.', 'prefix' => 'my'], function() {
|
||||||
|
Route::get('/settings', 'SettingsController@index')->name('index');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Route::group(['as' => 'auth.', 'namespace' => 'Auth'], function() {
|
Route::group(['as' => 'auth.', 'namespace' => 'Auth'], function() {
|
||||||
Route::group(['as' => 'protection.', 'prefix' => 'request-blocked'], function() {
|
Route::group(['as' => 'protection.', 'prefix' => 'request-blocked'], function() {
|
||||||
Route::get('/', 'DoubleSessionBlockController@index')->name('index');
|
Route::get('/', 'DoubleSessionBlockController@index')->name('index');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue