Skip to content

Commit

Permalink
Merge pull request mastodon#2684 from ClearlyClaire/glitch-soc/merge-…
Browse files Browse the repository at this point in the history
…upstream

Merge upstream changes up to 50fd94f
  • Loading branch information
ClearlyClaire authored Mar 20, 2024
2 parents d6f5702 + df77777 commit 8cac5d8
Show file tree
Hide file tree
Showing 104 changed files with 1,197 additions and 207 deletions.
4 changes: 3 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[production]
defaults
not IE 11
> 0.2%
ios >= 15.6
not dead
not OperaMini all

[development]
supports es6-module
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ class EmojiPickerDropdown extends PureComponent {
state = {
active: false,
loading: false,
placement: 'bottom',
};

setRef = (c) => {
Expand Down Expand Up @@ -383,10 +384,14 @@ class EmojiPickerDropdown extends PureComponent {
return this.target;
};

handleOverlayEnter = (state) => {
this.setState({ placement: state.placement });
};

render () {
const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props;
const title = intl.formatMessage(messages.emoji);
const { active, loading } = this.state;
const { active, loading, placement } = this.state;

return (
<div className='emoji-picker-dropdown' onKeyDown={this.handleKeyDown} ref={this.setTargetRef}>
Expand All @@ -399,7 +404,7 @@ class EmojiPickerDropdown extends PureComponent {
inverted
/>

<Overlay show={active} placement={'bottom'} target={this.findTarget} popperConfig={{ strategy: 'fixed' }}>
<Overlay show={active} placement={placement} flip target={this.findTarget} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}>
{({ props, placement })=> (
<div {...props} style={{ ...props.style }}>
<div className={`dropdown-animation ${placement}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ export default class ColumnSettings extends PureComponent {
<span className='warning-hint'><FormattedMessage id='notifications.permission_denied' defaultMessage='Desktop notifications are unavailable due to previously denied browser permissions request' /></span>
)}

{alertsEnabled && browserSupport && browserPermission === 'default' && (
<span className='warning-hint'>
<FormattedMessage id='notifications.permission_required' defaultMessage='Desktop notifications are unavailable because the required permission has not been granted.' /> <GrantPermissionButton onClick={onRequestNotificationPermission} />
</span>
)}

<section>
<ClearColumnButton onClick={onClear} />
</section>

{alertsEnabled && browserSupport && browserPermission === 'default' && (
<section>
<span className='warning-hint'>
<FormattedMessage id='notifications.permission_required' defaultMessage='Desktop notifications are unavailable because the required permission has not been granted.' /> <GrantPermissionButton onClick={onRequestNotificationPermission} />
</span>
</section>
)}

<section>
<h3><FormattedMessage id='notifications.policy.title' defaultMessage='Filter out notifications from…' /></h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

import { connect } from 'react-redux';

import SettingsIcon from '@/material-icons/400-20px/settings.svg?react';
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
import TuneIcon from '@/material-icons/400-24px/tune.svg?react';
import { requestBrowserPermission } from 'flavours/glitch/actions/notifications';
import { changeSetting } from 'flavours/glitch/actions/settings';
import { Button } from 'flavours/glitch/components/button';
Expand Down Expand Up @@ -42,7 +42,7 @@ class NotificationsPermissionBanner extends PureComponent {
</div>

<h2><FormattedMessage id='notifications_permission_banner.title' defaultMessage='Never miss a thing' /></h2>
<p><FormattedMessage id='notifications_permission_banner.how_to_control' defaultMessage="To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled." values={{ icon: <Icon id='sliders' icon={TuneIcon} /> }} /></p>
<p><FormattedMessage id='notifications_permission_banner.how_to_control' defaultMessage="To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled." values={{ icon: <Icon id='sliders' icon={SettingsIcon} /> }} /></p>
<Button onClick={this.handleClick}><FormattedMessage id='notifications_permission_banner.enable' defaultMessage='Enable desktop notifications' /></Button>
</div>
);
Expand Down
11 changes: 11 additions & 0 deletions app/javascript/flavours/glitch/styles/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5234,6 +5234,11 @@ a.status-card {
position: relative;
margin-top: 5px;
z-index: 2;
background: var(--dropdown-background-color);
backdrop-filter: var(--background-filter);
border: 1px solid var(--dropdown-border-color);
box-shadow: var(--dropdown-shadow);
border-radius: 5px;

.emoji-mart-scroll {
transition: opacity 200ms ease;
Expand Down Expand Up @@ -9169,6 +9174,12 @@ noscript {
color: $darker-text-color;
margin-bottom: 15px;
text-align: center;

.icon {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
}

Expand Down
15 changes: 0 additions & 15 deletions app/javascript/flavours/glitch/styles/emoji_picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,9 @@
}

.emoji-mart-bar {
border: 0 solid var(--dropdown-border-color);

&:first-child {
border-bottom-width: 1px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: var(--dropdown-border-color);
}

&:last-child {
border-top-width: 1px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
display: none;
}
}

.emoji-mart-anchors {
Expand Down Expand Up @@ -94,7 +82,6 @@
height: 270px;
max-height: 35vh;
padding: 0 6px 6px;
background: var(--dropdown-background-color);
will-change: transform;

&::-webkit-scrollbar-track:hover,
Expand All @@ -106,7 +93,6 @@
.emoji-mart-search {
padding: 10px;
padding-inline-end: 45px;
background: var(--dropdown-background-color);
position: relative;

input {
Expand Down Expand Up @@ -195,7 +181,6 @@
width: 100%;
font-weight: 500;
padding: 5px 6px;
background: var(--dropdown-background-color);
}
}

Expand Down
8 changes: 1 addition & 7 deletions app/javascript/flavours/glitch/styles/rich_text.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.status__content__text,
.e-content,
.edit-indicator__content,
.reply-indicator__content {
pre,
blockquote {
Expand Down Expand Up @@ -90,10 +91,3 @@
list-style-type: decimal;
}
}

.reply-indicator__content {
blockquote {
border-inline-start-color: $inverted-text-color;
color: $inverted-text-color;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class EmojiPickerDropdown extends PureComponent {
state = {
active: false,
loading: false,
placement: 'bottom',
};

setRef = (c) => {
Expand Down Expand Up @@ -381,10 +382,14 @@ class EmojiPickerDropdown extends PureComponent {
return this.target;
};

handleOverlayEnter = (state) => {
this.setState({ placement: state.placement });
};

render () {
const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props;
const title = intl.formatMessage(messages.emoji);
const { active, loading } = this.state;
const { active, loading, placement } = this.state;

return (
<div className='emoji-picker-dropdown' onKeyDown={this.handleKeyDown} ref={this.setTargetRef}>
Expand All @@ -397,7 +402,7 @@ class EmojiPickerDropdown extends PureComponent {
inverted
/>

<Overlay show={active} placement={'bottom'} target={this.findTarget} popperConfig={{ strategy: 'fixed' }}>
<Overlay show={active} placement={placement} flip target={this.findTarget} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}>
{({ props, placement })=> (
<div {...props} style={{ ...props.style }}>
<div className={`dropdown-animation ${placement}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,18 @@ export default class ColumnSettings extends PureComponent {
<span className='warning-hint'><FormattedMessage id='notifications.permission_denied' defaultMessage='Desktop notifications are unavailable due to previously denied browser permissions request' /></span>
)}

{alertsEnabled && browserSupport && browserPermission === 'default' && (
<span className='warning-hint'>
<FormattedMessage id='notifications.permission_required' defaultMessage='Desktop notifications are unavailable because the required permission has not been granted.' /> <GrantPermissionButton onClick={onRequestNotificationPermission} />
</span>
)}

<section>
<ClearColumnButton onClick={onClear} />
</section>

{alertsEnabled && browserSupport && browserPermission === 'default' && (
<section>
<span className='warning-hint'>
<FormattedMessage id='notifications.permission_required' defaultMessage='Desktop notifications are unavailable because the required permission has not been granted.' /> <GrantPermissionButton onClick={onRequestNotificationPermission} />
</span>
</section>
)}

<section>
<h3><FormattedMessage id='notifications.policy.title' defaultMessage='Filter out notifications from…' /></h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

import { connect } from 'react-redux';

import SettingsIcon from '@/material-icons/400-20px/settings.svg?react';
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
import TuneIcon from '@/material-icons/400-24px/tune.svg?react';
import { requestBrowserPermission } from 'mastodon/actions/notifications';
import { changeSetting } from 'mastodon/actions/settings';
import { Button } from 'mastodon/components/button';
Expand Down Expand Up @@ -42,7 +42,7 @@ class NotificationsPermissionBanner extends PureComponent {
</div>

<h2><FormattedMessage id='notifications_permission_banner.title' defaultMessage='Never miss a thing' /></h2>
<p><FormattedMessage id='notifications_permission_banner.how_to_control' defaultMessage="To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled." values={{ icon: <Icon id='sliders' icon={TuneIcon} /> }} /></p>
<p><FormattedMessage id='notifications_permission_banner.how_to_control' defaultMessage="To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled." values={{ icon: <Icon id='sliders' icon={SettingsIcon} /> }} /></p>
<Button onClick={this.handleClick}><FormattedMessage id='notifications_permission_banner.enable' defaultMessage='Enable desktop notifications' /></Button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/fo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"about.domain_blocks.silenced.explanation": "Yvirhøvur, so sært tú ikki vangar og innihald frá hesum ambætaranum, uttan so at tú skilliga leitar hesi upp ella velur tey við at fylgja teimum.",
"about.domain_blocks.silenced.title": "Avmarkað",
"about.domain_blocks.suspended.explanation": "Ongar dátur frá hesum ambætara verða viðgjørd, goymd ella deild, tað ger, at samskifti við aðrar ambætarar er iki møguligt.",
"about.domain_blocks.suspended.title": "Koyrdur frá",
"about.domain_blocks.suspended.title": "Gjørt óvirkið",
"about.not_available": "Hetta er ikki tøkt á føroyska servaranum enn.",
"about.powered_by": "Miðfirra almennur miðil koyrandi á {mastodon}",
"about.rules": "Ambætarareglur",
Expand Down
22 changes: 11 additions & 11 deletions app/javascript/mastodon/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
"block_modal.remote_users_caveat": "Arra kérjük a {domain} kiszolgálót, hogy tartsa tiszteletben a döntésedet. Ugyanakkor az együttműködés nem garantált, mivel néhány kiszolgáló másképp kezelheti a letiltásokat. A nyilvános bejegyzések a be nem jelentkezett felhasználók számára továbbra is látszódhatnak.",
"block_modal.show_less": "Kevesebb mutatása",
"block_modal.show_more": "Több mutatása",
"block_modal.they_cant_mention": "Nem említhetnek meg vagy követhetnek téged.",
"block_modal.they_cant_see_posts": "Nem láthatják a bejegyzéseidet, és te sem fogod látni az övékét.",
"block_modal.they_will_know": "Láthatják, hogy le vannak tiltva.",
"block_modal.they_cant_mention": "Nem említhet meg és nem követhet téged.",
"block_modal.they_cant_see_posts": "Nem láthatja a bejegyzéseidet, és te sem fogod látni az övéit.",
"block_modal.they_will_know": "Láthatja, hogy le van tiltva.",
"block_modal.title": "Letiltsuk a felhasználót?",
"block_modal.you_wont_see_mentions": "Nem látsz majd őket említő bejegyzéseket.",
"block_modal.you_wont_see_mentions": "Nem látsz majd őt említő bejegyzéseket.",
"boost_modal.combo": "Hogy átugord ezt következő alkalommal, használd {combo}",
"bundle_column_error.copy_stacktrace": "Hibajelentés másolása",
"bundle_column_error.error.body": "A kért lap nem jeleníthető meg. Ez lehet, hogy kódhiba, vagy böngészőkompatibitási hiba.",
Expand Down Expand Up @@ -176,7 +176,7 @@
"confirmations.delete_list.confirm": "Törlés",
"confirmations.delete_list.message": "Biztos, hogy véglegesen törölni szeretnéd ezt a listát?",
"confirmations.discard_edit_media.confirm": "Elvetés",
"confirmations.discard_edit_media.message": "Elmentetlen változtatásaid vannak a média leírásában vagy előnézetében. Eldobjuk őket?",
"confirmations.discard_edit_media.message": "Mentetlen változtatásaid vannak a média leírásában vagy előnézetében, mindenképp elveted?",
"confirmations.domain_block.confirm": "Kiszolgáló letiltása",
"confirmations.domain_block.message": "Biztos, hogy le szeretnéd tiltani a teljes {domain} domaint? A legtöbb esetben néhány célzott tiltás vagy némítás elegendő, és kívánatosabb megoldás. Semmilyen tartalmat nem fogsz látni ebből a domainből se az idővonalakon, se az értesítésekben. Az ebben a domainben lévő követőidet is eltávolítjuk.",
"confirmations.edit.confirm": "Szerkesztés",
Expand Down Expand Up @@ -213,7 +213,7 @@
"domain_block_modal.block_account_instead": "Helyette @{name} letiltása",
"domain_block_modal.they_can_interact_with_old_posts": "Az ezen a kiszolgálón lévő emberek interaktálhatnak a régi bejegyzéseiddel.",
"domain_block_modal.they_cant_follow": "Erről a kiszolgálóról senki sem követhet.",
"domain_block_modal.they_wont_know": "Nem fogják tudni, hogy letiltották őket.",
"domain_block_modal.they_wont_know": "Nem fogja tudni, hogy letiltották.",
"domain_block_modal.title": "Letiltsuk a domaint?",
"domain_block_modal.you_will_lose_followers": "Az ezen a kiszolgálón lévő összes követődet törölni fogjuk.",
"domain_block_modal.you_wont_see_posts": "Nem látsz majd bejegyzéseket vagy értesítéseket ennek a kiszolgálónak a felhasználóitól.",
Expand Down Expand Up @@ -350,7 +350,7 @@
"home.pending_critical_update.title": "Kritikus biztonsági frissítés érhető el!",
"home.show_announcements": "Közlemények megjelenítése",
"interaction_modal.description.favourite": "Egy Mastodon fiókkal kedvencnek jelölheted ezt a bejegyzést, tudatva a szerzővel, hogy értékeled és elteszed későbbre.",
"interaction_modal.description.follow": "Egy Mastodon fiókkal bekövetheted {name} fiókot, hogy lásd a bejegyzéseit a saját hírfolyamodban.",
"interaction_modal.description.follow": "Egy Mastodon-fiókkal követheted {name} fiókját, hogy lásd a bejegyzéseit a kezdőlapodon.",
"interaction_modal.description.reblog": "Egy Mastodon fiókkal megtolhatod ezt a bejegyzést, hogy megoszd a saját követőiddel.",
"interaction_modal.description.reply": "Egy Mastodon fiókkal válaszolhatsz erre a bejegyzésre.",
"interaction_modal.login.action": "Vigyen haza",
Expand Down Expand Up @@ -431,11 +431,11 @@
"mute_modal.hide_options": "Beállítások elrejtése",
"mute_modal.indefinite": "Amíg nem oldom fel a némítást",
"mute_modal.show_options": "Beállítások megjelenítése",
"mute_modal.they_can_mention_and_follow": "Megemlíthetnek vagy követhetnek téged, de nem fogod őket látni.",
"mute_modal.they_wont_know": "Nem fogják tudni, hogy lenémították őket.",
"mute_modal.they_can_mention_and_follow": "Megemlíthet vagy követhet téged, de te nem fogod ezeket látni.",
"mute_modal.they_wont_know": "Nem fogja tudni, hogy lenémítottad.",
"mute_modal.title": "Elnémítsuk a felhasználót?",
"mute_modal.you_wont_see_mentions": "Nem látsz majd őket említő bejegyzéseket.",
"mute_modal.you_wont_see_posts": "Továbbra is látni fogják a bejegyzéseidet, de te nem fogod látni az övékét.",
"mute_modal.you_wont_see_mentions": "Nem látsz majd őt említő bejegyzéseket.",
"mute_modal.you_wont_see_posts": "Továbbra is látni fogja a bejegyzéseidet, de te nem fogod látni az övéit.",
"navigation_bar.about": "Névjegy",
"navigation_bar.advanced_interface": "Megnyitás a speciális webes felületben",
"navigation_bar.blocks": "Letiltott felhasználók",
Expand Down
9 changes: 7 additions & 2 deletions app/javascript/mastodon/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,15 @@
"domain_pill.activitypub_like_language": "액티비티펍은 마스토돈이 다른 소셜 네트워크와 대화할 때 쓰는 언어 같은 것입니다.",
"domain_pill.server": "서버",
"domain_pill.their_handle": "그의 핸들:",
"domain_pill.their_server": "그의 게시물이 살고 있는 디지털 거처입니다.",
"domain_pill.their_username": "그의 서버에서 유일한 식별자입니다. 다른 서버에서 같은 사용자명을 가진 사용자를 찾을 수도 있습니다.",
"domain_pill.username": "사용자명",
"domain_pill.whats_in_a_handle": "핸들엔 무엇이 담겨 있나요?",
"domain_pill.who_they_are": "핸들은 어디에 있는 누구인지를 나타내기 때문에 <button>액티비티펍을 사용하는 플랫폼</button>들의 소셜 웹을 넘나들며 사람들과 상호작용 할 수 있습니다.",
"domain_pill.who_you_are": "내 핸들은 내가 어디에 있는 누군지 나타내기 때문에 사람들은 <button>액티비티펍</button>을 통해 소셜 웹을 넘나들며 나와 상호작용 할 수 있습니다.",
"domain_pill.your_handle": "내 핸들:",
"domain_pill.your_server": "내 게시물들이 살고 있는 나의 디지털 거처입니다. 마음에 들지 않나요? 팔로워를 데리고 언제든지 다른 서버로 거처를 옮길 수도 있습니다.",
"domain_pill.your_username": "이 서버에서 유일한 내 식별자입니다. 다른 서버에서 같은 사용자명을 가진 사용자를 찾을 수도 있습니다.",
"embed.instructions": "아래의 코드를 복사하여 대화를 원하는 곳으로 공유하세요.",
"embed.preview": "이렇게 표시됩니다:",
"emoji_button.activity": "활동",
Expand Down Expand Up @@ -507,11 +512,11 @@
"notifications.policy.filter_new_accounts_title": "새 계정",
"notifications.policy.filter_not_followers_hint": "나를 팔로우 한 지 {days, plural, other {# 일}}이 되지 않은 사람들을 포함",
"notifications.policy.filter_not_followers_title": "나를 팔로우하지 않는 사람들",
"notifications.policy.filter_not_following_hint": "내가 수동으로 승인하기 전까지",
"notifications.policy.filter_not_following_hint": "내가 수동으로 승인하지 않는 한",
"notifications.policy.filter_not_following_title": "내가 팔로우하지 않는 사람들",
"notifications.policy.filter_private_mentions_hint": "내가 한 멘션에 단 답글이거나 내가 발신자를 팔로우 한 것이 아닌 이상 걸러집니다",
"notifications.policy.filter_private_mentions_title": "청하지 않은 개인적인 멘션",
"notifications.policy.title": "알림을 거를 사람들",
"notifications.policy.title": "알림을 제외할 조건들",
"notifications_permission_banner.enable": "데스크탑 알림 활성화",
"notifications_permission_banner.how_to_control": "마스토돈이 열려 있지 않을 때에도 알림을 받으려면, 데스크탑 알림을 활성화 하세요. 당신은 어떤 종류의 반응이 데스크탑 알림을 발생할 지를 {icon} 버튼을 통해 세세하게 설정할 수 있습니다.",
"notifications_permission_banner.title": "아무것도 놓치지 마세요",
Expand Down
Loading

0 comments on commit 8cac5d8

Please sign in to comment.