From 3b3e4ffc5417d0c99d6c9f31beb5dc0c4287cbec Mon Sep 17 00:00:00 2001 From: j1t Date: Wed, 22 May 2019 01:46:08 +0300 Subject: [PATCH 01/15] Translate up to settings. --- src/i18n/he.json | 80 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/src/i18n/he.json b/src/i18n/he.json index ea581e05b..ee612a653 100644 --- a/src/i18n/he.json +++ b/src/i18n/he.json @@ -2,6 +2,10 @@ "chat": { "title": "צ'אט" }, + "exporter": { + "export": "ייצוא", + "processing": "מעבד, בקרוב תופיע אפשרות להוריד את הקובץ" + }, "features_panel": { "chat": "צ'אט", "gopher": "גופר", @@ -17,23 +21,53 @@ }, "general": { "apply": "החל", - "submit": "שלח" + "submit": "שלח", + "more": "עוד", + "generic_error": "קרתה שגיאה", + "optional": "לבחירה", + "show_more": "הראה עוד", + "show_less": "הראה פחות", + "cancel": "בטל" + }, + "image_cropper": { + "crop_picture": "חתוך תמונה", + "save": "שמור", + "save_without_cropping": "שמור בלי לחתוך", + "cancel": "בטל" + }, + "importer": { + "submit": "שלח", + "success": "ייובא בהצלחה.", + "error": "אירעתה שגיאה בזמן ייבוא קובץ זה." }, "login": { "login": "התחבר", + "description": "היכנס עם OAuth", "logout": "התנתק", "password": "סיסמה", "placeholder": "למשל lain", "register": "הירשם", - "username": "שם המשתמש" + "username": "שם המשתמש", + "hint": "הירשם על מנת להצטרף לדיון" + }, + "media_modal": { + "previous": "הקודם", + "next": "הבא" }, "nav": { + "about": "על-אודות", + "back": "חזור", "chat": "צ'אט מקומי", "friend_requests": "בקשות עקיבה", "mentions": "אזכורים", + "interactions": "אינטרקציות", + "dms": "הודעות ישירות", "public_tl": "ציר הזמן הציבורי", "timeline": "ציר הזמן", - "twkn": "כל הרשת הידועה" + "twkn": "כל הרשת הידועה", + "user_search": "חיפוש משתמש", + "who_to_follow": "אחרי מי לעקוב", + "preferences": "העדפות" }, "notifications": { "broken_favorite": "סטאטוס לא ידוע, מחפש...", @@ -42,19 +76,35 @@ "load_older": "טען התראות ישנות", "notifications": "התראות", "read": "קרא!", - "repeated_you": "חזר על הסטטוס שלך" + "repeated_you": "חזר על הסטטוס שלך", + "no_more_notifications": "לא עוד התראות" + }, + "interactions": { + "favs_repeats": "חזרות ומועדפים", + "follows": "עוקבים חדשים", + "load_older": "טען אינטרקציות ישנות" }, "post_status": { + "new_status": "פרסם סטאטוס חדש", "account_not_locked_warning": "המשתמש שלך אינו {0}. כל אחד יכול לעקוב אחריך ולראות את ההודעות לעוקבים-בלבד שלך.", "account_not_locked_warning_link": "נעול", "attachments_sensitive": "סמן מסמכים מצורפים כלא בטוחים לצפייה", "content_type": { - "text/plain": "טקסט פשוט" + "text/plain": "טקסט פשוט", + "text/html": "HTML", + "text/markdown": "Markdown", + "text/bbcode": "BBCode" }, "content_warning": "נושא (נתון לבחירה)", "default": "הרגע נחת ב-ל.א.", - "direct_warning": "הודעה זו תהיה זמינה רק לאנשים המוזכרים.", + "direct_warning_to_all": "הודעה זו תהיה נראית לכל המשתמשים המוזכרים.", + "direct_warning_to_first_only": "הודעה זו תהיה נראית לכל המשתמשים במוזכרים בתחילת ההודעה בלבד.", "posting": "מפרסם", + "scope_notice": { + "public": "הודעה זו תהיה נראית לכולם", + "private": "הודעה זו תהיה נראית לעוקבים שלך בלבד", + "unlisted": "הודעה זו לא תהיה נראית בציר זמן הציבורי או בכל הרשת הידועה" + }, "scope": { "direct": "ישיר - שלח לאנשים המוזכרים בלבד", "private": "עוקבים-בלבד - שלח לעוקבים בלבד", @@ -68,7 +118,23 @@ "fullname": "שם תצוגה", "password_confirm": "אישור סיסמה", "registration": "הרשמה", - "token": "טוקן הזמנה" + "token": "טוקן הזמנה", + "captcha": "אימות אנוש", + "new_captcha": "לחץ על התמונה על מנת לקבל אימות אנוש חדש", + "username_placeholder": "למשל lain", + "fullname_placeholder": "למשל Lain Iwakura", + "bio_placeholder": "למשל\nהיי, אני ליין.\nאני ילדת אנימה שגרה בפרוורי יפן. אולי אתם מכירים אותי מהWired.", + "validations": { + "username_required": "לא יכול להישאר ריק", + "fullname_required": "לא יכול להישאר ריק", + "email_required": "לא יכול להישאר ריק", + "password_required": "לא יכול להישאר ריק", + "password_confirmation_required": "לא יכול להישאר ריק", + "password_confirmation_match": "צריך להיות דומה לסיסמה" + } + }, + "selectable_list": { + "select_all": "בחר הכל" }, "settings": { "attachmentRadius": "צירופים", From 4249a2fd6f174abe1c94f6486e98b15f8dbdeac8 Mon Sep 17 00:00:00 2001 From: j1t Date: Wed, 22 May 2019 21:33:05 +0300 Subject: [PATCH 02/15] Translation to Hebrew of everything other than theme_helpers and style. --- src/i18n/he.json | 145 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 5 deletions(-) diff --git a/src/i18n/he.json b/src/i18n/he.json index ee612a653..1c034960d 100644 --- a/src/i18n/he.json +++ b/src/i18n/he.json @@ -137,6 +137,7 @@ "select_all": "בחר הכל" }, "settings": { + "app_name": "שם האפליקציה", "attachmentRadius": "צירופים", "attachments": "צירופים", "autoload": "החל טעינה אוטומטית בגלילה לתחתית הדף", @@ -145,6 +146,12 @@ "avatarRadius": "תמונות פרופיל", "background": "רקע", "bio": "אודות", + "block_export": "ייצוא חסימות", + "block_export_button": "ייצוא חסימות אל קובץ csv", + "block_import": "ייבוא חסימות", + "block_import_error": "שגיאה בייבוא החסימות", + "blocks_imported": "החסימות יובאו! ייקח מעט זמן לעבד אותן.", + "blocks_tab": "חסימות", "btnRadius": "כפתורים", "cBlue": "כחול (תגובה, עקיבה)", "cGreen": "ירוק (חזרה)", @@ -154,6 +161,7 @@ "change_password_error": "הייתה בעיה בשינוי סיסמתך.", "changed_password": "סיסמה שונתה בהצלחה!", "collapse_subject": "מזער הודעות עם נושאים", + "composing": "מרכיב", "confirm_new_password": "אשר סיסמה", "current_avatar": "תמונת הפרופיל הנוכחית שלך", "current_password": "סיסמה נוכחית", @@ -164,21 +172,35 @@ "delete_account_description": "מחק לצמיתות את המשתמש שלך ואת כל הודעותיך.", "delete_account_error": "הייתה בעיה במחיקת המשתמש. אם זה ממשיך, אנא עדכן את מנהל השרת שלך.", "delete_account_instructions": "הכנס את סיסמתך בקלט למטה על מנת לאשר מחיקת משתמש.", + "avatar_size_instruction": "הגודל המינימלי המומלץ לתמונות פרופיל הוא 150x150 פיקסלים.", "export_theme": "שמור ערכים", "filtering": "סינון", "filtering_explanation": "כל הסטטוסים הכוללים את המילים הללו יושתקו, אחד לשורה", "follow_export": "יצוא עקיבות", "follow_export_button": "ייצא את הנעקבים שלך לקובץ csv", - "follow_export_processing": "טוען. בקרוב תתבקש להוריד את הקובץ את הקובץ שלך", "follow_import": "יבוא עקיבות", "follow_import_error": "שגיאה בייבוא נעקבים.", "follows_imported": "נעקבים יובאו! ייקח זמן מה לעבד אותם.", "foreground": "חזית", + "general": "כללי", "hide_attachments_in_convo": "החבא צירופים בשיחות", "hide_attachments_in_tl": "החבא צירופים בציר הזמן", + "hide_muted_posts": "הסתר הודעות של משתמשים מושתקים", + "max_thumbnails": "מספר מירבי של תמונות ממוזערות להודעה", + "hide_isp": "הסתר פאנל-צד", + "preload_images": "טען תמונות מראש", + "use_one_click_nsfw": "פתח תמונות לא-בטוחות-לעבודה עם לחיצה אחת בלבד", + "hide_post_stats": "הסתר נתוני הודעה (למשל, מספר החזרות)", + "hide_user_stats": "הסתר נתוני משתמש (למשל, מספר העוקבים)", + "hide_filtered_statuses": "מסתר סטטוסים מסוננים", + "import_blocks_from_a_csv_file": "ייבא חסימות מקובץ csv", "import_followers_from_a_csv_file": "ייבא את הנעקבים שלך מקובץ csv", "import_theme": "טען ערכים", "inputRadius": "שדות קלט", + "checkboxRadius": "תיבות סימון", + "instance_default": "(default: {value})", + "instance_default_simple": "(default)", + "interface": "ממשק", "interfaceLanguage": "שפת הממשק", "invalid_theme_imported": "הקובץ הנבחר אינו תמה הנתמכת ע\"י פלרומה. שום שינויים לא נעשו לתמה שלך.", "limited_availability": "לא זמין בדפדפן שלך", @@ -186,6 +208,9 @@ "lock_account_description": "הגבל את המשתמש לעוקבים מאושרים בלבד", "loop_video": "נגן סרטונים ללא הפסקה", "loop_video_silent_only": "נגן רק סרטונים חסרי קול ללא הפסקה", + "mutes_tab": "השתקות", + "play_videos_in_modal": "נגן סרטונים ישירות בנגן המדיה", + "use_contain_fit": "אל תחתוך את הצירוף בתמונות הממוזערות", "name": "שם", "name_bio": "שם ואודות", "new_password": "סיסמה חדשה", @@ -194,6 +219,13 @@ "notification_visibility_likes": "לייקים", "notification_visibility_mentions": "אזכורים", "notification_visibility_repeats": "חזרות", + "no_rich_text_description": "הסר פורמט טקסט עשיר מכל ההודעות", + "no_blocks": "ללא חסימות", + "no_mutes": "ללא השתקות", + "hide_follows_description": "אל תראה אחרי מי אני עוקב", + "hide_followers_description": "אל תראה מי עוקב אחרי", + "show_admin_badge": "הראה סמל מנהל בפרופיל שלי", + "show_moderator_badge": "הראה סמל צוות בפרופיל שלי", "nsfw_clickthrough": "החל החבאת צירופים לא בטוחים לצפיה בעת עבודה בעזרת לחיצת עכבר", "oauth_tokens": "אסימוני OAuth", "token": "אסימון", @@ -212,18 +244,43 @@ "reply_visibility_all": "הראה את כל התגובות", "reply_visibility_following": "הראה תגובות שמופנות אליי או לעקובים שלי בלבד", "reply_visibility_self": "הראה תגובות שמופנות אליי בלבד", + "autohide_floating_post_button": "החבא אוטומטית את הכפתור הודעה חדשה (נייד)", + "saving_err": "שגיאה בשמירת הגדרות", + "saving_ok": "הגדרות נשמרו", + "search_user_to_block": "חפש משתמש לחסימה", + "search_user_to_mute": "חפש משתמש להשתקה", "security_tab": "ביטחון", + "scope_copy": "העתק תחום הודעה בתגובה להודעה (הודעות ישירות תמיד מועתקות)", + "minimal_scopes_mode": "צמצם אפשרויות בחירה לתחום הודעה", "set_new_avatar": "קבע תמונת פרופיל חדשה", "set_new_profile_background": "קבע רקע פרופיל חדש", "set_new_profile_banner": "קבע כרזת פרופיל חדשה", "settings": "הגדרות", + "subject_input_always_show": "תמיד הראה את שדה הנושא", + "subject_line_behavior": "העתק נושא בתגובה", + "subject_line_email": "כמו אימייל: \"re: נושא\"", + "subject_line_mastodon": "כמו מסטודון: העתק כפי שזה", + "subject_line_noop": "אל תעתיק", + "post_status_content_type": "שלח את סוג תוכן ההודעה", "stop_gifs": "נגן-בעת-ריחוף GIFs", "streaming": "החל זרימת הודעות אוטומטית בעת גלילה למעלה הדף", "text": "טקסט", "theme": "תמה", "theme_help": "השתמש בקודי צבע הקס (#אדום-אדום-ירוק-ירוק-כחול-כחול) על מנת להתאים אישית את תמת הצבע שלך.", "tooltipRadius": "טולטיפ \\ התראות", - "user_settings": "הגדרות משתמש" + "upload_a_photo": "העלה תמונה", + "user_settings": "הגדרות משתמש", + "values": { + "false": "לא", + "true": "כן" + }, + "notifications": "התראות", + "enable_web_push_notifications": "אפשר התראות web push", + "version": { + "title": "גרסה", + "backend_version": "גרסת קצה אחורי", + "frontend_version": "גרסת קצה קדמי" + } }, "timeline": { "collapse": "מוטט", @@ -233,29 +290,107 @@ "no_retweet_hint": "ההודעה מסומנת כ\"לעוקבים-בלבד\" ולא ניתן לחזור עליה", "repeated": "חזר", "show_new": "הראה חדש", - "up_to_date": "עדכני" + "up_to_date": "עדכני", + "no_more_statuses": "אין עוד סטטוסים", + "no_statuses": "אין סטטוסים" + }, + "status": { + "favorites": "מועדפים", + "repeats": "חזרות", + "delete": "מחק סטטוס", + "pin": "הצמד לפרופיל", + "unpin": "הסר הצמדה מהפרופיל", + "pinned": "מוצמד", + "delete_confirm": "האם באמת למחוק סטטוס זה?", + "reply_to": "הגב ל", + "replies_list": "תגובות:" }, "user_card": { "approve": "אשר", "block": "חסימה", "blocked": "חסום!", "deny": "דחה", + "favorites": "מועדפים", "follow": "עקוב", + "follow_sent": "בקשה נשלחה!", + "follow_progress": "מבקש...", + "follow_again": "שלח בקשה שוב?", + "follow_unfollow": "בטל עקיבה", "followees": "נעקבים", "followers": "עוקבים", "following": "עוקב!", "follows_you": "עוקב אחריך!", + "its_you": "זה אתה!", + "media": "מדיה", "mute": "השתק", "muted": "מושתק", "per_day": "ליום", "remote_follow": "עקיבה מרחוק", - "statuses": "סטטוסים" + "report": "דווח", + "statuses": "סטטוסים", + "unblock": "הסר חסימה", + "unblock_progress": "מסיר חסימה...", + "block_progress": "חוסם...", + "unmute": "הסר השתקה", + "unmute_progress": "מסיר השתקה...", + "mute_progress": "משתיק...", + "admin_menu": { + "moderation": "ניהול (צוות)", + "grant_admin": "הפוך למנהל", + "revoke_admin": "הסר מנהל", + "grant_moderator": "הפוך לצוות", + "revoke_moderator": "הסר צוות", + "activate_account": "הפעל משתמש", + "deactivate_account": "השבת משתמש", + "delete_account": "מחק משתמש", + "force_nsfw": "סמן את כל ההודעות בתור לא-מתאימות-לעבודה", + "strip_media": "הסר מדיה מההודעות", + "force_unlisted": "הפוך הודעות ללא רשומות", + "sandbox": "הפוך הודעות לנראות לעוקבים-בלבד", + "disable_remote_subscription": "אל תאפשר עקיבה של המשתמש מאינסטנס אחר", + "disable_any_subscription": "אל תאפשר עקיבה של המשתמש בכלל", + "quarantine": "אל תאפשר פדרציה של ההודעות של המשתמש", + "delete_user": "מחק משתמש", + "delete_user_confirmation": "בטוח? פעולה זו הינה בלתי הפיכה." + } }, "user_profile": { - "timeline_title": "ציר זמן המשתמש" + "timeline_title": "ציר זמן המשתמש", + "profile_does_not_exist": "סליחה, פרופיל זה אינו קיים.", + "profile_loading_error": "סליחה, הייתה שגיאה בטעינת הפרופיל." + }, + "user_reporting": { + "title": "מדווח על {0}", + "add_comment_description": "הדיווח ישלח לצוות האינסטנס. אפשר להסביר למה הנך מדווחים על משתמש זה למטה:", + "additional_comments": "תגובות נוספות", + "forward_description": "המשתמש משרת אחר. לשלוח לשם עותק של הדיווח?", + "forward_to": "העבר ל {0}", + "submit": "הגש", + "generic_error": "קרתה שגיאה בעת עיבוד הבקשה." }, "who_to_follow": { "more": "עוד", "who_to_follow": "אחרי מי לעקוב" + }, + "tool_tip": { + "media_upload": "העלה מדיה", + "repeat": "חזור", + "reply": "הגב", + "favorite": "מועדף", + "user_settings": "הגדרות משתמש" + }, + "upload":{ + "error": { + "base": "העלאה נכשלה.", + "file_too_big": "קובץ גדול מדי [{filesize}{filesizeunit} / {allowedsize}{allowedsizeunit}]", + "default": "נסה שוב אחר כך" + }, + "file_size_units": { + "B": "B", + "KiB": "KiB", + "MiB": "MiB", + "GiB": "GiB", + "TiB": "TiB" + } } } From 2af35b84044a93d19b4d6378e6f5695bde867be1 Mon Sep 17 00:00:00 2001 From: taehoon Date: Wed, 22 May 2019 23:47:20 -0400 Subject: [PATCH 03/15] do not miss statusnet_profile_url of mentions --- src/services/entity_normalizer/entity_normalizer.service.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 46ca76026..efff23d1c 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -33,6 +33,7 @@ export const parseUser = (data) => { if (masto) { output.screen_name = data.acct + output.statusnet_profile_url = data.url // There's nothing else to get if (mastoShort) { @@ -56,8 +57,6 @@ export const parseUser = (data) => { output.bot = data.bot - output.statusnet_profile_url = data.url - if (data.pleroma) { const relationship = data.pleroma.relationship From 28ca504576134a8dd7b7e90488319c23f23b2300 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 25 May 2019 07:01:02 +0000 Subject: [PATCH 04/15] wire up notification settings --- src/components/user_settings/user_settings.js | 7 ++- .../user_settings/user_settings.vue | 45 +++++++++++++++++++ src/i18n/en.json | 7 +++ src/services/api/api.service.js | 19 +++++++- .../backend_interactor_service.js | 7 ++- .../entity_normalizer.service.js | 5 +++ 6 files changed, 87 insertions(+), 3 deletions(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 2418450cb..ae36e5e8f 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -55,7 +55,8 @@ const UserSettings = { changePasswordInputs: [ '', '', '' ], changedPassword: false, changePasswordError: false, - activeTab: 'profile' + activeTab: 'profile', + notificationSettings: this.$store.state.users.currentUser.notification_settings } }, created () { @@ -128,6 +129,10 @@ const UserSettings = { this.$store.commit('setCurrentUser', user) }) }, + updateNotificationSettings () { + this.$store.state.api.backendInteractor + .updateNotificationSettings({ settings: this.notificationSettings }) + }, changeVis (visibility) { this.newDefaultScope = visibility }, diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 2cb8b37ab..69f1b44f4 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -167,6 +167,51 @@ +
+
+

{{$t('settings.notifications')}}

+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
+
+

{{$t('settings.follow_import')}}

diff --git a/src/i18n/en.json b/src/i18n/en.json index 031c93de4..2840582b5 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -209,6 +209,7 @@ "loop_video": "Loop videos", "loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")", "mutes_tab": "Mutes", + "interactions_tab": "Interactions", "play_videos_in_modal": "Play videos directly in the media viewer", "use_contain_fit": "Don't crop the attachment in thumbnails", "name": "Name", @@ -277,6 +278,12 @@ "true": "yes" }, "notifications": "Notifications", + "notification_setting_local": "Show notifications from local users", + "notification_setting_remote": "Show notifications from remote users", + "notification_setting_follows": "Show notifications from users you follow", + "notification_setting_non_follows": "Show notifications from users you do not follow", + "notification_setting_followers": "Show notifications from users who follow you", + "notification_setting_non_followers": "Show notifications from users who do not follow you", "enable_web_push_notifications": "Enable web push notifications", "style": { "switcher": { diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index c67eccf10..d6904d306 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -16,6 +16,7 @@ const PERMISSION_GROUP_URL = (screenName, right) => `/api/pleroma/admin/users/${ const ACTIVATION_STATUS_URL = screenName => `/api/pleroma/admin/users/${screenName}/activation_status` const ADMIN_USERS_URL = '/api/pleroma/admin/users' const SUGGESTIONS_URL = '/api/v1/suggestions' +const NOTIFICATION_SETTINGS_URL = '/api/pleroma/notification_settings' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications' @@ -97,6 +98,21 @@ const promisedRequest = ({ method, url, payload, credentials, headers = {} }) => }) } +const updateNotificationSettings = ({credentials, settings}) => { + const form = new FormData() + + each(settings, (value, key) => { + form.append(key, value) + }) + + return fetch(NOTIFICATION_SETTINGS_URL, { + headers: authHeaders(credentials), + method: 'PUT', + body: form + }) + .then((data) => data.json()) +} + const updateAvatar = ({credentials, avatar}) => { const form = new FormData() form.append('avatar', avatar) @@ -767,7 +783,8 @@ const apiService = { markNotificationsAsSeen, fetchFavoritedByUsers, fetchRebloggedByUsers, - reportUser + reportUser, + updateNotificationSettings } export default apiService diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index 639bcabc4..36152429f 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -87,6 +87,10 @@ const backendInteractorService = (credentials) => { return apiService.deleteUser({screen_name, credentials}) } + const updateNotificationSettings = ({settings}) => { + return apiService.updateNotificationSettings({credentials, settings}) + } + const fetchMutes = () => apiService.fetchMutes({credentials}) const muteUser = (id) => apiService.muteUser({credentials, id}) const unmuteUser = (id) => apiService.unmuteUser({credentials, id}) @@ -171,7 +175,8 @@ const backendInteractorService = (credentials) => { favorite, unfavorite, retweet, - unretweet + unretweet, + updateNotificationSettings } return backendInteractorServiceInstance diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index efff23d1c..baf58e9bf 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -141,8 +141,13 @@ export const parseUser = (data) => { output.deactivated = data.pleroma.deactivated } + if (data.pleroma) { + output.notification_settings = data.pleroma.notification_settings + } + output.tags = output.tags || [] output.rights = output.rights || {} + output.notification_settings = output.notification_settings || {} return output } From ac97cd3e469f6b3051fa74d66f72cd23dc53a2fb Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 25 May 2019 22:59:04 +0000 Subject: [PATCH 05/15] entity normalizer: collapse data.pleroma if blocks --- src/services/entity_normalizer/entity_normalizer.service.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index baf58e9bf..e27b61084 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -134,14 +134,10 @@ export const parseUser = (data) => { if (data.pleroma) { output.follow_request_count = data.pleroma.follow_request_count - } - if (data.pleroma) { output.tags = data.pleroma.tags output.deactivated = data.pleroma.deactivated - } - if (data.pleroma) { output.notification_settings = data.pleroma.notification_settings } From 855566f887cb9f705f62141b929bb9a3d089099c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 25 May 2019 23:44:36 +0000 Subject: [PATCH 06/15] notification controls: redesign entirely --- .../user_settings/user_settings.vue | 72 +++++++++---------- src/i18n/en.json | 14 ++-- 2 files changed, 39 insertions(+), 47 deletions(-) diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 69f1b44f4..20b109799 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -167,47 +167,39 @@
-
+
-

{{$t('settings.notifications')}}

-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
+
+ {{$t('settings.notification_setting')}} +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+

{{$t('settings.notification_mutes')}}

+

{{$t('settings.notification_blocks')}}

diff --git a/src/i18n/en.json b/src/i18n/en.json index 2840582b5..2b5c54686 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -209,7 +209,6 @@ "loop_video": "Loop videos", "loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")", "mutes_tab": "Mutes", - "interactions_tab": "Interactions", "play_videos_in_modal": "Play videos directly in the media viewer", "use_contain_fit": "Don't crop the attachment in thumbnails", "name": "Name", @@ -278,12 +277,13 @@ "true": "yes" }, "notifications": "Notifications", - "notification_setting_local": "Show notifications from local users", - "notification_setting_remote": "Show notifications from remote users", - "notification_setting_follows": "Show notifications from users you follow", - "notification_setting_non_follows": "Show notifications from users you do not follow", - "notification_setting_followers": "Show notifications from users who follow you", - "notification_setting_non_followers": "Show notifications from users who do not follow you", + "notification_setting": "Receive notifications from:", + "notification_setting_follows": "Users you follow", + "notification_setting_non_follows": "Users you do not follow", + "notification_setting_followers": "Users who follow you", + "notification_setting_non_followers": "Users who do not follow you", + "notification_mutes": "To stop receiving notifications from a specific user, use a mute.", + "notification_blocks": "Blocking a user stops all notifications as well as unsubscribes them.", "enable_web_push_notifications": "Enable web push notifications", "style": { "switcher": { From 6c7eeb93fef28789a4d560be7feaeccc19d6ed20 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 27 May 2019 00:13:08 +0300 Subject: [PATCH 07/15] move drowdown menu to popper --- .../extra_buttons/extra_buttons.vue | 3 +- .../moderation_tools/moderation_tools.vue | 58 ------------------- src/components/popper/popper.scss | 57 ++++++++++++++++++ 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index ef11138db..a761d3134 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -13,7 +13,7 @@ }" >
- diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue index 7621fb202..3da543dec 100644 --- a/src/components/dialog_modal/dialog_modal.vue +++ b/src/components/dialog_modal/dialog_modal.vue @@ -62,6 +62,7 @@ .title { margin-bottom: 0; + text-align: center; } } @@ -80,6 +81,7 @@ background-color: var(--lightBg, $fallback--lightBg); border-top: 1px solid $fallback--bg; border-top: 1px solid var(--bg, $fallback--bg); + display: flex; justify-content: flex-end; button { diff --git a/src/components/moderation_tools/moderation_tools.vue b/src/components/moderation_tools/moderation_tools.vue index 146673a56..6a5e8cc00 100644 --- a/src/components/moderation_tools/moderation_tools.vue +++ b/src/components/moderation_tools/moderation_tools.vue @@ -65,18 +65,20 @@ {{ $t('user_card.admin_menu.moderation') }} - - {{ $t('user_card.admin_menu.delete_user') }} -

{{ $t('user_card.admin_menu.delete_user_confirmation') }}

- - - - -
+ + + +

{{ $t('user_card.admin_menu.delete_user_confirmation') }}

+ +
+