Skip to content

Commit

Permalink
Merge remote-tracking branch 'mastodon/main' into hota/master
Browse files Browse the repository at this point in the history
* revert cd88876

Signed-off-by: lindwurm <[email protected]>
  • Loading branch information
lindwurm committed Oct 22, 2024
2 parents cec1e89 + 029c99b commit b091e75
Show file tree
Hide file tree
Showing 114 changed files with 469 additions and 615 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ FROM build AS libvips

# libvips version to compile, change with [--build-arg VIPS_VERSION="8.15.2"]
# renovate: datasource=github-releases depName=libvips packageName=libvips/libvips
ARG VIPS_VERSION=8.15.3
ARG VIPS_VERSION=8.15.5
# libvips download URL, change with [--build-arg VIPS_URL="https://github.com/libvips/libvips/releases/download"]
ARG VIPS_URL=https://github.com/libvips/libvips/releases/download

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ gem 'irb', '~> 1.8'
gem 'kaminari', '~> 1.2'
gem 'link_header', '~> 0.0'
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar'
gem 'mime-types', '~> 3.6.0', require: 'mime/types/columnar'
gem 'nokogiri', '~> 1.15'
gem 'oj', '~> 3.14'
gem 'ox', '~> 2.14'
Expand Down
27 changes: 14 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ GEM
attr_required (1.0.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.983.0)
aws-sdk-core (3.209.1)
aws-partitions (1.992.0)
aws-sdk-core (3.210.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
Expand All @@ -147,7 +147,7 @@ GEM
blurhash (0.1.8)
bootsnap (1.18.4)
msgpack (~> 1.2)
brakeman (6.2.1)
brakeman (6.2.2)
racc
browser (5.3.1)
brpoplpush-redis_script (0.1.3)
Expand Down Expand Up @@ -243,7 +243,7 @@ GEM
tzinfo
excon (0.111.0)
fabrication (2.31.0)
faker (3.4.2)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -439,9 +439,10 @@ GEM
azure-storage-blob (~> 2.0.1)
hashie (~> 5.0)
memory_profiler (1.1.0)
mime-types (3.5.2)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0820)
mime-types-data (3.2024.1001)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
Expand Down Expand Up @@ -771,7 +772,7 @@ GEM
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-prof (1.7.0)
ruby-prof (1.7.1)
ruby-progressbar (1.13.0)
ruby-saml (1.17.0)
nokogiri (>= 1.13.10)
Expand Down Expand Up @@ -976,7 +977,7 @@ DEPENDENCIES
mario-redis-lock (~> 1.2)
md-paperclip-azure (~> 2.2)
memory_profiler
mime-types (~> 3.5.0)
mime-types (~> 3.6.0)
net-http (~> 0.4.0)
net-ldap (~> 0.18)
nokogiri (~> 1.15)
Expand Down
5 changes: 5 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ def copyable_input(options = {})
tag.input(type: :text, maxlength: 999, spellcheck: false, readonly: true, **options)
end

def recent_tag_usage(tag)
people = tag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts
I18n.t 'user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(people), count: people
end

private

def storage_host_var
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/languages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module LanguagesHelper
th: ['Thai', 'ไทย'].freeze,
ti: ['Tigrinya', 'ትግርኛ'].freeze,
tk: ['Turkmen', 'Türkmen'].freeze,
tl: ['Tagalog', 'Wikang Tagalog'].freeze,
tl: ['Tagalog', 'Tagalog'].freeze,
tn: ['Tswana', 'Setswana'].freeze,
to: ['Tonga', 'faka Tonga'].freeze,
tr: ['Turkish', 'Türkçe'].freeze,
Expand Down
35 changes: 14 additions & 21 deletions app/javascript/entrypoints/public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,31 +327,24 @@ Rails.delegate(document, '.input-copy button', 'click', ({ target }) => {

if (!input) return;

const oldReadOnly = input.readOnly;

input.readOnly = false;
input.focus();
input.select();
input.setSelectionRange(0, input.value.length);

try {
if (document.execCommand('copy')) {
input.blur();

navigator.clipboard
.writeText(input.value)
.then(() => {
const parent = target.parentElement;

if (!parent) return;
parent.classList.add('copied');
if (parent) {
parent.classList.add('copied');

setTimeout(() => {
parent.classList.remove('copied');
}, 700);
}
} catch (err) {
console.error(err);
}
setTimeout(() => {
parent.classList.remove('copied');
}, 700);
}

input.readOnly = oldReadOnly;
return true;
})
.catch((error: unknown) => {
console.error(error);
});
});

