From 9326245cfb74573c04cebdd8942a99b7fce24ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Thu, 24 Sep 2020 14:24:42 +0200 Subject: [PATCH] Add a Privacy page + validation Slight UI adjustments Allow Markdown in the intro text Add toggle for Devices Management panel --- flexiapi/.env.example | 1 + flexiapi/README.md | 2 +- .../Account/AuthenticateController.php | 7 +- .../Account/RegisterController.php | 2 + .../Http/Controllers/AccountController.php | 5 + flexiapi/composer.json | 1 + flexiapi/composer.lock | 105 ++++++- flexiapi/config/app.php | 1 + .../resources/views/account/delete.blade.php | 2 +- .../resources/views/account/home.blade.php | 4 +- .../resources/views/account/login.blade.php | 15 +- .../resources/views/account/panel.blade.php | 16 +- .../resources/views/account/privacy.blade.php | 5 + .../mails/confirmed_registration.blade.php | 2 +- .../confirmed_registration_text.blade.php | 2 +- .../views/parts/password_recovery.blade.php | 2 +- .../resources/views/parts/terms.blade.php | 6 + .../views/vendor/mail/html/button.blade.php | 19 ++ .../views/vendor/mail/html/footer.blade.php | 11 + .../views/vendor/mail/html/header.blade.php | 11 + .../views/vendor/mail/html/layout.blade.php | 54 ++++ .../views/vendor/mail/html/message.blade.php | 27 ++ .../views/vendor/mail/html/panel.blade.php | 14 + .../views/vendor/mail/html/subcopy.blade.php | 7 + .../views/vendor/mail/html/table.blade.php | 3 + .../views/vendor/mail/html/themes/default.css | 289 ++++++++++++++++++ .../views/vendor/mail/text/button.blade.php | 1 + .../views/vendor/mail/text/footer.blade.php | 1 + .../views/vendor/mail/text/header.blade.php | 1 + .../views/vendor/mail/text/layout.blade.php | 9 + .../views/vendor/mail/text/message.blade.php | 27 ++ .../views/vendor/mail/text/panel.blade.php | 1 + .../views/vendor/mail/text/subcopy.blade.php | 1 + .../views/vendor/mail/text/table.blade.php | 1 + flexiapi/routes/web.php | 1 + 35 files changed, 632 insertions(+), 24 deletions(-) create mode 100644 flexiapi/resources/views/account/privacy.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/button.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/footer.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/header.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/layout.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/message.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/panel.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/subcopy.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/table.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/html/themes/default.css create mode 100644 flexiapi/resources/views/vendor/mail/text/button.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/footer.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/header.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/layout.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/message.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/panel.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/subcopy.blade.php create mode 100644 flexiapi/resources/views/vendor/mail/text/table.blade.php diff --git a/flexiapi/.env.example b/flexiapi/.env.example index e4399b1..91f4940 100644 --- a/flexiapi/.env.example +++ b/flexiapi/.env.example @@ -44,6 +44,7 @@ MAIL_SIGNATURE="The Linphone Team" NEWSLETTER_REGISTRATION_ADDRESS= PHONE_AUTHENTICATION=true +DEVICES_MANAGEMENT=true OVH_APP_KEY= OVH_APP_SECRET= diff --git a/flexiapi/README.md b/flexiapi/README.md index 54ea411..c61c30a 100644 --- a/flexiapi/README.md +++ b/flexiapi/README.md @@ -71,7 +71,7 @@ We advise you to copy the `style.css` file and rename it to make your custom CSS ### systemd restrictions -To retrieve the devices configuration, FlexiAPI connects to the UNIX socket opened by FlexiSIP. The socket is located in the `/tmp` directory. +To retrieve the devices configuration, FlexiAPI connects to the UNIX socket opened by Flexisip. The socket is located in the `/tmp` directory. If you have issues connecting to that socket, please ensure that your PHP process have access to it (user, rights). The systemd service [PrivateTmp](https://access.redhat.com/blogs/766093/posts/1976243) setting might restrict that access. diff --git a/flexiapi/app/Http/Controllers/Account/AuthenticateController.php b/flexiapi/app/Http/Controllers/Account/AuthenticateController.php index 7176c1f..ddc6fec 100644 --- a/flexiapi/app/Http/Controllers/Account/AuthenticateController.php +++ b/flexiapi/app/Http/Controllers/Account/AuthenticateController.php @@ -49,8 +49,11 @@ class AuthenticateController extends Controller 'password' => 'required' ]); - $account = Account::where('username', $request->get('username')) - ->firstOrFail(); + $account = Account::where('username', $request->get('username'))->first(); + + if (!$account) { + return redirect()->back()->withErrors(['authentication' => 'The account doesn\'t exists']); + } // Try out the passwords foreach ($account->passwords as $password) { diff --git a/flexiapi/app/Http/Controllers/Account/RegisterController.php b/flexiapi/app/Http/Controllers/Account/RegisterController.php index 82e3e07..e572559 100644 --- a/flexiapi/app/Http/Controllers/Account/RegisterController.php +++ b/flexiapi/app/Http/Controllers/Account/RegisterController.php @@ -65,6 +65,7 @@ class RegisterController extends Controller { $request->validate([ 'terms' => 'accepted', + 'privacy' => 'accepted', 'username' => [ 'required', 'unique:external.accounts,username', 'filled', new WithoutSpaces ], @@ -101,6 +102,7 @@ class RegisterController extends Controller { $request->validate([ 'terms' =>'accepted', + 'privacy' => 'accepted', 'username' => 'unique:external.accounts,username|nullable|filled', 'phone' => [ 'required', 'unique:external.aliases,alias', diff --git a/flexiapi/app/Http/Controllers/AccountController.php b/flexiapi/app/Http/Controllers/AccountController.php index eadee7c..b3d117a 100644 --- a/flexiapi/app/Http/Controllers/AccountController.php +++ b/flexiapi/app/Http/Controllers/AccountController.php @@ -52,6 +52,11 @@ class AccountController extends Controller return view('account.terms'); } + public function privacy(Request $request) + { + return view('account.privacy'); + } + public function delete(Request $request) { return view('account.delete', [ diff --git a/flexiapi/composer.json b/flexiapi/composer.json index 6a9dbb2..1a5e069 100644 --- a/flexiapi/composer.json +++ b/flexiapi/composer.json @@ -15,6 +15,7 @@ "laravel/tinker": "^2.4", "laravelcollective/html": "^6.2", "ovh/ovh": "^2.0", + "parsedown/laravel": "^1.2", "propaganistas/laravel-phone": "^4.2" }, "require-dev": { diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 03adba7..45f4019 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5063139d9245c72528e7b86c22887d58", + "content-hash": "f32d08746d9f85a865c21dc34baf5713", "packages": [ { "name": "anhskohbo/no-captcha", @@ -430,6 +430,52 @@ ], "time": "2020-09-19T14:37:56+00:00" }, + { + "name": "erusev/parsedown", + "version": "1.7.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2019-12-30T22:54:17+00:00" + }, { "name": "fideloper/proxy", "version": "4.4.0", @@ -1811,6 +1857,63 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "parsedown/laravel", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/parsedown/laravel.git", + "reference": "c713ffe28c76730754389180e86e93e8e84087e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/parsedown/laravel/zipball/c713ffe28c76730754389180e86e93e8e84087e7", + "reference": "c713ffe28c76730754389180e86e93e8e84087e7", + "shasum": "" + }, + "require": { + "erusev/parsedown": "^1.7", + "php": ">=7.1.3" + }, + "require-dev": { + "orchestra/testbench": "^3.8", + "php": ">=7.2", + "phpunit/phpunit": "^8.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Parsedown\\Providers\\ParsedownServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Support/helpers.php" + ], + "psr-4": { + "Parsedown\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Agostini", + "email": "edu.agostini@gmail.com" + } + ], + "description": "Official Parsedown's Laravel Wrapper.", + "homepage": "http://parsedown.org", + "keywords": [ + "laravel", + "parsedown" + ], + "time": "2020-01-07T02:12:55+00:00" + }, { "name": "phpoption/phpoption", "version": "1.7.5", diff --git a/flexiapi/config/app.php b/flexiapi/config/app.php index 0345a86..46041b3 100644 --- a/flexiapi/config/app.php +++ b/flexiapi/config/app.php @@ -19,6 +19,7 @@ return [ 'newsletter_registration_address' => env('NEWSLETTER_REGISTRATION_ADDRESS', ''), 'phone_authentication' => env('PHONE_AUTHENTICATION', true), + 'devices_management' => env('DEVICES_MANAGEMENT', true), 'proxy_registrar_address' => env('ACCOUNT_PROXY_REGISTRAR_ADDRESS', 'sip.domain.com'), 'transport_protocol' => env('ACCOUNT_TRANSPORT_PROTOCOL', 'TLS (recommended), TCP or UDP'), diff --git a/flexiapi/resources/views/account/delete.blade.php b/flexiapi/resources/views/account/delete.blade.php index 8cf2147..281939c 100644 --- a/flexiapi/resources/views/account/delete.blade.php +++ b/flexiapi/resources/views/account/delete.blade.php @@ -7,7 +7,7 @@ {!! Form::open(['route' => 'account.destroy', 'method' => 'delete']) !!}

