Skip to content

Commit aa490d0

Browse files
committed
Put the author name and status in the destination column
Protect links with password #1108 Link Expiration #1109 Merge the author's name into the destination link field 6929f2d
1 parent 6929f2d commit aa490d0

2 files changed

Lines changed: 27 additions & 18 deletions

File tree

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<div>
2-
<a href="{{ route('link.edit', $model) }}" class="text-slate-700 dark:text-dark-400">
2+
@php
3+
$linkClasses = 'text-slate-700 dark:text-dark-400';
4+
if ($model->isExpired()) {
5+
$linkClasses .= ' line-through !text-red-500 dark:!text-red-400';
6+
}
7+
@endphp
8+
9+
<a href="{{ route('link.edit', $model) }}" class="{{ $linkClasses }}">
310
{{ urlDisplay($destination, $limit) }}
411
</a>
512

@@ -8,13 +15,25 @@ class="text-slate-600 dark:text-dark-400"
815
>
916
@svg('open-link-in-new')
1017
</a>
18+
</div>
19+
20+
@if (request()->routeIs('dboard.allurl'))
21+
<div class="text-sm text-slate-600 dark:text-dark-400 inline">
22+
@svg('icon-person', 'text-primary-600')
23+
<a href="{{ route('dboard.allurl.u-user', $model->author) }}" class="underline decoration-dotted">
24+
{{ $model->author->name }}
25+
</a>
26+
</div>
27+
@endif
28+
29+
<div class="text-sm text-slate-600 dark:text-dark-400 inline">
30+
@if ($model->password)
31+
@svg('icon-key', 'text-emerald-600 size-[14px] ml-1', ['title' => 'Password protected'])
32+
Password protected
33+
@endif
1134

12-
@if (request()->routeIs('dboard.allurl'))
13-
<p class="text-sm text-slate-600 dark:text-dark-400">
14-
Created by
15-
<a href="{{ route('dboard.allurl.u-user', $model->author) }}" class="underline decoration-dotted">
16-
{{ $model->author->name }}
17-
</a>
18-
</p>
35+
@if ($model->isExpired())
36+
@svg('link-expired', 'text-orange-600 size-[16px] ml-1')
37+
Expired
1938
@endif
2039
</div>

resources/views/components/table/keyword.blade.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
<div class="mb-2">
2-
<div class="mb-1">
3-
@if ($model->password)
4-
@svg('icon-key', 'text-emerald-600 size-[10px]', ['title' => 'Password protected'])
5-
@endif
6-
7-
@if ($model->isExpired())
8-
@svg('link-expired', 'text-orange-600 size-4', ['title' => 'This link has expired'])
9-
@endif
10-
</div>
11-
122
<a href="{{ $model->short_url }}" title="{{ $model->keyword }}" target="_blank" class="bg-primary-50 dark:bg-dark-800 text-primary-700 dark:text-emerald-500 font-light p-1 rounded">
133
{{ mb_strimwidth($model->keyword, 0, 15, '...') }}
144
</a>

0 commit comments

Comments
 (0)