From 79d02bddbe2b77574844b8ade7a09043c31b1c6b Mon Sep 17 00:00:00 2001 From: marcin mikołajczak Date: Sun, 13 Feb 2022 19:07:49 +0100 Subject: Birthdays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/settings_modal/tabs/profile_tab.js | 6 +++++- src/components/settings_modal/tabs/profile_tab.scss | 5 +++++ src/components/settings_modal/tabs/profile_tab.vue | 12 ++++++++++++ src/components/user_profile/user_profile.js | 11 +++++++++-- src/components/user_profile/user_profile.vue | 14 ++++++++++++++ src/i18n/en.json | 5 +++++ src/i18n/pl.json | 9 +++++++-- .../entity_normalizer/entity_normalizer.service.js | 3 +++ 8 files changed, 60 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index 64079fcd..0ae95dbd 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -29,6 +29,8 @@ const ProfileTab = { newLocked: this.$store.state.users.currentUser.locked, newNoRichText: this.$store.state.users.currentUser.no_rich_text, newDefaultScope: this.$store.state.users.currentUser.default_scope, + newBirthday: this.$store.state.users.currentUser.birthday, + showBirthday: this.$store.state.users.currentUser.show_birthday, newFields: this.$store.state.users.currentUser.fields.map(field => ({ name: field.name, value: field.value })), hideFollows: this.$store.state.users.currentUser.hide_follows, hideFollowers: this.$store.state.users.currentUser.hide_followers, @@ -132,7 +134,9 @@ const ProfileTab = { allow_following_move: this.allowFollowingMove, hide_follows_count: this.hideFollowsCount, hide_followers_count: this.hideFollowersCount, - show_role: this.showRole + show_role: this.showRole, + birthday: this.newBirthday || null, + show_birthday: this.showBirthday /* eslint-enable camelcase */ } }).then((user) => { this.newFields.splice(user.fields.length) diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss index 111eaed3..24287511 100644 --- a/src/components/settings_modal/tabs/profile_tab.scss +++ b/src/components/settings_modal/tabs/profile_tab.scss @@ -124,4 +124,9 @@ padding: 0 0.5em; } } + + .birthday-input { + display: block; + margin-bottom: 1em; + } } diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index bb3c301d..9b92056d 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -95,6 +95,18 @@ {{ $t('settings.discoverable') }}

+
+

{{ $t('settings.birthday.label') }}

+ + + {{ $t('settings.birthday.show_birthday') }} + +

{{ $t('settings.profile_fields.label') }}

