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
|
||||
MIX_APP_URL=http://gtoria.net
|
||||
|
||||
GAMESERVER_IP=127.0.0.1
|
||||
THUMBNAILER_IP=127.0.0.1
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
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
|
||||
|
||||
.graphictoria-item-page {
|
||||
max-width: 1096px;
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
|
||||
.graphictoria-list-dropdown::after {
|
||||
@include caret-down();
|
||||
|
||||
|
|
@ -145,8 +150,10 @@ img.twemoji {
|
|||
}
|
||||
|
||||
.modal-content {
|
||||
html.gtoria-dark & {
|
||||
background-color: #222 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.float-right {
|
||||
margin-left: auto !important;
|
||||
|
|
@ -959,6 +966,37 @@ input {
|
|||
|
||||
// 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 {
|
||||
&-success {
|
||||
&.active {
|
||||
|
|
|
|||
|
|
@ -6,17 +6,59 @@
|
|||
@endsection
|
||||
|
||||
@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)
|
||||
<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
|
||||
<div class="graphictoria-item-page">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<div class="d-flex">
|
||||
<div class="pe-4">
|
||||
<img src={{ asset('images/testing/hat.png') }} alt="{{ $asset->name }}" class="border img-fluid" />
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div class="flex-fill">
|
||||
<h3 class="mb-0">{{ $asset->name }}</h3>
|
||||
{{-- TODO: XlXi: url to user's profile --}}
|
||||
<p>By {{ $asset->user->username }}</p>
|
||||
|
|
@ -29,9 +71,10 @@
|
|||
<div class="col-9 d-flex">
|
||||
@if( $asset->onSale )
|
||||
<h4 class="my-auto" style="color:#e59800!important;font-weight:bold">
|
||||
<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>
|
||||
<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>
|
||||
</h4>
|
||||
@endif
|
||||
@auth
|
||||
@php
|
||||
$buttonText = 'Buy';
|
||||
$buttonClass = 'success';
|
||||
|
|
@ -42,7 +85,8 @@
|
|||
$buttonClass = 'secondary';
|
||||
}
|
||||
@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 class="row mt-2">
|
||||
|
|
@ -69,5 +113,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gt-comments"></div>
|
||||
</div>
|
||||
</div>
|
||||
@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::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' => 'protection.', 'prefix' => 'request-blocked'], function() {
|
||||
Route::get('/', 'DoubleSessionBlockController@index')->name('index');
|
||||
|
|
|
|||
Loading…
Reference in New Issue