1
0
forked from metin2/web

Shop improvements, renamed "shop" to "mall", support for Argon2ID

This commit is contained in:
2024-06-02 22:09:52 +03:00
parent 83f4f72b6e
commit 63d0d2ac79
1932 changed files with 729 additions and 514 deletions

View File

@ -1,4 +1,4 @@
@extends('layouts.shop')
@extends('layouts.mall')
@section('content')
<div id="mainContent">
@ -7,7 +7,7 @@
<div class="item" id="confirmBox">
<div class="itemDesc confirmDesc">
<div class="thumbnailBgSmall">
<img src="{{ asset('assets/shop/img/error.png') }}" width="63px" height="63px" alt="Error" />
<img src="{{ asset('assets/mall/img/error.png') }}" width="63px" height="63px" alt="Error" />
</div>
<p>

View File

@ -96,7 +96,7 @@
})
</script>
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body>
@ -250,7 +250,7 @@
<div class="modul-box-bg">
<div class="modul-box-bg-bottom">
<h3>{{ __('app/main.nav.itemshop') }}</h3>
<a href="{{ url('shop') }}" class="itemshop btn itemshop-btn iframe" title="{{ __('app/main.nav.itemshop') }}"></a>
<a href="{{ route('mall') }}" class="itemshop btn itemshop-btn iframe" title="{{ __('app/main.nav.itemshop') }}"></a>
</div>
</div>
</div>

View File

