From 475eb0565d3ad2c5d409bb6f57c9ef8d6a882182 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 24 Jun 2021 14:27:57 -0400 Subject: [PATCH 01/12] Add funding option, fixes #1279 --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..073fb760 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +patreon: FreeScout From 60912da17ca61c9c011f4a5bcf7005b061fc9deb Mon Sep 17 00:00:00 2001 From: FreeScout Date: Fri, 2 Jul 2021 23:13:40 -0700 Subject: [PATCH 02/12] Add mailbox name to the title - closes #1297 --- resources/views/mailboxes/view.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/mailboxes/view.blade.php b/resources/views/mailboxes/view.blade.php index 77cc8382..b202f762 100644 --- a/resources/views/mailboxes/view.blade.php +++ b/resources/views/mailboxes/view.blade.php @@ -4,9 +4,9 @@ @section('body_attrs')@parent data-folder_id="{{ $folder->id }}"@endsection @if ($folder->active_count) - @section('title', '('.(int)$folder->getCount().') '.$folder->getTypeName()) + @section('title', '('.(int)$folder->getCount().') '.$folder->getTypeName().' - '.$mailbox->name) @else - @section('title', $folder->getTypeName()) + @section('title', $folder->getTypeName().' - '.$mailbox->name) @endif @section('sidebar') From 920afd6045e28e8d1567532930909a538cc7a5fb Mon Sep 17 00:00:00 2001 From: FreeScout Date: Sat, 3 Jul 2021 03:00:54 -0700 Subject: [PATCH 03/12] Add Telegram to customer social profiles list --- app/Customer.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Customer.php b/app/Customer.php index 1dc7aebb..4a13562f 100644 --- a/app/Customer.php +++ b/app/Customer.php @@ -130,6 +130,7 @@ class Customer extends Model */ const SOCIAL_TYPE_TWITTER = 1; const SOCIAL_TYPE_FACEBOOK = 2; + const SOCIAL_TYPE_TELEGRAM = 14; const SOCIAL_TYPE_LINKEDIN = 3; const SOCIAL_TYPE_ABOUTME = 4; const SOCIAL_TYPE_GOOGLE = 5; @@ -145,6 +146,7 @@ class Customer extends Model public static $social_types = [ self::SOCIAL_TYPE_TWITTER => 'twitter', self::SOCIAL_TYPE_FACEBOOK => 'facebook', + self::SOCIAL_TYPE_TELEGRAM => 'telegram', self::SOCIAL_TYPE_LINKEDIN => 'linkedin', self::SOCIAL_TYPE_ABOUTME => 'aboutme', self::SOCIAL_TYPE_GOOGLE => 'google', @@ -161,6 +163,7 @@ class Customer extends Model public static $social_type_names = [ self::SOCIAL_TYPE_TWITTER => 'Twitter', self::SOCIAL_TYPE_FACEBOOK => 'Facebook', + self::SOCIAL_TYPE_TELEGRAM => 'Telegram', self::SOCIAL_TYPE_LINKEDIN => 'Linkedin', self::SOCIAL_TYPE_ABOUTME => 'About.me', self::SOCIAL_TYPE_GOOGLE => 'Google', @@ -1269,7 +1272,15 @@ class Customer extends Model $sp['value_url'] = $sp['value']; if (!preg_match("/^https?:\/\//i", $sp['value_url'])) { - $sp['value_url'] = 'http://'.$sp['value_url']; + switch ($sp['type']) { + case self::SOCIAL_TYPE_TELEGRAM: + $sp['value_url'] = 'https://t.me/'.$sp['value']; + break; + + default: + $sp['value_url'] = 'http://'.$sp['value_url']; + break; + } } if (empty($sp['value_url'])) { $sp['value_url'] = ''; From 9c1ac14bf1595d87bb09d657fafed34123482e52 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Sat, 3 Jul 2021 04:28:58 -0700 Subject: [PATCH 04/12] Fix duplicating attachments when creating a new conversation --- app/Http/Controllers/ConversationsController.php | 9 +++++++-- public/js/main.js | 14 ++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/ConversationsController.php b/app/Http/Controllers/ConversationsController.php index a4cc8764..2bbec973 100644 --- a/app/Http/Controllers/ConversationsController.php +++ b/app/Http/Controllers/ConversationsController.php @@ -1337,7 +1337,8 @@ class ConversationsController extends Controller } break; - // Load attachments from all threads in conversation (when forwarding). + // Load attachments from all threads in conversation + // when forwarding or creating a new conversation. case 'load_attachments': $conversation = Conversation::find($request->conversation_id); if (!$conversation) { @@ -1356,7 +1357,11 @@ class ConversationsController extends Controller foreach ($conversation->threads as $thread) { if ($thread->has_attachments) { foreach ($thread->attachments as $attachment) { - $attachment_copy = $attachment->duplicate($thread->id); + if ($request->is_forwarding == 'true') { + $attachment_copy = $attachment->duplicate($thread->id); + } else { + $attachment_copy = $attachment; + } $attachments[] = [ 'id' => $attachment_copy->id, diff --git a/public/js/main.js b/public/js/main.js index bd1edcf2..98d52efe 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -3697,7 +3697,7 @@ function forwardConversation(e) showForwardForm({}, reply_block); // Load attachments - loadAttachments(); + loadAttachments(true); } // Follow / unfollow conversation @@ -3730,15 +3730,21 @@ function followConversation(action) ); } -// Load attachments for the draft of a new conversation of draft of the forward -function loadAttachments() +// Load attachments for the draft of a new conversation or draft of the forward +function loadAttachments(is_forwarding) { var attachments_container = $(".attachments-upload:first"); var conversation_id = getGlobalAttr('conversation_id'); + + if (typeof(is_forwarding) == "undefined") { + is_forwarding = false; + } + if (!attachments_container.hasClass('forward-attachments-loaded') && conversation_id) { fsAjax({ action: 'load_attachments', - conversation_id: conversation_id + conversation_id: conversation_id, + is_forwarding: is_forwarding }, laroute.route('conversations.ajax'), function(response) { From 405f09ff00f23818f9ec1d6de0ace3f76fc2419a Mon Sep 17 00:00:00 2001 From: Henrik Jensen Date: Mon, 5 Jul 2021 15:16:04 +0200 Subject: [PATCH 05/12] Fixes #1252 Fixes #1252 "Missing format specifier at end of string" in sprintf due to mismatched number of % and format specifiers. --- app/Http/Controllers/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 820ff6cb..16be6d2b 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -124,7 +124,7 @@ class PublicController extends Controller } // Create a 1x1 ttransparent pixel and return it - $pixel = sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59); + $pixel = sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59); $response = \Response::make($pixel, 200); $response->header('Content-type', 'image/gif'); $response->header('Content-Length', 42); From 28cd928a1bc6af3aa06c0fa807f7ff8905ae9ca8 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 25 Jun 2021 21:25:18 -0400 Subject: [PATCH 06/12] Add role buttons --- resources/views/conversations/view.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/conversations/view.blade.php b/resources/views/conversations/view.blade.php index a984da4c..aa77877c 100644 --- a/resources/views/conversations/view.blade.php +++ b/resources/views/conversations/view.blade.php @@ -42,25 +42,25 @@ From acdc935f70af0fba7c8b83672ea647da46312e1f Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 25 Jun 2021 21:49:11 -0400 Subject: [PATCH 07/12] Add aria-label --- resources/views/conversations/view.blade.php | 10 +++++----- resources/views/layouts/app.blade.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/views/conversations/view.blade.php b/resources/views/conversations/view.blade.php index aa77877c..5f355d0a 100644 --- a/resources/views/conversations/view.blade.php +++ b/resources/views/conversations/view.blade.php @@ -25,17 +25,17 @@
{{-- There should be no spaced between buttons --}} @if (!$conversation->isPhone()) - + @endif - + @if (Auth::user()->can('delete', $conversation)) @if ($conversation->state != App\Conversation::STATE_DELETED) - + @else - + @endif @endif - @action('conversation.action_buttons', $conversation, $mailbox){{----}} + @action('conversation.action_buttons', $conversation, $mailbox){{----}} @endif - +
@endif @action('mailbox.after_sidebar_buttons') \ No newline at end of file diff --git a/resources/views/secure/dashboard.blade.php b/resources/views/secure/dashboard.blade.php index e81bf5ef..a578159a 100644 --- a/resources/views/secure/dashboard.blade.php +++ b/resources/views/secure/dashboard.blade.php @@ -51,7 +51,7 @@ @endif @if (\Eventy::filter('mailbox.show_buttons', true, $mailbox) && $mailbox->isActive()) - + @endif From fd45d20876de43f449902f4447d94c34d0c282cf Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 28 Jun 2021 12:22:20 -0400 Subject: [PATCH 10/12] Extend aria-labels --- resources/views/conversations/view.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/conversations/view.blade.php b/resources/views/conversations/view.blade.php index 4ea839c5..00ba1853 100644 --- a/resources/views/conversations/view.blade.php +++ b/resources/views/conversations/view.blade.php @@ -38,7 +38,7 @@ @action('conversation.action_buttons', $conversation, $mailbox){{----}}