Skip to content

Commit

Permalink
Merge pull request glitch-soc#2709 from ClearlyClaire/glitch-soc/merg…
Browse files Browse the repository at this point in the history
…e-upstream

Merge upstream changes up to 1bf661c
  • Loading branch information
ClearlyClaire authored May 15, 2024
2 parents 5ed6622 + 47ce5f4 commit 19ed3d9
Show file tree
Hide file tree
Showing 42 changed files with 326 additions and 111 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ jobs:
ports:
- 6379:6379

search:
image: ${{ matrix.search-image }}
elasticsearch:
image: ${{ contains(matrix.search-image, 'elasticsearch') && matrix.search-image || '' }}
env:
discovery.type: single-node
xpack.security.enabled: false
Expand All @@ -277,6 +277,20 @@ jobs:
ports:
- 9200:9200

opensearch:
image: ${{ contains(matrix.search-image, 'opensearch') && matrix.search-image || '' }}
env:
discovery.type: single-node
DISABLE_INSTALL_DEMO_CONFIG: true
DISABLE_SECURITY_PLUGIN: true
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 9200:9200

env:
DB_HOST: localhost
DB_USER: postgres
Expand All @@ -300,6 +314,8 @@ jobs:
include:
- ruby-version: '.ruby-version'
search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2
- ruby-version: '.ruby-version'
search-image: opensearchproject/opensearch:2

steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 1 addition & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.62.1.
# using RuboCop version 1.63.5.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -122,13 +122,6 @@ Style/HashTransformValues:
- 'app/serializers/rest/web_push_subscription_serializer.rb'
- 'app/services/import_service.rb'

# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'config/environments/production.rb'
- 'config/initializers/devise.rb'
- 'config/initializers/ffmpeg.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
Style/MapToHash:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ GEM
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.20.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-pg (0.27.2)
opentelemetry-instrumentation-pg (0.27.3)
opentelemetry-api (~> 1.0)
opentelemetry-helpers-sql-obfuscation
opentelemetry-instrumentation-base (~> 0.22.1)
Expand Down
1 change: 0 additions & 1 deletion app/javascript/flavours/glitch/components/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ Account.propTypes = {
onBlock: PropTypes.func,
onMute: PropTypes.func,
onMuteNotifications: PropTypes.func,
intl: PropTypes.object.isRequired,
hidden: PropTypes.bool,
minimal: PropTypes.bool,
defaultAction: PropTypes.string,
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/flavours/glitch/styles/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4602,12 +4602,20 @@ a.status-card {
outline: $ui-button-focus-outline;
}

.no-reduce-motion .icon {
transition: transform 0.15s ease-in-out;
}

&.active {
color: $primary-text-color;

&:hover {
color: $primary-text-color;
}

.icon {
transform: rotate(60deg);
}
}

&:disabled {
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/components/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ Account.propTypes = {
onBlock: PropTypes.func,
onMute: PropTypes.func,
onMuteNotifications: PropTypes.func,
intl: PropTypes.object.isRequired,
hidden: PropTypes.bool,
minimal: PropTypes.bool,
defaultAction: PropTypes.string,
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"notification.follow_request": "Mae {name} wedi gwneud cais i'ch dilyn",
"notification.mention": "Crybwyllodd {name} amdanoch chi",
"notification.moderation-warning.learn_more": "Dysgu mwy",
"notification.moderation_warning": "Rydych wedi derbyn rhybudd cymedroli",
"notification.moderation_warning.action_delete_statuses": "Mae rhai o'ch postiadau wedi'u dileu.",
"notification.moderation_warning.action_disable": "Mae eich cyfrif wedi'i analluogi.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Mae rhai o'ch postiadau wedi'u marcio'n sensitif.",
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/mastodon/locales/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,12 @@
"notification.moderation-warning.learn_more": "Saber más",
"notification.moderation_warning": "Has recibido una advertencia de moderación",
"notification.moderation_warning.action_delete_statuses": "Se han eliminado algunas de tus publicaciones.",
"notification.moderation_warning.action_disable": "Se ha desactivado su cuenta.",
"notification.moderation_warning.action_disable": "Tu cuenta ha sido desactivada.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Se han marcado como sensibles algunas de tus publicaciones.",
"notification.moderation_warning.action_none": "Tu cuenta ha recibido un aviso de moderación.",
"notification.moderation_warning.action_sensitive": "De ahora en adelante, todas tus publicaciones se marcarán como sensibles.",
"notification.moderation_warning.action_silence": "Se ha limitado tu cuenta.",
"notification.moderation_warning.action_suspend": "Se ha suspendido tu cuenta.",
"notification.moderation_warning.action_silence": "Tu cuenta ha sido limitada.",
"notification.moderation_warning.action_suspend": "Tu cuenta ha sido suspendida.",
"notification.own_poll": "Tu encuesta ha terminado",
"notification.poll": "Una encuesta en la que has votado ha terminado",
"notification.reblog": "{name} ha retooteado tu estado",
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/mastodon/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,12 @@
"notification.moderation-warning.learn_more": "Saber más",
"notification.moderation_warning": "Has recibido una advertencia de moderación",
"notification.moderation_warning.action_delete_statuses": "Se han eliminado algunas de tus publicaciones.",
"notification.moderation_warning.action_disable": "Se ha desactivado su cuenta.",
"notification.moderation_warning.action_disable": "Tu cuenta ha sido desactivada.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Se han marcado como sensibles algunas de tus publicaciones.",
"notification.moderation_warning.action_none": "Tu cuenta ha recibido un aviso de moderación.",
"notification.moderation_warning.action_sensitive": "De ahora en adelante, todas tus publicaciones se marcarán como sensibles.",
"notification.moderation_warning.action_silence": "Se ha limitado tu cuenta.",
"notification.moderation_warning.action_suspend": "Se ha suspendido tu cuenta.",
"notification.moderation_warning.action_silence": "Tu cuenta ha sido limitada.",
"notification.moderation_warning.action_suspend": "Tu cuenta ha sido suspendida.",
"notification.own_poll": "Tu encuesta ha terminado",
"notification.poll": "Una encuesta en la que has votado ha terminado",
"notification.reblog": "{name} ha impulsado tu publicación",
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/locales/fo.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,11 @@
"notification.follow_request": "{name} biður um at fylgja tær",
"notification.mention": "{name} nevndi teg",
"notification.moderation-warning.learn_more": "Lær meira",
"notification.moderation_warning": "Tú hevur móttikið eina umsjónarávarðing",
"notification.moderation_warning": "Tú hevur móttikið eina umsjónarávaring",
"notification.moderation_warning.action_delete_statuses": "Onkrir av tínum postum eru strikaðir.",
"notification.moderation_warning.action_disable": "Konta tín er gjørd óvirkin.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Nakrir av postum tínum eru merktir sum viðkvæmir.",
"notification.moderation_warning.action_none": "Konta tín hevur móttikið eina umsjónarávarðing.",
"notification.moderation_warning.action_none": "Konta tín hevur móttikið eina umsjónarávaring.",
"notification.moderation_warning.action_sensitive": "Postar tínir verða merktir sum viðkvæmir frá nú av.",
"notification.moderation_warning.action_silence": "Konta tín er avmarkað.",
"notification.moderation_warning.action_suspend": "Konta tín er ógildað.",
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"notification.follow_request": "{name} solicitou seguirte",
"notification.mention": "{name} mencionoute",
"notification.moderation-warning.learn_more": "Saber máis",
"notification.moderation_warning": "Recibiches unha advertencia da moderación",
"notification.moderation_warning.action_delete_statuses": "Algunha das túas publicacións foron eliminadas.",
"notification.moderation_warning.action_disable": "A túa conta foi desactivada.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Algunha das túas publicacións foron marcadas como sensibles.",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/ia.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"notification.follow_request": "{name} ha requestate de sequer te",
"notification.mention": "{name} te ha mentionate",
"notification.moderation-warning.learn_more": "Apprender plus",
"notification.moderation_warning": "Tu ha recipite un advertimento de moderation",
"notification.moderation_warning": "Tu ha recepite un aviso de moderation",
"notification.moderation_warning.action_delete_statuses": "Alcunes de tu messages ha essite removite.",
"notification.moderation_warning.action_disable": "Tu conto ha essite disactivate.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Alcunes de tu messages ha essite marcate como sensibile.",
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/mastodon/locales/ie.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"announcement.announcement": "Proclamation",
"attachments_list.unprocessed": "(íntractat)",
"audio.hide": "Celar audio",
"block_modal.remote_users_caveat": "Noi va petir que li servitor {domain} mey respecter tui decision. Támen, obedientie ne es garantit pro que chascun servitor gere bloccas diferentmen. Possibilmen public postas va restar visibil a usatores de inloggat.",
"block_modal.show_less": "Monstrar minu",
"block_modal.show_more": "Monstrar plu",
"block_modal.they_cant_mention": "Ne posse mentionar ni sequer te.",
Expand Down Expand Up @@ -224,7 +225,10 @@
"domain_pill.their_username": "Su unic identificator sur su servitor. It es possibil que altri servitores va haver usatores con li sam nómine.",
"domain_pill.username": "Usator-nómine",
"domain_pill.whats_in_a_handle": "Ex quo consiste un identificator?",
"domain_pill.who_they_are": "Pro que identificatores informa qui e u un person is, tu posse interacter con persones tra li rete social de <button>ActivityPub-usant platformes</button>.",
"domain_pill.who_you_are": "Pro que tui identificator informa qui e u tu es, persones posse interacter con te tra li rete social de <button>ActivityPub-usant platformes</button>.",
"domain_pill.your_handle": "Tui identificator:",
"domain_pill.your_server": "Tui digital hem, u trova se omni tui postas. Si it ne plese te, tu posse transferer ad un altri servitor quandecunc e tui sequitores con te.",
"domain_pill.your_username": "Tui unic identificator sur ti-ci servitor. It es possibil que altri servitores va haver usatores con li sam nómine.",
"embed.instructions": "Inbedar ti-ci posta per copiar li code in infra.",
"embed.preview": "Vi qualmen it va aspecter:",
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 @@ -474,7 +474,7 @@
"notification.follow_request": "{name}さんがあなたにフォローリクエストしました",
"notification.mention": "{name}さんがあなたに返信しました",
"notification.moderation-warning.learn_more": "さらに詳しく",
"notification.moderation_warning": "あなたは管理者からの警告を受けています。",
"notification.moderation_warning": "管理者から警告が来ています",
"notification.moderation_warning.action_delete_statuses": "あなたによるいくつかの投稿が削除されました。",
"notification.moderation_warning.action_disable": "あなたのアカウントは無効になりました。",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "あなたの投稿のいくつかは閲覧注意として判定されています。",
Expand Down
5 changes: 2 additions & 3 deletions app/javascript/mastodon/locales/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
"empty_column.community": "Vietinė laiko skalė yra tuščia. Parašyk ką nors viešai, kad pradėtum sąveikauti.",
"empty_column.direct": "Dar neturi jokių privačių paminėjimų. Kai išsiųsi arba gausi vieną iš jų, jis bus rodomas čia.",
"empty_column.domain_blocks": "Dar nėra užblokuotų domenų.",
"empty_column.explore_statuses": "Šiuo metu niekas nėra tendencinga. Patikrink vėliau.",
"empty_column.explore_statuses": "Šiuo metu niekas nėra tendencinga. Patikrink vėliau!",
"empty_column.favourited_statuses": "Dar neturi mėgstamų įrašų. Kai vieną iš jų pamėgsi, jis bus rodomas čia.",
"empty_column.favourites": "Šio įrašo dar niekas nepamėgo. Kai kas nors tai padarys, jie bus rodomi čia.",
"empty_column.follow_requests": "Dar neturi jokių sekimo prašymų. Kai gausi tokį prašymą, jis bus rodomas čia.",
Expand Down Expand Up @@ -466,7 +466,6 @@
"notification.follow_request": "{name} paprašė tave sekti",
"notification.mention": "{name} paminėjo tave",
"notification.moderation-warning.learn_more": "Sužinoti daugiau",
"notification.moderation_warning": "Gavai prižiūrėjimo įspėjimą",
"notification.moderation_warning.action_delete_statuses": "Kai kurie tavo įrašai buvo pašalintos.",
"notification.moderation_warning.action_disable": "Tavo paskyra buvo išjungta.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Kai kurie tavo įrašai buvo pažymėtos kaip jautrios.",
Expand Down Expand Up @@ -536,7 +535,7 @@
"onboarding.follows.lead": "Tavo pagrindinis srautas – pagrindinis būdas patirti Mastodon. Kuo daugiau žmonių seksi, tuo jis bus aktyvesnis ir įdomesnis. Norint pradėti, pateikiame keletą pasiūlymų:",
"onboarding.follows.title": "Suasmenink savo pagrindinį srautą",
"onboarding.profile.discoverable": "Padaryti mano profilį atrandamą",
"onboarding.profile.discoverable_hint": "Kai pasirenki Mastodon atrandamumą, tavo įrašai gali būti rodomi paieškos rezultatuose ir tendencijose, o profilis gali būti siūlomas panašių pomėgių turintiems žmonėms.",
"onboarding.profile.discoverable_hint": "Kai sutinki su Mastodon atrandamumu, tavo įrašai gali būti rodomi paieškos rezultatuose ir tendencijose, o profilis gali būti siūlomas panašių pomėgių turintiems žmonėms.",
"onboarding.profile.display_name": "Rodomas vardas",
"onboarding.profile.display_name_hint": "Tavo pilnas vardas arba linksmas vardas…",
"onboarding.profile.lead": "Gali visada tai užbaigti vėliau nustatymuose, kur yra dar daugiau pritaikymo parinkčių.",
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"notification.follow_request": "{name} quer te seguir",
"notification.mention": "{name} te mencionou",
"notification.moderation-warning.learn_more": "Aprender mais",
"notification.moderation_warning": "Você recebeu um aviso de moderação",
"notification.moderation_warning.action_delete_statuses": "Algumas das suas publicações foram removidas.",
"notification.moderation_warning.action_disable": "Sua conta foi desativada.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Algumas de suas publicações foram marcadas por ter conteúdo sensível.",
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"notification.follow_request": "{name} vam želi slediti",
"notification.mention": "{name} vas je omenil/a",
"notification.moderation-warning.learn_more": "Več o tem",
"notification.moderation_warning": "Prejeli ste opozorilo moderatorjev",
"notification.moderation_warning.action_delete_statuses": "Nekatere vaše objave so odstranjene.",
"notification.moderation_warning.action_disable": "Vaš račun je bil onemogočen.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Nekatere vaše objave so bile označene kot občutljive.",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/sq.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"notification.follow_request": "{name} ka kërkuar t’ju ndjekë",
"notification.mention": "{name} ju ka përmendur",
"notification.moderation-warning.learn_more": "Mësoni më tepër",
"notification.moderation_warning": "Keni marrë një sinjalizim moderimi",
"notification.moderation_warning": "Ju është dhënë një sinjalizim moderimi",
"notification.moderation_warning.action_delete_statuses": "Disa nga postimet tuaja janë hequr.",
"notification.moderation_warning.action_disable": "Llogaria juaj është çaktivizuar.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Disa prej postimeve tuaja u është vënë shenjë si me spec.",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"notification.follow_request": "{name} har begärt att följa dig",
"notification.mention": "{name} nämnde dig",
"notification.moderation-warning.learn_more": "Läs mer",
"notification.moderation_warning": "Du har mottagit en modereringsvarning",
"notification.moderation_warning": "Du har fått en moderationsvarning",
"notification.moderation_warning.action_delete_statuses": "Några av dina inlägg har tagits bort.",
"notification.moderation_warning.action_disable": "Ditt konto har inaktiverats.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Några av dina inlägg har markerats som känsliga.",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"notification.follow_request": "{name} yêu cầu theo dõi bạn",
"notification.mention": "{name} nhắc đến bạn",
"notification.moderation-warning.learn_more": "Tìm hiểu",
"notification.moderation_warning": "Bạn đã nhận một cảnh báo kiểm duyệt",
"notification.moderation_warning": "Bạn vừa nhận một cảnh báo kiểm duyệt",
"notification.moderation_warning.action_delete_statuses": "Một vài tút của bạn bị gỡ.",
"notification.moderation_warning.action_disable": "Tài khoản của bạn đã bị vô hiệu hóa.",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Vài tút bạn bị đánh dấu nhạy cảm.",
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"notification.follow_request": "{name} 要求追蹤你",
"notification.mention": "{name} 提及你",
"notification.moderation-warning.learn_more": "了解更多",
"notification.moderation_warning": "你收到一則審核警告",
"notification.moderation_warning.action_delete_statuses": "你的部份帖文已被刪除。",
"notification.moderation_warning.action_disable": "你的帳號已被停用。",
"notification.moderation_warning.action_mark_statuses_as_sensitive": "你某些帖文已被標記為敏感內容。",
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4365,12 +4365,20 @@ a.status-card {
outline: $ui-button-focus-outline;
}

.no-reduce-motion .icon {
transition: transform 0.15s ease-in-out;
}

&.active {
color: $primary-text-color;

&:hover {
color: $primary-text-color;
}

.icon {
transform: rotate(60deg);
}
}

&:disabled {
Expand Down
2 changes: 1 addition & 1 deletion bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PORT="${PORT:-3000}"
# Get around our boot.rb ENV check
export RAILS_ENV="${RAILS_ENV:-development}"

if command -v overmind &> /dev/null
if command -v overmind 1> /dev/null 2>&1
then
overmind start -f Procfile.dev "$@"
exit $?
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
require_relative '../lib/public_file_server_middleware'
require_relative '../lib/devise/strategies/two_factor_ldap_authenticatable'
require_relative '../lib/devise/strategies/two_factor_pam_authenticatable'
require_relative '../lib/elasticsearch/client_extensions'
require_relative '../lib/chewy/settings_extensions'
require_relative '../lib/chewy/index_extensions'
require_relative '../lib/chewy/strategy/mastodon'
Expand Down
4 changes: 1 addition & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@
config.lograge.enabled = true

config.lograge.custom_payload do |controller|
if controller.respond_to?(:signed_request?) && controller.signed_request?
{ key: controller.signature_key_id }
end
{ key: controller.signature_key_id } if controller.respond_to?(:signed_request?) && controller.signed_request?
end

# Use a different logger for distributed setups.
Expand Down
4 changes: 1 addition & 3 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def authenticate!
return pass
end

if validate(resource)
success!(resource)
end
success!(resource) if validate(resource)
end

private
Expand Down
Loading

0 comments on commit 19ed3d9

Please sign in to comment.