const toggleSidebar = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PropsWithChildren } from 'react';
import type { PropsWithChildren, JSX } from 'react';
import { useCallback } from 'react';

import classNames from 'classnames';
Expand Down
1 change: 1 addition & 0 deletions app/javascript/mastodon/components/short_number.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { memo } from 'react';
import type { JSX } from 'react';

import { FormattedMessage, FormattedNumber } from 'react-intl';

Expand Down
12 changes: 2 additions & 10 deletions app/javascript/mastodon/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { MediaGallery, Video, Audio } from '../features/ui/util/async-components
import { SensitiveMediaContext } from '../features/ui/util/sensitive_media_context';
import { cropAttachmentThumbnailsOnTimeline, displayMedia } from '../initial_state';

import AttachmentList from './attachment_list';
import { Avatar } from './avatar';
import { AvatarOverlay } from './avatar_overlay';
import { DisplayName } from './display_name';
Expand Down Expand Up @@ -450,14 +449,7 @@ class Status extends ImmutablePureComponent {
} else if (status.get('media_attachments').size > 0) {
const language = status.getIn(['translation', 'language']) || status.get('language');

if (this.props.muted) {
media = (
<AttachmentList
compact
media={status.get('media_attachments')}
/>
);
} else if (['image', 'gifv'].includes(status.getIn(['media_attachments', 0, 'type'])) || status.get('media_attachments').size > 1) {
if (['image', 'gifv', 'unknown'].includes(status.getIn(['media_attachments', 0, 'type'])) || status.get('media_attachments').size > 1) {
media = (
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}>
{Component => (
Expand Down Expand Up @@ -528,7 +520,7 @@ class Status extends ImmutablePureComponent {
</Bundle>
);
}
} else if (status.get('spoiler_text').length === 0 && status.get('card') && !this.props.muted) {
} else if (status.get('spoiler_text').length === 0 && status.get('card')) {
media = (
<Card
onOpenMedia={this.handleOpenMedia}
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/status_action_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class StatusActionBar extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShareClick });
}

if (publicStatus && (signedIn || !isRemote)) {
if (publicStatus && !isRemote) {
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ class ColumnSettings extends PureComponent {

return (
<div className='column-settings'>
<div className='column-settings__row'>
<SettingToggle settings={settings} settingPath={['other', 'onlyMedia']} onChange={onChange} label={<FormattedMessage id='community.column_settings.media_only' defaultMessage='Media only' />} />
</div>
<section>
<div className='column-settings__row'>
<SettingToggle settings={settings} settingPath={['other', 'onlyMedia']} onChange={onChange} label={<FormattedMessage id='community.column_settings.media_only' defaultMessage='Media only' />} />
</div>
</section>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from 'react';

import { FormattedMessage } from 'react-intl';

import { Link } from 'react-router-dom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'react';
import type { JSX } from 'react';

import classNames from 'classnames';

Expand Down
3 changes: 3 additions & 0 deletions app/javascript/mastodon/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"compose_form.poll.duration": "Cyfnod pleidlais",
"compose_form.poll.multiple": "Dewis lluosog",
"compose_form.poll.option_placeholder": "Dewis {number}",
"compose_form.poll.single": "Dewis unigol",
"compose_form.poll.switch_to_multiple": "Newid pleidlais i adael mwy nag un dewis",
"compose_form.poll.switch_to_single": "Newid pleidlais i gyfyngu i un dewis",
"compose_form.poll.type": "Arddull",
Expand Down Expand Up @@ -507,6 +508,7 @@
"notification.favourite": "Ffafriodd {name} eich postiad",
"notification.favourite.name_and_others_with_link": "Ffafriodd {name} a <a>{count, plural, one {# arall} other {# eraill}}</a> eich postiad",
"notification.follow": "Dilynodd {name} chi",
"notification.follow.name_and_others": "Mae {name} a <a>{count, plural, zero {}one {# other} two {# others} few {# others} many {# others} other {# others}}</a> nawr yn eich dilyn chi",
"notification.follow_request": "Mae {name} wedi gwneud cais i'ch dilyn",
"notification.follow_request.name_and_others": "Mae {name} a{count, plural, one {# other} other {# others}} wedi gofyn i'ch dilyn chi",
"notification.label.mention": "Crybwyll",
Expand Down Expand Up @@ -565,6 +567,7 @@
"notifications.column_settings.filter_bar.category": "Bar hidlo cyflym",
"notifications.column_settings.follow": "Dilynwyr newydd:",
"notifications.column_settings.follow_request": "Ceisiadau dilyn newydd:",
"notifications.column_settings.group": "Grŵp",
"notifications.column_settings.mention": "Crybwylliadau:",
"notifications.column_settings.poll": "Canlyniadau pleidlais:",
"notifications.column_settings.push": "Hysbysiadau gwthiadwy",
Expand Down
3 changes: 3 additions & 0 deletions app/javascript/mastodon/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"compose_form.poll.duration": "משך הסקר",
"compose_form.poll.multiple": "בחירה מרובה",
"compose_form.poll.option_placeholder": "אפשרות {number}",
"compose_form.poll.single": "בחירה יחידה",
"compose_form.poll.switch_to_multiple": "אפשרו בחירה מרובה בסקר",
"compose_form.poll.switch_to_single": "אפשרו בחירה בודדת בסקר",
"compose_form.poll.type": "סוג משאל",
Expand Down Expand Up @@ -507,6 +508,7 @@
"notification.favourite": "הודעתך חובבה על ידי {name}",
"notification.favourite.name_and_others_with_link": "{name} ועוד <a>{count, plural,one {אחד נוסף}other {# נוספים}}</a> חיבבו את הודעתך",
"notification.follow": "{name} במעקב אחרייך",
"notification.follow.name_and_others": "{name} ועוד <a>{count, plural,one {מישהו} other {# אחרים}}</a> החלו לעקוב אחריך",
"notification.follow_request": "{name} ביקשו לעקוב אחריך",
"notification.follow_request.name_and_others": "{name} ועוד {count, plural,one {אחד אחר}other {# אחרים}} ביקשו לעקוב אחריך",
"notification.label.mention": "אזכור",
Expand Down Expand Up @@ -565,6 +567,7 @@
"notifications.column_settings.filter_bar.category": "שורת סינון מהיר",
"notifications.column_settings.follow": "עוקבים חדשים:",
"notifications.column_settings.follow_request": "בקשות מעקב חדשות:",
"notifications.column_settings.group": "קבוצה",
"notifications.column_settings.mention": "פניות:",
"notifications.column_settings.poll": "תוצאות סקר:",
"notifications.column_settings.push": "התראות בדחיפה",
Expand Down
1 change: 1 addition & 0 deletions app/javascript/mastodon/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"compose_form.poll.duration": "Durata del sondaggio",
"compose_form.poll.multiple": "Scelta multipla",
"compose_form.poll.option_placeholder": "Opzione {number}",
"compose_form.poll.single": "Scelta singola",
"compose_form.poll.switch_to_multiple": "Modifica il sondaggio per consentire scelte multiple",
"compose_form.poll.switch_to_single": "Modifica il sondaggio per consentire una singola scelta",
"compose_form.poll.type": "Stile",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@
"status.bookmark": "ブックマーク",
"status.cancel_reblog_private": "ブースト解除",
"status.cannot_reblog": "この投稿はブーストできません",
"status.continued_thread": "つり下げ投稿",
"status.continued_thread": "続きのスレッド",
"status.copy": "投稿へのリンクをコピー",
"status.delete": "削除",
"status.detailed_status": "詳細な会話ビュー",
Expand Down
Loading

0 comments on commit b091e75

Please sign in to comment.