You are going to permanently delete your account.

-

Please enter your username {{ $account->identifier }} to confirm.

+

Please enter your complete username to confirm: {{ $account->identifier }}.

{!! Form::label('identifier', 'Username') !!} diff --git a/flexiapi/resources/views/account/home.blade.php b/flexiapi/resources/views/account/home.blade.php index 2c8b8f8..6712951 100644 --- a/flexiapi/resources/views/account/home.blade.php +++ b/flexiapi/resources/views/account/home.blade.php @@ -4,10 +4,10 @@

{{ config('app.name') }}

-

There are {{ number_format($count) }} users registered with this service.

+

There are {{ number_format($count) }} users registered with this service.

@if (config('instance.intro_registration')) -

{!! nl2br(config('instance.intro_registration')) !!}

+ @parsedown(config('instance.intro_registration')) @endif
diff --git a/flexiapi/resources/views/account/login.blade.php b/flexiapi/resources/views/account/login.blade.php index 691c3be..e57cd18 100644 --- a/flexiapi/resources/views/account/login.blade.php +++ b/flexiapi/resources/views/account/login.blade.php @@ -1,13 +1,6 @@ @extends('layouts.main') @section('content') -

- No account yet? - Register -

- -
- @if (Auth::check()) @include('parts.already_auth') @else @@ -34,4 +27,12 @@ @include('parts.password_recovery') @endif + +
+ +

