Skip to content

Commit 72a7b64

Browse files
authored
Fix profile tabs (#107)
* Add return type * 🍱 Compile Assets
1 parent 07feefc commit 72a7b64

File tree

7 files changed

+21
-17
lines changed

7 files changed

+21
-17
lines changed

app/Http/Middleware/HttpsProtocol.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
use Illuminate\Http\RedirectResponse;
1010
use Illuminate\Http\Request;
1111
use Illuminate\Http\Response;
12+
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1213

1314
class HttpsProtocol
1415
{
15-
public function handle(Request $request, Closure $next): RedirectResponse | Response | JsonResponse
16+
public function handle(Request $request, Closure $next): RedirectResponse | Response | JsonResponse | BinaryFileResponse
1617
{
1718
if (app()->environment('production') && ! $request->isSecure()) {
1819
return redirect()->secure($request->getRequestUri());

public/js/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.js.LICENSE.txt

+9
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@
3232
*/
3333

3434
/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
35+
36+
/**
37+
* @license
38+
* Lodash <https://lodash.com/>
39+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
40+
* Released under MIT license <https://lodash.com/license>
41+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
42+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
43+
*/

public/mix-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/js/app.js": "/js/app.js?id=ddc8fa37fd058e1a878d06ff2dd04e98",
2+
"/js/app.js": "/js/app.js?id=7d33838f31a5f129f9e40f95493c3b47",
33
"/css/app.css": "/css/app.css?id=c81faad7c99dc23b2559ae4fa79951ce"
44
}

resources/js/helpers/helpers.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import hljs from 'highlight.js'
22
import Choices from 'choices.js'
3+
import { capitalize } from 'lodash'
34

45
window.choices = (element) => {
56
return new Choices(element, { maxItemCount: 3, removeItemButton: true })
67
}
78

9+
window.capitalize = capitalize
10+
811
window.highlightCode = (element) => {
912
element.querySelectorAll('pre code').forEach((block) => {
1013
hljs.highlightBlock(block)

resources/views/user/profile.blade.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<x-user.status />
2626
@endif
2727
</h1>
28-
<p class="text-sm font-medium text-skin-base font-normal">
28+
<p class="text-sm text-skin-base font-normal">
2929
{{ __('Inscrit') }} <time-ago time="{{ $user->created_at->getTimestamp() }}"/>
3030
</p>
3131
</div>
@@ -38,22 +38,14 @@
3838
{{ __('Éditer') }}
3939
</x-default-button>
4040
@endif
41-
@if (! $user->isLoggedInUser())
42-
<x-default-button type="button">
43-
<svg class="-ml-1 mr-2 h-5 w-5 text-skin-muted" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
44-
<path stroke-linecap="round" stroke-linejoin="round" d="M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z" />
45-
</svg>
46-
<span>{{ __('Suivre') }}</span>
47-
</x-default-button>
48-
@endif
4941
</div>
5042
</div>
5143
</div>
5244
<div class="hidden sm:block md:hidden mt-6 min-w-0 flex-1">
5345
<h1 class="text-2xl font-bold text-skin-inverted truncate font-sans">
5446
{{ $user->name }}
5547
</h1>
56-
<p class="text-sm font-medium text-skin-base font-normal">
48+
<p class="text-sm text-skin-base font-normal">
5749
{{ __('Inscrit') }} <time-ago time="{{ $user->created_at->getTimestamp() }}"/>
5850
</p>
5951
</div>
@@ -169,7 +161,9 @@ class="border-transparent text-skin-base hover:text-skin-inverted-muted hover:bo
169161
<svg class="h-10 w-10 text-skin-primary mx-auto" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
170162
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" />
171163
</svg>
172-
<p class="mt-1 text-skin-base text-sm leading-5">{{ __(':name ne possède aucun badge', ['name' => $user->name]) }}</p>
164+
<p class="mt-1 text-skin-base text-sm leading-5">
165+
{{ __(':name ne possède aucun badge', ['name' => $user->name]) }}
166+
</p>
173167
<x-button link="#" class="mt-4">
174168
{{ __('Voir tous les badges') }}
175169
</x-button>

tailwind.config.js

-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ module.exports = {
3131
'lg:max-w-2xl',
3232
'lg:max-w-3xl',
3333
'lg:max-w-4xl',
34-
{
35-
pattern: /^media-library/
36-
}
3734
],
3835
theme: {
3936
extend: {

0 commit comments

Comments
 (0)