|
+
+
+
+
+
+
|
+ ||
|
+ + Open-source social media scheduling tool + + @if(isset($unsubscribe_url)) ++ + Unsubscribe + + + @endif + |
+
diff --git a/app/Mail/WorkspaceConnectionsDisconnected.php b/app/Mail/WorkspaceConnectionsDisconnected.php
new file mode 100644
index 00000000..5f764b79
--- /dev/null
+++ b/app/Mail/WorkspaceConnectionsDisconnected.php
@@ -0,0 +1,73 @@
+ $disconnectedAccounts
+ */
+ public function __construct(
+ public Workspace $workspace,
+ public Collection $disconnectedAccounts
+ ) {
+ $this->locale = $this->workspace->owner?->language?->code ?? 'en';
+ }
+
+ public function envelope(): Envelope
+ {
+ $count = $this->disconnectedAccounts->count();
+
+ return new Envelope(
+ subject: trans_choice('mail.workspace_connections_disconnected.subject', $count, [
+ 'count' => $count,
+ 'workspace' => $this->workspace->name,
+ ], $this->locale),
+ );
+ }
+
+ public function content(): Content
+ {
+ $count = $this->disconnectedAccounts->count();
+ $workspaceName = $this->workspace->name;
+ $locale = $this->locale;
+
+ return new Content(
+ view: 'mail.workspace-connections-disconnected',
+ with: [
+ 'title' => __('mail.workspace_connections_disconnected.title', [], $locale),
+ 'previewText' => trans_choice('mail.workspace_connections_disconnected.subject', $count, [
+ 'count' => $count,
+ 'workspace' => $workspaceName,
+ ], $locale),
+ 'intro' => __('mail.workspace_connections_disconnected.intro', ['workspace' => $workspaceName], $locale),
+ 'reasonsTitle' => __('mail.workspace_connections_disconnected.reasons_title', [], $locale),
+ 'reasonExpired' => __('mail.workspace_connections_disconnected.reason_expired', [], $locale),
+ 'reasonRevoked' => __('mail.workspace_connections_disconnected.reason_revoked', [], $locale),
+ 'reasonChanged' => __('mail.workspace_connections_disconnected.reason_changed', [], $locale),
+ 'reconnectCta' => __('mail.workspace_connections_disconnected.reconnect_cta', [], $locale),
+ 'buttonText' => __('mail.workspace_connections_disconnected.button', [], $locale),
+ 'workspace' => $this->workspace,
+ 'disconnectedAccounts' => $this->disconnectedAccounts,
+ 'url' => route('accounts'),
+ ],
+ );
+ }
+
+ public function attachments(): array
+ {
+ return [];
+ }
+}
diff --git a/lang/en/mail.php b/lang/en/mail.php
new file mode 100644
index 00000000..d31c4e50
--- /dev/null
+++ b/lang/en/mail.php
@@ -0,0 +1,15 @@
+ [
+ 'subject' => '{1} :count account needs to be reconnected in :workspace|[2,*] :count accounts need to be reconnected in :workspace',
+ 'title' => 'Accounts Need Reconnection',
+ 'intro' => 'The following social accounts in your :workspace workspace have been disconnected and need to be reconnected:',
+ 'reasons_title' => 'This may have happened because:',
+ 'reason_expired' => 'Access tokens expired',
+ 'reason_revoked' => 'You revoked access to TryPost on the platform',
+ 'reason_changed' => 'The platform changed their authentication requirements',
+ 'reconnect_cta' => 'Please reconnect these accounts to continue scheduling and publishing posts.',
+ 'button' => 'Reconnect Accounts',
+ ],
+];
diff --git a/lang/pt-BR/mail.php b/lang/pt-BR/mail.php
new file mode 100644
index 00000000..dce2efe5
--- /dev/null
+++ b/lang/pt-BR/mail.php
@@ -0,0 +1,15 @@
+ [
+ 'subject' => '{1} :count conta precisa ser reconectada em :workspace|[2,*] :count contas precisam ser reconectadas em :workspace',
+ 'title' => 'Contas Precisam ser Reconectadas',
+ 'intro' => 'As seguintes contas de redes sociais no seu workspace :workspace foram desconectadas e precisam ser reconectadas:',
+ 'reasons_title' => 'Isso pode ter acontecido porque:',
+ 'reason_expired' => 'Os tokens de acesso expiraram',
+ 'reason_revoked' => 'Você revogou o acesso ao TryPost na plataforma',
+ 'reason_changed' => 'A plataforma mudou os requisitos de autenticação',
+ 'reconnect_cta' => 'Por favor, reconecte essas contas para continuar agendando e publicando posts.',
+ 'button' => 'Reconectar Contas',
+ ],
+];
diff --git a/maizzle/templates/workspace-connections-disconnected.html b/maizzle/templates/workspace-connections-disconnected.html
new file mode 100644
index 00000000..3e94c864
--- /dev/null
+++ b/maizzle/templates/workspace-connections-disconnected.html
@@ -0,0 +1,66 @@
+
+ {!! $intro !!}
+
+ @{{ $reasonsTitle }}
+
+ @{{ $reconnectCta }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @{{ $title }}
+
+
+
+ @foreach($disconnectedAccounts as $account)
+
+
+
+
+ @endforeach
+
+
+
+
+
+
|
+
+
+
+
+
+
|
+ ||
|
+ + Open-source social media scheduling tool + + @if(isset($unsubscribe_url)) ++ + Unsubscribe + + + @endif + |
+