+ No account yet? + Register +

+ @endsection \ No newline at end of file diff --git a/flexiapi/resources/views/account/panel.blade.php b/flexiapi/resources/views/account/panel.blade.php index 8a22d96..fd6eda6 100644 --- a/flexiapi/resources/views/account/panel.blade.php +++ b/flexiapi/resources/views/account/panel.blade.php @@ -15,12 +15,14 @@

No email yet

@endif - -
-
Manage my devices
-
-

See and delete the devices linked to your account

-
+ @if (config('app.devices_management') == true) + +
+
Manage my devices
+
+

See and delete the devices linked to your account

+
+ @endif @endif diff --git a/flexiapi/resources/views/account/privacy.blade.php b/flexiapi/resources/views/account/privacy.blade.php new file mode 100644 index 0000000..df0a39b --- /dev/null +++ b/flexiapi/resources/views/account/privacy.blade.php @@ -0,0 +1,5 @@ +@extends('layouts.main') + +@section('content') +

Privacy policy

+@endsection \ No newline at end of file diff --git a/flexiapi/resources/views/mails/confirmed_registration.blade.php b/flexiapi/resources/views/mails/confirmed_registration.blade.php index d853494..bf734a6 100644 --- a/flexiapi/resources/views/mails/confirmed_registration.blade.php +++ b/flexiapi/resources/views/mails/confirmed_registration.blade.php @@ -5,7 +5,7 @@

