Skip to content

Commit

Permalink
Merge pull request #904 from owlchester/leaflet-update
Browse files Browse the repository at this point in the history
Updated leaflet
  • Loading branch information
ilestis authored Jul 2, 2024
2 parents 95b8a73 + 0209564 commit fbb0d67
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/Jobs/Emails/SubscriptionCancelEmailJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SubscriptionCancelEmailJob implements ShouldQueue
use Queueable;
use SerializesModels;

/** @var int */
/** */
public int $userId;

/** @var string */
Expand Down
3 changes: 2 additions & 1 deletion app/Models/CharacterRace.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function race()
return $this->belongsTo(Race::class);
}

public function getCharacterRacesAttribute() {
public function getCharacterRacesAttribute()
{
return $this->character->races;
}
}
1 change: 0 additions & 1 deletion app/View/Components/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class Grid extends Component
{

/**
* Create a new component instance.
*/
Expand Down
8 changes: 8 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@
*/
'default_country' => env('DEFAULT_COUNTRY', 'CH'),

/**
* Leaflet version.
*/

'leaflet_source' => env('LEAFLET_SOURCE', '@1.9.4'),
'leaflet_css' => env('LEAFLET_CSS', 'sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY='),
'leaflet_js' => env('LEAFLET_JS', 'sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo='),

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
Expand Down
4 changes: 2 additions & 2 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@
@vite('resources/js/dashboard.js')

@if ($hasMap)
<script src="https://unpkg.com/leaflet@1.9.2/dist/leaflet.js" integrity="sha256-o9N1jGDZrf5tS+Ft4gbIK7mYMipq9lqpVJ91xHSyKhg=" crossorigin=""></script>
<script src="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.js' }}" integrity="{{ config('app.leaflet_js') }}" crossorigin=""></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.layersupport.js"></script>
@endif
@endsection

@section('styles')
@if ($hasMap)
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.2/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin="" />
<link rel="stylesheet" href="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.css' }}" integrity="{{ config('app.leaflet_css') }}" crossorigin="" />
@endif

@vite([
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/map.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'resources/sass/map-v3.scss',
])
@if (!config('fontawesome.kit'))<link href="/vendor/fontawesome/6.0.0/css/all.min.css" rel="stylesheet">@endif
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.2/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin="" />
<link rel="stylesheet" href="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.css' }}" integrity="{{ config('app.leaflet_css') }}" crossorigin="" />
@if (!empty($themeOverride) && in_array($themeOverride, ['dark', 'midnight', 'base']))
@php $specificTheme = $themeOverride; @endphp
@if($themeOverride != 'base')
Expand Down Expand Up @@ -152,7 +152,7 @@
<script src="https://kit.fontawesome.com/{{ config('fontawesome.kit') }}.js" crossorigin="anonymous"></script>
@endif
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/leaflet@1.9.2/dist/leaflet.js" integrity="sha256-o9N1jGDZrf5tS+Ft4gbIK7mYMipq9lqpVJ91xHSyKhg=" crossorigin=""></script>
<script src="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.js' }}" integrity="{{ config('app.leaflet_js') }}" crossorigin=""></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.layersupport.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.zoomcss.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/maps/form/_markers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@section('scripts')
@parent
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/leaflet@1.9.2/dist/leaflet.js" integrity="sha256-o9N1jGDZrf5tS+Ft4gbIK7mYMipq9lqpVJ91xHSyKhg=" crossorigin=""></script>
<script src="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.js' }}" integrity="{{ config('app.leaflet_js') }}" crossorigin=""></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.layersupport.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.path.drag.js"></script>
Expand Down Expand Up @@ -91,7 +91,7 @@

@section('styles')
@parent
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.2/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin="" />
<link rel="stylesheet" href="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.css' }}" integrity="{{ config('app.leaflet_css') }}" crossorigin="" />
@vite('resources/sass/map-v3.scss')

<style>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/maps/markers/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@section('scripts')
@parent
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/leaflet@1.9.2/dist/leaflet.js" integrity="sha256-o9N1jGDZrf5tS+Ft4gbIK7mYMipq9lqpVJ91xHSyKhg=" crossorigin=""></script>
<script src="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.js' }}" integrity="{{ config('app.leaflet_js') }}" crossorigin=""></script>
@vite([
'resources/js/location/map-v3.js',
])
Expand All @@ -73,6 +73,6 @@

@section('styles')
@parent
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.2/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin="" />
<link rel="stylesheet" href="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.css' }}" integrity="{{ config('app.leaflet_css') }}" crossorigin="" />
@vite('resources/sass/map-v3.scss')
@endsection
2 changes: 1 addition & 1 deletion resources/views/maps/markers/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
@section('scripts')
@parent
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/leaflet@1.9.2/dist/leaflet.js" integrity="sha256-o9N1jGDZrf5tS+Ft4gbIK7mYMipq9lqpVJ91xHSyKhg=" crossorigin=""></script>
<script src="{{ 'https://unpkg.com/leaflet@' . config('app.leaflet_source') . '/dist/leaflet.js' }}" integrity="{{ config('app.leaflet_js') }}" crossorigin=""></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.markercluster.layersupport.js"></script>
<script src="{{ config('app.asset_url') }}/vendor/leaflet/leaflet.path.drag.js"></script>
Expand Down

0 comments on commit fbb0d67

Please sign in to comment.