Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes up to 82d2ce293d98a2b9e024bc5396c3586904d46ae5 #2934

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3bdfa3e
Added validator for extra profile field values with empty name (#33421)
timothyjrogers Jan 4, 2025
f16fbc0
Use configured limit for number of profile fields (#33463)
zunda Jan 6, 2025
081244f
Update dependency sass to v1.83.1 (#33453)
renovate[bot] Jan 6, 2025
c0f5705
Update dependency uuid to v11.0.4 (#33464)
renovate[bot] Jan 6, 2025
c93c1f3
New Crowdin Translations (automated) (#33451)
github-actions[bot] Jan 6, 2025
612d618
Fix `/share` not using server-set characters limit (#33459)
kescherCode Jan 6, 2025
08dd11f
Use `in_order_of` with `filter: false` in `AccountSummary.localized` …
mjankowski Jan 6, 2025
dbbf450
Fix `fediverse:creator` metadata not showing up in REST API (#33466)
ClearlyClaire Jan 6, 2025
ea9b10d
Fix error 500 when passing an invalid `lang` parameter (#33467)
ClearlyClaire Jan 6, 2025
c692f69
Fix color contrast in report modal (#33468)
ClearlyClaire Jan 6, 2025
e8672e2
Further remove old notifications code (#33465)
ClearlyClaire Jan 6, 2025
1eb752f
Extract constants for `AnnualReport::*` minimum thresholds (#33469)
mjankowski Jan 6, 2025
4cf031e
Extricate `Invite` constants for code generation (#33472)
mjankowski Jan 6, 2025
ef39398
Add `urgent` scope and `by_version` method to `SoftwareUpdate` (#33470)
mjankowski Jan 6, 2025
24554bb
Use `ubuntu-latest` for all GH actions runners (#33473)
mjankowski Jan 6, 2025
fbd2833
Avoid "double icon" near each other in nav sidebar (#33449)
mjankowski Jan 6, 2025
82d2ce2
Convert `admin/warning_presets` spec controller->system (#33474)
mjankowski Jan 6, 2025
126ce9a
Merge commit '82d2ce293d98a2b9e024bc5396c3586904d46ae5' into glitch-s…
ClearlyClaire Jan 6, 2025
32567a6
[Glitch] Fix color contrast in report modal
ClearlyClaire Jan 6, 2025
412a0dd
[Glitch] Further remove old notifications code
ClearlyClaire Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
check-i18n:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:

test-libvips:
name: Libvips tests
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

needs:
- build
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/software_updates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SoftwareUpdatesController < BaseController

def index
authorize :software_update, :index?
@software_updates = SoftwareUpdate.all.sort_by(&:gem_version)
@software_updates = SoftwareUpdate.by_version
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/localized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def http_accept_language
end

def available_locale_or_nil(locale_name)
locale_name.to_sym if locale_name.present? && I18n.available_locales.include?(locale_name.to_sym)
locale_name.to_sym if locale_name.respond_to?(:to_sym) && I18n.available_locales.include?(locale_name.to_sym)
end

def content_locale
Expand Down
42 changes: 3 additions & 39 deletions app/javascript/flavours/glitch/actions/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,25 @@ import { requestNotificationPermission } from '../utils/notifications';
import { fetchFollowRequests } from './accounts';
import {
importFetchedAccount,
importFetchedStatus,
} from './importer';
import { submitMarkers } from './markers';
import { notificationsUpdate } from "./notifications_typed";
import { register as registerPushNotifications } from './push_notifications';
import { saveSettings } from './settings';

export * from "./notifications_typed";

export const NOTIFICATIONS_UPDATE_NOOP = 'NOTIFICATIONS_UPDATE_NOOP';

export const NOTIFICATIONS_FILTER_SET = 'NOTIFICATIONS_FILTER_SET';

export const NOTIFICATIONS_SET_BROWSER_SUPPORT = 'NOTIFICATIONS_SET_BROWSER_SUPPORT';
export const NOTIFICATIONS_SET_BROWSER_PERMISSION = 'NOTIFICATIONS_SET_BROWSER_PERMISSION';

export const NOTIFICATION_REQUESTS_DISMISS_REQUEST = 'NOTIFICATION_REQUESTS_DISMISS_REQUEST';
export const NOTIFICATION_REQUESTS_DISMISS_SUCCESS = 'NOTIFICATION_REQUESTS_DISMISS_SUCCESS';
export const NOTIFICATION_REQUESTS_DISMISS_FAIL = 'NOTIFICATION_REQUESTS_DISMISS_FAIL';

defineMessages({
mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' },
group: { id: 'notifications.group', defaultMessage: '{count} notifications' },
});

export function updateNotifications(notification, intlMessages, intlLocale) {
return (dispatch, getState) => {
const activeFilter = getState().getIn(['settings', 'notifications', 'quickFilter', 'active']);
const showInColumn = activeFilter === 'all' ? getState().getIn(['settings', 'notifications', 'shows', notification.type], true) : activeFilter === notification.type;
const showAlert = getState().getIn(['settings', 'notifications', 'alerts', notification.type], true);
const playSound = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);

Expand All @@ -57,24 +47,9 @@ export function updateNotifications(notification, intlMessages, intlLocale) {

dispatch(submitMarkers());

if (showInColumn) {
dispatch(importFetchedAccount(notification.account));

if (notification.status) {
dispatch(importFetchedStatus(notification.status));
}

if (notification.report) {
dispatch(importFetchedAccount(notification.report.target_account));
}

dispatch(notificationsUpdate({ notification, playSound: playSound && !filtered}));
} else if (playSound && !filtered) {
dispatch({
type: NOTIFICATIONS_UPDATE_NOOP,
meta: { sound: 'boop' },
});
}
// `notificationsUpdate` is still used in `user_lists` and `relationships` reducers
dispatch(importFetchedAccount(notification.account));
dispatch(notificationsUpdate({ notification, playSound: playSound && !filtered}));

// Desktop notifications
if (typeof window.Notification !== 'undefined' && showAlert && !filtered) {
Expand All @@ -93,17 +68,6 @@ export function updateNotifications(notification, intlMessages, intlLocale) {

const noOp = () => {};

export function setFilter (filterType) {
return dispatch => {
dispatch({
type: NOTIFICATIONS_FILTER_SET,
path: ['notifications', 'quickFilter', 'active'],
value: filterType,
});
dispatch(saveSettings());
};
}

// Browser support
export function setupBrowserNotifications() {
return dispatch => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';

import { openModal } from 'flavours/glitch/actions/modal';
import { fetchNotifications } from 'flavours/glitch/actions/notification_groups';
import { fetchNotifications , setNotificationsFilter } from 'flavours/glitch/actions/notification_groups';

import { showAlert } from '../../../actions/alerts';
import { setFilter, requestBrowserPermission } from '../../../actions/notifications';
import { requestBrowserPermission } from '../../../actions/notifications';
import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications';
import { changeSetting } from '../../../actions/settings';
import ColumnSettings from '../components/column_settings';
Expand Down Expand Up @@ -43,7 +43,7 @@ const mapDispatchToProps = (dispatch) => ({
}
} else if (path[0] === 'quickFilter') {
dispatch(changeSetting(['notifications', ...path], checked));
dispatch(setFilter('all'));
dispatch(setNotificationsFilter('all'));
} else if (path[0] === 'alerts' && checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/styles/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ body > [data-popper-placement] {
padding: 0 10px;

.detailed-status__display-name {
color: lighten($inverted-text-color, 16%);
color: $dark-text-color;

span {
display: inline;
Expand Down
42 changes: 3 additions & 39 deletions app/javascript/mastodon/actions/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,25 @@ import { requestNotificationPermission } from '../utils/notifications';
import { fetchFollowRequests } from './accounts';
import {
importFetchedAccount,
importFetchedStatus,
} from './importer';
import { submitMarkers } from './markers';
import { notificationsUpdate } from "./notifications_typed";
import { register as registerPushNotifications } from './push_notifications';
import { saveSettings } from './settings';

export * from "./notifications_typed";

export const NOTIFICATIONS_UPDATE_NOOP = 'NOTIFICATIONS_UPDATE_NOOP';

export const NOTIFICATIONS_FILTER_SET = 'NOTIFICATIONS_FILTER_SET';

export const NOTIFICATIONS_SET_BROWSER_SUPPORT = 'NOTIFICATIONS_SET_BROWSER_SUPPORT';
export const NOTIFICATIONS_SET_BROWSER_PERMISSION = 'NOTIFICATIONS_SET_BROWSER_PERMISSION';

export const NOTIFICATION_REQUESTS_DISMISS_REQUEST = 'NOTIFICATION_REQUESTS_DISMISS_REQUEST';
export const NOTIFICATION_REQUESTS_DISMISS_SUCCESS = 'NOTIFICATION_REQUESTS_DISMISS_SUCCESS';
export const NOTIFICATION_REQUESTS_DISMISS_FAIL = 'NOTIFICATION_REQUESTS_DISMISS_FAIL';

defineMessages({
mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' },
group: { id: 'notifications.group', defaultMessage: '{count} notifications' },
});

export function updateNotifications(notification, intlMessages, intlLocale) {
return (dispatch, getState) => {
const activeFilter = getState().getIn(['settings', 'notifications', 'quickFilter', 'active']);
const showInColumn = activeFilter === 'all' ? getState().getIn(['settings', 'notifications', 'shows', notification.type], true) : activeFilter === notification.type;
const showAlert = getState().getIn(['settings', 'notifications', 'alerts', notification.type], true);
const playSound = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);

Expand All @@ -57,24 +47,9 @@ export function updateNotifications(notification, intlMessages, intlLocale) {

dispatch(submitMarkers());

if (showInColumn) {
dispatch(importFetchedAccount(notification.account));

if (notification.status) {
dispatch(importFetchedStatus(notification.status));
}

if (notification.report) {
dispatch(importFetchedAccount(notification.report.target_account));
}

dispatch(notificationsUpdate({ notification, playSound: playSound && !filtered}));
} else if (playSound && !filtered) {
dispatch({
type: NOTIFICATIONS_UPDATE_NOOP,
meta: { sound: 'boop' },
});
}
// `notificationsUpdate` is still used in `user_lists` and `relationships` reducers
dispatch(importFetchedAccount(notification.account));
dispatch(notificationsUpdate({ notification, playSound: playSound && !filtered}));

// Desktop notifications
if (typeof window.Notification !== 'undefined' && showAlert && !filtered) {
Expand All @@ -93,17 +68,6 @@ export function updateNotifications(notification, intlMessages, intlLocale) {

const noOp = () => {};

export function setFilter (filterType) {
return dispatch => {
dispatch({
type: NOTIFICATIONS_FILTER_SET,
path: ['notifications', 'quickFilter', 'active'],
value: filterType,
});
dispatch(saveSettings());
};
}

// Browser support
export function setupBrowserNotifications() {
return dispatch => {
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/containers/compose_container.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Provider } from 'react-redux';

import { fetchCustomEmojis } from 'mastodon/actions/custom_emojis';
import { fetchServer } from 'mastodon/actions/server';
import { hydrateStore } from 'mastodon/actions/store';
import { Router } from 'mastodon/components/router';
import Compose from 'mastodon/features/standalone/compose';
Expand All @@ -13,6 +14,7 @@ if (initialState) {
}

store.dispatch(fetchCustomEmojis());
store.dispatch(fetchServer());

const ComposeContainer = () => (
<IntlProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';

import { openModal } from 'mastodon/actions/modal';
import { fetchNotifications } from 'mastodon/actions/notification_groups';
import { fetchNotifications , setNotificationsFilter } from 'mastodon/actions/notification_groups';

import { showAlert } from '../../../actions/alerts';
import { setFilter, requestBrowserPermission } from '../../../actions/notifications';
import { requestBrowserPermission } from '../../../actions/notifications';
import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications';
import { changeSetting } from '../../../actions/settings';
import ColumnSettings from '../components/column_settings';
Expand Down Expand Up @@ -43,7 +43,7 @@ const mapDispatchToProps = (dispatch) => ({
}
} else if (path[0] === 'quickFilter') {
dispatch(changeSetting(['notifications', ...path], checked));
dispatch(setFilter('all'));
dispatch(setNotificationsFilter('all'));
} else if (path[0] === 'alerts' && checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
Expand Down
4 changes: 3 additions & 1 deletion app/javascript/mastodon/locales/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,7 @@
"dismissable_banner.community_timeline": "Bunlar, hesabları {domain} serverində yerləşən insanların ən son ictimai paylaşımlarıdır.",
"dismissable_banner.dismiss": "Bağla",
"dismissable_banner.explore_links": "Bu xəbərlər bu gün fediversedə ən çox paylaşılır. Daha fərqli insanlar tərəfindən dərc edilən daha yeni xəbərlər daha yuxarıda sıralanır.",
"dismissable_banner.explore_statuses": "Fediversedən olan bu paylaşımlar bu gün maraq qazanır. Daha çox gücləndirici və bəyənmə olan daha yeni paylaşımlar daha yuxarıda sıralanır."
"dismissable_banner.explore_statuses": "Fediversedən olan bu paylaşımlar bu gün maraq qazanır. Daha çox gücləndirici və bəyənmə olan daha yeni paylaşımlar daha yuxarıda sıralanır.",
"domain_block_modal.block_account_instead": "@{name} istifadəçisini blokla",
"domain_block_modal.they_can_interact_with_old_posts": "Bu serverdən olan insanlar köhnə paylaşımlarınızla əlaqə qura bilər."
}
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
"keyboard_shortcuts.toggle_hidden": "Показване/скриване на текст зад предупреждение на съдържание",
"keyboard_shortcuts.toggle_sensitivity": "Показване/скриване на мултимедията",
"keyboard_shortcuts.toot": "Начало на нова публикация",
"keyboard_shortcuts.translate": "за превод на публикация",
"keyboard_shortcuts.unfocus": "Разфокусиране на текстовото поле за съставяне/търсене",
"keyboard_shortcuts.up": "Преместване нагоре в списъка",
"lightbox.close": "Затваряне",
Expand Down Expand Up @@ -836,6 +837,7 @@
"status.reblogs.empty": "Още никого не е подсилвал публикацията. Подсилващият ще се покаже тук.",
"status.redraft": "Изтриване и преработване",
"status.remove_bookmark": "Премахване на отметката",
"status.remove_favourite": "Премахване от любими",
"status.replied_in_thread": "Отговорено в нишката",
"status.replied_to": "В отговор до {name}",
"status.reply": "Отговор",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
"keyboard_shortcuts.toggle_hidden": "Mostra/amaga el text marcat com a sensible",
"keyboard_shortcuts.toggle_sensitivity": "Mostra/amaga contingut",
"keyboard_shortcuts.toot": "Escriu un nou tut",
"keyboard_shortcuts.translate": "per a traduir una publicació",
"keyboard_shortcuts.unfocus": "Descentra l'àrea de composició de text/cerca",
"keyboard_shortcuts.up": "Apuja a la llista",
"lightbox.close": "Tanca",
Expand Down Expand Up @@ -836,6 +837,7 @@
"status.reblogs.empty": "Encara no ha impulsat ningú aquest tut. Quan algú ho faci, apareixerà aquí.",
"status.redraft": "Esborra i reescriu",
"status.remove_bookmark": "Elimina el marcador",
"status.remove_favourite": "Elimina dels preferits",
"status.replied_in_thread": "Respost al fil",
"status.replied_to": "En resposta a {name}",
"status.reply": "Respon",
Expand Down
Loading
Loading