Hello,

- Your SIP account has been successfully created using {{ config('app.name') }}.
+ Your SIP account has been successfully created.
You can now configure this account on any SIP-compatible application using the following parameters:

diff --git a/flexiapi/resources/views/mails/confirmed_registration_text.blade.php b/flexiapi/resources/views/mails/confirmed_registration_text.blade.php index 23b93f4..e926501 100644 --- a/flexiapi/resources/views/mails/confirmed_registration_text.blade.php +++ b/flexiapi/resources/views/mails/confirmed_registration_text.blade.php @@ -2,7 +2,7 @@ Registration confirmed {{ config('app.name') }} Hello, -Your SIP account has been successfully created using {{ config('app.name') }}. +Your SIP account has been successfully created. You can now configure this account on any SIP-compatible application using the following parameters: SIP address: sip:{{ $account->identifier }} diff --git a/flexiapi/resources/views/parts/password_recovery.blade.php b/flexiapi/resources/views/parts/password_recovery.blade.php index d0a6510..0ed8652 100644 --- a/flexiapi/resources/views/parts/password_recovery.blade.php +++ b/flexiapi/resources/views/parts/password_recovery.blade.php @@ -1,4 +1,4 @@ -

+

Set or recover your password using your Email address @if (config('app.phone_authentication')) or your Phone number diff --git a/flexiapi/resources/views/parts/terms.blade.php b/flexiapi/resources/views/parts/terms.blade.php index ef60467..cd644f8 100644 --- a/flexiapi/resources/views/parts/terms.blade.php +++ b/flexiapi/resources/views/parts/terms.blade.php @@ -4,4 +4,10 @@

Read the Terms and Conditions

+
+ {!! Form::checkbox('privacy', 'true', false, ['class' => 'form-check-input', 'id' => 'privacy']) !!} + +

Read the Privacy policy