@ -4,19 +4,19 @@
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>{{ __('shop/main.title') }}</title>
<link href="{{ asset('assets/shop/css/style.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/start.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/options.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/discount.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/tiptip.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/fancybox.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/jScrollPane.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/promoted.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/pending.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/usermenu.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/purchase.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/shop/css/wheel.css') }}" rel="stylesheet" type="text/css" />
<title>{{ __('mall/main.title') }}</title>
<link href="{{ asset('assets/mall/css/style.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/start.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/options.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/discount.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/tiptip.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/fancybox.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/jScrollPane.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/promoted.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/pending.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/usermenu.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/purchase.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/mall/css/wheel.css') }}" rel="stylesheet" type="text/css" />
<!--[if IE]>
<style type="text/css">@import url(https://gf1.geo.gfsrv.net/cdn9a/6ea1bf4927ebc189a9ad0a0e2d7140.css);</style>
<style type="text/css">@import url(https://gf1.geo.gfsrv.net/cdn3e/8a0cdb2c5a2e9c5af58e1dcdee50e7.css);</style>
@ -45,7 +45,7 @@
/* <![CDATA[ */
function searchFocusGained()
{
if (trim(document.searchForm.searchString.value) === '{{ __('shop/main.nav.search_placeholder') }}')
if (trim(document.searchForm.searchString.value) === '{{ __('mall/main.nav.search_placeholder') }}')
{
document.searchForm.searchString.value = '';
}
@ -55,7 +55,7 @@
{
if (trim(document.searchForm.searchString.value) === '')
{
document.searchForm.searchString.value = '{{ __('shop/main.nav.search_placeholder') }}';
document.searchForm.searchString.value = '{{ __('mall/main.nav.search_placeholder') }}';
}
}
@ -63,7 +63,7 @@
{
searchString = trim(document.searchForm.searchString.value);
return searchString !== '' && searchString !== '{{ __('shop/main.nav.search_placeholder') }}';
return searchString !== '' && searchString !== '{{ __('mall/main.nav.search_placeholder') }}';
}
$(document).ready(function() {
@ -97,27 +97,27 @@
/* ]]> */
</script>
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="twoColFixLtHdr" scroll="no" ondblclick="return false;">
<div id="container">
<div id="header">
<div class="boxSigns">
<span class="heading">{{ __('shop/main.currency.mileage_long') }} ({{ __('shop/main.currency.mileage') }}):</span>
<span class="heading">{{ __('mall/main.currency.mileage_long') }} ({{ __('mall/main.currency.mileage') }}):</span>
<span class="marksValue">{{ Auth::user()->mileage }}</span>
<a href="{{ url('shop/faq', ['section' => 'mileage']) }}" class="tip helpSmallIcon" title="{{ __('shop/main.nav.help_tooltip') }}" style="right: 23px;">
<img src="{{ asset('assets/shop/img/helpSmallIcon.png') }}" />
<a href="{{ url('mall/faq', ['section' => 'mileage']) }}" class="tip helpSmallIcon" title="{{ __('mall/main.nav.help_tooltip') }}" style="right: 23px;">
<img src="{{ asset('assets/mall/img/helpSmallIcon.png') }}" />
</a>
</div>
<div class="boxCoins">
<span class="heading">{{ __('shop/main.currency.cash_long') }} ({{ __('shop/main.currency.cash') }}):</span>
<span class="heading">{{ __('mall/main.currency.cash_long') }} ({{ __('mall/main.currency.cash') }}):</span>
<span class="coinsValue">{{ Auth::user()->cash }}</span>
<a href="{{ url('shop/faq', ['section' => 'cash']) }}" class="tip helpSmallIcon" title="{{ __('shop/main.nav.help_tooltip') }}" style="right: 7px;">
<img src="{{ asset('assets/shop/img/helpSmallIcon.png') }}" />
<a href="{{ url('mall/faq', ['section' => 'cash']) }}" class="tip helpSmallIcon" title="{{ __('mall/main.nav.help_tooltip') }}" style="right: 7px;">
<img src="{{ asset('assets/mall/img/helpSmallIcon.png') }}" />
</a>
<a href="{{ url('shop/faq', ['section' => 'donate']) }}" class="purchaseButton" title="{{ __('shop/main.nav.buy_coins_tooltip') }}">
{!! nl2br(__('shop/main.nav.buy_coins_btn')) !!}
<a href="{{ url('mall/faq', ['section' => 'donate']) }}" class="purchaseButton" title="{{ __('mall/main.nav.buy_coins_tooltip') }}">
{!! nl2br(__('mall/main.nav.buy_coins_btn')) !!}
</a>
</div>
</div>
@ -128,9 +128,9 @@
<div class="userdataDiv">
@if ($storageCount > 0)
<a title="{{ __('shop/main.nav.user_data_tooltip') }}" href="{{ url('shop/userdata') }}" class="tip userdataInfoIcon"></a>
<a title="{{ __('mall/main.nav.user_data_tooltip') }}" href="{{ url('mall/userdata') }}" class="tip userdataInfoIcon"></a>
@else
<a title="{{ __('shop/main.nav.user_data_tooltip') }}" href="{{ url('shop/userdata') }}" class="tip userdataIcon"></a>
<a title="{{ __('mall/main.nav.user_data_tooltip') }}" href="{{ url('mall/userdata') }}" class="tip userdataIcon"></a>
@endif
</div>
@ -141,26 +141,26 @@
<div id="arrowBorderRight"></div>
</div>
<span id="discountLong">{{ __('shop/main.nav.stored_items', ['storageCount' => $storageCount]) }}</span>
<span id="discountLong">{{ __('mall/main.nav.stored_items', ['storageCount' => $storageCount]) }}</span>
</div>
@endif
<ul id="breadcrumb">
<li><a href="{{ url('shop') }}">{{ __('shop/main.nav.home') }}</a></li>
<li><a href="{{ route('mall') }}">{{ __('mall/main.nav.home') }}</a></li>
</ul>
<div id="sidebar1">
<div id="search">
<form action="{{ url('shop/search') }}" method="post" name="searchForm" onsubmit="return trySubmit()">
<form action="{{ url('mall/search') }}" method="post" name="searchForm" onsubmit="return trySubmit()">
@csrf
<input type="text" value="{{ __('shop/main.nav.search_placeholder') }}" class="type" name="searchString" onfocus="searchFocusGained()" onblur="searchFocusLost()" maxlength="42" />
<input type="text" value="{{ __('mall/main.nav.search_placeholder') }}" class="type" name="searchString" onfocus="searchFocusGained()" onblur="searchFocusLost()" maxlength="42" />
<input type="submit" value="" class="send" />
</form>
</div>
<ul id="mainMenu">
@foreach ($categories as $category)
<li><a href="{{ url('shop/category', ['id' => $category->id]) }}" title="{{ $category->name }}">{{ $category->name }}</a></li>
<li><a href="{{ url('mall/category', ['id' => $category->id]) }}" title="{{ $category->name }}">{{ $category->name }}</a></li>
@endforeach
</ul>
</div>

View File

@ -1,33 +1,34 @@
@extends('layouts.shop')
@extends('layouts.mall')
@section('content')
<div id="mainContent">
<h1>{{ $category->name }}</h1>
<div class="dynContent" style="position:relative">
@foreach ($category->items as $item)
@forelse ($category->items->sortBy('id') as $item)
<div class="item">
<div class="itemDesc">
<div @class(["thumbnailBgSmall", "discount thumbnailBgSmall-discount-ie6" => $item->old_price > 0])>
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
<img src="{{ asset("assets/shop/img/item/{$item->image}.png") }}" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" width="63px" height="63px" alt="More information"/>
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
<img src="{{ route('mall.item.image', ['id' => $item->id]) }}" width="63px" height="63px" alt="More information"/>
</a>
@if ($item->old_price)
<div class="discountPercentCategory">
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation"></a>
<a href="{{ route('mall.item', ['id' => $item->id]) }}"
title="More information" class="openinformation"></a>
</div>
@endif
</div>
<p>
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
<span class="itemTitle">{ data.name|raw }</span>
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
<span class="itemTitle">{{ $item->proto->locale_name }}</span>
</a>
<span class="line"></span>
{{ $item->description ?? "No description is currently available for this item." }}
<br class="clearfloat" />
<br class="clearfloat"/>
</p>
</div>
<div class="purchaseOptionsWrapper">
@ -47,16 +48,30 @@
@endif
</div>
<a href="{{ route('shop.item', ['id' => $item->id]) }}"
title="More information"
@class(["purchaseInfo", "openinformation", "discount purchaseInfo-discount-ie6" => $item->old_price])
>
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" @class(["purchaseInfo", "openinformation", "discount purchaseInfo-discount-ie6" => $item->old_price])>
Details
</a>
<br class="clearfloat" />
<br class="clearfloat"/>
</div>
</div>
@endforeach
@empty
<div class="item" id="confirmBox">
<div class="itemDesc confirmDesc">
<div class="thumbnailBgSmall">
<img src="{{ asset('assets/mall/img/warning.png') }}" width="63px" height="63px"
alt="Error"/>
</div>
<p>
<span class="confirmTitle">Empty category</span>
</p>
<p>This category does not contain any items.</p>
<br class="clearfloat"/>
</div>
</div>
@endforelse
</div>
<div class="endContent"></div>
</div>

View File

@ -0,0 +1,58 @@
@extends('layouts.mall')
@section('content')
<div id="wideMainContent">
<div class="landing wheelLanding">
<h1>Item suggestions:</h1>
@foreach ($suggestions as $item)
<div @class(['promotedItem', 'withDescription' => $item->other == 'recommend_desc'])>
<h4>{{ $item->proto->locale_name }}</h4>
<div class="promotedItemImg">
<a href="{{ route('mall.item', ['id' => $item->id]) }}" class="openinformation" title="More information">
<img src="{{ route('mall.item.image', ['id' => $item->id]) }}" alt="{{ $item->proto->locale_name }}" />
</a>
</div>
@if ($item->old_price)
<div class="discountPercentPromoted">
<a href="{{ route('mall.item', ['id' => $item->id]) }}" class="openinformation" title="More information"></a>
</div>
<div class="discountPercentCirclePromoted"></div>
<p class="discountOldPricePromoted">{{ $item->old_price }}&nbsp;{{ $item->pricing->description() }}</p>
@endif
<div @class(['promotedItemBtns', 'promotedItemBtns-discount' => $item->old_price])>
@if ($item->old_price)
<p class="pdiscount">
{{ $item->quantity }} pcs: <span class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->description() }}</span>
</p>
<div class="divdiscount">
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail-discount openinformation">Details</a>
</div>
@else
<p>{{ $item->quantity }} pcs. only: <span class="price">{{ $item->price }} {{ $item->pricing->description() }}</span></p>
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail openinformation">Details</a>
@endif
</div>
@if ($item->description && $item->other == 'recommend_desc')
<p class="promotedItemDescr">{{ $item->description }}</p>
@endif
</div>
@endforeach
<div id="wheelLandingButton" class="ad">
<h2 style="margin-top: 100px">The Wheel of Fortune</h2>
<p>
Try your luck and turn the Wheel of Fortune.
Get your hand on some of the best items for your character!
</p>
<a href="{{ url('mall/wheel') }}" class="goToWheel">To the Wheel</a>
</div>
<a class="buyDR" href="{{ url('mall/faq', ['section' => 'donate']) }}">You don't have Dragon Coins?</a>
</div>
<div class="endContent"></div>
</div>
@endsection

View File

@ -9,18 +9,17 @@
document.getElementById('buyItemLink').href = document.getElementById('buyItemLink').href.replace(/\/\d+?\?/, '/' + amount + '?');
}
function disableLink(link, id)
{
function disableLink(link, id) {
link.style.display = 'none';
document.getElementById(id).style.display = 'inline';
}
</script>
<h1 class="mainHeadline">{ data.name|raw }}</h1>
<h1 class="mainHeadline">{{ $item->proto->locale_name }}</h1>
<div class="dynContent detail">
<div class="box boxLeft visual">
<img src="{{ asset("assets/shop/img/item/{$item->image}.png") }}" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="{ data.name }}" />
<img src="{{ route('mall.item.image-large', ['id' => $item->id]) }}" alt="{{ $item->proto->locale_name }}"/>
@if ($item->old_price)
<div id="discountPercent"></div>
@ -31,7 +30,7 @@
<div class="detailBadge">
<div class="detailBadgeInner"></div>
</div>
<h2>{ data.name }}</h2>
<h2>{{ $item->proto->locale_name }}</h2>
<div class="scrollpane scrollpaneOnlyItem">
<p>{{ $item->description ?? "No description is currently available for this item." }}</p>
</div>
@ -57,13 +56,15 @@
</div>
@if ($item->userCanBuy())
<a id="buyItemLink" href="{{ route('shop.item.buy', ['id' => $item->id]) }}" title="Buy item" onclick="disableLink(this, 'linkBlank')">Buy item</a>
<a id="buyItemLink" href="{{ route('mall.item.buy', ['id' => $item->id]) }}" title="Buy item"
onclick="disableLink(this, 'linkBlank')">Buy item</a>
<a id="linkBlank" class="blank" style="display:none" href="#">Buy item</a>
@else
<a id="buyItemLink" class="blank" href="#" style="cursor: default">Not enough {{ $item->pricing->description() }}</a>
<a id="buyItemLink" class="blank" href="#" style="cursor: default">Not
enough {{ $item->pricing->description() }}</a>
@endif
@if ($item->pricing == \App\Models\Enums\ShopItemPricingEnum::CASH)
@if ($item->pricing == \App\Models\Enums\MallItemPricingEnum::CASH)
<div class="buyInfo">
You'll recieve <span id="mileageAmount">{{ $item->price }}</span> DM after buying this item!
</div>
@ -73,13 +74,13 @@
<div class="box suggestions">
<h2>You might be interested in:</h2>
<ol id="suggestions">
{% for id, info in suggestions %}
<li class="thumbnailBgSmall{% if loop.last %} last{% endif %}">
<a id="suggestion{ id }}" class="suggestion" href="?action=detail&id={ id }}" title="{ info.name }}">
<img src="img/item/{ info.image }}.png" width="63" height="63" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="{ info.name }}"/>
</a>
</li>
{% endfor %}
@foreach($suggestions as $suggestion)
<li @class(['thumbnailBgSmall', 'last' => $loop->last])>
<a id="suggestion-{{ $suggestion->id }}" class="suggestion" href="{{ route('mall.item', ['id' => $suggestion->id]) }}" title="{{ $suggestion->proto->locale_name }}">
<img src="{{ route('mall.item.image', ['id' => $suggestion->id]) }}" width="63" height="63" alt="{{ $suggestion->proto->locale_name }}"/>
</a>
</li>
@endforeach
</ol>
</div>
</div>

View File

@ -1,4 +1,4 @@
@extends('layouts.shop')
@extends('layouts.mall')
@section('content')
<div id="mainContent">
@ -9,7 +9,7 @@
<div class="userdataContainer">
<div class="userdataLine">
<div class="titleIcon">
<img alt="Informatii" src="{{ asset('assets/shop/img/storage.png') }}"/>
<img alt="Informatii" src="{{ asset('assets/mall/img/storage.png') }}"/>
</div>
<div class="userdataText">
<div class="title">
@ -25,7 +25,7 @@
</div>
<div class="userdataLine">
<div class="titleIcon">
<img alt="Information" src="{{ asset('assets/shop/img/purchases.png') }}"/>
<img alt="Information" src="{{ asset('assets/mall/img/purchases.png') }}"/>
</div>
<div class="userdataText">
<div class="title">My purchases ({{ $boughtCount }})</div>
@ -38,7 +38,7 @@
</div>
<div class="userdataLine">
<div class="titleIcon">
<img alt="Informatii" src="{{ asset('assets/shop/img/faq.png') }}"/>
<img alt="Informatii" src="{{ asset('assets/mall/img/faq.png') }}"/>
</div>
<div class="userdataText">
<div class="title">FAQ - Frequently Asked Questions</div>

View File

@ -1,56 +0,0 @@
@extends('layouts.shop')
@section('content')
<div id="wideMainContent">
<div class="landing wheelLanding">
<h1>Item suggestions:</h1>
{% for id, data in items %}
<div @class([
'promotedItem',
'withDescription' => isset($item->description),
])>
<h4>{ data.name|raw }</h4>
<div class="promotedItemImg">
<a href="?action=detail&id={ id }" class="openinformation" title="More information">
<img src="img/item/{ data.image }.png" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="" />
</a>
</div>
{% if data.oldPrice != 0 %}
<div class="discountPercentPromoted">
<a href="?action=detail&id={ id }" class="openinformation" title="More information"></a>
</div>
<div class="discountPercentCirclePromoted"></div>
<p class="discountOldPricePromoted">{ data.oldPrice }&nbsp;{ data.pricing }</p>
{% endif %}
<div class="promotedItemBtns{% if data.oldPrice != 0 %} promotedItemBtns-discount{% endif %}">
{% if data.oldPrice != 0 %}
<p class="pdiscount">
{ data.count } pcs: <span class="price discount price-discount-ie6">{ data.price }&nbsp;{ data.pricing }</span>
</p>
<div class="divdiscount">
<a href="?action=detail&id={ id }" title="More information" class="detail-discount openinformation">Details</a>
</div>
{% else %}
<p>{ data.count } pcs. only: <span class="price">{ data.price }&nbsp;{ data.pricing }</span></p>
<a href="?action=detail&id={ id }" title="More information" class="detail openinformation">Details</a>
{% endif %}
</div>
{% if data.description is defined %}<p class="promotedItemDescr">{ data.description }</p>{% endif %}
</div>
{% endfor %}
<div id="wheelLandingButton" class="ad">
<h2 style="margin-top: 100px">The Wheel of Fortune</h2>
<p>
Try your luck and turn the Wheel of Fortune.
Get your hand on some of the best items for your character!
</p>
<a href="{{ url('shop/wheel') }}" class="goToWheel">To the Wheel</a>
</div>
<a class="buyDR" href="{{ url('shop/faq', ['section' => 'donate']) }}">You don't have Dragon Coins?</a>
</div>
<div class="endContent"></div>
</div>
@endsection