Merge commit 'b42661ba95b7872ba278fca9b0fee8faffd89e52' into glitch-soc/merge-upstream

Conflicts:
- `lib/sanitize_ext/sanitize_config.rb`:
  Upstream added `<s>` to the list of allowed tags, the conflict is because
  we have a different list of allowed tags.
  Added `<s>` like upstream did.
This commit is contained in:
Claire committed 2024-08-12 17:46:24 +02:00
commit 83480df820
20 files changed
+159 -21

No files matched your search

@@ -15,6 +15,7 @@ import type { NotificationGap } from 'mastodon/reducers/notification_groups';
import {
selectSettingsNotificationsExcludedTypes,
selectSettingsNotificationsQuickFilterActive,
selectSettingsNotificationsShows,
} from 'mastodon/selectors/settings';
import type { AppDispatch } from 'mastodon/store';
import {
@@ -104,7 +105,31 @@ export const fetchNotificationsGap = createDataLoadingThunk(
export const processNewNotificationForGroups = createAppAsyncThunk(
'notificationGroups/processNew',
(notification: ApiNotificationJSON, { dispatch }) => {
(notification: ApiNotificationJSON, { dispatch, getState }) => {
const state = getState();
const activeFilter = selectSettingsNotificationsQuickFilterActive(state);
const notificationShows = selectSettingsNotificationsShows(state);
const showInColumn =
activeFilter === 'all'
? notificationShows[notification.type]
: activeFilter === notification.type;
if (!showInColumn) return;
if (
(notification.type === 'mention' || notification.type === 'update') &&
notification.status.filtered
) {
const filters = notification.status.filtered.filter((result) =>
result.filter.context.includes('notifications'),
);
if (filters.some((result) => result.filter.filter_action === 'hide')) {
return;
}
}
dispatchAssociatedRecords(dispatch, [notification]);
return notification;
+1 -1
View File
@@ -104,7 +104,7 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
const notificationJSON = JSON.parse(data.payload);
dispatch(updateNotifications(notificationJSON, messages, locale));
// TODO: remove this once the groups feature replaces the previous one
if(getState().notificationGroups.groups.length > 0) {
if(getState().settings.getIn(['notifications', 'groupingBeta'], false)) {
dispatch(processNewNotificationForGroups(notificationJSON));
}
break;
@@ -2,8 +2,8 @@ import { apiRequestGet, apiRequestPut } from 'mastodon/api';
import type { NotificationPolicyJSON } from 'mastodon/api_types/notification_policies';
export const apiGetNotificationPolicy = () =>
apiRequestGet<NotificationPolicyJSON>('/v2/notifications/policy');
apiRequestGet<NotificationPolicyJSON>('v2/notifications/policy');
export const apiUpdateNotificationsPolicy = (
policy: Partial<NotificationPolicyJSON>,
) => apiRequestPut<NotificationPolicyJSON>('/v2/notifications/policy', policy);
) => apiRequestPut<NotificationPolicyJSON>('v2/notifications/policy', policy);
+24 -2
View File
@@ -58,6 +58,29 @@ export interface ApiPreviewCardJSON {
authors: ApiPreviewCardAuthorJSON[];
}
export type FilterContext =
| 'home'
| 'notifications'
| 'public'
| 'thread'
| 'account';
export interface ApiFilterJSON {
id: string;
title: string;
context: FilterContext;
expires_at: string;
filter_action: 'warn' | 'hide';
keywords?: unknown[]; // TODO: FilterKeywordSerializer
statuses?: unknown[]; // TODO: FilterStatusSerializer
}
export interface ApiFilterResultJSON {
filter: ApiFilterJSON;
keyword_matches: string[];
status_matches: string[];
}
export interface ApiStatusJSON {
id: string;
created_at: string;
@@ -80,8 +103,7 @@ export interface ApiStatusJSON {
bookmarked?: boolean;
pinned?: boolean;
// filtered: FilterResult[]
filtered: unknown; // TODO
filtered?: ApiFilterResultJSON[];
content?: string;
text?: string;
+9
View File
@@ -356,8 +356,16 @@
"home.pending_critical_update.link": "Veure actualitzacions",
"home.pending_critical_update.title": "Actualització de seguretat crítica disponible!",
"home.show_announcements": "Mostra els anuncis",
"ignore_notifications_modal.disclaimer": "Mastodon no pot informar als usuaris de que heu ignorat notificacions seves.\nIgnorar notificacions no evitarà que se segueixin enviant els missatges.",
"ignore_notifications_modal.filter_to_act_users": "Encara podreu acceptar, rebutjar o reportar usuaris",
"ignore_notifications_modal.filter_to_avoid_confusion": "Filtrar ajuda a evitar potencials confusions",
"ignore_notifications_modal.filter_to_review_separately": "Podeu revisar separadament notificacions filtrades",
"ignore_notifications_modal.ignore": "Ignora les notificacions",
"ignore_notifications_modal.limited_accounts_title": "Voleu ignorar les notificacions dels comptes moderats?",
"ignore_notifications_modal.new_accounts_title": "Voleu ignorar les notificacions dels comptes nous?",
"ignore_notifications_modal.not_followers_title": "Voleu ignorar les notificacions de qui no us segueix?",
"ignore_notifications_modal.not_following_title": "Voleu ignorar les notificacions de qui no seguiu?",
"ignore_notifications_modal.private_mentions_title": "Voleu ignorar les notificacions de mencions privades no sol·licitades?",
"interaction_modal.description.favourite": "Amb un compte a Mastodon pots afavorir aquest tut perquè l'autor sàpiga que t'ha agradat i desar-lo per a més endavant.",
"interaction_modal.description.follow": "Amb un compte a Mastodon, pots seguir a {name} per a rebre els seus tuts en la teva línia de temps d'Inici.",
"interaction_modal.description.reblog": "Amb un compte a Mastodon, pots impulsar aquest tut per a compartir-lo amb els teus seguidors.",
@@ -514,6 +522,7 @@
"notification_requests.confirm_accept_all.button": "Accepta-ho tot",
"notification_requests.confirm_accept_all.message": "Esteu a punt d'acceptar {count, plural, one {una petició de notificació} other {# peticions de notificació}}. N'esteu segurs de continuar?",
"notification_requests.confirm_accept_all.title": "Accepteu peticions de notificació?",
"notification_requests.confirm_dismiss_all.button": "Descarta-les totes",
"notification_requests.dismiss": "Ignora",
"notification_requests.explainer_for_limited_account": "S'han filtrat les notificacions d'aquest compte perquè un moderador l'ha limitat.",
"notification_requests.explainer_for_limited_remote_account": "S'han filtrat les notificacions d'aquest compte perquè un moderador ha limitat el compte o el seu servidor.",
+13
View File
@@ -11,6 +11,7 @@
"about.not_available": "Эта информация не указана на данном сервере.",
"about.powered_by": "Децентрализованная социальная сеть на базе {mastodon}",
"about.rules": "Правила сервера",
"account.account_note_header": "Личная заметка",
"account.add_or_remove_from_list": "Управление списками",
"account.badges.bot": "Бот",
"account.badges.group": "Группа",
@@ -167,19 +168,25 @@
"confirmations.block.confirm": "Заблокировать",
"confirmations.delete.confirm": "Удалить",
"confirmations.delete.message": "Вы уверены, что хотите удалить этот пост?",
"confirmations.delete.title": "Удалить пост?",
"confirmations.delete_list.confirm": "Удалить",
"confirmations.delete_list.message": "Вы действительно хотите навсегда удалить этот список?",
"confirmations.delete_list.title": "Удалить список?",
"confirmations.discard_edit_media.confirm": "Отменить",
"confirmations.discard_edit_media.message": "У вас есть несохранённые изменения описания мультимедиа или предпросмотра, отменить их?",
"confirmations.edit.confirm": "Редактировать",
"confirmations.edit.message": "В данный момент, редактирование перезапишет составляемое вами сообщение. Вы уверены, что хотите продолжить?",
"confirmations.edit.title": "Переписать сообщение?",
"confirmations.logout.confirm": "Выйти",
"confirmations.logout.message": "Вы уверены, что хотите выйти?",
"confirmations.logout.title": "Выйти?",
"confirmations.mute.confirm": "Игнорировать",
"confirmations.redraft.confirm": "Удалить и исправить",
"confirmations.redraft.message": "Вы уверены, что хотите удалить и переписать этот пост? Отметки «избранного», продвижения и ответы к оригинальному посту будут удалены.",
"confirmations.redraft.title": "Удалим и исправим пост?",
"confirmations.reply.confirm": "Ответить",
"confirmations.reply.message": "При ответе, текст набираемого поста будет очищен. Продолжить?",
"confirmations.reply.title": "Перепишем пост?",
"confirmations.unfollow.confirm": "Отписаться",
"confirmations.unfollow.message": "Вы уверены, что хотите отписаться от {name}?",
"conversation.delete": "Удалить беседу",
@@ -484,13 +491,16 @@
"notification.update": "{name} изменил(а) пост",
"notification_requests.accept": "Принять",
"notification_requests.dismiss": "Отклонить",
"notification_requests.maximize": "Развернуть",
"notification_requests.notifications_from": "Уведомления от {name}",
"notification_requests.title": "Отфильтрованные уведомления",
"notifications.clear": "Очистить уведомления",
"notifications.clear_confirmation": "Вы уверены, что хотите очистить все уведомления?",
"notifications.clear_title": "Сбросить уведомления?",
"notifications.column_settings.admin.report": "Новые жалобы:",
"notifications.column_settings.admin.sign_up": "Новые регистрации:",
"notifications.column_settings.alert": "Уведомления на рабочем столе",
"notifications.column_settings.beta.category": "Экспериментальные функции",
"notifications.column_settings.favourite": "Избранные:",
"notifications.column_settings.filter_bar.advanced": "Отображать все категории",
"notifications.column_settings.filter_bar.category": "Панель сортировки",
@@ -519,6 +529,7 @@
"notifications.permission_denied": "Уведомления на рабочем столе недоступны, так как вы запретили их отправку в браузере. Проверьте настройки для сайта, чтобы включить их обратно.",
"notifications.permission_denied_alert": "Уведомления на рабочем столе недоступны, так как вы ранее отклонили запрос на их отправку.",
"notifications.permission_required": "Чтобы включить уведомления на рабочем столе, необходимо разрешить их в браузере.",
"notifications.policy.drop": "Игнорируем",
"notifications.policy.filter_new_accounts.hint": "Создано в течение последних {days, plural, one {один день} few {# дней} many {# дней} other {# дня}}",
"notifications.policy.filter_new_accounts_title": "Новые учётные записи",
"notifications.policy.filter_not_followers_title": "Люди, не подписанные на вас",
@@ -652,8 +663,10 @@
"report.unfollow_explanation": "Вы подписаны на этого пользователя. Чтобы не видеть его/её посты в своей домашней ленте, отпишитесь от него/неё.",
"report_notification.attached_statuses": "{count, plural, one {{count} сообщение} few {{count} сообщения} many {{count} сообщений} other {{count} сообщений}} вложено",
"report_notification.categories.legal": "Правовая информация",
"report_notification.categories.legal_sentence": "срамной контент",
"report_notification.categories.other": "Прочее",
"report_notification.categories.spam": "Спам",
"report_notification.categories.spam_sentence": "спам",
"report_notification.categories.violation": "Нарушение правил",
"report_notification.open": "Открыть жалобу",
"search.no_recent_searches": "Недавние запросы отсутствуют",
@@ -387,12 +387,14 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
})
.addCase(processNewNotificationForGroups.fulfilled, (state, action) => {
const notification = action.payload;
processNewNotification(
usePendingItems ? state.pendingGroups : state.groups,
notification,
);
updateLastReadId(state);
trimNotifications(state);
if (notification) {
processNewNotification(
usePendingItems ? state.pendingGroups : state.groups,
notification,
);
updateLastReadId(state);
trimNotifications(state);
}
})
.addCase(disconnectTimeline, (state, action) => {
if (action.payload.timeline === 'home') {
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm400-280q17 0 28.5-11.5T520-400q0-17-11.5-28.5T480-440q-17 0-28.5 11.5T440-400q0 17 11.5 28.5T480-360Zm-40-160h80v-240h-80v240Z"/></svg>

After

Width:  |  Height:  |  Size: 332 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M480-360q17 0 28.5-11.5T520-400q0-17-11.5-28.5T480-440q-17 0-28.5 11.5T440-400q0 17 11.5 28.5T480-360Zm-40-160h80v-240h-80v240ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"/></svg>

After

Width:  |  Height:  |  Size: 380 B

@@ -52,10 +52,6 @@ html {
color: darken($action-button-color, 25%);
}
.account__header__bar .avatar .account__avatar {
border-color: $white;
}
.getting-started__footer a {
color: $ui-secondary-color;
text-decoration: underline;
@@ -7970,7 +7970,8 @@ noscript {
.account__avatar {
background: var(--background-color);
border: 2px solid var(--background-border-color);
border: 1px solid var(--background-border-color);
border-radius: 4px;
}
}
}
+37
View File
@@ -56,3 +56,40 @@ table {
html {
scrollbar-color: lighten($ui-base-color, 4%) rgba($base-overlay-background, 0.1);
}
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-thumb {
background: lighten($ui-base-color, 4%);
border: 0px none $base-border-color;
border-radius: 50px;
}
::-webkit-scrollbar-thumb:hover {
background: lighten($ui-base-color, 6%);
}
::-webkit-scrollbar-thumb:active {
background: lighten($ui-base-color, 4%);
}
::-webkit-scrollbar-track {
border: 0px none $base-border-color;
border-radius: 0;
background: rgba($base-overlay-background, 0.1);
}
::-webkit-scrollbar-track:hover {
background: $ui-base-color;
}
::-webkit-scrollbar-track:active {
background: $ui-base-color;
}
::-webkit-scrollbar-corner {
background: transparent;
}