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"
>
Date: Mon, 2 Jan 2023 13:25:59 -0500
Subject: Load emoji row by row
---
src/components/emoji_picker/emoji_picker.js | 45 +++++++++++++++++++++++-----
src/components/emoji_picker/emoji_picker.vue | 3 +-
2 files changed, 39 insertions(+), 9 deletions(-)
(limited to 'src')
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index 9c97e16c..39a514a7 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -18,7 +18,7 @@ import {
faCode,
faFlag
} from '@fortawesome/free-solid-svg-icons'
-import { debounce, trim } from 'lodash'
+import { debounce, trim, chunk } from 'lodash'
library.add(
faBoxOpen,
@@ -88,6 +88,10 @@ const getOffset = (elem) => {
return res[1]
}
+const toHeaderId = id => {
+ return id.replace(/^row-\d+-/, '')
+}
+
const EmojiPicker = {
props: {
enableStickerPicker: {
@@ -152,20 +156,20 @@ const EmojiPicker = {
},
onScroll (startIndex, endIndex, visibleStartIndex, visibleEndIndex) {
console.log('onScroll', startIndex, endIndex, visibleStartIndex, visibleEndIndex)
- const current = this.filteredEmojiGroups[visibleStartIndex].id
const target = this.$refs['emoji-groups'].$el
- this.scrolledGroup(target, current, visibleStartIndex, visibleEndIndex)
+ this.scrolledGroup(target, visibleStartIndex, visibleEndIndex)
},
- scrolledGroup (target, groupId, start, end) {
+ scrolledGroup (target, start, end) {
const top = target.scrollTop + 5
this.$nextTick(() => {
- this.filteredEmojiGroups.slice(start, end + 1).forEach(group => {
+ this.emojiItems.slice(start, end + 1).forEach(group => {
+ const headerId = toHeaderId(group.id)
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.activeGroup = headerId
}
})
this.scrollHeader()
@@ -190,7 +194,12 @@ const EmojiPicker = {
},
highlight (index) {
this.setShowStickers(false)
- this.$refs['emoji-groups'].scrollToItem(index)
+ const item = this.filteredEmojiGroups[index]
+ if (!item) {
+ return
+ }
+ const indexInList = this.emojiItems.findIndex(k => k.id === item.id)
+ this.$refs['emoji-groups'].scrollToItem(indexInList)
},
updateScrolledClass (target) {
if (target.scrollTop <= 5) {
@@ -245,7 +254,16 @@ const EmojiPicker = {
},
computed: {
minItemSize () {
- return 32
+ return this.emojiHeight
+ },
+ emojiHeight () {
+ return 32 + 4
+ },
+ emojiWidth () {
+ return 32 + 4
+ },
+ itemPerRow () {
+ return 6
},
activeGroupView () {
return this.showingStickers ? '' : this.activeGroup
@@ -287,6 +305,17 @@ const EmojiPicker = {
this.filteredEmojiGroups = this.getFilteredEmojiGroups()
}, 500)
},
+ emojiItems () {
+ return this.filteredEmojiGroups.map(group =>
+ chunk(group.emojis, this.itemPerRow)
+ .map((items, index) => ({
+ ...group,
+ id: index === 0 ? group.id : `row-${index}-${group.id}`,
+ emojis: items,
+ isFirstRow: index === 0
+ })))
+ .reduce((a, c) => a.concat(c), [])
+ },
languages () {
return ensureFinalFallback(this.$store.getters.mergedConfig.interfaceLanguage)
},
diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue
index 78da4808..5d8b0431 100644
--- a/src/components/emoji_picker/emoji_picker.vue
+++ b/src/components/emoji_picker/emoji_picker.vue
@@ -79,7 +79,7 @@
class="emoji-groups"
:class="groupsScrolledClass"
:min-item-size="minItemSize"
- :items="filteredEmojiGroups"
+ :items="emojiItems"
:emit-update="true"
@update="onScroll"
>
@@ -95,6 +95,7 @@
class="emoji-group"
>
{{ group.text }}
--
cgit v1.2.3-70-g09d2
From 081a4161034ce6d748a11e260b7a9429c65aab9d Mon Sep 17 00:00:00 2001
From: tusooa
Date: Mon, 2 Jan 2023 13:42:09 -0500
Subject: Calculate display count from width
---
src/components/emoji_picker/emoji_picker.js | 18 +++++++++++++++---
src/components/emoji_picker/emoji_picker.vue | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
(limited to 'src')
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index 39a514a7..ca2a3683 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -112,7 +112,8 @@ const EmojiPicker = {
contentLoaded: false,
groupRefs: {},
emojiRefs: {},
- filteredEmojiGroups: []
+ filteredEmojiGroups: [],
+ width: 0
}
},
components: {
@@ -155,7 +156,6 @@ const EmojiPicker = {
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
},
onScroll (startIndex, endIndex, visibleStartIndex, visibleEndIndex) {
- console.log('onScroll', startIndex, endIndex, visibleStartIndex, visibleEndIndex)
const target = this.$refs['emoji-groups'].$el
this.scrolledGroup(target, visibleStartIndex, visibleEndIndex)
},
@@ -221,6 +221,7 @@ const EmojiPicker = {
},
onShowing () {
const oldContentLoaded = this.contentLoaded
+ this.recalculateItemPerRow()
this.$nextTick(() => {
this.$refs.search.focus()
})
@@ -241,6 +242,14 @@ const EmojiPicker = {
emojis: this.filterByKeyword(group.emojis, trim(this.keyword))
}))
.filter(group => group.emojis.length > 0)
+ },
+ recalculateItemPerRow () {
+ this.$nextTick(() => {
+ if (!this.$refs['emoji-groups']) {
+ return
+ }
+ this.width = this.$refs['emoji-groups'].$el.offsetWidth
+ })
}
},
watch: {
@@ -252,6 +261,9 @@ const EmojiPicker = {
this.filteredEmojiGroups = this.getFilteredEmojiGroups()
}
},
+ mounted () {
+ this.recalculateItemPerRow()
+ },
computed: {
minItemSize () {
return this.emojiHeight
@@ -263,7 +275,7 @@ const EmojiPicker = {
return 32 + 4
},
itemPerRow () {
- return 6
+ return this.width ? Math.floor(this.width / this.emojiWidth - 1) : 6
},
activeGroupView () {
return this.showingStickers ? '' : this.activeGroup
diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue
index 5d8b0431..ae4683f5 100644
--- a/src/components/emoji_picker/emoji_picker.vue
+++ b/src/components/emoji_picker/emoji_picker.vue
@@ -82,6 +82,7 @@
:items="emojiItems"
:emit-update="true"
@update="onScroll"
+ @visible="recalculateItemPerRow"
>
Date: Mon, 2 Jan 2023 14:01:56 -0500
Subject: Clean up code
---
src/components/emoji_picker/emoji_picker.js | 11 ++---------
src/components/emoji_picker/emoji_picker.vue | 4 ++--
2 files changed, 4 insertions(+), 11 deletions(-)
(limited to 'src')
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index ca2a3683..4a447905 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -192,13 +192,9 @@ const EmojiPicker = {
setScroll(right + margin - headerCont.clientWidth)
}
},
- highlight (index) {
+ highlight (groupId) {
this.setShowStickers(false)
- const item = this.filteredEmojiGroups[index]
- if (!item) {
- return
- }
- const indexInList = this.emojiItems.findIndex(k => k.id === item.id)
+ const indexInList = this.emojiItems.findIndex(k => k.id === groupId)
this.$refs['emoji-groups'].scrollToItem(indexInList)
},
updateScrolledClass (target) {
@@ -261,9 +257,6 @@ const EmojiPicker = {
this.filteredEmojiGroups = this.getFilteredEmojiGroups()
}
},
- mounted () {
- this.recalculateItemPerRow()
- },
computed: {
minItemSize () {
return this.emojiHeight
diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue
index ae4683f5..453ecdfc 100644
--- a/src/components/emoji_picker/emoji_picker.vue
+++ b/src/components/emoji_picker/emoji_picker.vue
@@ -13,7 +13,7 @@
class="emoji-tabs"
>
Date: Fri, 6 Jan 2023 13:14:38 -0500
Subject: Fix emoji picker off-by-1 error
---
src/components/emoji_picker/emoji_picker.js | 2 +-
src/components/emoji_picker/emoji_picker.scss | 2 +-
src/components/emoji_picker/emoji_picker.vue | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'src')
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index 4a447905..0d7ca812 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -244,7 +244,7 @@ const EmojiPicker = {
if (!this.$refs['emoji-groups']) {
return
}
- this.width = this.$refs['emoji-groups'].$el.offsetWidth
+ this.width = this.$refs['emoji-groups'].$el.clientWidth
})
}
},
diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss
index dda12197..848d435a 100644
--- a/src/components/emoji_picker/emoji_picker.scss
+++ b/src/components/emoji_picker/emoji_picker.scss
@@ -7,7 +7,7 @@ $emoji-picker-emoji-size: 32px;
.emoji-picker {
width: 25em;
- max-width: 100vw;
+ max-width: calc(100vw - 20px); // popover gives 10px margin from window edge
display: flex;
flex-direction: column;
background-color: $fallback--bg;
diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue
index 453ecdfc..ca90bf26 100644
--- a/src/components/emoji_picker/emoji_picker.vue
+++ b/src/components/emoji_picker/emoji_picker.vue
@@ -83,6 +83,7 @@
:emit-update="true"
@update="onScroll"
@visible="recalculateItemPerRow"
+ @resize="recalculateItemPerRow"
>
Date: Fri, 6 Jan 2023 13:30:35 -0500
Subject: Stop propogation for all top-bar buttons
---
src/components/desktop_nav/desktop_nav.vue | 4 ++--
1 file 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 5db7fc79..07bf8005 100644
--- a/src/components/desktop_nav/desktop_nav.vue
+++ b/src/components/desktop_nav/desktop_nav.vue
@@ -38,7 +38,7 @@
/>
-
-
diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue
index 218aa6b3..973a5935 100644
--- a/src/components/account_actions/account_actions.vue
+++ b/src/components/account_actions/account_actions.vue
@@ -80,7 +80,8 @@
diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss
index b2dea98d..cf38d45b 100644
--- a/src/components/attachment/attachment.scss
+++ b/src/components/attachment/attachment.scss
@@ -1,4 +1,4 @@
-@import '../../_variables.scss';
+@import "../../variables";
.Attachment {
display: inline-flex;
@@ -102,14 +102,13 @@
padding-top: 0.5em;
}
-
.play-icon {
position: absolute;
font-size: 64px;
top: calc(50% - 32px);
left: calc(50% - 32px);
- color: rgba(255, 255, 255, 0.75);
- text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
+ color: rgb(255 255 255 / 75%);
+ text-shadow: 0 0 2px rgb(0 0 0 / 40%);
&::before {
margin: 0;
@@ -135,18 +134,32 @@
margin-left: 0.5em;
font-size: 1.25em;
// TODO: theming? hard to theme with unknown background image color
- background: rgba(230, 230, 230, 0.7);
+ background: rgb(230 230 230 / 70%);
.svg-inline--fa {
- color: rgba(0, 0, 0, 0.6);
+ color: rgb(0 0 0 / 60%);
}
&:hover .svg-inline--fa {
- color: rgba(0, 0, 0, 0.9);
+ color: rgb(0 0 0 / 90%);
}
}
}
+ &.-contain-fit {
+ img,
+ canvas {
+ object-fit: contain;
+ }
+ }
+
+ &.-cover-fit {
+ img,
+ canvas {
+ object-fit: cover;
+ }
+ }
+
.oembed-container {
line-height: 1.2em;
flex: 1 0 100%;
@@ -160,8 +173,9 @@
.image {
flex: 1;
+
img {
- border: 0px;
+ border: 0;
border-radius: 5px;
height: 100%;
object-fit: cover;
@@ -172,9 +186,10 @@
flex: 2;
margin: 8px;
word-break: break-all;
+
h1 {
font-size: 1rem;
- margin: 0px;
+ margin: 0;
}
}
}
@@ -251,18 +266,4 @@
&.-loading {
cursor: progress;
}
-
- &.-contain-fit {
- img,
- canvas {
- object-fit: contain;
- }
- }
-
- &.-cover-fit {
- img,
- canvas {
- object-fit: cover;
- }
- }
}
diff --git a/src/components/autosuggest/autosuggest.vue b/src/components/autosuggest/autosuggest.vue
index f283ab82..7b7102fd 100644
--- a/src/components/autosuggest/autosuggest.vue
+++ b/src/components/autosuggest/autosuggest.vue
@@ -24,7 +24,7 @@
diff --git a/src/components/chat_list/chat_list.vue b/src/components/chat_list/chat_list.vue
index 1248c4c8..27a475ed 100644
--- a/src/components/chat_list/chat_list.vue
+++ b/src/components/chat_list/chat_list.vue
@@ -45,7 +45,7 @@
diff --git a/src/components/chat_message/chat_message.scss b/src/components/chat_message/chat_message.scss
index 1913479f..fd5b7aa4 100644
--- a/src/components/chat_message/chat_message.scss
+++ b/src/components/chat_message/chat_message.scss
@@ -1,12 +1,12 @@
-@import '../../_variables.scss';
+@import "../../variables";
.chat-message-wrapper {
-
&.hovered-message-chain {
.animated.Avatar {
canvas {
display: none;
}
+
img {
visibility: visible;
}
@@ -28,7 +28,8 @@
.menu-icon {
cursor: pointer;
- &:hover, .extra-button-popover.open & {
+ &:hover,
+ .extra-button-popover.open & {
color: $fallback--text;
color: var(--text, $fallback--text);
}
@@ -54,27 +55,11 @@
width: 32px;
}
- .link-preview, .attachments {
+ .link-preview,
+ .attachments {
margin-bottom: 1em;
}
- .chat-message-inner {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- max-width: 80%;
- min-width: 10em;
- width: 100%;
-
- &.with-media {
- width: 100%;
-
- .status {
- width: 100%;
- }
- }
- }
-
.status {
border-radius: $fallback--chatMessageRadius;
border-radius: var(--chatMessageRadius, $fallback--chatMessageRadius);
@@ -86,7 +71,7 @@
position: relative;
float: right;
font-size: 0.8em;
- margin: -1em 0 -0.5em 0;
+ margin: -1em 0 -0.5em;
font-style: italic;
opacity: 0.8;
}
@@ -103,18 +88,54 @@
}
.pending {
- .status-content.media-body, .created-at {
+ .status-content.media-body,
+ .created-at {
color: var(--faint);
}
}
.error {
- .status-content.media-body, .created-at {
+ .status-content.media-body,
+ .created-at {
color: $fallback--cRed;
color: var(--badgeNotification, $fallback--cRed);
}
}
+ .chat-message-inner {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ max-width: 80%;
+ min-width: 10em;
+ width: 100%;
+ }
+
+ .outgoing {
+ display: flex;
+ flex-flow: row wrap;
+ align-content: end;
+ justify-content: flex-end;
+
+ a {
+ color: var(--chatMessageOutgoingLink, $fallback--link);
+ }
+
+ .status {
+ color: var(--chatMessageOutgoingText, $fallback--text);
+ background-color: var(--chatMessageOutgoingBg, $fallback--lightBg);
+ border: 1px solid var(--chatMessageOutgoingBorder, --lightBg);
+ }
+
+ .chat-message-inner {
+ align-items: flex-end;
+ }
+
+ .chat-message-menu {
+ right: 0.4rem;
+ }
+ }
+
.incoming {
a {
color: var(--chatMessageIncomingLink, $fallback--link);
@@ -137,36 +158,17 @@
}
}
- .outgoing {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-content: end;
- justify-content: flex-end;
-
- a {
- color: var(--chatMessageOutgoingLink, $fallback--link);
- }
+ .chat-message-inner.with-media {
+ width: 100%;
.status {
- color: var(--chatMessageOutgoingText, $fallback--text);
- background-color: var(--chatMessageOutgoingBg, $fallback--lightBg);
- border: 1px solid var(--chatMessageOutgoingBorder, --lightBg);
- }
-
- .chat-message-inner {
- align-items: flex-end;
- }
-
- .chat-message-menu {
- right: 0.4rem;
+ width: 100%;
}
}
.visible {
opacity: 1;
}
-
}
.chat-message-date-separator {
diff --git a/src/components/chat_message/chat_message.vue b/src/components/chat_message/chat_message.vue
index d635c47e..381574c3 100644
--- a/src/components/chat_message/chat_message.vue
+++ b/src/components/chat_message/chat_message.vue
@@ -33,7 +33,7 @@
@@ -98,6 +98,6 @@
diff --git a/src/components/chat_new/chat_new.scss b/src/components/chat_new/chat_new.scss
index 240e1a38..b145ecf9 100644
--- a/src/components/chat_new/chat_new.scss
+++ b/src/components/chat_new/chat_new.scss
@@ -1,7 +1,7 @@
.chat-new {
.input-wrap {
display: flex;
- margin: 0.7em 0.5em 0.7em 0.5em;
+ margin: 0.7em 0.5em;
input {
width: 100%;
diff --git a/src/components/chat_new/chat_new.vue b/src/components/chat_new/chat_new.vue
index bf09a379..52306c1d 100644
--- a/src/components/chat_new/chat_new.vue
+++ b/src/components/chat_new/chat_new.vue
@@ -46,6 +46,6 @@
diff --git a/src/components/chat_title/chat_title.vue b/src/components/chat_title/chat_title.vue
index ab7491fa..93db4fa7 100644
--- a/src/components/chat_title/chat_title.vue
+++ b/src/components/chat_title/chat_title.vue
@@ -26,7 +26,7 @@
diff --git a/src/components/color_input/color_input.scss b/src/components/color_input/color_input.scss
index 3de31fde..ca46199a 100644
--- a/src/components/color_input/color_input.scss
+++ b/src/components/color_input/color_input.scss
@@ -1,4 +1,4 @@
-@import '../../_variables.scss';
+@import "../../variables";
.color-input {
display: inline-flex;
@@ -8,7 +8,7 @@
flex: 0 0 0;
max-width: 9em;
align-items: stretch;
- padding: .2em 8px;
+ padding: 0.2em 8px;
input {
background: none;
@@ -31,6 +31,7 @@
min-height: 100%;
}
}
+
.computedIndicator,
.transparentIndicator {
flex: 0 0 2em;
@@ -38,22 +39,27 @@
align-self: stretch;
min-height: 100%;
}
+
.transparentIndicator {
// forgot to install counter-strike source, ooops
- background-color: #FF00FF;
+ background-color: #f0f;
position: relative;
- &::before, &::after {
+
+ &::before,
+ &::after {
display: block;
- content: '';
- background-color: #000000;
+ content: "";
+ background-color: #000;
position: absolute;
height: 50%;
width: 50%;
}
+
&::after {
top: 0;
left: 0;
}
+
&::before {
bottom: 0;
right: 0;
@@ -64,5 +70,4 @@
.label {
flex: 1 1 auto;
}
-
}
diff --git a/src/components/contrast_ratio/contrast_ratio.vue b/src/components/contrast_ratio/contrast_ratio.vue
index 374cb9ba..bbd6fd4a 100644
--- a/src/components/contrast_ratio/contrast_ratio.vue
+++ b/src/components/contrast_ratio/contrast_ratio.vue
@@ -87,7 +87,6 @@ export default {
.contrast-ratio {
display: flex;
justify-content: flex-end;
-
margin-top: -4px;
margin-bottom: 5px;
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index afa04db0..7577129e 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -210,17 +210,16 @@
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index b2fad1c9..a84d47f6 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -172,15 +172,10 @@
diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue
index c919b11a..eff69fb2 100644
--- a/src/components/follow_card/follow_card.vue
+++ b/src/components/follow_card/follow_card.vue
@@ -39,9 +39,8 @@
&-content-container {
flex-shrink: 0;
display: flex;
- flex-direction: row;
+ flex-flow: row wrap;
justify-content: space-between;
- flex-wrap: wrap;
line-height: 1.5em;
}
diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
index 1b12ba4b..eb222cc7 100644
--- a/src/components/follow_request_card/follow_request_card.vue
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -22,8 +22,8 @@
diff --git a/src/components/global_notice_list/global_notice_list.vue b/src/components/global_notice_list/global_notice_list.vue
index d828b819..0e58476f 100644
--- a/src/components/global_notice_list/global_notice_list.vue
+++ b/src/components/global_notice_list/global_notice_list.vue
@@ -25,7 +25,7 @@
diff --git a/src/components/lists_edit/lists_edit.vue b/src/components/lists_edit/lists_edit.vue
index 6521aba6..eec0f978 100644
--- a/src/components/lists_edit/lists_edit.vue
+++ b/src/components/lists_edit/lists_edit.vue
@@ -164,7 +164,7 @@
diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue
index a538a5ed..2799495b 100644
--- a/src/components/media_upload/media_upload.vue
+++ b/src/components/media_upload/media_upload.vue
@@ -29,7 +29,7 @@
diff --git a/src/components/moderation_tools/moderation_tools.vue b/src/components/moderation_tools/moderation_tools.vue
index 8535ef27..b708cdc8 100644
--- a/src/components/moderation_tools/moderation_tools.vue
+++ b/src/components/moderation_tools/moderation_tools.vue
@@ -166,18 +166,21 @@
diff --git a/src/components/mute_card/mute_card.vue b/src/components/mute_card/mute_card.vue
index ca33c6c5..97e91cbc 100644
--- a/src/components/mute_card/mute_card.vue
+++ b/src/components/mute_card/mute_card.vue
@@ -37,6 +37,7 @@
.mute-card-content-container {
margin-top: 0.5em;
text-align: right;
+
button {
width: 10em;
}
diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue
index d628c380..1a826cc4 100644
--- a/src/components/nav_panel/nav_panel.vue
+++ b/src/components/nav_panel/nav_panel.vue
@@ -102,7 +102,7 @@
diff --git a/src/components/navigation/navigation_entry.vue b/src/components/navigation/navigation_entry.vue
index f4d53836..411ca536 100644
--- a/src/components/navigation/navigation_entry.vue
+++ b/src/components/navigation/navigation_entry.vue
@@ -63,7 +63,7 @@
diff --git a/src/components/reply_button/reply_button.vue b/src/components/reply_button/reply_button.vue
index dada511b..6e3964b7 100644
--- a/src/components/reply_button/reply_button.vue
+++ b/src/components/reply_button/reply_button.vue
@@ -51,8 +51,8 @@
diff --git a/src/components/report/report.scss b/src/components/report/report.scss
index 578b4eb1..9762400b 100644
--- a/src/components/report/report.scss
+++ b/src/components/report/report.scss
@@ -1,4 +1,4 @@
-@import '../../_variables.scss';
+@import "../../variables";
.Report {
.report-content {
diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
index 240828e3..7700ee0d 100644
--- a/src/components/retweet_button/retweet_button.vue
+++ b/src/components/retweet_button/retweet_button.vue
@@ -65,8 +65,8 @@
diff --git a/src/components/search_bar/search_bar.vue b/src/components/search_bar/search_bar.vue
index 199a7500..3969d8de 100644
--- a/src/components/search_bar/search_bar.vue
+++ b/src/components/search_bar/search_bar.vue
@@ -56,7 +56,7 @@
diff --git a/src/components/selectable_list/selectable_list.vue b/src/components/selectable_list/selectable_list.vue
index 1f7683ab..14910fc5 100644
--- a/src/components/selectable_list/selectable_list.vue
+++ b/src/components/selectable_list/selectable_list.vue
@@ -51,7 +51,7 @@
diff --git a/src/components/settings_modal/helpers/size_setting.vue b/src/components/settings_modal/helpers/size_setting.vue
index 90c9f538..5a78f100 100644
--- a/src/components/settings_modal/helpers/size_setting.vue
+++ b/src/components/settings_modal/helpers/size_setting.vue
@@ -45,10 +45,11 @@
diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss
index 13cb0e65..f5861229 100644
--- a/src/components/settings_modal/settings_modal.scss
+++ b/src/components/settings_modal/settings_modal.scss
@@ -1,4 +1,5 @@
-@import 'src/_variables.scss';
+@import "src/variables";
+
.settings-modal {
overflow: hidden;
@@ -6,32 +7,13 @@
.option-list {
list-style-type: none;
padding-left: 2em;
+
li {
margin-bottom: 0.5em;
}
- .suboptions {
- margin-top: 0.3em
- }
- }
-
- &.peek {
- .settings-modal-panel {
- /* Explanation:
- * Modal is positioned vertically centered.
- * 100vh - 100% = Distance between modal's top+bottom boundaries and screen
- * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen
- * + 100% - we move modal completely off-screen, it's top boundary touches
- * bottom of the screen
- * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible
- */
- transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px));
- @media all and (max-width: 800px) {
- /* For mobile, the modal takes 100% of the available screen.
- This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible.
- */
- transform: translateY(calc(100% - 50px));
- }
+ .suboptions {
+ margin-top: 0.3em;
}
}
@@ -63,6 +45,7 @@
.settings-footer {
display: flex;
+
>* {
margin-right: 0.5em;
}
@@ -72,4 +55,26 @@
flex-grow: 1;
}
}
+
+ &.peek {
+ .settings-modal-panel {
+ /* Explanation:
+ * Modal is positioned vertically centered.
+ * 100vh - 100% = Distance between modal's top+bottom boundaries and screen
+ * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen
+ * + 100% - we move modal completely off-screen, it's top boundary touches
+ * bottom of the screen
+ * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible
+ */
+ transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px));
+
+ @media all and (max-width: 800px) {
+ /* For mobile, the modal takes 100% of the available screen.
+ This ensures the minimized modal is always 50px above the browser bottom
+ bar regardless of whether or not it is visible.
+ */
+ transform: translateY(calc(100% - 50px));
+ }
+ }
+ }
}
diff --git a/src/components/settings_modal/settings_modal_content.scss b/src/components/settings_modal/settings_modal_content.scss
index 81ab434b..87df7982 100644
--- a/src/components/settings_modal/settings_modal_content.scss
+++ b/src/components/settings_modal/settings_modal_content.scss
@@ -1,4 +1,5 @@
-@import 'src/_variables.scss';
+@import "src/variables";
+
.settings_tab-switcher {
height: 100%;
@@ -10,7 +11,8 @@
> div,
> label {
display: block;
- margin-bottom: .5em;
+ margin-bottom: 0.5em;
+
&:last-child {
margin-bottom: 0;
}
@@ -21,7 +23,7 @@
.option-list {
margin: 0;
- padding-left: .5em;
+ padding-left: 0.5em;
}
}
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index 8561647b..582cb288 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -464,6 +464,7 @@
justify-content: space-evenly;
flex-wrap: wrap;
}
+
.column-settings .size-label {
display: block;
margin-bottom: 0.5em;
diff --git a/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss b/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss
index 2adff847..5fa3a27b 100644
--- a/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss
+++ b/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss
@@ -1,29 +1,29 @@
.mutes-and-blocks-tab {
- height: 100%;
+ height: 100%;
- .usersearch-wrapper {
- padding: 1em;
- }
+ .usersearch-wrapper {
+ padding: 1em;
+ }
- .bulk-actions {
- text-align: right;
- padding: 0 1em;
- min-height: 2em;
- }
+ .bulk-actions {
+ text-align: right;
+ padding: 0 1em;
+ min-height: 2em;
+ }
- .bulk-action-button {
- width: 10em
- }
+ .bulk-action-button {
+ width: 10em;
+ }
- .domain-mute-form {
- padding: 1em;
- display: flex;
- flex-direction: column
- }
+ .domain-mute-form {
+ padding: 1em;
+ display: flex;
+ flex-direction: column;
+ }
- .domain-mute-button {
- align-self: flex-end;
- margin-top: 1em;
- width: 10em
- }
+ .domain-mute-button {
+ align-self: flex-end;
+ margin-top: 1em;
+ width: 10em;
+ }
}
diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss
index 201f1a76..73879192 100644
--- a/src/components/settings_modal/tabs/profile_tab.scss
+++ b/src/components/settings_modal/tabs/profile_tab.scss
@@ -1,4 +1,5 @@
-@import '../../../_variables.scss';
+@import "../../../variables";
+
.profile-tab {
.bio {
margin: 0;
@@ -8,7 +9,7 @@
padding-top: 5px;
}
- input[type=file] {
+ input[type="file"] {
padding: 5px;
height: auto;
}
@@ -52,7 +53,7 @@
right: 0.2em;
border-radius: $fallback--tooltipRadius;
border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
- background-color: rgba(0, 0, 0, 0.6);
+ background-color: rgb(0 0 0 / 60%);
opacity: 0.7;
width: 1.5em;
height: 1.5em;
diff --git a/src/components/settings_modal/tabs/security_tab/mfa.vue b/src/components/settings_modal/tabs/security_tab/mfa.vue
index 455d17b6..ee5b6b13 100644
--- a/src/components/settings_modal/tabs/security_tab/mfa.vue
+++ b/src/components/settings_modal/tabs/security_tab/mfa.vue
@@ -137,9 +137,11 @@
diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue
index c6fffc71..04727278 100644
--- a/src/components/thread_tree/thread_tree.vue
+++ b/src/components/thread_tree/thread_tree.vue
@@ -119,7 +119,8 @@
diff --git a/src/components/update_notification/update_notification.scss b/src/components/update_notification/update_notification.scss
index ce8129d0..4337acc4 100644
--- a/src/components/update_notification/update_notification.scss
+++ b/src/components/update_notification/update_notification.scss
@@ -1,4 +1,5 @@
-@import 'src/_variables.scss';
+@import "src/variables";
+
.UpdateNotification {
overflow: hidden;
}
@@ -21,7 +22,8 @@
@media all and (max-width: 800px) {
/* For mobile, the modal takes 100% of the available screen.
- This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible.
+ This ensures the minimized modal is always 50px above the browser
+ bottom bar regardless of whether or not it is visible.
*/
width: 100vw;
}
@@ -44,7 +46,7 @@
}
.panel-body {
- border-width: 0 0 1px 0;
+ border-width: 0 0 1px;
border-style: solid;
border-color: var(--border, $fallback--border);
}
@@ -67,7 +69,7 @@
z-index: 20;
position: relative;
shape-margin: 0.5em;
- filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.5));
+ filter: drop-shadow(5px 5px 10px rgb(0 0 0 / 50%));
pointer-events: none;
}
@@ -94,7 +96,7 @@
}
&.-peek {
- /* Explanation:
+ /* Explanation:
* 100vh - 100% = Distance between modal's top+bottom boundaries and screen
* (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen
*/
@@ -103,7 +105,7 @@
.pleroma-tan {
float: right;
z-index: 10;
- shape-image-threshold: 0.7;
+ shape-image-threshold: 70%;
}
.extra-info-group {
diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue
index f4d294df..91c17611 100644
--- a/src/components/user_avatar/user_avatar.vue
+++ b/src/components/user_avatar/user_avatar.vue
@@ -27,7 +27,7 @@
diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss
index cdb8cb57..942673c4 100644
--- a/src/components/user_card/user_card.scss
+++ b/src/components/user_card/user_card.scss
@@ -1,4 +1,4 @@
-@import '../../_variables.scss';
+@import "../../variables";
.user-card {
position: relative;
@@ -11,7 +11,7 @@
}
.panel-heading {
- padding: .5em 0;
+ padding: 0.5em 0;
text-align: center;
box-shadow: none;
background: transparent;
@@ -35,17 +35,19 @@
left: 0;
right: 0;
bottom: 0;
- mask: linear-gradient(to top, white, transparent) bottom no-repeat,
- linear-gradient(to top, white, white);
+ mask:
+ linear-gradient(to top, white, transparent) bottom no-repeat,
+ linear-gradient(to top, white, white);
// Autoprefixer seem to ignore this one, and also syntax is different
- -webkit-mask-composite: xor;
+ mask-composite: xor;
mask-composite: exclude;
background-size: cover;
mask-size: 100% 60%;
- border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);
- border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);
- border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);
- border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);
+ border-radius:
+ calc(var(--__roundnessTop, --panelRadius) - 1px)
+ calc(var(--__roundnessTop, --panelRadius) - 1px)
+ calc(var(--__roundnessBottom, --panelRadius) - 1px)
+ calc(var(--__roundnessBottom, --panelRadius) - 1px);
background-color: var(--profileBg);
z-index: -2;
@@ -159,17 +161,17 @@
top: 0;
right: 0;
bottom: 0;
- background-color: rgba(0, 0, 0, 0.3);
+ background-color: rgb(0 0 0 / 30%);
display: flex;
justify-content: center;
align-items: center;
border-radius: $fallback--avatarRadius;
border-radius: var(--avatarRadius, $fallback--avatarRadius);
opacity: 0;
- transition: opacity .2s ease;
+ transition: opacity 0.2s ease;
svg {
- color: #FFF;
+ color: #fff;
}
}
@@ -178,7 +180,8 @@
}
}
- .external-link-button, .edit-profile-button {
+ .external-link-button,
+ .edit-profile-button {
cursor: pointer;
width: 2.5em;
text-align: center;
@@ -191,34 +194,6 @@
}
}
- .user-summary {
- display: block;
- margin-left: 0.6em;
- text-align: left;
- text-overflow: ellipsis;
- white-space: nowrap;
- flex: 1 1 0;
- // This is so that text doesn't get overlapped by avatar's shadow if it has
- // big one
- z-index: 1;
- line-height: 2em;
-
- --emoji-size: 1.7em;
-
- .top-line,
- .bottom-line {
- display: flex;
- }
- }
-
- .user-name {
- text-overflow: ellipsis;
- overflow: hidden;
- flex: 1 1 auto;
- margin-right: 1em;
- font-size: 1.1em;
- }
-
.bottom-line {
font-weight: light;
font-size: 1.1em;
@@ -253,8 +228,36 @@
}
}
+ .user-summary {
+ display: block;
+ margin-left: 0.6em;
+ text-align: left;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ flex: 1 1 0;
+ // This is so that text doesn't get overlapped by avatar's shadow if it has
+ // big one
+ z-index: 1;
+ line-height: 2em;
+
+ --emoji-size: 1.7em;
+
+ .top-line,
+ .bottom-line {
+ display: flex;
+ }
+ }
+
+ .user-name {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ flex: 1 1 auto;
+ margin-right: 1em;
+ font-size: 1.1em;
+ }
+
.user-meta {
- margin-bottom: .15em;
+ margin-bottom: 0.15em;
display: flex;
align-items: baseline;
line-height: 22px;
@@ -263,7 +266,7 @@
.following {
flex: 1 0 auto;
margin: 0;
- margin-bottom: .25em;
+ margin-bottom: 0.25em;
text-align: left;
}
@@ -271,7 +274,7 @@
flex: 0 1 auto;
display: flex;
flex-wrap: wrap;
- margin-right: -.5em;
+ margin-right: -0.5em;
align-self: start;
.userHighlightCl {
@@ -294,19 +297,20 @@
.userHighlightText,
.userHighlightSel {
vertical-align: top;
- margin-right: .5em;
- margin-bottom: .25em;
+ margin-right: 0.5em;
+ margin-bottom: 0.25em;
}
}
}
+
.user-interactions {
position: relative;
display: flex;
flex-flow: row wrap;
- margin-right: -.75em;
+ margin-right: -0.75em;
> * {
- margin: 0 .75em .6em 0;
+ margin: 0 0.75em 0.6em 0;
white-space: nowrap;
min-width: 95px;
}
@@ -317,7 +321,7 @@
}
.user-note {
- margin: 0 .75em .6em 0;
+ margin: 0 0.75em 0.6em 0;
}
}
@@ -327,8 +331,8 @@
.user-counts {
display: flex;
- line-height:16px;
- padding: .5em 1.5em 0em 1.5em;
+ line-height: 16px;
+ padding: 0.5em 1.5em 0;
text-align: center;
justify-content: space-between;
color: $fallback--lightText;
@@ -338,14 +342,16 @@
.user-count {
flex: 1 0 auto;
- padding: .5em 0 .5em 0;
- margin: 0 .5em;
+ padding: 0.5em 0;
+ margin: 0 0.5em;
h5 {
- font-size:1em;
+ font-size: 1em;
font-weight: bolder;
margin: 0 0 0.25em;
}
+
+ /* stylelint-disable-next-line no-descending-specificity */
a {
text-decoration: none;
}
diff --git a/src/components/user_list_popover/user_list_popover.vue b/src/components/user_list_popover/user_list_popover.vue
index 635dc7f6..8307cc8a 100644
--- a/src/components/user_list_popover/user_list_popover.vue
+++ b/src/components/user_list_popover/user_list_popover.vue
@@ -48,7 +48,7 @@
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index d5e8d230..2720f052 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -140,7 +140,7 @@
diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.vue b/src/components/who_to_follow_panel/who_to_follow_panel.vue
index c1ba6fb1..0fecec0b 100644
--- a/src/components/who_to_follow_panel/who_to_follow_panel.vue
+++ b/src/components/who_to_follow_panel/who_to_follow_panel.vue
@@ -33,24 +33,28 @@
.who-to-follow * {
vertical-align: middle;
}
+
.who-to-follow img {
width: 32px;
height: 32px;
}
+
.who-to-follow {
- padding: 0em 1em;
- margin: 0px;
+ padding: 0 1em;
+ margin: 0;
}
+
.who-to-follow-items {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
- padding: 0px;
- margin: 1em 0em;
+ padding: 0;
+ margin: 1em 0;
}
+
.who-to-follow-more {
- padding: 0px;
- margin: 1em 0em;
+ padding: 0;
+ margin: 1em 0;
text-align: center;
}
diff --git a/src/hocs/with_load_more/with_load_more.scss b/src/hocs/with_load_more/with_load_more.scss
index de86ed4a..bad852f4 100644
--- a/src/hocs/with_load_more/with_load_more.scss
+++ b/src/hocs/with_load_more/with_load_more.scss
@@ -1,5 +1,4 @@
-
-@import '../../_variables.scss';
+@import "../../variables";
.with-load-more {
&-footer {
diff --git a/src/hocs/with_subscription/with_subscription.scss b/src/hocs/with_subscription/with_subscription.scss
index 7fd83802..996045b4 100644
--- a/src/hocs/with_subscription/with_subscription.scss
+++ b/src/hocs/with_subscription/with_subscription.scss
@@ -7,4 +7,4 @@
font-size: 1rem;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/panel.scss b/src/panel.scss
index a53e47c6..9471da11 100644
--- a/src/panel.scss
+++ b/src/panel.scss
@@ -1,3 +1,4 @@
+/* stylelint-disable no-descending-specificity */
.panel {
position: relative;
display: flex;
@@ -12,14 +13,14 @@
}
&::after {
- content: '';
+ content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 5;
- box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
+ box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);
box-shadow: var(--panelShadow);
pointer-events: none;
}
@@ -87,7 +88,7 @@
&::after,
&::before {
- content: '';
+ content: "";
position: absolute;
top: 0;
bottom: 0;
@@ -126,7 +127,7 @@
.panel-heading {
border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
- border-width: 0 0 1px 0;
+ border-width: 0 0 1px;
align-items: start;
// panel theme
color: var(--panelText);
@@ -150,7 +151,7 @@
.button-unstyled:hover,
a:hover {
- i[class*=icon-],
+ i[class*="icon-"],
.svg-inline--fa,
.iconLetter {
color: var(--panelText);
@@ -173,7 +174,7 @@
flex-shrink: 0;
&,
- i[class*=icon-] {
+ i[class*="icon-"] {
color: $fallback--text;
color: var(--btnPanelText, $fallback--text);
}
@@ -234,7 +235,8 @@
border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
align-items: center;
- border-width: 1px 0 0 0;
+ border-width: 1px 0 0;
border-style: solid;
border-color: var(--border, $fallback--border);
}
+/* stylelint-enable no-descending-specificity */
diff --git a/yarn.lock b/yarn.lock
index c0061cf8..e2e06dec 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5278,7 +5278,7 @@ jest-worker@^27.4.5:
merge-stream "^2.0.0"
supports-color "^8.0.0"
-jest-worker@^28.0.2:
+jest-worker@^28.0.2, jest-worker@^28.1.0:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98"
integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==
@@ -8014,6 +8014,17 @@ stylelint-scss@^4.0.0:
postcss-selector-parser "^6.0.6"
postcss-value-parser "^4.1.0"
+stylelint-webpack-plugin@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/stylelint-webpack-plugin/-/stylelint-webpack-plugin-3.3.0.tgz#3ba40e2b2b2b7d1802fa53618e01fc28bc21ffb3"
+ integrity sha512-F53bapIZ9zI16ero8IWm6TrUE6SSibZBphJE9b5rR2FxtvmGmm1YmS+a5xjQzn63+cv71GVSCu4byX66fBLpEw==
+ dependencies:
+ globby "^11.1.0"
+ jest-worker "^28.1.0"
+ micromatch "^4.0.5"
+ normalize-path "^3.0.0"
+ schema-utils "^4.0.0"
+
stylelint@14.16.1:
version "14.16.1"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.16.1.tgz#b911063530619a1bbe44c2b875fd8181ebdc742d"
--
cgit v1.2.3-70-g09d2
From aea9f92d39df4af5e7579e9d0ec443d3fb18a756 Mon Sep 17 00:00:00 2001
From: flxy
Date: Wed, 11 Jan 2023 13:52:49 +0100
Subject: Adjust query selector to actually get the popover now
---
src/components/react_button/react_button.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src')
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index 2a0dac85..58fbb61b 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -41,7 +41,7 @@ const ReactButton = {
},
focusInput () {
this.$nextTick(() => {
- const input = this.$el.querySelector('input')
+ const input = document.querySelector('.popover.ReactButton').querySelector('input')
if (input) input.focus()
})
},
--
cgit v1.2.3-70-g09d2
From d81fdafacb86b120714b6541bd83cf588ab8b577 Mon Sep 17 00:00:00 2001
From: flxy
Date: Wed, 11 Jan 2023 14:12:29 +0100
Subject: Pick a better query selector
---
src/components/react_button/react_button.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src')
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index 58fbb61b..47a48623 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -41,7 +41,7 @@ const ReactButton = {
},
focusInput () {
this.$nextTick(() => {
- const input = document.querySelector('.popover.ReactButton').querySelector('input')
+ const input = document.querySelector('.reaction-picker-filter > input')
if (input) input.focus()
})
},
--
cgit v1.2.3-70-g09d2
From d21ce77670d1a639929aac468e0b4c88cf0b2186 Mon Sep 17 00:00:00 2001
From: flxy
Date: Thu, 12 Jan 2023 09:45:10 +0100
Subject: Use splice instead of delete
---
src/components/settings_modal/tabs/profile_tab.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src')
diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js
index b86faef0..ff2ccef2 100644
--- a/src/components/settings_modal/tabs/profile_tab.js
+++ b/src/components/settings_modal/tabs/profile_tab.js
@@ -153,7 +153,7 @@ const ProfileTab = {
return false
},
deleteField (index, event) {
- this.$delete(this.newFields, index)
+ this.newFields.splice(index, 1)
},
uploadFile (slot, e) {
const file = e.target.files[0]
--
cgit v1.2.3-70-g09d2
From a28032fa58ff341b8815a0651d621ed358efd168 Mon Sep 17 00:00:00 2001
From: tusooa
Date: Fri, 13 Jan 2023 00:37:42 -0500
Subject: Disable no-shorthand for certain props for better readability
---
.stylelintrc.json | 17 ++++++++++++++++-
src/App.scss | 2 --
src/components/desktop_nav/desktop_nav.scss | 2 --
src/components/user_card/user_card.scss | 9 ++++-----
4 files changed, 20 insertions(+), 10 deletions(-)
(limited to 'src')
diff --git a/.stylelintrc.json b/.stylelintrc.json
index 7517362c..d6689cc0 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -21,6 +21,21 @@
"import-notation": null,
"custom-property-pattern": null,
"keyframes-name-pattern": null,
- "scss/operator-no-newline-after": null
+ "scss/operator-no-newline-after": null,
+ "declaration-block-no-redundant-longhand-properties": [
+ true,
+ {
+ "ignoreShorthands": [
+ "grid-template",
+ "margin",
+ "padding",
+ "border",
+ "border-width",
+ "border-style",
+ "border-color",
+ "border-radius"
+ ]
+ }
+ ]
}
}
diff --git a/src/App.scss b/src/App.scss
index 0d2daa7d..be5dce9d 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -214,10 +214,8 @@ nav {
grid-template-columns:
var(--effectiveSidebarColumnWidth)
var(--effectiveContentColumnWidth);
- /* stylelint-disable declaration-block-no-redundant-longhand-properties */
grid-template-areas: "sidebar content";
grid-template-rows: 1fr;
- /* stylelint-enable declaration-block-no-redundant-longhand-properties */
box-sizing: border-box;
margin: 0 auto;
align-content: flex-start;
diff --git a/src/components/desktop_nav/desktop_nav.scss b/src/components/desktop_nav/desktop_nav.scss
index 00f434bf..c7e02936 100644
--- a/src/components/desktop_nav/desktop_nav.scss
+++ b/src/components/desktop_nav/desktop_nav.scss
@@ -14,11 +14,9 @@
.inner-nav {
display: grid;
- /* stylelint-disable declaration-block-no-redundant-longhand-properties */
grid-template-rows: var(--navbar-height);
grid-template-columns: 2fr auto 2fr;
grid-template-areas: "sitename logo actions";
- /* stylelint-enable declaration-block-no-redundant-longhand-properties */
box-sizing: border-box;
padding: 0 1.2em;
margin: auto;
diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss
index 942673c4..d56b6672 100644
--- a/src/components/user_card/user_card.scss
+++ b/src/components/user_card/user_card.scss
@@ -43,11 +43,10 @@
mask-composite: exclude;
background-size: cover;
mask-size: 100% 60%;
- border-radius:
- calc(var(--__roundnessTop, --panelRadius) - 1px)
- calc(var(--__roundnessTop, --panelRadius) - 1px)
- calc(var(--__roundnessBottom, --panelRadius) - 1px)
- calc(var(--__roundnessBottom, --panelRadius) - 1px);
+ border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);
+ border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);
+ border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);
+ border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);
background-color: var(--profileBg);
z-index: -2;
--
cgit v1.2.3-70-g09d2
From 274d384572f5699ddf0b43065235b32304954ca1 Mon Sep 17 00:00:00 2001
From: tusooa
Date: Sat, 14 Jan 2023 10:19:08 -0500
Subject: Make modal easier to close if there is only one image
---
src/components/media_modal/media_modal.js | 5 +++++
src/components/media_modal/media_modal.vue | 1 +
src/components/swipe_click/swipe_click.js | 7 +++++++
3 files changed, 13 insertions(+)
(limited to 'src')
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js
index ff993664..05ef9fbe 100644
--- a/src/components/media_modal/media_modal.js
+++ b/src/components/media_modal/media_modal.js
@@ -63,6 +63,11 @@ const MediaModal = {
},
type () {
return this.currentMedia ? this.getType(this.currentMedia) : null
+ },
+ swipeDisableClickThreshold () {
+ // If there is only one media, allow more mouse movements to close the modal
+ // because there is less chance that the user wants to switch to another image
+ return () => this.canNavigate ? 1 : 30
}
},
methods: {
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index d59055b3..8e1adda5 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -10,6 +10,7 @@
class="modal-image-container"
:direction="swipeDirection"
:threshold="swipeThreshold"
+ :disable-click-threshold="swipeDisableClickThreshold"
@preview-requested="handleSwipePreview"
@swipe-finished="handleSwipeEnd"
@swipeless-clicked="hide"
diff --git a/src/components/swipe_click/swipe_click.js b/src/components/swipe_click/swipe_click.js
index 238e6df8..2a423901 100644
--- a/src/components/swipe_click/swipe_click.js
+++ b/src/components/swipe_click/swipe_click.js
@@ -5,6 +5,8 @@ import GestureService from '../../services/gesture_service/gesture_service'
* direction: a vector that indicates the direction of the intended swipe
* threshold: the minimum distance in pixels the swipe has moved on `direction'
* for swipe-finished() to have a non-zero sign
+ * disableClickThreshold: the minimum distance in pixels for the swipe to
+ * not trigger a click
* perpendicularTolerance: see gesture_service
*
* Events:
@@ -34,6 +36,10 @@ const SwipeClick = {
type: Function,
default: () => 30
},
+ disableClickThreshold: {
+ type: Function,
+ default: () => 1
+ },
perpendicularTolerance: {
type: Number,
default: 1.0
@@ -72,6 +78,7 @@ const SwipeClick = {
this.$gesture = new GestureService.SwipeAndClickGesture({
direction: this.direction,
threshold: this.threshold,
+ disableClickThreshold: this.disableClickThreshold,
perpendicularTolerance: this.perpendicularTolerance,
swipePreviewCallback: this.preview,
swipeEndCallback: this.end,
--
cgit v1.2.3-70-g09d2
From c69878cee7a77364afe6ed44a6df109e84273f3b Mon Sep 17 00:00:00 2001
From: tusooa
Date: Sat, 14 Jan 2023 22:17:21 -0500
Subject: Display better error message for unauthenticated timelines
---
src/services/api/api.service.js | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
(limited to 'src')
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 00d1c020..af12265e 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -734,26 +734,22 @@ const fetchTimeline = ({
const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
url += `?${queryString}`
- let status = ''
- let statusText = ''
-
- let pagination = {}
return fetch(url, { headers: authHeaders(credentials) })
- .then((data) => {
- status = data.status
- statusText = data.statusText
- pagination = parseLinkHeaderPagination(data.headers.get('Link'), {
- flakeId: timeline !== 'bookmarks' && timeline !== 'notifications'
- })
- return data
- })
- .then((data) => data.json())
- .then((data) => {
- if (!data.errors) {
+ .then(async (response) => {
+ const success = response.ok
+
+ const data = await response.json()
+
+ if (success && !data.errors) {
+ const pagination = parseLinkHeaderPagination(response.headers.get('Link'), {
+ flakeId: timeline !== 'bookmarks' && timeline !== 'notifications'
+ })
+
return { data: data.map(isNotifications ? parseNotification : parseStatus), pagination }
} else {
- data.status = status
- data.statusText = statusText
+ data.errors ||= []
+ data.status = response.status
+ data.statusText = response.statusText
return data
}
})
--
cgit v1.2.3-70-g09d2
From 8acbc31a20069c737a65a9bc38f760741560574d Mon Sep 17 00:00:00 2001
From: tusooa
Date: Sat, 14 Jan 2023 22:36:21 -0500
Subject: Use bdi to isolate repeater name
---
src/components/status/status.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src')
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 82eb7ac6..f3bdb19d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -84,7 +84,7 @@
:user="statusoid.user"
/>
-
@@ -101,7 +101,7 @@
v-else
:to="retweeterProfileLink"
>{{ retweeter }}
-
+
{{ ' ' }}
Date: Sat, 14 Jan 2023 22:43:18 -0500
Subject: Debounce mute word setting
---
src/components/settings_modal/tabs/filtering_tab.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'src')
diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js
index 5354e5db..7c37f0bc 100644
--- a/src/components/settings_modal/tabs/filtering_tab.js
+++ b/src/components/settings_modal/tabs/filtering_tab.js
@@ -1,4 +1,4 @@
-import { filter, trim } from 'lodash'
+import { filter, trim, debounce } from 'lodash'
import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue'
@@ -29,11 +29,16 @@ const FilteringTab = {
},
set (value) {
this.muteWordsStringLocal = value
+ this.debouncedSetMuteWords(value)
+ }
+ },
+ debouncedSetMuteWords () {
+ return debounce((value) => {
this.$store.dispatch('setOption', {
name: 'muteWords',
value: filter(value.split('\n'), (word) => trim(word).length > 0)
})
- }
+ }, 1000)
}
},
// Updating nested properties
--
cgit v1.2.3-70-g09d2
From a58a6d3c357592f34007c67bbf7fdf740864212a Mon Sep 17 00:00:00 2001
From: tusooa
Date: Sat, 14 Jan 2023 23:20:28 -0500
Subject: Fix notification attachment icon overflow
---
src/components/attachment/attachment.js | 4 +++-
src/components/attachment/attachment.scss | 7 ++++++-
src/components/attachment/attachment.vue | 5 +++--
src/components/gallery/gallery.js | 1 +
src/components/gallery/gallery.vue | 1 +
src/components/status_content/status_content.vue | 1 +
6 files changed, 15 insertions(+), 4 deletions(-)
(limited to 'src')
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 5dc50475..6e14b24d 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -36,6 +36,7 @@ library.add(
const Attachment = {
props: [
'attachment',
+ 'compact',
'description',
'hideDescription',
'nsfw',
@@ -71,7 +72,8 @@ const Attachment = {
{
'-loading': this.loading,
'-nsfw-placeholder': this.hidden,
- '-editable': this.edit !== undefined
+ '-editable': this.edit !== undefined,
+ '-compact': this.compact
},
'-type-' + this.type,
this.size && '-size-' + this.size,
diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss
index b2dea98d..966acc68 100644
--- a/src/components/attachment/attachment.scss
+++ b/src/components/attachment/attachment.scss
@@ -102,7 +102,6 @@
padding-top: 0.5em;
}
-
.play-icon {
position: absolute;
font-size: 64px;
@@ -265,4 +264,10 @@
object-fit: cover;
}
}
+
+ &.-compact {
+ .placeholder-container {
+ padding-bottom: 0.5em;
+ }
+ }
}
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 2a89886d..79f62806 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -162,10 +162,11 @@
target="_blank"
>
-
+
{{ localDescription }}
diff --git a/src/components/gallery/gallery.js b/src/components/gallery/gallery.js
index 4e1bda55..e86a3eea 100644
--- a/src/components/gallery/gallery.js
+++ b/src/components/gallery/gallery.js
@@ -4,6 +4,7 @@ import { sumBy, set } from 'lodash'
const Gallery = {
props: [
'attachments',
+ 'compact',
'limitRows',
'descriptions',
'limit',
diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue
index ccf6e3e2..bc18f545 100644
--- a/src/components/gallery/gallery.vue
+++ b/src/components/gallery/gallery.vue
@@ -20,6 +20,7 @@
v-for="(attachment, attachmentIndex) in row.items"
:key="attachment.id"
class="gallery-item"
+ :compact="compact"
:nsfw="nsfw"
:attachment="attachment"
:size="size"
diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue
index e2120f7a..c0e5c0b9 100644
--- a/src/components/status_content/status_content.vue
+++ b/src/components/status_content/status_content.vue
@@ -33,6 +33,7 @@
Date: Sun, 15 Jan 2023 00:08:59 -0500
Subject: Add status authors from search results to store
---
src/modules/statuses.js | 1 +
1 file changed, 1 insertion(+)
(limited to 'src')
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 5a5c7b1b..77dd7e1c 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -765,6 +765,7 @@ const statuses = {
return store.rootState.api.backendInteractor.search2({ q, resolve, limit, offset, following, type })
.then((data) => {
store.commit('addNewUsers', data.accounts)
+ store.commit('addNewUsers', data.statuses.map(s => s.user).filter(u => u))
store.commit('addNewStatuses', { statuses: data.statuses })
return data
})
--
cgit v1.2.3-70-g09d2
From bd58ccd3b6db00c98520987c42fdea40d8e8dd2f Mon Sep 17 00:00:00 2001
From: tusooa
Date: Sun, 15 Jan 2023 22:39:20 -0500
Subject: Fix mobile layout margin
---
src/App.scss | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src')
diff --git a/src/App.scss b/src/App.scss
index be5dce9d..1c4c8941 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -335,7 +335,7 @@ nav {
.column {
padding-top: 0;
- margin-top: var(--navbar-height) 0 0 0;
+ margin: var(--navbar-height) 0 0 0;
}
.panel-heading,
--
cgit v1.2.3-70-g09d2
From 5b56b6b9fdd9ad82a8f1c24d03024be0e7902c80 Mon Sep 17 00:00:00 2001
From: tusooa
Date: Tue, 17 Jan 2023 19:55:16 -0500
Subject: Populate user card on receiving chats
---
src/modules/chats.js | 1 +
1 file changed, 1 insertion(+)
(limited to 'src')
diff --git a/src/modules/chats.js b/src/modules/chats.js
index f28c2603..0f1540db 100644
--- a/src/modules/chats.js
+++ b/src/modules/chats.js
@@ -65,6 +65,7 @@ const chats = {
const newChatMessageSideEffects = (chat) => {
maybeShowChatNotification(store, chat)
}
+ commit('addNewUsers', chats.map(k => k.account).filter(k => k))
commit('addNewChats', { dispatch, chats, rootGetters, newChatMessageSideEffects })
},
updateChat ({ commit }, { chat }) {
--
cgit v1.2.3-70-g09d2
From d1876503bc560b9c62d03e219021593cb954fcf4 Mon Sep 17 00:00:00 2001
From: tusooa
Date: Fri, 20 Jan 2023 12:33:19 -0500
Subject: Display delete status errors
---
src/i18n/en.json | 1 +
src/modules/statuses.js | 14 ++++++++++++--
src/services/api/api.service.js | 5 +++--
3 files changed, 16 insertions(+), 4 deletions(-)
(limited to 'src')
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 1ee1147a..5e653ad8 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -844,6 +844,7 @@
"favorites": "Favorites",
"repeats": "Repeats",
"delete": "Delete status",
+ "delete_error": "Error deleting status: {0}",
"edit": "Edit status",
"edited_at": "(last edited {time})",
"pin": "Pin on profile",
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 77dd7e1c..93a4a957 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -615,9 +615,19 @@ const statuses = {
fetchStatusHistory ({ rootState, dispatch }, status) {
return apiService.fetchStatusHistory({ status })
},
- deleteStatus ({ rootState, commit }, status) {
- commit('setDeleted', { status })
+ deleteStatus ({ rootState, commit, dispatch }, status) {
apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })
+ .then((_) => {
+ commit('setDeleted', { status })
+ })
+ .catch((e) => {
+ dispatch('pushGlobalNotice', {
+ level: 'error',
+ messageKey: 'status.delete_error',
+ messageArgs: [e.message],
+ timeout: 5000
+ })
+ })
},
deleteStatusById ({ rootState, commit }, id) {
const status = rootState.statuses.allStatusesObject[id]
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index af12265e..609f6790 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -923,8 +923,9 @@ const editStatus = ({
}
const deleteStatus = ({ id, credentials }) => {
- return fetch(MASTODON_DELETE_URL(id), {
- headers: authHeaders(credentials),
+ return promisedRequest({
+ url: MASTODON_DELETE_URL(id),
+ credentials,
method: 'DELETE'
})
}
--
cgit v1.2.3-70-g09d2
From 3ad5df805e22ddd473fdaa9a92df335a61fad7fc Mon Sep 17 00:00:00 2001
From: Tusooa Zhu
Date: Wed, 9 Feb 2022 15:04:53 -0500
Subject: Add delete status confirm modal
---
src/components/extra_buttons/extra_buttons.js | 31 +++++++++++++++++++++-----
src/components/extra_buttons/extra_buttons.vue | 10 +++++++++
src/modules/config.js | 6 +++++
src/modules/instance.js | 6 +++++
4 files changed, 47 insertions(+), 6 deletions(-)
(limited to 'src')
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 3dc968c9..b1458d30 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -1,4 +1,5 @@
import Popover from '../popover/popover.vue'
+import ConfirmModal from '../confirm_modal/confirm_modal.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faEllipsisH,
@@ -32,10 +33,14 @@ library.add(
const ExtraButtons = {
props: ['status'],
- components: { Popover },
+ components: {
+ Popover,
+ ConfirmModal
+ },
data () {
return {
- expanded: false
+ expanded: false,
+ showingDeleteDialog: false
}
},
methods: {
@@ -46,11 +51,22 @@ const ExtraButtons = {
this.expanded = false
},
deleteStatus () {
- const confirmed = window.confirm(this.$t('status.delete_confirm'))
- if (confirmed) {
- this.$store.dispatch('deleteStatus', { id: this.status.id })
+ if (this.shouldConfirmDelete) {
+ this.showDeleteStatusConfirmDialog()
+ } else {
+ this.doDeleteStatus()
}
},
+ doDeleteStatus () {
+ this.$store.dispatch('deleteStatus', { id: this.status.id })
+ hideDeleteStatusConfirmDialog()
+ },
+ showDeleteStatusConfirmDialog () {
+ this.showingDeleteDialog = true
+ },
+ hideDeleteStatusConfirmDialog () {
+ this.showingDeleteDialog = false
+ },
pinStatus () {
this.$store.dispatch('pinStatus', this.status.id)
.then(() => this.$emit('onSuccess'))
@@ -133,7 +149,10 @@ const ExtraButtons = {
isEdited () {
return this.status.edited_at !== null
},
- editingAvailable () { return this.$store.state.instance.editingAvailable }
+ editingAvailable () { return this.$store.state.instance.editingAvailable },
+ shouldConfirmDelete () {
+ return this.$store.getters.mergedConfig.modalOnDelete
+ }
}
}
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index a84d47f6..293f6d68 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -165,6 +165,16 @@
/>
+
+ {{ $t('status.delete_confirm') }}
+
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