mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-11-02 09:00:01 -06:00
Add link to Firefly III in emails
This commit is contained in:
1 parent
c520e79b85
commit
1611cb3819
11 files changed
+34
-14
No files matched your search
@@ -60,6 +60,7 @@ class UnknownUserLoginAttempt extends Notification
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
$link = route('index');
|
||||
|
||||
return new MailMessage()
|
||||
->markdown('emails.owner.unknown-user', [
|
||||
@@ -68,6 +69,7 @@ class UnknownUserLoginAttempt extends Notification
|
||||
'host' => $host,
|
||||
'userAgent' => $userAgent,
|
||||
'time' => $time,
|
||||
'link' => $link,
|
||||
])
|
||||
->subject((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
|
||||
@@ -58,6 +58,7 @@ class UserFailedLoginAttempt extends Notification
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
$link = route('index');
|
||||
|
||||
return new MailMessage()
|
||||
->markdown('emails.security.failed-login', [
|
||||
@@ -66,6 +67,7 @@ class UserFailedLoginAttempt extends Notification
|
||||
'host' => $host,
|
||||
'userAgent' => $userAgent,
|
||||
'time' => $time,
|
||||
'link' => $link,
|
||||
])
|
||||
->subject($subject)
|
||||
;
|
||||
|
||||
@@ -51,9 +51,9 @@ class OwnerTestNotificationEmail extends Notification
|
||||
public function toMail(OwnerNotifiable $notifiable): MailMessage
|
||||
{
|
||||
$address = (string) config('firefly.site_owner');
|
||||
|
||||
$link = route('index');
|
||||
return new MailMessage()
|
||||
->markdown('emails.admin-test', ['email' => $address])
|
||||
->markdown('emails.admin-test', ['email' => $address, 'link' => $link])
|
||||
->subject((string) trans('email.admin_test_subject'))
|
||||
;
|
||||
}
|
||||
|
||||
@@ -56,23 +56,20 @@ class NewAccessToken extends Notification
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
$link = route('index');
|
||||
|
||||
return new MailMessage()
|
||||
->markdown('emails.token-created', ['ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->markdown('emails.token-created', [
|
||||
'ip' => $ip,
|
||||
'host' => $host,
|
||||
'userAgent' => $userAgent,
|
||||
'time' => $time,
|
||||
'link' => $link,
|
||||
])
|
||||
->subject((string) trans('email.access_token_created_subject'))
|
||||
;
|
||||
}
|
||||
|
||||
// public function toNtfy(User $notifiable): Message
|
||||
// {
|
||||
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
|
||||
// $message = new Message();
|
||||
// $message->topic($settings['ntfy_topic']);
|
||||
// $message->title((string) trans('email.access_token_created_subject'));
|
||||
// $message->body((string) trans('email.access_token_created_body'));
|
||||
//
|
||||
// return $message;
|
||||
// }
|
||||
|
||||
/**
|
||||
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
|
||||
|
||||
@@ -55,9 +55,16 @@ class UserLogin extends Notification
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
$link = route('index');
|
||||
|
||||
return new MailMessage()
|
||||
->markdown('emails.new-ip', ['ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->markdown('emails.new-ip', [
|
||||
'ip' => $ip,
|
||||
'host' => $host,
|
||||
'userAgent' => $userAgent,
|
||||
'time' => $time,
|
||||
'link' => $link,
|
||||
])
|
||||
->subject((string) trans('email.login_from_new_ip'))
|
||||
;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ return [
|
||||
'admin_test_subject' => 'A test message from your Firefly III installation',
|
||||
'admin_test_body' => 'This is a test message from your Firefly III instance. It was sent to :email.',
|
||||
'admin_test_message' => 'This is a test message from your Firefly III instance over channel ":channel".',
|
||||
'admin_test_link' => 'The following link should point to your Firefly III installation. It should be correctly adorned with "http" or "https". If not, please set your `APP_URL` environment variable: [:link](:link)',
|
||||
'firefly_iii_url' => 'Firefly III',
|
||||
|
||||
// invite
|
||||
'invitation_created_subject' => 'An invitation has been created',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@component('mail::message')
|
||||
{{ trans('email.admin_test_body', ['email' => $email]) }}
|
||||
|
||||
{{ trans('email.admin_test_link', ['link' => $link]) }}
|
||||
|
||||
@endcomponent
|
||||
@@ -7,5 +7,7 @@
|
||||
- {{ trans('email.host_name') }}: {{ $host }}
|
||||
- {{ trans('email.date_time') }}: {{ $time }}
|
||||
- {{ trans('email.user_agent') }}: {{ $userAgent }}
|
||||
- {{ trans('email.firefly_iii_url') }}: {{ $link }}
|
||||
|
||||
|
||||
@endcomponent
|
||||
@@ -5,5 +5,7 @@
|
||||
- {{ trans('email.ip_address') }}: {{ $ip }}
|
||||
- {{ trans('email.host_name') }}: {{ $host }}
|
||||
- {{ trans('email.user_agent') }}: {{ $userAgent }}
|
||||
- {{ trans('email.firefly_iii_url') }}: {{ $link }}
|
||||
|
||||
|
||||
@endcomponent
|
||||
@@ -7,5 +7,7 @@
|
||||
- {{ trans('email.ip_address') }}: {{ $ip }}
|
||||
- {{ trans('email.host_name') }}: {{ $host }}
|
||||
- {{ trans('email.user_agent') }}: {{ $userAgent }}
|
||||
- {{ trans('email.firefly_iii_url') }}: {{ $link }}
|
||||
|
||||
|
||||
@endcomponent
|
||||
@@ -9,6 +9,7 @@
|
||||
- {{ trans('email.host_name') }}: {{ $host }}
|
||||
- {{ trans('email.date_time') }}: {{ $time }}
|
||||
- {{ trans('email.user_agent') }}: {{ $userAgent }}
|
||||
- {{ trans('email.firefly_iii_url') }}: {{ $link }}
|
||||
|
||||
|
||||
@endcomponent
|
||||
Reference in new issue
Block a user