Skip to content

Commit

Permalink
Merge pull request #10 from itinerare/master
Browse files Browse the repository at this point in the history
Various tweaks and bugfixes
  • Loading branch information
corowne authored May 23, 2020
2 parents 404f6bf + 1b9849b commit db3be55
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 28 deletions.
6 changes: 5 additions & 1 deletion app/Services/CharacterManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,10 @@ public function createLog($senderId, $senderAlias, $recipientId, $recipientAlias
* @param array $data
* @param \App\Models\Character\Character $character
* @param \App\Models\User\User $user
* @param \App\Models\User\User $staff
* @return \App\Models\Character\Character|bool
*/
public function createImage($data, $character, $user)
public function createImage($data, $character, $user, $staff)
{
DB::beginTransaction();

Expand Down Expand Up @@ -409,6 +410,9 @@ public function createImage($data, $character, $user)
Notifications::create('IMAGE_UPLOAD', $character->user, [
'character_url' => $character->url,
'character_slug' => $character->slug,
'character_name' => $character->name,
'sender_url' => $staff->url,
'sender_name' => $staff->name
]);
}

Expand Down
26 changes: 25 additions & 1 deletion public/css/lorekeeper.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,20 @@ main > .row {
padding: 10px 20px;
}

@media (max-width: 767px) {
.site-mobile-header {
top: 54px !important;
}
}

@media (max-width: 991px) {
.site-header-image {
display: none;
}
.site-mobile-header {
display: block;
position: fixed;
top: 68px;
top: 68px;
z-index: 2;
width: 100%;
}
Expand Down Expand Up @@ -239,6 +245,24 @@ main > .row {

box-shadow: none;
}

/*fix for screen being over-wide on mobile*/
.row {
margin:0; max-width:100%;
}

.container-fluid {
padding:0px;
}

.site-footer .navbar .navbar-nav {
flex-wrap: wrap; justify-content: center;
}

.timestamp {
margin-left: 1rem!important;
margin-right: 1rem!important;
}
}

/* Footer */
Expand Down
10 changes: 2 additions & 8 deletions resources/views/character/_image_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,9 @@
{{-- Image notes --}}
<div class="tab-pane fade" id="notes-{{ $image->id }}">
@if($image->parsed_description)
<div class="parsed-text">{!! $image->parsed_description !!}</div>
<div class="parsed-text imagenoteseditingparse">{!! $image->parsed_description !!}</div>
@else
<div>No additional notes given.</div>
@endif

@if(Auth::check() && Auth::user()->hasPower('manage_characters'))
<div class="mt-3">
<a href="#" class="btn btn-outline-info btn-sm edit-notes" data-id="{{ $image->id }}"><i class="fas fa-cog"></i> Edit</a>
</div>
<div class="imagenoteseditingparse">No additional notes given.</div>
@endif
</div>

Expand Down
10 changes: 8 additions & 2 deletions resources/views/character/_image_js.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
});
$('.edit-notes').on('click', function(e) {
e.preventDefault();
loadModal("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", 'Edit Image Notes');
$( "div.imagenoteseditingparse" ).load("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", 'Edit Image Notes');
$( "div.imagenoteseditingparse" ).attr('id', 'modal');
$( ".edit-notes" ).remove();
//loadModal("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", 'Edit Image Notes');
});
$('.edit-credits').on('click', function(e) {
e.preventDefault();
Expand Down Expand Up @@ -34,7 +37,10 @@
});
$('.edit-description').on('click', function(e) {
e.preventDefault();
loadModal("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", 'Edit Description');
$( "div.descriptioneditingparse" ).load("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", 'Edit Description');
$( "div.descriptioneditingparse" ).attr('id', 'modal');
$( ".edit-description" ).remove();
//loadModal("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", 'Edit Description');
});
$('.delete-character').on('click', function(e) {
e.preventDefault();
Expand Down
4 changes: 2 additions & 2 deletions resources/views/character/_tab_notes.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if($character->parsed_description)
<div class="parsed-text">{!! $character->parsed_description !!}</div>
<div class="parsed-text descriptioneditingparse">{!! $character->parsed_description !!}</div>
@else
No additional notes given.
<div class="parsed-text descriptioneditingparse">No additional notes given.</div>
@endif
@if(Auth::check() && Auth::user()->hasPower('manage_characters'))
<div class="mt-3">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/character/character_logs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@include('character._header', ['character' => $character])

<h3>Ownership History</h3>
<h3>Change Log</h3>

{!! $logs->render() !!}
<table class="table table-sm">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/home/_character.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@if($character)
<div class="character-info" data-id="{{ $character->id }}"><img src="{{ $character->image->thumbnailUrl }}" class="mw-100" /></div>
<div class="text-center">{{ $character->slug }}</div>
<div class="text-center"><a href="{{ $character->url }}">{{ $character->slug }}</a></div>
@else
<div class="text-danger character-info" data-id="0">Character not found.</div>
@endif
4 changes: 2 additions & 2 deletions resources/views/home/_sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<li class="sidebar-header"><a href="{{ url('/') }}" class="card-link">Home</a></li>
<li class="sidebar-section">
<div class="sidebar-section-header">Inventory</div>
<div class="sidebar-item"><a href="{{ url('characters') }}" class="{{ set_active('characters') }}">Characters</a></div>
<div class="sidebar-item"><a href="{{ url('characters/myos') }}" class="{{ set_active('characters/myos') }}">MYO Slots</a></div>
<div class="sidebar-item"><a href="{{ url('characters') }}" class="{{ set_active('characters') }}">My Characters</a></div>
<div class="sidebar-item"><a href="{{ url('characters/myos') }}" class="{{ set_active('characters/myos') }}">My MYO Slots</a></div>
<div class="sidebar-item"><a href="{{ url('inventory') }}" class="{{ set_active('inventory*') }}">Inventory</a></div>
<div class="sidebar-item"><a href="{{ url('bank') }}" class="{{ set_active('bank*') }}">Bank</a></div>
</li>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/home/characters.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@extends('home.layout')

@section('home-title') Characters @endsection
@section('home-title') My Characters @endsection

@section('home-content')
{!! breadcrumbs(['Characters' => 'characters']) !!}
{!! breadcrumbs(['My Characters' => 'characters']) !!}

<h1>
Characters
My Characters
</h1>

<p>This is a list of characters you own. Drag and drop to rearrange them.</p>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/home/myos.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@extends('home.layout')

@section('home-title') MYO Slots @endsection
@section('home-title') My MYO Slots @endsection

@section('home-content')
{!! breadcrumbs(['Characters' => 'characters', 'MYO Slots' => 'myos']) !!}
{!! breadcrumbs(['Characters' => 'characters', 'My MYO Slots' => 'myos']) !!}

<h1>
MYO Slots
My MYO Slots
</h1>

<p>This is a list of MYO slots you own - click on a slot to view details about it. MYO slots can be submitted for design approval from their respective pages.</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/pages/_dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1>Welcome, {!! Auth::user()->displayName !!}!</h1>
<div class="card mb-4">
<div class="card mb-4 timestamp">
<div class="card-body">
<i class="far fa-clock"></i> {!! format_date(Carbon\Carbon::now()) !!}
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/_bank_select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<?php $currencySelect = $owner->getCurrencySelect(isset($isTransferrable) ? $isTransferrable : false); ?>
@foreach($selected as $currencyId=>$quantity)
<tr class="bank-row">
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $currencySelect, $currencyId, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency']) !!}</td>
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $currencySelect, $currencyId, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency ']) !!}</td>
<td>{!! Form::text('currency_quantity['.strtolower($owner->logType).'-'.$owner->id.'][]', $quantity, ['class' => 'form-control']) !!}</td>
<td class="text-right"><a href="#" class="btn btn-danger remove-currency-button">Remove</a></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/_bank_select_row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@if($owner)
<tbody id="{{ strtolower($owner->logType) }}Row-{{ $owner->id }}">
<tr class="bank-row">
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $owner->getCurrencySelect(isset($isTransferrable) ? $isTransferrable : false), null, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency']) !!}</td>
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $owner->getCurrencySelect(isset($isTransferrable) ? $isTransferrable : false), null, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency ']) !!}</td>
<td>{!! Form::text('currency_quantity['.strtolower($owner->logType).'-'.$owner->id.'][]', 0, ['class' => 'form-control']) !!}</td>
<td class="text-right"><a href="#" class="btn btn-danger remove-currency-button">Remove</a></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/world/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="col-md-6">
<div class="card mb-4">
<div class="card-body text-center">
<img src="{{ asset('images/account.png') }}" />
<img src="{{ asset('images/characters.png') }}" />
<h5 class="card-title">Characters</h5>
</div>
<ul class="list-group list-group-flush">
Expand Down

0 comments on commit db3be55

Please sign in to comment.