diff --git a/controller/action/MailActions.class.php b/controller/action/MailActions.class.php index 5d3d99ef..b97fe21e 100644 --- a/controller/action/MailActions.class.php +++ b/controller/action/MailActions.class.php @@ -63,10 +63,48 @@ class MailActions extends Actions public static function editEmailSettings(string $token) { $response = LBRY::emailStatus($token); + $responseData = $response['data'] ?? []; return ['mail/settings', [ - 'status' => $response['data'] ?? '/', + 'emails' => $responseData['emails'] ?? [], + 'tags' => $responseData['tags'] ?? [], 'token' => $token, 'error' => $response['error'] ?? false ]]; } + + public static function prepareSettingsFormPartial(array $vars) + { + return $vars + [ + 'tagMetadata' => [ + '3d-printing' => [ + 'label' => '3D Printing', + 'description' => 'Receive updates, tips, and new content suggestions related to 3D Printing.' + ], + 'android' => [ + 'label' => 'Android', + 'description' => 'Be an Android beta tester, earn LBC, and receive notification when the app goes live!' + ], + 'college' => [ + 'label' => 'University', + 'description' => 'LBRY has special programs and opportunities for people in school.' + ], + 'creator' => [ + 'label' => 'Creator', + 'description' => 'Get the most out of the stuff you create with tips and feedback from LBRY.' + ], + 'consumer' => [ + 'label' => 'Content Lover', + 'description' => 'Learn how to get the most out of LBRY as someone who just wants to find cool stuff.' + ], + 'developer' => [ + 'label' => 'Developer', + 'description' => 'Receive technical updates and other news intended for those who are familiar with software engineering.' + ], + 'ios' => [ + 'label' => 'iPhone', + 'description' => 'Be an iOS alpha tester, earn LBC, and receive notification when the app goes live!' + ], + ] + ]; + } } diff --git a/data/i18n/en.yaml b/data/i18n/en.yaml index a36b2523..c1d33453 100644 --- a/data/i18n/en.yaml +++ b/data/i18n/en.yaml @@ -115,7 +115,7 @@ page: header: Frequently Asked Questions funnier: One day this will be funnier but today is not that day. join: Join Email List - email_settings: Email Settings + email_settings: Email Preferences unsubscribe: Unsubscribe refer: count0: Don't fret, we still like you. diff --git a/view/template/mail/_settingsForm.php b/view/template/mail/_settingsForm.php index b62ae580..945cb309 100644 --- a/view/template/mail/_settingsForm.php +++ b/view/template/mail/_settingsForm.php @@ -1,7 +1,8 @@ - lbry.emailSettingsForm("#", '', ); + lbry.emailSettingsForm("#", , ); + @@ -10,19 +11,63 @@
-
+
+
+
+ |
+
+
+
+
+ |
+