+
+ @include('parts.captcha') \ No newline at end of file diff --git a/flexiapi/resources/views/vendor/mail/html/button.blade.php b/flexiapi/resources/views/vendor/mail/html/button.blade.php new file mode 100644 index 0000000..e74fe55 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/button.blade.php @@ -0,0 +1,19 @@ + + + + + diff --git a/flexiapi/resources/views/vendor/mail/html/footer.blade.php b/flexiapi/resources/views/vendor/mail/html/footer.blade.php new file mode 100644 index 0000000..3ff41f8 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/footer.blade.php @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/flexiapi/resources/views/vendor/mail/html/header.blade.php b/flexiapi/resources/views/vendor/mail/html/header.blade.php new file mode 100644 index 0000000..fa1875c --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/header.blade.php @@ -0,0 +1,11 @@ + + + +@if (trim($slot) === 'Laravel') + +@else +{{ $slot }} +@endif + + + diff --git a/flexiapi/resources/views/vendor/mail/html/layout.blade.php b/flexiapi/resources/views/vendor/mail/html/layout.blade.php new file mode 100644 index 0000000..02a54e2 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/layout.blade.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff --git a/flexiapi/resources/views/vendor/mail/html/message.blade.php b/flexiapi/resources/views/vendor/mail/html/message.blade.php new file mode 100644 index 0000000..deec4a1 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') +{{-- Header --}} +@slot('header') +@component('mail::header', ['url' => config('app.url')]) +{{ config('app.name') }} +@endcomponent +@endslot + +{{-- Body --}} +{{ $slot }} + +{{-- Subcopy --}} +@isset($subcopy) +@slot('subcopy') +@component('mail::subcopy') +{{ $subcopy }} +@endcomponent +@endslot +@endisset + +{{-- Footer --}} +@slot('footer') +@component('mail::footer') +© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') +@endcomponent +@endslot +@endcomponent diff --git a/flexiapi/resources/views/vendor/mail/html/panel.blade.php b/flexiapi/resources/views/vendor/mail/html/panel.blade.php new file mode 100644 index 0000000..2975a60 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/panel.blade.php @@ -0,0 +1,14 @@ + + + + + + diff --git a/flexiapi/resources/views/vendor/mail/html/subcopy.blade.php b/flexiapi/resources/views/vendor/mail/html/subcopy.blade.php new file mode 100644 index 0000000..790ce6c --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/subcopy.blade.php @@ -0,0 +1,7 @@ + + + + + diff --git a/flexiapi/resources/views/vendor/mail/html/table.blade.php b/flexiapi/resources/views/vendor/mail/html/table.blade.php new file mode 100644 index 0000000..a5f3348 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/table.blade.php @@ -0,0 +1,3 @@ +
+{{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/flexiapi/resources/views/vendor/mail/html/themes/default.css b/flexiapi/resources/views/vendor/mail/html/themes/default.css new file mode 100644 index 0000000..350fb83 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/html/themes/default.css @@ -0,0 +1,289 @@ +/* Base */ + +body, +body *:not(html):not(style):not(br):not(tr):not(code) { + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + position: relative; +} + +body { + -webkit-text-size-adjust: none; + background-color: #ffffff; + color: #718096; + height: 100%; + line-height: 1.4; + margin: 0; + padding: 0; + width: 100% !important; +} + +p, +ul, +ol, +blockquote { + line-height: 1.4; + text-align: left; +} + +a { + color: #3869d4; +} + +a img { + border: none; +} + +/* Typography */ + +h1 { + color: #3d4852; + font-size: 18px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h2 { + font-size: 16px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h3 { + font-size: 14px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +p { + font-size: 16px; + line-height: 1.5em; + margin-top: 0; + text-align: left; +} + +p.sub { + font-size: 12px; +} + +img { + max-width: 100%; +} + +/* Layout */ + +.wrapper { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.content { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 0; + padding: 0; + width: 100%; +} + +/* Header */ + +.header { + padding: 25px 0; + text-align: center; +} + +.header a { + color: #3d4852; + font-size: 19px; + font-weight: bold; + text-decoration: none; +} + +/* Logo */ + +.logo { + height: 75px; + width: 75px; +} + +/* Body */ + +.body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + border-bottom: 1px solid #edf2f7; + border-top: 1px solid #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.inner-body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; + background-color: #ffffff; + border-color: #e8e5ef; + border-radius: 2px; + border-width: 1px; + box-shadow: 0 2px 0 rgba(0, 0, 150, 0.025), 2px 4px 0 rgba(0, 0, 150, 0.015); + margin: 0 auto; + padding: 0; + width: 570px; +} + +/* Subcopy */ + +.subcopy { + border-top: 1px solid #e8e5ef; + margin-top: 25px; + padding-top: 25px; +} + +.subcopy p { + font-size: 14px; +} + +/* Footer */ + +.footer { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; + margin: 0 auto; + padding: 0; + text-align: center; + width: 570px; +} + +.footer p { + color: #b0adc5; + font-size: 12px; + text-align: center; +} + +.footer a { + color: #b0adc5; + text-decoration: underline; +} + +/* Tables */ + +.table table { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + width: 100%; +} + +.table th { + border-bottom: 1px solid #edeff2; + margin: 0; + padding-bottom: 8px; +} + +.table td { + color: #74787e; + font-size: 15px; + line-height: 18px; + margin: 0; + padding: 10px 0; +} + +.content-cell { + max-width: 100vw; + padding: 32px; +} + +/* Buttons */ + +.action { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + padding: 0; + text-align: center; + width: 100%; +} + +.button { + -webkit-text-size-adjust: none; + border-radius: 4px; + color: #fff; + display: inline-block; + overflow: hidden; + text-decoration: none; +} + +.button-blue, +.button-primary { + background-color: #2d3748; + border-bottom: 8px solid #2d3748; + border-left: 18px solid #2d3748; + border-right: 18px solid #2d3748; + border-top: 8px solid #2d3748; +} + +.button-green, +.button-success { + background-color: #48bb78; + border-bottom: 8px solid #48bb78; + border-left: 18px solid #48bb78; + border-right: 18px solid #48bb78; + border-top: 8px solid #48bb78; +} + +.button-red, +.button-error { + background-color: #e53e3e; + border-bottom: 8px solid #e53e3e; + border-left: 18px solid #e53e3e; + border-right: 18px solid #e53e3e; + border-top: 8px solid #e53e3e; +} + +/* Panels */ + +.panel { + border-left: #2d3748 solid 4px; + margin: 21px 0; +} + +.panel-content { + background-color: #edf2f7; + color: #718096; + padding: 16px; +} + +.panel-content p { + color: #718096; +} + +.panel-item { + padding: 0; +} + +.panel-item p:last-of-type { + margin-bottom: 0; + padding-bottom: 0; +} + +/* Utilities */ + +.break-all { + word-break: break-all; +} diff --git a/flexiapi/resources/views/vendor/mail/text/button.blade.php b/flexiapi/resources/views/vendor/mail/text/button.blade.php new file mode 100644 index 0000000..97444eb --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/button.blade.php @@ -0,0 +1 @@ +{{ $slot }}: {{ $url }} diff --git a/flexiapi/resources/views/vendor/mail/text/footer.blade.php b/flexiapi/resources/views/vendor/mail/text/footer.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/footer.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/flexiapi/resources/views/vendor/mail/text/header.blade.php b/flexiapi/resources/views/vendor/mail/text/header.blade.php new file mode 100644 index 0000000..aaa3e57 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/header.blade.php @@ -0,0 +1 @@ +[{{ $slot }}]({{ $url }}) diff --git a/flexiapi/resources/views/vendor/mail/text/layout.blade.php b/flexiapi/resources/views/vendor/mail/text/layout.blade.php new file mode 100644 index 0000000..9378baa --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/layout.blade.php @@ -0,0 +1,9 @@ +{!! strip_tags($header) !!} + +{!! strip_tags($slot) !!} +@isset($subcopy) + +{!! strip_tags($subcopy) !!} +@endisset + +{!! strip_tags($footer) !!} diff --git a/flexiapi/resources/views/vendor/mail/text/message.blade.php b/flexiapi/resources/views/vendor/mail/text/message.blade.php new file mode 100644 index 0000000..1ae9ed8 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') + {{-- Header --}} + @slot('header') + @component('mail::header', ['url' => config('app.url')]) + {{ config('app.name') }} + @endcomponent + @endslot + + {{-- Body --}} + {{ $slot }} + + {{-- Subcopy --}} + @isset($subcopy) + @slot('subcopy') + @component('mail::subcopy') + {{ $subcopy }} + @endcomponent + @endslot + @endisset + + {{-- Footer --}} + @slot('footer') + @component('mail::footer') + © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') + @endcomponent + @endslot +@endcomponent diff --git a/flexiapi/resources/views/vendor/mail/text/panel.blade.php b/flexiapi/resources/views/vendor/mail/text/panel.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/panel.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/flexiapi/resources/views/vendor/mail/text/subcopy.blade.php b/flexiapi/resources/views/vendor/mail/text/subcopy.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/subcopy.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/flexiapi/resources/views/vendor/mail/text/table.blade.php b/flexiapi/resources/views/vendor/mail/text/table.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/flexiapi/resources/views/vendor/mail/text/table.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/flexiapi/routes/web.php b/flexiapi/routes/web.php index f54c5bd..49cc637 100644 --- a/flexiapi/routes/web.php +++ b/flexiapi/routes/web.php @@ -21,6 +21,7 @@ Route::get('/', 'AccountController@home')->name('account.home'); Route::get('terms', 'AccountController@terms')->name('account.terms'); +Route::get('privacy', 'AccountController@privacy')->name('account.privacy'); Route::get('login', 'Account\AuthenticateController@login')->name('account.login'); Route::post('authenticate', 'Account\AuthenticateController@authenticate')->name('account.authenticate');