mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-03-19 13:00:25 +01:00
Fixed bug/simplified setup
Fixed bug where users littlelink pages (domain.com/@username) would display a 404 error. This was caused due to the .env config file not containing an App URL. This issue could be solved by simply adding a URL to the config, this is now not necessary anymore, making the setup process easier and less confusing. I changed every instance of "{{ config('app.url') }}" to "{{ url(' ') }}". This effectively automatically uses the correct URL for LittleLink links, even if LittleLink Custom is set up in a subdirectory. In my testing, I couldn't find any problems this might have caused, so this appears to do the job just as well as setting the URL in the config. If I find any issues with this, I will revert this change.
This commit is contained in:
parent
3cf687a37f
commit
ec88a74889
@ -1,7 +1,7 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -9,7 +9,7 @@ foreach($pages as $page)
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<x-guest-layout>
|
||||
<x-auth-card>
|
||||
<x-slot name="logo">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<a href="{{ url('') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</x-slot>
|
||||
|
@ -103,11 +103,11 @@ foreach($pages as $page)
|
||||
<div class="updated" style="display:none">
|
||||
@foreach($updatedPages as $page)
|
||||
@if(file_exists(base_path("img/$page->littlelink_name" . ".png" )))
|
||||
<a href="{{ config('app.url') }}/@<?= $page->littlelink_name ?>" target="_blank">
|
||||
<a href="{{ url('') }}/@<?= $page->littlelink_name ?>" target="_blank">
|
||||
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" srcset="{{ asset("img/$page->littlelink_name" . "@2x.png 2x") }}" width="50px" height="50px">
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ config('app.url') }}/@<?= $page->littlelink_name ?>" target="_blank">
|
||||
<a href="{{ url('') }}/@<?= $page->littlelink_name ?>" target="_blank">
|
||||
<img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="50px" height="50px">
|
||||
</a>
|
||||
@endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="footer" style="margin:5% 0px 35px 0px;">
|
||||
<!--<a href="/">Home</a>
|
||||
<a href="{{ config('app.url') }}/pages/terms">Terms</a>
|
||||
<a href="{{ config('app.url') }}/pages/privacy">Privacy</a>
|
||||
<a href="{{ config('app.url') }}/pages/contact">Contact</a>-->
|
||||
<a href="{{ url('') }}/pages/terms">Terms</a>
|
||||
<a href="{{ url('') }}/pages/privacy">Privacy</a>
|
||||
<a href="{{ url('') }}/pages/contact">Contact</a>-->
|
||||
</div>
|
||||
|
@ -103,9 +103,9 @@
|
||||
<p>
|
||||
Copyright © @php echo date('Y'); @endphp <i class="icon-heart" aria-hidden="true"></i> </br>
|
||||
<a href="/" target="_blank">Home</a> .
|
||||
<a href="{{ config('app.url') }}/pages/terms" target="_blank">Terms</a> .
|
||||
<a href="{{ config('app.url') }}/pages/privacy" target="_blank">Privacy</a> .
|
||||
<a href="{{ config('app.url') }}/pages/contact" target="_blank">Contact</a>
|
||||
<a href="{{ url('') }}/pages/terms" target="_blank">Terms</a> .
|
||||
<a href="{{ url('') }}/pages/privacy" target="_blank">Privacy</a> .
|
||||
<a href="{{ url('') }}/pages/contact" target="_blank">Contact</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -161,7 +161,7 @@
|
||||
@endif
|
||||
<! –– #### end update detection #### ––>
|
||||
|
||||
<a class="nav-link" href="{{ config('app.url') }}/@<?= Auth::user()->littlelink_name ?>" target="_blank">Watch Page</a>
|
||||
<a class="nav-link" href="{{ url('') }}/@<?= Auth::user()->littlelink_name ?>" target="_blank">Watch Page</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<!-- This shows a preview for title, description and avatar image of users profiles if shared on social media sites -->
|
||||
|
||||
<!-- Facebook Meta Tags -->
|
||||
<meta property="og:url" content="{{ config('app.url') }}/@littlelink_name">
|
||||
<meta property="og:url" content="{{ url('') }}/@littlelink_name">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $userinfo->littlelink_name }}">
|
||||
<meta property="og:description" content="{{ $userinfo->littlelink_description }}">
|
||||
@ -23,8 +23,8 @@
|
||||
|
||||
<!-- Twitter Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:domain" content="{{ config('app.url') }}/@littlelink_name">
|
||||
<meta property="twitter:url" content="{{ config('app.url') }}/@littlelink_name">
|
||||
<meta property="twitter:domain" content="{{ url('') }}/@littlelink_name">
|
||||
<meta property="twitter:url" content="{{ url('') }}/@littlelink_name">
|
||||
<meta name="twitter:title" content="{{ $userinfo->littlelink_name }}">
|
||||
<meta name="twitter:description" content="{{ $userinfo->littlelink_description }}">
|
||||
@if(file_exists(base_path("img/$littlelink_name" . ".png" )))
|
||||
|
@ -43,7 +43,7 @@
|
||||
<label>Page URL</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">{{ config('app.url') }}/@</div>
|
||||
<div class="input-group-text">{{ url('') }}/@</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="littlelink_name" value="{{ $user->littlelink_name }}">
|
||||
</div>
|
||||
|
@ -12,10 +12,10 @@
|
||||
</div>
|
||||
</form>
|
||||
Users:
|
||||
<a href="{{ config('app.url') }}/panel/users/all">All</a> -
|
||||
<a href="{{ config('app.url') }}/panel/users/user">User</a> -
|
||||
<a href="{{ config('app.url') }}/panel/users/vip">Vip</a> -
|
||||
<a href="{{ config('app.url') }}/panel/users/admin">Admin</a>
|
||||
<a href="{{ url('') }}/panel/users/all">All</a> -
|
||||
<a href="{{ url('') }}/panel/users/user">User</a> -
|
||||
<a href="{{ url('') }}/panel/users/vip">Vip</a> -
|
||||
<a href="{{ url('') }}/panel/users/admin">Admin</a>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
@ -31,7 +31,7 @@
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<td> {{ $user->name }} </td>
|
||||
<td><a href="{{ config('app.url') }}/@<?= $user->littlelink_name ?>" target="_blank" class="text-info"><i class="bi bi-box-arrow-up-right"></i> {{ $user->littlelink_name }} </a></td>
|
||||
<td><a href="{{ url('') }}/@<?= $user->littlelink_name ?>" target="_blank" class="text-info"><i class="bi bi-box-arrow-up-right"></i> {{ $user->littlelink_name }} </a></td>
|
||||
<td>{{ $user->role }}</td>
|
||||
<td><a href="{{ route('editUser', $user->id ) }}">Edit</a></td>
|
||||
<td><a href="{{ route('blockUser', ['block' => $user->block, 'id' => $user->id] ) }}" class="text-danger">{{ $user->block }}</a></td>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<label>Page URL</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">{{ config('app.url') }}/@</div>
|
||||
<div class="input-group-text">{{ url('') }}/@</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="pageName" value="{{ $page->littlelink_name ?? '' }}">
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user