+ + + {{ $t('user_card.birthday', { birthday: formattedBirthday }) }} + diff --git a/src/i18n/en.json b/src/i18n/en.json index 9abfae67..7df42d92 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -334,8 +334,10 @@ "select_all": "Select all" }, "settings": { - "add_language": "Add another language", + "add_language": "Add fallback language", "remove_language": "Remove", + "primary_language": "Primary language:", + "fallback_language": "Fallback language {index}:", "app_name": "App name", "expert_mode": "Show advanced", "save": "Save changes", diff --git a/src/modules/instance.js b/src/modules/instance.js index 3b15e62e..bff26151 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -273,8 +273,13 @@ const instance = { langList .map(async lang => { if (!state.unicodeEmojiAnnotations[lang]) { - const annotations = await loadAnnotations(lang) - commit('setUnicodeEmojiAnnotations', { lang, annotations }) + try { + const annotations = await loadAnnotations(lang) + commit('setUnicodeEmojiAnnotations', { lang, annotations }) + } catch (e) { + console.warn(`Error loading unicode emoji annotations for ${lang}: `, e) + // ignore + } } })) }, -- cgit v1.2.3-70-g09d2 From 78690cdf518390308624b4914dd9be06858822e1 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 24 Dec 2022 11:58:33 -0500 Subject: Display detailed backup state --- src/components/settings_modal/tabs/data_import_export_tab.vue | 10 ++++++++++ src/i18n/en.json | 2 ++ 2 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/components/settings_modal/tabs/data_import_export_tab.vue b/src/components/settings_modal/tabs/data_import_export_tab.vue index e3b7f407..48356c9b 100644 --- a/src/components/settings_modal/tabs/data_import_export_tab.vue +++ b/src/components/settings_modal/tabs/data_import_export_tab.vue @@ -77,6 +77,16 @@ > {{ $t('settings.download_backup') }} + + {{ $tc('settings.backup_running', backup.processed_number, { number: backup.processed_number }) }} + + + {{ $t('settings.backup_failed') }} + diff --git a/src/i18n/en.json b/src/i18n/en.json index 59ee1c17..b7c19b88 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -390,6 +390,8 @@ "account_backup_table_head": "Backup", "download_backup": "Download", "backup_not_ready": "This backup is not ready yet.", + "backup_running": "This backup is in progress, processed {number} record. | This backup is in progress, processed {number} records.", + "backup_failed": "This backup has failed.", "remove_backup": "Remove", "list_backups_error": "Error fetching backup list: {error}", "add_backup": "Create a new backup", -- cgit v1.2.3-70-g09d2 From b65a89c8225289708fc0e97f3c2cbe66511473cb Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 24 Dec 2022 12:17:09 -0500 Subject: Make announcements available to all with privileges --- src/components/announcement/announcement.js | 3 +++ src/components/announcement/announcement.vue | 4 ++-- src/components/announcements_page/announcements_page.js | 3 +++ src/components/announcements_page/announcements_page.vue | 2 +- src/modules/announcements.js | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/announcement/announcement.js b/src/components/announcement/announcement.js index c10c7d90..30254926 100644 --- a/src/components/announcement/announcement.js +++ b/src/components/announcement/announcement.js @@ -27,6 +27,9 @@ const Announcement = { ...mapState({ currentUser: state => state.users.currentUser }), + canEditAnnouncement () { + return this.currentUser && this.currentUser.privileges.includes('announcements_manage_announcements') + }, content () { return this.announcement.content }, diff --git a/src/components/announcement/announcement.vue b/src/components/announcement/announcement.vue index 5f64232a..c1b35981 100644 --- a/src/components/announcement/announcement.vue +++ b/src/components/announcement/announcement.vue @@ -45,14 +45,14 @@ {{ $t('announcements.mark_as_read_action') }}
diff --git a/src/modules/announcements.js b/src/modules/announcements.js index e4d2d2b0..4504263b 100644 --- a/src/modules/announcements.js +++ b/src/modules/announcements.js @@ -49,7 +49,7 @@ const announcements = { } const currentUser = store.rootState.users.currentUser - const isAdmin = currentUser && currentUser.role === 'admin' + const isAdmin = currentUser && currentUser.privileges.includes('announcements_manage_announcements') const getAnnouncements = async () => { if (!isAdmin) { -- cgit v1.2.3-70-g09d2 From 01807446a846bdda5581a45562d14e5d6d17acf1 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 27 Dec 2022 13:46:50 -0500 Subject: Make notification settings work --- src/services/api/api.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 7174cc5d..00d1c020 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -164,7 +164,7 @@ const updateNotificationSettings = ({ credentials, settings }) => { form.append(key, value) }) - return fetch(NOTIFICATION_SETTINGS_URL, { + return fetch(`${NOTIFICATION_SETTINGS_URL}?${new URLSearchParams(settings)}`, { headers: authHeaders(credentials), method: 'PUT', body: form -- cgit v1.2.3-70-g09d2 From de8c97f3a08241a08d4b4badd9ccfaa2333fef56 Mon Sep 17 00:00:00 2001 From: Dmytro Poltavchenko Date: Tue, 27 Dec 2022 01:35:29 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 87.8% (810 of 922 strings) Translation: Pleroma/Pleroma-FE Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/uk/ --- src/i18n/uk.json | 106 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/i18n/uk.json b/src/i18n/uk.json index c75ed197..67b348d3 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -32,7 +32,13 @@ "private": "Лише читачі", "public": "Публічне", "unlisted": "Непублічне" - } + }, + "undo": "Відмінити", + "yes": "Так", + "no": "Ні", + "unpin": "Відкріпити", + "scroll_to_top": "Вгору", + "pin": "Прикріпити" }, "finder": { "error_fetching_user": "Користувача не знайдено", @@ -81,7 +87,8 @@ "accept_desc": "Поточний інстанс приймає повідомлення тільки з перелічених інстансів:", "simple_policies": "Правила поточного інстансу", "reason": "Причина", - "not_applicable": "н/в" + "not_applicable": "н/в", + "instance": "Інстанс" }, "mrf_policies_desc": "Правила MRF розповсюджуються на даний інстанс. Наступні правила активні:", "mrf_policies": "Активувати правила MRF (модуль переписування повідомлень)", @@ -153,7 +160,8 @@ "favorited_you": "вподобав(-ла) ваш допис", "broken_favorite": "Невідомий допис, шукаю його…", "error": "Помилка при оновленні сповіщень: {0}", - "poll_ended": "опитування закінчено" + "poll_ended": "опитування закінчено", + "submitted_report": "подав скаргу" }, "nav": { "chats": "Чати", @@ -174,7 +182,13 @@ "back": "Назад", "administration": "Адміністрування", "home_timeline": "Домашня стрічка", - "lists": "Списки" + "lists": "Списки", + "edit_pinned": "Редагувати прикріплене", + "edit_finish": "Завершити редагування", + "mobile_sidebar": "Ввімкнути бокову панель", + "mobile_notifications": "Відкрити сповіщення (є непрочитані)", + "mobile_notifications_close": "Закрити сповіщення", + "edit_nav_mobile": "Редагувати панель навігації" }, "media_modal": { "next": "Наступна", @@ -221,7 +235,8 @@ "follows": "Нові підписки", "favs_repeats": "Поширення та вподобайки", "moves": "Міграції користувачів", - "emoji_reactions": "Емоджі реакції" + "emoji_reactions": "Емоджі реакції", + "reports": "Скарги" }, "errors": { "storage_unavailable": "Pleroma не змогла отримати доступ до сховища браузеру. Ваша сесія та налаштування не будуть збережені, це може спричинити непередбачувані проблеми. Спробуйте увімкнути cookie." @@ -235,7 +250,19 @@ "emoji": "Емодзі", "load_all": "Всі {emojiAmount} эмодзі завантажуються", "load_all_hint": "Завантажені перші {saneAmount} емодзі, завантаження всіх емодзі може призвести до проблем з продуктивністю.", - "unicode": "Стандартні емодзі" + "unicode": "Стандартні емодзі", + "regional_indicator": "Регіональний індикатор {letter}", + "unicode_groups": { + "animals-and-nature": "Тварини і Рослини", + "flags": "Прапори", + "food-and-drink": "Їжа та Напої", + "objects": "Об'єкти", + "people-and-body": "Люди та Тіло", + "smileys-and-emotion": "Смайлики та Емотікони", + "activities": "Активності", + "symbols": "Символи", + "travel-and-places": "Подорожі та Місця" + } }, "post_status": { "content_type": { @@ -269,7 +296,10 @@ "preview_empty": "Пустий", "media_description_error": "Не вдалось оновити медіа, спробуйте ще раз", "media_description": "Опис медіа", - "post": "Опублікувати" + "post": "Опублікувати", + "edit_unsupported_warning": "Pleroma не підтримує редагування згадувань чи голосувань.", + "edit_status": "Редагувати допис", + "edit_remote_warning": "Інші віддалені інстанси можуть не підтримувати редагування та вони можуть не отримати актуальну версію допису." }, "settings": { "blocks_imported": "Блокування імпортовані! Їх обробка триватиме певний час.", @@ -682,7 +712,30 @@ "move_account": "Перемістити обліковий запис", "move_account_target": "Цільовий обліковий запис (напр. {example})", "moved_account": "Обліковий запис переміщено.", - "move_account_error": "Помилка під час переміщення облікового запису: {error}" + "move_account_error": "Помилка під час переміщення облікового запису: {error}", + "word_filter_and_more": "Фільтр слів та більше...", + "hide_bot_indication": "Сховати позначку бот у дописах", + "navbar_column_stretch": "Розтягнути панель навігації на ширину колонок", + "hide_wordfiltered_statuses": "Ховати фільтровані статуси", + "hide_muted_threads": "Ховати приглушені треди", + "posts": "Дописи", + "account_privacy": "Безпека", + "conversation_display": "Стиль відображення розмови", + "conversation_display_tree": "Деревоподібне", + "conversation_display_tree_quick": "Вигляд дерева", + "disable_sticky_headers": "Не закріплювати заголовок колонки зверху на сторінці", + "third_column_mode_none": "Не показувати третю колонку взагалі", + "third_column_mode_notifications": "Колонка сповіщень", + "columns": "Колонки", + "auto_update": "Автоматично показувати нові дописи", + "use_websockets": "Використовувати вебсокети (Оновлення в реальному часі)", + "use_at_icon": "Показувати {'@'} символ як іконку замість тексту", + "mute_bot_posts": "Приховати дописи ботів", + "always_show_post_button": "Завжди показувати плаваючу кнопку «Новий Допис»", + "hide_favorites_description": "Не показувати список моїх вподобань (люди все одно отримують сповіщення)", + "third_column_mode": "Коли достатньо місця, показувати третю колонку, що містить", + "user_popover_avatar_action_open": "Відкрити профіль", + "wordfilter": "Фільтр слів" }, "selectable_list": { "select_all": "Вибрати все" @@ -781,7 +834,23 @@ "day": "{0} день", "seconds_short": "{0}с", "seconds": "{0} секунди", - "in_future": "через {0}" + "in_future": "через {0}", + "unit": { + "months": "{0} місяць | {0} місяців", + "minutes": "{0} хвилина | {0} хвилин", + "hours_short": "{0}год", + "minutes_short": "{0}хв", + "months_short": "{0}міс", + "seconds": "{0} секунда | {0} секунд", + "seconds_short": "{0}с", + "weeks_short": "{0}тижд", + "years": "{0} рік | {0} років", + "years_short": "{0}р.", + "days": "{0} день | {0} днів", + "days_short": "{0}д", + "hours": "{0} година | {0} годин", + "weeks": "{0} тиждень | {0} тижнів" + } }, "search": { "no_results": "Немає результатів", @@ -850,7 +919,9 @@ "disabled": "Не виділяти" }, "bot": "Бот", - "edit_profile": "Редагувати профіль" + "edit_profile": "Редагувати профіль", + "deactivated": "Деактивований", + "follow_cancel": "Скасувати запит" }, "status": { "copy_link": "Скопіювати посилання на допис", @@ -877,7 +948,15 @@ "thread_muted": "Нитка заглушена", "unmute_conversation": "Припинити глушити розмову", "external_source": "Зовнішнє джерело", - "expand": "Розгорнути" + "expand": "Розгорнути", + "edit": "Редагувати допис", + "edited_at": "(змінено: {time})", + "thread_follow_with_icon": "{icon} {text}", + "ancestor_follow_with_icon": "{icon} {text}", + "show_all_conversation_with_icon": "{icon} {text}", + "plus_more": "+{number} більше", + "thread_show_full_with_icon": "{icon} {text}", + "show_only_conversation_under_this": "Показати всі відповіді на цей допис" }, "timeline": { "no_more_statuses": "Більше немає дописів", @@ -913,6 +992,9 @@ "state": "Статус:", "state_open": "відкритий", "state_closed": "закритий", - "state_resolved": "вирішений" + "state_resolved": "вирішений", + "reported_statuses": "Дописи, на які подано скаргу:", + "reporter": "Позивач:", + "reported_user": "Відповідач:" } } -- cgit v1.2.3-70-g09d2 From 010fdd8c245ed413666807b081f3735a33a2094f Mon Sep 17 00:00:00 2001 From: Dmytro Poltavchenko Date: Tue, 27 Dec 2022 20:12:11 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 87.8% (810 of 922 strings) Translation: Pleroma/Pleroma-FE Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/uk/ --- src/i18n/uk.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/i18n/uk.json b/src/i18n/uk.json index 67b348d3..99b49868 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -54,7 +54,7 @@ "media_proxy": "Посередник медіа-даних", "text_limit": "Ліміт символів", "upload_limit": "Обмеження завантажень", - "shout": "Оголошення" + "shout": "Гучномовець" }, "exporter": { "processing": "Опрацьовую, скоро ви зможете завантажити файл", @@ -67,7 +67,7 @@ "mute": "Ігнорувати" }, "shoutbox": { - "title": "Оголошення" + "title": "Гучномовець" }, "about": { "staff": "Адміністрація", @@ -684,7 +684,7 @@ "backup_restore": "Резервне копіювання налаштувань" }, "right_sidebar": "Показувати бокову панель справа", - "hide_shoutbox": "Приховати оголошення інстансу", + "hide_shoutbox": "Приховати гучномовець", "setting_server_side": "Цей параметр прив’язаний до вашого профілю та впливає на всі сеанси та клієнти", "lists_navigation": "Показувати списки в навігації", "account_backup": "Резервне копіювання облікового запису", -- cgit v1.2.3-70-g09d2 From a1520b172a41004a2e4c50f47d60b90f35b53f2e Mon Sep 17 00:00:00 2001 From: Tirifto Date: Wed, 28 Dec 2022 21:47:14 +0000 Subject: Translated using Weblate (Esperanto) Currently translated at 98.0% (904 of 922 strings) Translation: Pleroma/Pleroma-FE Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/eo/ --- src/i18n/eo.json | 78 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/i18n/eo.json b/src/i18n/eo.json index 5a2c8afb..3596065c 100644 --- a/src/i18n/eo.json +++ b/src/i18n/eo.json @@ -96,7 +96,7 @@ "friend_requests": "Petoj pri abono", "mentions": "Mencioj", "dms": "Rektaj mesaĝoj", - "public_tl": "Loka historio", + "public_tl": "Noda historio", "timeline": "Historio", "twkn": "Federa historio", "user_search": "Serĉi uzantojn", @@ -112,16 +112,19 @@ "edit_pinned": "Redakti fiksitajn erojn", "lists": "Listoj", "edit_nav_mobile": "Adapti navigan breton", - "edit_finish": "Fini redakton" + "edit_finish": "Fini redakton", + "mobile_notifications": "Malfermi sciigojn (estas nelegitaj)", + "mobile_notifications_close": "Fermi sciigojn", + "announcements": "Anoncoj" }, "notifications": { - "broken_favorite": "Nekonata stato, serĉante ĝin…", - "favorited_you": "ŝatis vian staton", + "broken_favorite": "Nekonata afiŝo, serĉante ĝin…", + "favorited_you": "ŝatis vian afiŝon", "followed_you": "ekabonis vin", "load_older": "Enlegi pli malnovajn sciigojn", "notifications": "Sciigoj", "read": "Legite!", - "repeated_you": "ripetis vian staton", + "repeated_you": "ripetis vian afiŝon", "no_more_notifications": "Neniuj pliaj sciigoj", "reacted_with": "reagis per {0}", "migrated_to": "migris al", @@ -131,7 +134,7 @@ "poll_ended": "enketo finiĝis" }, "post_status": { - "new_status": "Afiŝi novan staton", + "new_status": "Afiŝi", "account_not_locked_warning": "Via konto ne estas {0}. Iu ajn povas vin aboni por vidi eĉ viajn afiŝoj nur por abonantoj.", "account_not_locked_warning_link": "ŝlosita", "attachments_sensitive": "Marki kunsendaĵojn konsternaj", @@ -152,12 +155,12 @@ "unlisted": "Nelistigita – ne afiŝi al publikaj historioj" }, "scope_notice": { - "unlisted": "Ĉi tiu afiŝo ne estos videbla en la Loka historio kaj la Federa historio", + "unlisted": "Ĉi tiu afiŝo ne estos videbla en la Noda kaj la Federa historioj", "private": "Ĉi tiu afiŝo estos videbla nur al viaj abonantoj", "public": "Ĉi tiu afiŝo estos videbla al ĉiuj" }, "media_description_error": "Malsukcesis afiŝo de vidaŭdaĵoj; reprovu", - "empty_status_error": "Ne povas afiŝi malplenan staton sen dosieroj", + "empty_status_error": "Ne povas fari malplenan afiŝon sen dosieroj", "preview_empty": "Malplena", "preview": "Antaŭrigardo", "direct_warning_to_first_only": "Ĉi tiu afiŝo estas nur videbla al uzantoj menciitaj je la komenco de la mesaĝo.", @@ -166,7 +169,7 @@ "post": "Afiŝo", "edit_remote_warning": "Aliaj foraj nodoj eble ne subtenas redaktadon, kaj ne povos ricevi pli novan version de via afiŝo.", "edit_unsupported_warning": "Pleroma ne subtenas redaktadon de mencioj aŭ enketoj.", - "edit_status": "Stato de redakto" + "edit_status": "Redakti afiŝon" }, "registration": { "bio": "Priskribo", @@ -228,7 +231,7 @@ "avatar_size_instruction": "La rekomendata minimuma grando de profilbildoj estas 150×150 bilderoj.", "export_theme": "Konservi antaŭagordon", "filtering": "Filtrado", - "filtering_explanation": "Ĉiuj statoj kun tiuj ĉi vortoj silentiĝos; skribu po unu linie", + "filtering_explanation": "Ĉiuj afiŝoj kun tiuj ĉi vortoj silentiĝos; skribu po unu linie", "follow_export": "Elporto de abonoj", "follow_export_button": "Elporti viajn abonojn al CSV-dosiero", "follow_export_processing": "Traktante; baldaŭ vi ricevos peton elŝuti la dosieron", @@ -245,7 +248,7 @@ "use_one_click_nsfw": "Malfermi konsternajn kunsendaĵojn per nur unu klako", "hide_post_stats": "Kaŝi statistikon de afiŝoj (ekz. nombron de ŝatoj)", "hide_user_stats": "Kaŝi statistikon de uzantoj (ekz. nombron de abonantoj)", - "hide_filtered_statuses": "Kaŝi filtritajn statojn", + "hide_filtered_statuses": "Kaŝi ĉiujn filtritajn afiŝojn", "import_followers_from_a_csv_file": "Enporti abonojn el CSV-dosiero", "import_theme": "Enlegi antaŭagordojn", "inputRadius": "Enigaj kampoj", @@ -278,7 +281,7 @@ "hide_followers_description": "Ne montri kiu min sekvas", "show_admin_badge": "Montri la insignon de administranto en mia profilo", "show_moderator_badge": "Montri la insignon de reguligisto en mia profilo", - "nsfw_clickthrough": "Ŝalti traklakan kaŝadon de kunsendaĵoj kaj antaŭmontroj de ligiloj por konsternaj statoj", + "nsfw_clickthrough": "Ŝalti traklakan kaŝadon de kunsendaĵoj kaj antaŭmontroj de ligiloj por konsternaj afiŝoj", "oauth_tokens": "Pecoj de OAuth", "token": "Peco", "refresh_token": "Aktualiga peco", @@ -627,14 +630,14 @@ "word_filter_and_more": "Vortofiltrado kaj pli…", "mute_bot_posts": "Silentigi afiŝojn de robotoj", "hide_bot_indication": "Kaŝi markon de roboteco en afiŝoj", - "hide_wordfiltered_statuses": "Kaŝi vorte filtritajn statojn", + "hide_wordfiltered_statuses": "Kaŝi vorte filtritajn afiŝojn", "hide_muted_threads": "Kaŝi silentigitajn fadenojn", "account_privacy": "Privateco", "user_profiles": "Profiloj de uzantoj", "hide_favorites_description": "Ne montri liston de miaj ŝatatoj (oni tamen sciiĝas)", "conversation_display_tree": "Arba stilo", "conversation_display_tree_quick": "Arba vido", - "show_scrollbars": "Montri rulumajn bretojn de flankaj kolumnoj", + "show_scrollbars": "Montri rulumskalojn de flankaj kolumnoj", "third_column_mode_none": "Neniam montri trian kolumnon", "third_column_mode_notifications": "Kolumno de sciigoj", "columns": "Kolumnoj", @@ -644,9 +647,9 @@ "column_sizes_notifs": "Sciigoj", "tree_advanced": "Permesi pli flekseblan navigadon en arba vido", "conversation_display_linear": "Linia stilo", - "conversation_other_replies_button": "Montri la butonon «aliaj respondoj»", - "conversation_other_replies_button_below": "Sub statoj", - "conversation_other_replies_button_inside": "En statoj", + "conversation_other_replies_button": "Montri la butonon pri «aliaj respondoj»", + "conversation_other_replies_button_below": "Sub afiŝoj", + "conversation_other_replies_button_inside": "En afiŝoj", "max_depth_in_thread": "Maksimuma nombro de niveloj implicite montrataj en fadeno", "auto_update": "Montri novajn afiŝojn memage", "use_at_icon": "Montri simbolon {'@'} kiel bildon anstataŭ teksto", @@ -662,19 +665,20 @@ "user_popover_avatar_action_open": "Malfermi la profilon", "user_popover_avatar_overlay": "Aperigi ŝprucaĵon pri uzanto sur profilbildo", "show_yous": "Montri la markon «(Vi)»", - "user_popover_avatar_action_zoom": "Zomi la profilbildon" + "user_popover_avatar_action_zoom": "Zomi la profilbildon", + "third_column_mode": "Kun sufiĉo da spaco, montri trian kolumnon kun" }, "timeline": { "collapse": "Maletendi", "conversation": "Interparolo", "error_fetching": "Eraris ĝisdatigo", - "load_older": "Montri pli malnovajn statojn", + "load_older": "Montri pli malnovajn afiŝojn", "no_retweet_hint": "Afiŝo estas markita kiel rekta aŭ nur por abonantoj, kaj ne eblas ĝin ripeti", "repeated": "ripetis", "show_new": "Montri novajn", "up_to_date": "Ĝisdata", - "no_more_statuses": "Neniuj pliaj statoj", - "no_statuses": "Neniuj statoj", + "no_more_statuses": "Neniuj pliaj afiŝoj", + "no_statuses": "Neniuj afiŝoj", "reload": "Enlegi ree", "error": "Eraris akirado de historio: {0}", "socket_reconnected": "Realtempa konekto fariĝis", @@ -700,7 +704,7 @@ "muted": "Silentigita", "per_day": "tage", "remote_follow": "Fore aboni", - "statuses": "Statoj", + "statuses": "Afiŝoj", "unblock": "Malbloki", "unblock_progress": "Malblokante…", "block_progress": "Blokante…", @@ -744,7 +748,12 @@ "edit_profile": "Redakti profilon", "deactivated": "Malaktiva", "follow_cancel": "Nuligi peton", - "remove_follower": "Forigi abonanton" + "remove_follower": "Forigi abonanton", + "note": "Noto", + "note_blank": "(Neniu)", + "edit_note_apply": "Apliki", + "edit_note_cancel": "Nuligi", + "edit_note": "Redakti noton" }, "user_profile": { "timeline_title": "Historio de uzanto", @@ -764,7 +773,9 @@ "bookmark": "Legosigno", "reject_follow_request": "Rifuzi abonpeton", "accept_follow_request": "Akcepti abonpeton", - "add_reaction": "Aldoni reagon" + "add_reaction": "Aldoni reagon", + "toggle_expand": "Etendi aŭ maletendi sciigon por montri plenan afiŝon", + "toggle_mute": "Etendi aŭ maletendi afiŝon por montri silentigitan enhavon" }, "upload": { "error": { @@ -893,19 +904,19 @@ "show_full_subject": "Montri plenan temon", "thread_muted_and_words": ", enhavas vortojn:", "thread_muted": "Fadeno silentigita", - "copy_link": "Kopii ligilon al stato", - "status_unavailable": "Stato ne estas disponebla", + "copy_link": "Kopii ligilon al afiŝo", + "status_unavailable": "Afiŝo ne estas disponebla", "unmute_conversation": "Malsilentigi interparolon", "mute_conversation": "Silentigi interparolon", "replies_list": "Respondoj:", "reply_to": "Responde al", - "delete_confirm": "Ĉu vi certe volas forigi ĉi tiun staton?", + "delete_confirm": "Ĉu vi certe volas forigi ĉi tiun afiŝon?", "unbookmark": "Senlegosigni", "bookmark": "Legosigni", "pinned": "Fiksita", "unpin": "Malfiksi de profilo", "pin": "Fiksi al profilo", - "delete": "Forigi staton", + "delete": "Forigi afiŝon", "repeats": "Ripetoj", "favorites": "Ŝatoj", "status_deleted": "Ĉi tiu afiŝo foriĝis", @@ -939,7 +950,8 @@ "ancestor_follow_with_icon": "{icon} {text}", "show_all_conversation_with_icon": "{icon} {text}", "show_only_conversation_under_this": "Montri nur respondojn al ĉi tiu afiŝo", - "status_history": "Historio de afiŝo" + "status_history": "Historio de afiŝo", + "open_gallery": "Malfermi galerion" }, "time": { "years_short": "{0}j", @@ -996,7 +1008,9 @@ "no_results": "Neniuj rezultoj", "people_talking": "{count} personoj parolas", "person_talking": "{count} persono parolas", - "hashtags": "Kradvortoj" + "hashtags": "Kradvortoj", + "no_more_results": "Neniuj pliaj rezultoj", + "load_more": "Enlegi pliajn rezultojn" }, "display_date": { "today": "Hodiaŭ" @@ -1047,9 +1061,9 @@ "report": { "reporter": "Raportinto:", "reported_user": "Raportito:", - "reported_statuses": "Raportitaj statoj:", + "reported_statuses": "Raportitaj afiŝoj:", "notes": "Notoj:", - "state": "Stato:", + "state": "Afiŝo:", "state_open": "Malfermita", "state_closed": "Fermita", "state_resolved": "Solvita" -- cgit v1.2.3-70-g09d2 From 5e98ee05e4a163b9c939f6186b2e1d42cb852d4b Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 30 Dec 2022 16:26:50 -0500 Subject: Fix list membership actions --- src/components/lists_edit/lists_edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/lists_edit/lists_edit.js b/src/components/lists_edit/lists_edit.js index c22d1323..c33659df 100644 --- a/src/components/lists_edit/lists_edit.js +++ b/src/components/lists_edit/lists_edit.js @@ -95,10 +95,10 @@ const ListsNew = { return this.addedUserIds.has(user.id) }, addUser (user) { - this.$store.dispatch('addListAccount', { accountId: this.user.id, listId: this.id }) + this.$store.dispatch('addListAccount', { accountId: user.id, listId: this.id }) }, removeUser (userId) { - this.$store.dispatch('removeListAccount', { accountId: this.user.id, listId: this.id }) + this.$store.dispatch('removeListAccount', { accountId: userId, listId: this.id }) }, onSearchLoading (results) { this.searchLoading = true -- cgit v1.2.3-70-g09d2 From 876e51603a03dab45b5572bb014f2135bd4ad3e1 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 31 Dec 2022 12:29:33 -0500 Subject: Include unpacked emojis in emoji picker --- src/components/emoji_picker/emoji_picker.js | 6 ++++- src/i18n/en.json | 1 + src/modules/instance.js | 36 +++++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index dd5e5217..2838e102 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -287,7 +287,11 @@ const EmojiPicker = { return 0 }, allCustomGroups () { - return this.$store.getters.groupedCustomEmojis + const emojis = this.$store.getters.groupedCustomEmojis + if (emojis.unpacked) { + emojis.unpacked.text = this.$t('emoji.unpacked') + } + return emojis }, defaultGroup () { return Object.keys(this.allCustomGroups)[0] diff --git a/src/i18n/en.json b/src/i18n/en.json index 59ee1c17..b91f0b10 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -225,6 +225,7 @@ "search_emoji": "Search for an emoji", "add_emoji": "Insert emoji", "custom": "Custom emoji", + "unpacked": "Unpacked emoji", "unicode": "Unicode emoji", "unicode_groups": { "activities": "Activities", diff --git a/src/modules/instance.js b/src/modules/instance.js index 3b15e62e..8e8d13d3 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -181,15 +181,28 @@ const instance = { }, groupedCustomEmojis (state) { const packsOf = emoji => { - return emoji.tags + const packs = emoji.tags .filter(k => k.startsWith('pack:')) - .map(k => k.slice(5)) // remove 'pack:' prefix + .map(k => { + const packName = k.slice(5) // remove 'pack:' prefix + return { + id: `custom-${packName}`, + text: packName + } + }) + + if (!packs.length) { + return [{ + id: 'unpacked' + }] + } else { + return packs + } } return state.customEmoji .reduce((res, emoji) => { - packsOf(emoji).forEach(packName => { - const packId = `custom-${packName}` + packsOf(emoji).forEach(({ id: packId, text: packName }) => { if (!res[packId]) { res[packId] = ({ id: packId, @@ -290,9 +303,22 @@ const instance = { const lb = b.toLowerCase() return la > lb ? 1 : (la < lb ? -1 : 0) } + const noPackLast = (a, b) => { + const aNull = a === '' + const bNull = b === '' + if (aNull === bNull) { + return 0 + } else if (aNull && !bNull) { + return 1 + } else { + return -1 + } + } const byPackThenByName = (a, b) => { const packOf = emoji => (emoji.tags.filter(k => k.startsWith('pack:'))[0] || '').slice(5) - return caseInsensitiveStrCmp(packOf(a), packOf(b)) || caseInsensitiveStrCmp(a.displayText, b.displayText) + const packOfA = packOf(a) + const packOfB = packOf(b) + return noPackLast(packOfA, packOfB) || caseInsensitiveStrCmp(packOfA, packOfB) || caseInsensitiveStrCmp(a.displayText, b.displayText) } const emoji = Object.entries(values).map(([key, value]) => { -- cgit v1.2.3-70-g09d2 From 1120eb369421d121db33535c0445689c0b371cb2 Mon Sep 17 00:00:00 2001 From: Dmytro Poltavchenko Date: Fri, 30 Dec 2022 22:52:42 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 87.9% (811 of 922 strings) Translation: Pleroma/Pleroma-FE Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/uk/ --- src/i18n/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/i18n/uk.json b/src/i18n/uk.json index 99b49868..2110548c 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -956,7 +956,8 @@ "show_all_conversation_with_icon": "{icon} {text}", "plus_more": "+{number} більше", "thread_show_full_with_icon": "{icon} {text}", - "show_only_conversation_under_this": "Показати всі відповіді на цей допис" + "show_only_conversation_under_this": "Показати всі відповіді на цей допис", + "status_history": "Історія змін" }, "timeline": { "no_more_statuses": "Більше немає дописів", -- cgit v1.2.3-70-g09d2 From cf2b44acfd4e8e29c5a1ce230544d113a670a2b8 Mon Sep 17 00:00:00 2001 From: Ihor Andreew Date: Mon, 2 Jan 2023 10:33:26 +0000 Subject: Translated using Weblate (Ukrainian) Currently translated at 90.4% (834 of 922 strings) Translation: Pleroma/Pleroma-FE Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/uk/ --- src/i18n/uk.json | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/i18n/uk.json b/src/i18n/uk.json index 2110548c..c781b1f6 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -188,7 +188,8 @@ "mobile_sidebar": "Ввімкнути бокову панель", "mobile_notifications": "Відкрити сповіщення (є непрочитані)", "mobile_notifications_close": "Закрити сповіщення", - "edit_nav_mobile": "Редагувати панель навігації" + "edit_nav_mobile": "Редагувати панель навігації", + "announcements": "Анонси" }, "media_modal": { "next": "Наступна", @@ -735,7 +736,10 @@ "hide_favorites_description": "Не показувати список моїх вподобань (люди все одно отримують сповіщення)", "third_column_mode": "Коли достатньо місця, показувати третю колонку, що містить", "user_popover_avatar_action_open": "Відкрити профіль", - "wordfilter": "Фільтр слів" + "wordfilter": "Фільтр слів", + "mention_links": "Посилання для згадування", + "user_profiles": "Профілі користувачів", + "notification_visibility_polls": "Закінчення опитувань, в яких ви проголосували" }, "selectable_list": { "select_all": "Вибрати все" @@ -997,5 +1001,26 @@ "reported_statuses": "Дописи, на які подано скаргу:", "reporter": "Позивач:", "reported_user": "Відповідач:" + }, + "announcements": { + "delete_action": "Видалити", + "page_header": "Анонси", + "title": "Анонси", + "mark_as_read_action": "Позначити як прочитане", + "post_form_header": "Розмістити оголошення", + "post_placeholder": "Введіть текст вашого оголошення тут...", + "post_action": "Пост", + "post_error": "Помилка: {error}", + "close_error": "Закрити", + "start_time_prompt": "Початок: ", + "end_time_prompt": "Кінець: ", + "all_day_prompt": "Це захід на цілий день", + "published_time_display": "Опубліковано в {time}", + "start_time_display": "Початок о {time}", + "end_time_display": "Кінець о {time}", + "edit_action": "Редагувати", + "submit_edit_action": "Надіслати", + "cancel_edit_action": "Скасувати", + "inactive_message": "Це оголошення неактивне" } } -- cgit v1.2.3-70-g09d2 From 78081836dfa40abdb587dcbca59d339a27e23fb2 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 24 Dec 2022 12:43:30 -0500 Subject: Remove lozad code --- src/components/emoji_picker/emoji_picker.js | 40 ---------------------------- src/components/emoji_picker/emoji_picker.vue | 4 +-- src/components/still-image/still-image.js | 3 ++- src/components/still-image/still-image.vue | 1 + 4 files changed, 5 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 2838e102..68240fd8 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -3,7 +3,6 @@ import Checkbox from '../checkbox/checkbox.vue' import Popover from 'src/components/popover/popover.vue' import StillImage from '../still-image/still-image.vue' import { ensureFinalFallback } from '../../i18n/languages.js' -import lozad from 'lozad' import { library } from '@fortawesome/fontawesome-svg-core' import { faBoxOpen, @@ -125,9 +124,6 @@ const EmojiPicker = { setGroupRef (name) { return el => { this.groupRefs[name] = el } }, - setEmojiRef (name) { - return el => { this.emojiRefs[name] = el } - }, onPopoverShown () { this.$emit('show') }, @@ -208,43 +204,12 @@ const EmojiPicker = { filterByKeyword (list, keyword) { return filterByKeyword(list, keyword, this.languages, this.maybeLocalizedEmojiName) }, - initializeLazyLoad () { - this.destroyLazyLoad() - this.$nextTick(() => { - this.$lozad = lozad('.still-image.emoji-picker-emoji', { - load: el => { - const name = el.getAttribute('data-emoji-name') - const vn = this.emojiRefs[name] - if (!vn) { - return - } - - vn.loadLazy() - } - }) - this.$lozad.observe() - }) - }, - waitForDomAndInitializeLazyLoad () { - this.$nextTick(() => this.initializeLazyLoad()) - }, - destroyLazyLoad () { - if (this.$lozad) { - if (this.$lozad.observer) { - this.$lozad.observer.disconnect() - } - if (this.$lozad.mutationObserver) { - this.$lozad.mutationObserver.disconnect() - } - } - }, onShowing () { const oldContentLoaded = this.contentLoaded this.$nextTick(() => { this.$refs.search.focus() }) this.contentLoaded = true - this.waitForDomAndInitializeLazyLoad() this.filteredEmojiGroups = this.getFilteredEmojiGroups() if (!oldContentLoaded) { this.$nextTick(() => { @@ -269,13 +234,9 @@ const EmojiPicker = { this.debouncedHandleKeywordChange() }, allCustomGroups () { - this.waitForDomAndInitializeLazyLoad() this.filteredEmojiGroups = this.getFilteredEmojiGroups() } }, - destroyed () { - this.destroyLazyLoad() - }, computed: { activeGroupView () { return this.showingStickers ? '' : this.activeGroup @@ -314,7 +275,6 @@ const EmojiPicker = { }, debouncedHandleKeywordChange () { return debounce(() => { - this.waitForDomAndInitializeLazyLoad() this.filteredEmojiGroups = this.getFilteredEmojiGroups() }, 500) }, diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index ff56d637..d0b7fe8f 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -104,9 +104,9 @@ >{{ emoji.replacement }} diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 200ef147..56fd2fd9 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -8,7 +8,8 @@ const StillImage = { 'alt', 'height', 'width', - 'dataSrc' + 'dataSrc', + 'loading' ], data () { return { diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index 633fb229..d015e138 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -17,6 +17,7 @@ :data-src="dataSrc" :src="realSrc" :referrerpolicy="referrerpolicy" + :loading="loading" @load="onLoad" @error="onError" > -- cgit v1.2.3-70-g09d2 From afd7f5fabe58dc08a5a6e35e923e2e8fd71926dc Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 24 Dec 2022 13:48:36 -0500 Subject: Use virtual scrolling for emoji picker --- package.json | 1 + src/boot/after_store.js | 3 + src/components/emoji_picker/emoji_picker.js | 33 ++++------- src/components/emoji_picker/emoji_picker.scss | 1 + src/components/emoji_picker/emoji_picker.vue | 79 +++++++++++++++------------ yarn.lock | 24 ++++++++ 6 files changed, 83 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/package.json b/package.json index 231a93ad..a32f93a4 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "vue-i18n": "9.2.2", "vue-router": "4.1.6", "vue-template-compiler": "2.7.14", + "vue-virtual-scroller": "^2.0.0-beta.7", "vuex": "4.1.0" }, "devDependencies": { diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 7a4672b6..1fa9dd2a 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -1,6 +1,8 @@ import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import vClickOutside from 'click-outside-vue3' +import VueVirtualScroller from 'vue-virtual-scroller' +import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' import { FontAwesomeIcon, FontAwesomeLayers } from '@fortawesome/vue-fontawesome' @@ -397,6 +399,7 @@ const afterStoreSetup = async ({ store, i18n }) => { app.use(vClickOutside) app.use(VBodyScrollLock) + app.use(VueVirtualScroller) app.component('FAIcon', FontAwesomeIcon) app.component('FALayers', FontAwesomeLayers) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 68240fd8..c87dea7e 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -143,22 +143,13 @@ const EmojiPicker = { } this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen }) }, - onScroll (e) { - const target = (e && e.target) || this.$refs['emoji-groups'] - this.updateScrolledClass(target) - this.scrolledGroup(target) + onScroll (startIndex, endIndex, visibleStartIndex, visibleEndIndex) { + const current = this.filteredEmojiGroups[visibleStartIndex].id + this.scrolledGroup(current) }, - scrolledGroup (target) { - const top = target.scrollTop + 5 - this.$nextTick(() => { - this.allEmojiGroups.forEach(group => { - const ref = this.groupRefs['group-' + group.id] - if (ref && ref.offsetTop <= top) { - this.activeGroup = group.id - } - }) - this.scrollHeader() - }) + scrolledGroup (groupId) { + this.activeGroup = groupId + this.scrollHeader() }, scrollHeader () { // Scroll the active tab's header into view @@ -177,14 +168,9 @@ const EmojiPicker = { setScroll(right + margin - headerCont.clientWidth) } }, - highlight (key) { - const ref = this.groupRefs['group-' + key] - const top = ref.offsetTop + highlight (index) { this.setShowStickers(false) - this.activeGroup = key - this.$nextTick(() => { - this.$refs['emoji-groups'].scrollTop = top + 1 - }) + this.$refs['emoji-groups'].scrollToItem(index) }, updateScrolledClass (target) { if (target.scrollTop <= 5) { @@ -238,6 +224,9 @@ const EmojiPicker = { } }, computed: { + minItemSize () { + return 32 + }, activeGroupView () { return this.showingStickers ? '' : this.activeGroup }, diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index 53363ec1..dda12197 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -74,6 +74,7 @@ $emoji-picker-emoji-size: 32px; } .emoji-groups { + height: 100%; min-height: 200px; } diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index d0b7fe8f..15cdb704 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -13,7 +13,7 @@ class="emoji-tabs" >
-
-
-
- {{ group.text }} -
- + - {{ emoji.replacement }} - - - -
-
+
+
+ {{ group.text }} +
+ + {{ emoji.replacement }} + + +
+ + +
{{ $t('emoji.keep_open') }} diff --git a/yarn.lock b/yarn.lock index dc2050ca..7b45ee14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6370,6 +6370,11 @@ minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +mitt@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230" + integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg== + mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -8805,6 +8810,16 @@ vue-loader@17.0.1: hash-sum "^2.0.0" loader-utils "^2.0.0" +vue-observe-visibility@^2.0.0-alpha.1: + version "2.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/vue-observe-visibility/-/vue-observe-visibility-2.0.0-alpha.1.tgz#1e4eda7b12562161d58984b7e0dea676d83bdb13" + integrity sha512-flFbp/gs9pZniXR6fans8smv1kDScJ8RS7rEpMjhVabiKeq7Qz3D9+eGsypncjfIyyU84saU88XZ0zjbD6Gq/g== + +vue-resize@^2.0.0-alpha.1: + version "2.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-2.0.0-alpha.1.tgz#43eeb79e74febe932b9b20c5c57e0ebc14e2df3a" + integrity sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg== + vue-router@4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.6.tgz#b70303737e12b4814578d21d68d21618469375a1" @@ -8828,6 +8843,15 @@ vue-template-compiler@2.7.14: de-indent "^1.0.2" he "^1.2.0" +vue-virtual-scroller@^2.0.0-beta.7: + version "2.0.0-beta.7" + resolved "https://registry.yarnpkg.com/vue-virtual-scroller/-/vue-virtual-scroller-2.0.0-beta.7.tgz#4ea8158638c84b2033b001a8b26c5fcb6896b271" + integrity sha512-OrouVj1i2939jaLjVfu8f5fsDlbzhAb4bOsYZYrAkpcVLylAmMoGtIL7eT3hJrdTiaKbwQpRdnv7DKf9Fn+tHg== + dependencies: + mitt "^2.1.0" + vue-observe-visibility "^2.0.0-alpha.1" + vue-resize "^2.0.0-alpha.1" + vue@3.2.45: version "3.2.45" resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.45.tgz#94a116784447eb7dbd892167784619fef379b3c8" -- cgit v1.2.3-70-g09d2 From 314a4474f6475435cfac7e5e02862015a9455660 Mon Sep 17 00:00:00 2001 From: tusooa Date: Mon, 2 Jan 2023 12:40:03 -0500 Subject: Fix header indicator --- src/components/emoji_picker/emoji_picker.js | 28 ++++++++++++++++++++++++---- src/components/emoji_picker/emoji_picker.vue | 2 ++ 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index c87dea7e..9c97e16c 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -81,6 +81,13 @@ const filterByKeyword = (list, keyword = '', languages, nameLocalizer) => { return orderedEmojiList.flat() } +const getOffset = (elem) => { + const style = elem.style.transform + const res = /translateY\((\d+)px\)/.exec(style) + if (!res) { return 0 } + return res[1] +} + const EmojiPicker = { props: { enableStickerPicker: { @@ -144,12 +151,25 @@ const EmojiPicker = { this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen }) }, onScroll (startIndex, endIndex, visibleStartIndex, visibleEndIndex) { + console.log('onScroll', startIndex, endIndex, visibleStartIndex, visibleEndIndex) const current = this.filteredEmojiGroups[visibleStartIndex].id - this.scrolledGroup(current) + const target = this.$refs['emoji-groups'].$el + this.scrolledGroup(target, current, visibleStartIndex, visibleEndIndex) }, - scrolledGroup (groupId) { - this.activeGroup = groupId - this.scrollHeader() + scrolledGroup (target, groupId, start, end) { + const top = target.scrollTop + 5 + this.$nextTick(() => { + this.filteredEmojiGroups.slice(start, end + 1).forEach(group => { + const ref = this.groupRefs['group-' + group.id] + if (!ref) { return } + const elem = ref.$el.parentElement + if (!elem) { return } + if (elem && getOffset(elem) <= top) { + this.activeGroup = group.id + } + }) + this.scrollHeader() + }) }, scrollHeader () { // Scroll the active tab's header into view diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index 15cdb704..78da4808 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -80,10 +80,12 @@ :class="groupsScrolledClass" :min-item-size="minItemSize" :items="filteredEmojiGroups" + :emit-update="true" @update="onScroll" > diff --git a/src/modules/config.js b/src/modules/config.js index 3cd6888f..a8949030 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -78,6 +78,12 @@ export const defaultState = { minimalScopesMode: undefined, // instance default // This hides statuses filtered via a word filter hideFilteredStatuses: undefined, // instance default + modalOnRepeat: undefined, // instance default + modalOnUnfollow: undefined, // instance default + modalOnBlock: undefined, // instance default + modalOnMute: undefined, // instance default + modalOnDelete: undefined, // instance default + modalOnLogout: undefined, // instance default playVideosInModal: false, useOneClickNsfw: false, useContainFit: true, diff --git a/src/modules/instance.js b/src/modules/instance.js index 8e8d13d3..6fc3830c 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -71,6 +71,12 @@ const defaultState = { hideSitename: false, hideUserStats: false, muteBotStatuses: false, + modalOnRepeat: false, + modalOnUnfollow: false, + modalOnBlock: true, + modalOnMute: false, + modalOnDelete: true, + modalOnLogout: true, loginMethod: 'password', logo: '/static/logo.svg', logoMargin: '.2em', -- cgit v1.2.3-70-g09d2 From 1e352fbfacddc205397153bf5087484d550129e6 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:05:21 -0500 Subject: Add English translations for delete status confirm modal --- src/components/extra_buttons/extra_buttons.js | 2 +- src/i18n/en.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index b1458d30..48b960b2 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -59,7 +59,7 @@ const ExtraButtons = { }, doDeleteStatus () { this.$store.dispatch('deleteStatus', { id: this.status.id }) - hideDeleteStatusConfirmDialog() + this.hideDeleteStatusConfirmDialog() }, showDeleteStatusConfirmDialog () { this.showingDeleteDialog = true diff --git a/src/i18n/en.json b/src/i18n/en.json index 1ee1147a..b2bec692 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -852,6 +852,9 @@ "bookmark": "Bookmark", "unbookmark": "Unbookmark", "delete_confirm": "Do you really want to delete this status?", + "delete_confirm_title": "Delete confirmation", + "delete_confirm_accept_button": "Delete", + "delete_confirm_cancel_button": "Keep", "reply_to": "Reply to", "mentions": "Mentions", "replies_list": "Replies:", -- cgit v1.2.3-70-g09d2 From 1ff2948aeb485ef48a4add6310ba8fb9d43d262c Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:17:06 -0500 Subject: Add setting entries for whether to show confirmation dialogs --- src/components/settings_modal/tabs/general_tab.vue | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src') diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 582cb288..906c3758 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -148,6 +148,41 @@
+
  • + {{ $t('settings.confirm_dialogs') }} +
      +
    • + + {{ $t('settings.confirm_dialogs_repeat') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_unfollow') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_block') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_mute') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_delete') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_logout') }} + +
    • +
    +
  • -- cgit v1.2.3-70-g09d2 From f8b522e36dd08a08cd7071c30b5e4e61832275aa Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:17:49 -0500 Subject: Add English translations for setting entries --- src/i18n/en.json | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index b2bec692..ed21e2a5 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -416,6 +416,13 @@ "composing": "Composing", "confirm_new_password": "Confirm new password", "current_password": "Current password", + "confirm_dialogs": "Ask for confirmation when", + "confirm_dialogs_repeat": "repeating a status", + "confirm_dialogs_unfollow": "unfollowing a user", + "confirm_dialogs_block": "blocking a user", + "confirm_dialogs_mute": "muting a user", + "confirm_dialogs_delete": "deleting a status", + "confirm_dialogs_logout": "logging out", "mutes_and_blocks": "Mutes and Blocks", "data_import_export_tab": "Data import / export", "default_vis": "Default visibility scope", -- cgit v1.2.3-70-g09d2 From 4d175235f1bc72c369c5e5fc8ed1997b384c0b83 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:49:39 -0500 Subject: Add confirmation for repeating --- src/components/retweet_button/retweet_button.js | 24 +++++++++++++++++++++++- src/components/retweet_button/retweet_button.vue | 10 ++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js index 4d92b5fa..198b6c14 100644 --- a/src/components/retweet_button/retweet_button.js +++ b/src/components/retweet_button/retweet_button.js @@ -1,3 +1,4 @@ +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faRetweet, @@ -15,13 +16,24 @@ library.add( const RetweetButton = { props: ['status', 'loggedIn', 'visibility'], + components: { + ConfirmModal + }, data () { return { - animated: false + animated: false, + showingConfirmDialog: false } }, methods: { retweet () { + if (!this.status.repeated && this.shouldConfirmRepeat) { + this.showConfirmDialog() + } else { + this.doRetweet() + } + }, + doRetweet () { if (!this.status.repeated) { this.$store.dispatch('retweet', { id: this.status.id }) } else { @@ -31,6 +43,13 @@ const RetweetButton = { setTimeout(() => { this.animated = false }, 500) + this.hideConfirmDialog() + }, + showConfirmDialog () { + this.showingConfirmDialog = true + }, + hideConfirmDialog () { + this.showingConfirmDialog = false } }, computed: { @@ -39,6 +58,9 @@ const RetweetButton = { }, remoteInteractionLink () { return this.$store.getters.remoteInteractionLink({ statusId: this.status.id }) + }, + shouldConfirmRepeat () { + return this.mergedConfig.modalOnRepeat } } } diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 7700ee0d..38d4dc3f 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,6 +59,16 @@ > {{ status.repeat_num }} + + {{ $t('status.repeat_confirm') }} +
    -- cgit v1.2.3-70-g09d2 From a0b886459bf5e146b8b7654d97ba8838bfac29de Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:50:04 -0500 Subject: Add confirmation for following --- src/components/follow_button/follow_button.js | 25 ++++++++++++++++- src/components/follow_button/follow_button.vue | 38 ++++++++++++++++++++------ 2 files changed, 53 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 3edbcb86..0a74a7a1 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -1,12 +1,20 @@ +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate' export default { props: ['relationship', 'user', 'labelFollowing', 'buttonClass'], + components: { + ConfirmModal + }, data () { return { - inProgress: false + inProgress: false, + showingConfirmUnfollow: false, } }, computed: { + shouldConfirmUnfollow () { + return this.$store.getters.mergedConfig.modalOnUnfollow + }, isPressed () { return this.inProgress || this.relationship.following }, @@ -35,6 +43,12 @@ export default { } }, methods: { + showConfirmUnfollow () { + this.showingConfirmUnfollow = true + }, + hideConfirmUnfollow () { + this.showingConfirmUnfollow = false + }, onClick () { this.relationship.following || this.relationship.requested ? this.unfollow() : this.follow() }, @@ -45,12 +59,21 @@ export default { }) }, unfollow () { + if (this.shouldConfirmUnfollow) { + this.showConfirmUnfollow() + } else { + this.doUnfollow() + } + }, + doUnfollow () { const store = this.$store this.inProgress = true requestUnfollow(this.relationship.id, store).then(() => { this.inProgress = false store.commit('removeStatus', { timeline: 'friends', userId: this.relationship.id }) }) + + this.hideConfirmUnfollow() } } } diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 965d5256..4fc2233a 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,13 +1,33 @@ -- cgit v1.2.3-70-g09d2 From 0684f19d1b903a7d941aa7cfa366044b98d97659 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:50:25 -0500 Subject: Add ConfirmModal comp --- src/components/confirm_modal/confirm_modal.js | 42 ++++++++++++++++++++++++++ src/components/confirm_modal/confirm_modal.vue | 28 +++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/components/confirm_modal/confirm_modal.js create mode 100644 src/components/confirm_modal/confirm_modal.vue (limited to 'src') diff --git a/src/components/confirm_modal/confirm_modal.js b/src/components/confirm_modal/confirm_modal.js new file mode 100644 index 00000000..bb5e9d97 --- /dev/null +++ b/src/components/confirm_modal/confirm_modal.js @@ -0,0 +1,42 @@ +import DialogModal from '../dialog_modal/dialog_modal.vue' + +/** + * This component emits the following events: + * cancelled, emitted when the action should not be performed; + * accepted, emitted when the action should be performed; + * + * The caller should close this dialog after receiving any of the two events. + */ +const ConfirmModal = { + components: { + DialogModal + }, + data: { + }, + props: { + showing: { + type: Boolean + }, + title: { + type: String + }, + cancelText: { + type: String + }, + confirmText: { + type: String + } + }, + computed: { + }, + methods: { + onCancel () { + this.$emit('cancelled') + }, + onAccept () { + this.$emit('accepted') + } + } +} + +export default ConfirmModal diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue new file mode 100644 index 00000000..250a6984 --- /dev/null +++ b/src/components/confirm_modal/confirm_modal.vue @@ -0,0 +1,28 @@ + + + -- cgit v1.2.3-70-g09d2 From a0c6d642af277954585b32724de4f2b157b02e42 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:08:47 -0500 Subject: Add English translations for repeat and unfollow confirmation --- src/i18n/en.json | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index ed21e2a5..7e23a849 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -850,6 +850,10 @@ "status": { "favorites": "Favorites", "repeats": "Repeats", + "repeat_confirm": "Do you really want to repeat this status?", + "repeat_confirm_title": "Repeat confirmation", + "repeat_confirm_accept_button": "Repeat", + "repeat_confirm_cancel_button": "Do not repeat", "delete": "Delete status", "edit": "Edit status", "edited_at": "(last edited {time})", @@ -919,6 +923,10 @@ "follow_sent": "Request sent!", "follow_progress": "Requesting…", "follow_unfollow": "Unfollow", + "unfollow_confirm_title": "Unfollow confirmation", + "unfollow_confirm": "Do you really want to unfollow {user}?", + "unfollow_confirm_accept_button": "Unfollow", + "unfollow_confirm_cancel_button": "Do not unfollow", "followees": "Following", "followers": "Followers", "following": "Following!", -- cgit v1.2.3-70-g09d2 From e7e35ead09589e1673dd6b6fdd24f7679ef108bf Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:21:19 -0500 Subject: Add confirmation for muting --- src/components/user_card/user_card.js | 24 ++++++++++++++++++++++-- src/components/user_card/user_card.vue | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 67879307..1bcc4341 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -8,6 +8,7 @@ import UserNote from '../user_note/user_note.vue' import Select from '../select/select.vue' import UserLink from '../user_link/user_link.vue' import RichContent from 'src/components/rich_content/rich_content.jsx' +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import { mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' @@ -46,7 +47,8 @@ export default { data () { return { followRequestInProgress: false, - betterShadow: this.$store.state.interface.browserSupport.cssFilter + betterShadow: this.$store.state.interface.browserSupport.cssFilter, + showingConfirmMute: false } }, created () { @@ -137,6 +139,9 @@ export default { supportsNote () { return 'note' in this.relationship }, + shouldConfirmMute () { + return this.mergedConfig.modalOnMute + }, ...mapGetters(['mergedConfig']) }, components: { @@ -149,11 +154,26 @@ export default { Select, RichContent, UserLink, - UserNote + UserNote, + ConfirmModal }, methods: { + showConfirmMute () { + this.showingConfirmMute = true + }, + hideConfirmMute () { + this.showingConfirmMute = false + }, muteUser () { + if (!this.shouldConfirmMute) { + this.doMuteUser() + } else { + this.showConfirmMute() + } + }, + doMuteUser () { this.$store.dispatch('muteUser', this.user.id) + this.hideConfirmMute() }, unmuteUser () { this.$store.dispatch('unmuteUser', this.user.id) diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 349c7cb1..fac900a9 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,6 +314,24 @@ :handle-links="true" />
    + + + + +
    -- cgit v1.2.3-70-g09d2 From c032b48219ba601df5dabc7fd271444fe7db0321 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:21:30 -0500 Subject: Add English translation for mute confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index 7e23a849..fa359f88 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -938,6 +938,10 @@ "message": "Message", "mute": "Mute", "muted": "Muted", + "mute_confirm_title": "Mute confirmation", + "mute_confirm": "Do you really want to mute {user}?", + "mute_confirm_accept_button": "Mute", + "mute_confirm_cancel_button": "Do not mute", "per_day": "per day", "remote_follow": "Remote follow", "remove_follower": "Remove follower", -- cgit v1.2.3-70-g09d2 From 3b7aaae2b366abe1162c22a29918336c4210446f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:26:30 -0500 Subject: Add confirmation for blocking --- src/components/account_actions/account_actions.js | 25 ++++++++++++++++++++-- src/components/account_actions/account_actions.vue | 18 ++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index c23407f9..7dec0c3d 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -2,6 +2,7 @@ import { mapState } from 'vuex' import ProgressButton from '../progress_button/progress_button.vue' import Popover from '../popover/popover.vue' import UserListMenu from 'src/components/user_list_menu/user_list_menu.vue' +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faEllipsisV @@ -16,14 +17,23 @@ const AccountActions = { 'user', 'relationship' ], data () { - return { } + return { + showingConfirmBlock: false + } }, components: { ProgressButton, Popover, - UserListMenu + UserListMenu, + ConfirmModal }, methods: { + showConfirmBlock () { + this.showingConfirmBlock = true + }, + hideConfirmBlock () { + this.showingConfirmBlock = false + }, showRepeats () { this.$store.dispatch('showReblogs', this.user.id) }, @@ -31,7 +41,15 @@ const AccountActions = { this.$store.dispatch('hideReblogs', this.user.id) }, blockUser () { + if (!this.shouldConfirmBlock) { + this.doBlockUser() + } else { + this.showConfirmBlock() + } + }, + doBlockUser () { this.$store.dispatch('blockUser', this.user.id) + this.hideConfirmBlock() }, unblockUser () { this.$store.dispatch('unblockUser', this.user.id) @@ -50,6 +68,9 @@ const AccountActions = { } }, computed: { + shouldConfirmBlock () { + return this.$store.getters.mergedConfig.modalOnBlock + }, ...mapState({ pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable }) diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 973a5935..dfe1f706 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,6 +74,24 @@ + + + + + -- cgit v1.2.3-70-g09d2 From 0bfe100ef77ca36e2789310b204987ea54ec2696 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:26:42 -0500 Subject: Add English translation for block confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index fa359f88..1dec4b90 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -914,6 +914,10 @@ "approve": "Approve", "block": "Block", "blocked": "Blocked!", + "block_confirm_title": "Block confirmation", + "block_confirm": "Do you really want to block {user}?", + "block_confirm_accept_button": "Block", + "block_confirm_cancel_button": "Do not block", "deactivated": "Deactivated", "deny": "Deny", "edit_profile": "Edit profile", -- cgit v1.2.3-70-g09d2 From c202c89ca0f8c9bc1957bff3bbe3ea39e21ddbba Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:51:13 -0500 Subject: Add confirmation for logout --- src/components/confirm_modal/confirm_modal.vue | 1 + src/components/desktop_nav/desktop_nav.js | 26 ++++++++++++++++++++++--- src/components/desktop_nav/desktop_nav.vue | 10 ++++++++++ src/components/mobile_nav/mobile_nav.js | 27 +++++++++++++++++++++++--- src/components/mobile_nav/mobile_nav.vue | 18 +++++++++++++++++ 5 files changed, 76 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 250a6984..fa354285 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -1,6 +1,7 @@ @@ -235,6 +245,14 @@ } } } + .confirm-modal.dark-overlay { + &::before { + z-index: 3000; + } + .dialog-modal.panel { + z-index: 3001; + } + } } -- cgit v1.2.3-70-g09d2 From 5c048321e787b880f4c228e52b956b59edc3fc4f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:51:32 -0500 Subject: Add English translation for logout confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index 1dec4b90..f7d83aa3 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -137,6 +137,10 @@ "login": "Log in", "description": "Log in with OAuth", "logout": "Log out", + "logout_confirm_title": "Logout confirmation", + "logout_confirm": "Do you really want to logout?", + "logout_confirm_accept_button": "Logout", + "logout_confirm_cancel_button": "Do not logout", "password": "Password", "placeholder": "e.g. lain", "register": "Register", -- cgit v1.2.3-70-g09d2 From 8c8a8232c8c23f706b82c03c7ddadbd94ca2f3df Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 17:03:17 -0500 Subject: Lint --- src/components/confirm_modal/confirm_modal.vue | 14 +++++++------- src/components/follow_button/follow_button.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index fa354285..59e46dc1 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -2,26 +2,26 @@ - + diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 0a74a7a1..443aa9bc 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -8,7 +8,7 @@ export default { data () { return { inProgress: false, - showingConfirmUnfollow: false, + showingConfirmUnfollow: false } }, computed: { -- cgit v1.2.3-70-g09d2 From 51ade260660b1a6586b5c0091d89c9701b684870 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Fri, 11 Feb 2022 10:18:20 -0500 Subject: Fix logout confirm dialog title --- src/components/desktop_nav/desktop_nav.vue | 2 +- src/components/mobile_nav/mobile_nav.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 7db94a37..0f5b3136 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -78,7 +78,7 @@ Date: Thu, 17 Mar 2022 00:06:26 -0400 Subject: Use portal for modals --- src/components/account_actions/account_actions.vue | 36 +++++++------- src/components/confirm_modal/confirm_modal.js | 5 -- src/components/confirm_modal/confirm_modal.vue | 1 - src/components/desktop_nav/desktop_nav.vue | 22 +++++---- src/components/extra_buttons/extra_buttons.vue | 22 +++++---- src/components/follow_button/follow_button.vue | 56 +++++++++++----------- src/components/mobile_nav/mobile_nav.vue | 22 +++++---- src/components/retweet_button/retweet_button.vue | 22 +++++---- src/components/user_card/user_card.vue | 36 +++++++------- 9 files changed, 114 insertions(+), 108 deletions(-) (limited to 'src') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index dfe1f706..273aac69 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,24 +74,26 @@ - - + - - - + + + + + diff --git a/src/components/confirm_modal/confirm_modal.js b/src/components/confirm_modal/confirm_modal.js index bb5e9d97..96ddc118 100644 --- a/src/components/confirm_modal/confirm_modal.js +++ b/src/components/confirm_modal/confirm_modal.js @@ -11,12 +11,7 @@ const ConfirmModal = { components: { DialogModal }, - data: { - }, props: { - showing: { - type: Boolean - }, title: { type: String }, diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 59e46dc1..5b5014c5 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -1,6 +1,5 @@ diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 293f6d68..4641947a 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,16 +165,18 @@ /> - - {{ $t('status.delete_confirm') }} - + + + {{ $t('status.delete_confirm') }} + + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 4fc2233a..5c799406 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,33 +1,33 @@ diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 0f23b7ac..6b6b8f21 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,16 +88,18 @@ ref="sideDrawer" :logout="logout" /> - - {{ $t('login.logout_confirm') }} - + + + {{ $t('login.logout_confirm') }} + + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 38d4dc3f..9ed24bd5 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,16 +59,18 @@ > {{ status.repeat_num }} - - {{ $t('status.repeat_confirm') }} - + + + {{ $t('status.repeat_confirm') }} + + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index fac900a9..5a848ead 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,24 +314,26 @@ :handle-links="true" /> - - + - - - + + + + + -- cgit v1.2.3-70-g09d2 From dc04c8cbd48dd8dcfc6b1937663e57983d38562a Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 14:54:58 -0400 Subject: Use vue3 teleport instead of portal --- src/components/account_actions/account_actions.vue | 4 ++-- src/components/desktop_nav/desktop_nav.vue | 4 ++-- src/components/extra_buttons/extra_buttons.vue | 4 ++-- src/components/follow_button/follow_button.vue | 4 ++-- src/components/mobile_nav/mobile_nav.vue | 4 ++-- src/components/retweet_button/retweet_button.vue | 4 ++-- src/components/user_card/user_card.vue | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 273aac69..fc303271 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,7 +74,7 @@ - + - + diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 18630385..92622cf9 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -76,7 +76,7 @@ - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 4641947a..c1c15c0f 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,7 +165,7 @@ /> - + {{ $t('status.delete_confirm') }} - + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 5c799406..b4567348 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -7,7 +7,7 @@ @click="onClick" > {{ label }} - + - + diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 6b6b8f21..6d826622 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,7 +88,7 @@ ref="sideDrawer" :logout="logout" /> - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 9ed24bd5..134fcb36 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,7 +59,7 @@ > {{ status.repeat_num }} - + {{ $t('status.repeat_confirm') }} - + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 5a848ead..856ed54b 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,7 +314,7 @@ :handle-links="true" /> - + - + -- cgit v1.2.3-70-g09d2 From 76d99c08d6740886b8c52ee4a0291706dc68ca3f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 15:02:21 -0400 Subject: Move modal out of vue tree --- index.html | 1 + src/App.vue | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/index.html b/index.html index 4af84a59..c02bf308 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@
    + + + + {{ $t('user_card.approve_confirm', { user: user.screen_name_ui }) }} + + + {{ $t('user_card.deny_confirm', { user: user.screen_name_ui }) }} + + diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 906c3758..9de3ed81 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -181,6 +181,16 @@ {{ $t('settings.confirm_dialogs_logout') }} +
  • + + {{ $t('settings.confirm_dialogs_approve_follow') }} + +
  • +
  • + + {{ $t('settings.confirm_dialogs_deny_follow') }} + +
  • diff --git a/src/modules/config.js b/src/modules/config.js index a8949030..1df279a2 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -84,6 +84,8 @@ export const defaultState = { modalOnMute: undefined, // instance default modalOnDelete: undefined, // instance default modalOnLogout: undefined, // instance default + modalOnApproveFollow: undefined, // instance default + modalOnDenyFollow: undefined, // instance default playVideosInModal: false, useOneClickNsfw: false, useContainFit: true, diff --git a/src/modules/instance.js b/src/modules/instance.js index 6fc3830c..fcb6eecc 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -77,6 +77,8 @@ const defaultState = { modalOnMute: false, modalOnDelete: true, modalOnLogout: true, + modalOnApproveFollow: false, + modalOnDenyFollow: false, loginMethod: 'password', logo: '/static/logo.svg', logoMargin: '.2em', -- cgit v1.2.3-70-g09d2 From 041bbb162299b896f5d0583c1ed4e8dcdc035c38 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Tue, 7 Jun 2022 12:37:38 -0400 Subject: Add English translation for accept & deny follow requests --- src/i18n/en.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/i18n/en.json b/src/i18n/en.json index fc0de3ac..213f9cf0 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -427,6 +427,8 @@ "confirm_dialogs_mute": "muting a user", "confirm_dialogs_delete": "deleting a status", "confirm_dialogs_logout": "logging out", + "confirm_dialogs_approve_follow": "approving a follower", + "confirm_dialogs_deny_follow": "denying a follower", "mutes_and_blocks": "Mutes and Blocks", "data_import_export_tab": "Data import / export", "default_vis": "Default visibility scope", @@ -916,6 +918,10 @@ }, "user_card": { "approve": "Approve", + "approve_confirm_title": "Approve confirmation", + "approve_confirm_accept_button": "Approve", + "approve_confirm_cancel_button": "Do not approve", + "approve_confirm": "Do you want to approve {user}'s follow request?", "block": "Block", "blocked": "Blocked!", "block_confirm_title": "Block confirmation", @@ -924,6 +930,10 @@ "block_confirm_cancel_button": "Do not block", "deactivated": "Deactivated", "deny": "Deny", + "deny_confirm_title": "Deny confirmation", + "deny_confirm_accept_button": "Deny", + "deny_confirm_cancel_button": "Do not deny", + "deny_confirm": "Do you want to deny {user}'s follow request?", "edit_profile": "Edit profile", "favorites": "Favorites", "follow": "Follow", -- cgit v1.2.3-70-g09d2 From 1856eeda40e76618717a66b51ffc49a1ecf8c967 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Fri, 10 Jun 2022 15:55:31 -0400 Subject: Auto close confirm dialog after approve/deny --- src/components/notification/notification.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 0ce8892e..420db4f0 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -104,6 +104,7 @@ const Notification = { notification.type = 'follow' } }) + this.hideApproveConfirmDialog() }, denyUser () { if (this.shouldConfirmDeny) { @@ -118,6 +119,7 @@ const Notification = { this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id }) this.$store.dispatch('removeFollowRequest', this.user) }) + this.hideDenyConfirmDialog() } }, computed: { -- cgit v1.2.3-70-g09d2 From 8a99d129dcc4a07375727b4f8959c7fa775b8ec0 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 1 Aug 2022 11:02:21 -0400 Subject: Fix confirm modal lint --- src/components/confirm_modal/confirm_modal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 1ac64b62..3b98174a 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -4,13 +4,13 @@ class="confirm-modal" :on-cancel="onCancel" > -