New app notification description empty issue solved ( #32w9d5y )

This commit is contained in:
Cüneyt Şentürk 2022-06-24 09:06:46 +03:00
parent 43dba38232
commit 22bdcd12f7
3 changed files with 21 additions and 10 deletions

View File

@ -59,6 +59,13 @@ class ShowInNotifications
continue;
}
$app_url = route('apps.app.show', [
'alias' => $new_app->alias,
'utm_source' => 'notification',
'utm_medium' => 'software',
'utm_campaign' => str_replace('-', '', $new_app->alias),
]);
$new = new DatabaseNotification();
$new->id = $key;
$new->type = 'new-apps';
@ -66,7 +73,7 @@ class ShowInNotifications
$new->notifiable_id = user()->id;
$new->data = [
'title' => $new_app->name,
'description' => '', // $new_app->message,
'description' => trans('notifications.new_apps', ['app' => $new_app->name, 'url' => $app_url]),
'alias' => $new_app->alias,
];
$new->created_at = $new_app->started_at->date;

View File

@ -6,9 +6,10 @@ return [
'hello' => 'Hello!',
'salutation' => 'Regards,<br> :company_name',
'subcopy' => 'If youre having trouble clicking the ":text" button, copy and paste the URL below into your web browser: [:url](:url)',
'mark_read' => 'Mark Read',
'mark_read_all' => 'Mark Read All',
'mark_read' => 'Mark as Read',
'mark_read_all' => 'Mark as All Read',
'empty' => 'Woohoo, notification zero!',
'new_apps' => ':app is available. <a href=":url">Check it out now</a>!',
'update' => [

View File

@ -9,7 +9,7 @@
@if ($notifications)
<div class="flex justify-end mt-1 mb-3">
<x-tooltip id="notification-all" placement="top" message="Mark as All Read">
<x-tooltip id="notification-all" placement="top" message="{{ trans('notifications.mark_read_all') }}">
<button type="button" wire:click="markReadAll()">
<span id="menu-notification-read-all" class="material-icons text-lg text-purple">done_all</span>
</button>
@ -26,11 +26,14 @@
<div class="flex items-start justify-between font-medium text-sm text-purple mb-1">
<div class="flex flex-col">
{!! $notification->data['title'] !!}
<span class="text-gray-500" style="font-size: 10px;">{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}</span>
<span class="text-gray-500" style="font-size: 10px;">
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}
</span>
</div>
@if ($notification->type != 'updates')
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="Clear Notification">
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}">
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
</button>