Merge commit 'fe04291af46d7cb9d3439fa73739b2ffb2b53d72' into glitch-soc/merge-upstream
Conflicts: - `spec/lib/sanitize/config_spec.rb`: Upstream rewrote top-level `describe` calls to `RSpec.describe`, and glitch-soc had differences in the first few tests because of the wider subset of HTML it accepts. Changed `describe` to `RSpec.describe` as upstream did, keeping glitch-soc's tests.
This commit is contained in:
commit
5a55180b95
482 files changed
+1173
-773
No files matched your search
@@ -18,7 +18,7 @@ import {
|
||||
selectSettingsNotificationsQuickFilterActive,
|
||||
selectSettingsNotificationsShows,
|
||||
} from 'mastodon/selectors/settings';
|
||||
import type { AppDispatch } from 'mastodon/store';
|
||||
import type { AppDispatch, RootState } from 'mastodon/store';
|
||||
import {
|
||||
createAppAsyncThunk,
|
||||
createDataLoadingThunk,
|
||||
@@ -32,6 +32,14 @@ function excludeAllTypesExcept(filter: string) {
|
||||
return allNotificationTypes.filter((item) => item !== filter);
|
||||
}
|
||||
|
||||
function getExcludedTypes(state: RootState) {
|
||||
const activeFilter = selectSettingsNotificationsQuickFilterActive(state);
|
||||
|
||||
return activeFilter === 'all'
|
||||
? selectSettingsNotificationsExcludedTypes(state)
|
||||
: excludeAllTypesExcept(activeFilter);
|
||||
}
|
||||
|
||||
function dispatchAssociatedRecords(
|
||||
dispatch: AppDispatch,
|
||||
notifications: ApiNotificationGroupJSON[] | ApiNotificationJSON[],
|
||||
@@ -62,17 +70,8 @@ function dispatchAssociatedRecords(
|
||||
|
||||
export const fetchNotifications = createDataLoadingThunk(
|
||||
'notificationGroups/fetch',
|
||||
async (_params, { getState }) => {
|
||||
const activeFilter =
|
||||
selectSettingsNotificationsQuickFilterActive(getState());
|
||||
|
||||
return apiFetchNotifications({
|
||||
exclude_types:
|
||||
activeFilter === 'all'
|
||||
? selectSettingsNotificationsExcludedTypes(getState())
|
||||
: excludeAllTypesExcept(activeFilter),
|
||||
});
|
||||
},
|
||||
async (_params, { getState }) =>
|
||||
apiFetchNotifications({ exclude_types: getExcludedTypes(getState()) }),
|
||||
({ notifications, accounts, statuses }, { dispatch }) => {
|
||||
dispatch(importFetchedAccounts(accounts));
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
@@ -92,9 +91,11 @@ export const fetchNotifications = createDataLoadingThunk(
|
||||
|
||||
export const fetchNotificationsGap = createDataLoadingThunk(
|
||||
'notificationGroups/fetchGap',
|
||||
async (params: { gap: NotificationGap }) =>
|
||||
apiFetchNotifications({ max_id: params.gap.maxId }),
|
||||
|
||||
async (params: { gap: NotificationGap }, { getState }) =>
|
||||
apiFetchNotifications({
|
||||
max_id: params.gap.maxId,
|
||||
exclude_types: getExcludedTypes(getState()),
|
||||
}),
|
||||
({ notifications, accounts, statuses }, { dispatch }) => {
|
||||
dispatch(importFetchedAccounts(accounts));
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
@@ -109,6 +110,7 @@ export const pollRecentNotifications = createDataLoadingThunk(
|
||||
async (_params, { getState }) => {
|
||||
return apiFetchNotifications({
|
||||
max_id: undefined,
|
||||
exclude_types: getExcludedTypes(getState()),
|
||||
// In slow mode, we don't want to include notifications that duplicate the already-displayed ones
|
||||
since_id: usePendingItems
|
||||
? getState().notificationGroups.groups.find(
|
||||
@@ -183,7 +185,6 @@ export const setNotificationsFilter = createAppAsyncThunk(
|
||||
path: ['notifications', 'quickFilter', 'active'],
|
||||
value: filterType,
|
||||
});
|
||||
// dispatch(expandNotifications({ forceLoad: true }));
|
||||
void dispatch(fetchNotifications());
|
||||
dispatch(saveSettings());
|
||||
},
|
||||
|
||||
+4
-12
@@ -42,19 +42,11 @@ export const NotificationAdminReport: React.FC<{
|
||||
|
||||
if (!account || !targetAccount) return null;
|
||||
|
||||
const domain = account.acct.split('@')[1];
|
||||
|
||||
const values = {
|
||||
name: (
|
||||
<bdi
|
||||
dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }}
|
||||
/>
|
||||
),
|
||||
target: (
|
||||
<bdi
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: targetAccount.get('display_name_html'),
|
||||
}}
|
||||
/>
|
||||
),
|
||||
name: <bdi>{domain ?? `@${account.acct}`}</bdi>,
|
||||
target: <bdi>@{targetAccount.acct}</bdi>,
|
||||
category: intl.formatMessage(messages[report.category]),
|
||||
count: report.status_ids.length,
|
||||
};
|
||||
|
||||
@@ -524,7 +524,9 @@
|
||||
"notification.moderation_warning.action_silence": "Sua conta foi limitada.",
|
||||
"notification.moderation_warning.action_suspend": "Sua conta foi suspensa.",
|
||||
"notification.own_poll": "Sua enquete terminou",
|
||||
"notification.poll": "Uma enquete que você votou terminou",
|
||||
"notification.reblog": "{name} deu boost no teu toot",
|
||||
"notification.reblog.name_and_others_with_link": "{name} e <a>{count, plural, one {# outra} other {# outras}}</a> impulsionaram a publicação",
|
||||
"notification.relationships_severance_event": "Conexões perdidas com {name}",
|
||||
"notification.relationships_severance_event.account_suspension": "Um administrador de {from} suspendeu {target}, o que significa que você não pode mais receber atualizações deles ou interagir com eles.",
|
||||
"notification.relationships_severance_event.domain_block": "An admin from {from} has blocked {target}, including {followersCount} of your followers and {followingCount, plural, one {# account} other {# accounts}} you follow.",
|
||||
@@ -533,16 +535,32 @@
|
||||
"notification.status": "{name} acabou de tootar",
|
||||
"notification.update": "{name} editou uma publicação",
|
||||
"notification_requests.accept": "Aceitar",
|
||||
"notification_requests.accept_multiple": "{count, plural, one {Aceite # pedido…} other {Aceite # pedidos…}}",
|
||||
"notification_requests.confirm_accept_multiple.button": "{count, plural, one {Aceite # pedido} other {Aceite # pedidos}}",
|
||||
"notification_requests.confirm_accept_multiple.message": "Você está prestes a aceitar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Tem certeza de que deseja continuar?",
|
||||
"notification_requests.confirm_accept_multiple.title": "Aceitar solicitações de notificação?",
|
||||
"notification_requests.confirm_dismiss_multiple.button": "{count, plural, one {Dispensar pedido} other {Dispensar pedidos}}",
|
||||
"notification_requests.confirm_dismiss_multiple.message": "Você está prestes a descartar {count, plural, one {um pedido de notificação} other {# pedidos de notificação}}. Você não será capaz de acessar facilmente{count, plural, one {} other {}} novamente. Tem certeza de que deseja continuar?",
|
||||
"notification_requests.confirm_dismiss_multiple.title": "Descartar solicitações de notificação?",
|
||||
"notification_requests.dismiss": "Rejeitar",
|
||||
"notification_requests.dismiss_multiple": "{count, plural, one {Dispensar # pedido…} other {Dispensar # pedidos…}}",
|
||||
"notification_requests.edit_selection": "Editar",
|
||||
"notification_requests.exit_selection": "Concluído",
|
||||
"notification_requests.explainer_for_limited_account": "As notificações desta conta foram filtradas porque a conta foi limitada por um moderador.",
|
||||
"notification_requests.explainer_for_limited_remote_account": "As notificações desta conta foram filtradas porque a conta ou o seu servidor foi limitado por um moderador.",
|
||||
"notification_requests.maximize": "Maximizar",
|
||||
"notification_requests.minimize_banner": "Minimizar banner de notificações filtradas",
|
||||
"notification_requests.notifications_from": "Notificações de {name}",
|
||||
"notification_requests.title": "Notificações filtradas",
|
||||
"notification_requests.view": "Ver notificações",
|
||||
"notifications.clear": "Limpar notificações",
|
||||
"notifications.clear_confirmation": "Você tem certeza de que deseja limpar todas as suas notificações?",
|
||||
"notifications.clear_title": "Limpar notificações?",
|
||||
"notifications.column_settings.admin.report": "Novas denúncias:",
|
||||
"notifications.column_settings.admin.sign_up": "Novas inscrições:",
|
||||
"notifications.column_settings.alert": "Notificações no computador",
|
||||
"notifications.column_settings.beta.category": "Recursos experimentais",
|
||||
"notifications.column_settings.beta.grouping": "Agrupar notificações",
|
||||
"notifications.column_settings.favourite": "Favoritos:",
|
||||
"notifications.column_settings.filter_bar.advanced": "Exibir todas as categorias",
|
||||
"notifications.column_settings.filter_bar.category": "Barra de filtro rápido",
|
||||
@@ -574,6 +592,11 @@
|
||||
"notifications.policy.accept": "Aceitar",
|
||||
"notifications.policy.accept_hint": "Mostrar nas notificações",
|
||||
"notifications.policy.drop": "Ignorar",
|
||||
"notifications.policy.drop_hint": "Envie para o void, para nunca mais ser visto novamente",
|
||||
"notifications.policy.filter": "Filtrar",
|
||||
"notifications.policy.filter_hint": "Enviar para caixa de notificações filtradas",
|
||||
"notifications.policy.filter_limited_accounts_hint": "Limitado pelos moderadores do servidor",
|
||||
"notifications.policy.filter_limited_accounts_title": "Contas moderadas",
|
||||
"notifications.policy.filter_new_accounts.hint": "Created within the past {days, plural, one {one day} other {# days}}",
|
||||
"notifications.policy.filter_new_accounts_title": "Novas contas",
|
||||
"notifications.policy.filter_not_followers_hint": "Including people who have been following you fewer than {days, plural, one {one day} other {# days}}",
|
||||
@@ -582,6 +605,7 @@
|
||||
"notifications.policy.filter_not_following_title": "Pessoas que você não segue",
|
||||
"notifications.policy.filter_private_mentions_hint": "Filtrado, a menos que respondido em sua própria menção ou se você segue o remetente",
|
||||
"notifications.policy.filter_private_mentions_title": "Menções privadas não solicitadas",
|
||||
"notifications.policy.title": "Gerenciar notificações de…",
|
||||
"notifications_permission_banner.enable": "Ativar notificações no computador",
|
||||
"notifications_permission_banner.how_to_control": "Para receber notificações quando o Mastodon não estiver aberto, ative as notificações no computador. Você pode controlar precisamente quais tipos de interações geram notificações no computador através do botão {icon}.",
|
||||
"notifications_permission_banner.title": "Nunca perca nada",
|
||||
@@ -708,9 +732,13 @@
|
||||
"report.unfollow_explanation": "Você está seguindo esta conta. Para não ver as publicações dela em sua página inicial, deixe de segui-la.",
|
||||
"report_notification.attached_statuses": "{count, plural, one {{count} publicação anexada} other {{count} publicações anexadas}}",
|
||||
"report_notification.categories.legal": "Legal",
|
||||
"report_notification.categories.legal_sentence": "conteúdo ilegal",
|
||||
"report_notification.categories.other": "Outro",
|
||||
"report_notification.categories.other_sentence": "outro",
|
||||
"report_notification.categories.spam": "Spam",
|
||||
"report_notification.categories.spam_sentence": "spam",
|
||||
"report_notification.categories.violation": "Violação de regra",
|
||||
"report_notification.categories.violation_sentence": "violação de regra",
|
||||
"report_notification.open": "Abrir denúncia",
|
||||
"search.no_recent_searches": "Nenhuma busca recente",
|
||||
"search.placeholder": "Pesquisar",
|
||||
|
||||
Reference in new issue
Block a user