Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
97e6e2e421
6 changed files with 53 additions and 136 deletions
app/javascript/flavours/glitch
components
features
locales
styles
|
@ -18,26 +18,7 @@ import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state';
|
|||
import { IconButton } from './icon_button';
|
||||
|
||||
const messages = defineMessages({
|
||||
hidden: {
|
||||
defaultMessage: 'Media hidden',
|
||||
id: 'status.media_hidden',
|
||||
},
|
||||
sensitive: {
|
||||
defaultMessage: 'Sensitive',
|
||||
id: 'media_gallery.sensitive',
|
||||
},
|
||||
toggle: {
|
||||
defaultMessage: 'Click to view',
|
||||
id: 'status.sensitive_toggle',
|
||||
},
|
||||
toggle_visible: {
|
||||
defaultMessage: '{number, plural, one {Hide image} other {Hide images}}',
|
||||
id: 'media_gallery.toggle_visible',
|
||||
},
|
||||
warning: {
|
||||
defaultMessage: 'Sensitive content',
|
||||
id: 'status.sensitive_warning',
|
||||
},
|
||||
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: '{number, plural, one {Hide image} other {Hide images}}' },
|
||||
});
|
||||
|
||||
class Item extends PureComponent {
|
||||
|
@ -299,8 +280,8 @@ class MediaGallery extends PureComponent {
|
|||
this.props.onOpenMedia(this.props.media, index, this.props.lang);
|
||||
};
|
||||
|
||||
handleRef = (node) => {
|
||||
this.node = node;
|
||||
handleRef = c => {
|
||||
this.node = c;
|
||||
|
||||
if (this.node) {
|
||||
this._setDimensions();
|
||||
|
@ -379,11 +360,6 @@ class MediaGallery extends PureComponent {
|
|||
<div className={computedClass} style={style} ref={this.handleRef}>
|
||||
<div className={classNames('spoiler-button', { 'spoiler-button--minified': visible && !uncached, 'spoiler-button--click-thru': uncached })}>
|
||||
{spoilerButton}
|
||||
{visible && sensitive && (
|
||||
<span className='sensitive-marker'>
|
||||
<FormattedMessage {...messages.sensitive} />
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{children}
|
||||
|
|
|
@ -156,7 +156,11 @@ export default class ComposerOptionsDropdownContent extends PureComponent {
|
|||
if (!contents) {
|
||||
contents = (
|
||||
<>
|
||||
{icon && <Icon className='icon' id={icon} icon={iconComponent} />}
|
||||
{icon && (
|
||||
<div className='privacy-dropdown__option__icon'>
|
||||
<Icon className='icon' id={icon} icon={iconComponent} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className='privacy-dropdown__option__content'>
|
||||
<strong>{text}</strong>
|
||||
|
|
|
@ -115,7 +115,9 @@ class ToggleOptionImpl extends ImmutablePureComponent {
|
|||
|
||||
return (
|
||||
<>
|
||||
<Toggle checked={checked} onChange={this.handleChange} />
|
||||
<div className='privacy-dropdown__option__icon'>
|
||||
<Toggle checked={checked} onChange={this.handleChange} />
|
||||
</div>
|
||||
|
||||
<div className='privacy-dropdown__option__content'>
|
||||
<strong>{text}</strong>
|
||||
|
|
|
@ -5,11 +5,6 @@ import classNames from 'classnames';
|
|||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import { Avatar } from 'flavours/glitch/components/avatar';
|
||||
import { DisplayName } from 'flavours/glitch/components/display_name';
|
||||
import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp';
|
||||
import StatusContent from 'flavours/glitch/components/status_content';
|
||||
|
||||
import { IconButton } from '../../../components/icon_button';
|
||||
|
||||
export default class ActionsModal extends ImmutablePureComponent {
|
||||
|
@ -58,33 +53,9 @@ export default class ActionsModal extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
render () {
|
||||
const status = this.props.status && (
|
||||
<div className='status light'>
|
||||
<div className='boost-modal__status-header'>
|
||||
<div className='boost-modal__status-time'>
|
||||
<a href={this.props.status.get('url')} className='status__relative-time' target='_blank' rel='noopener noreferrer'>
|
||||
<RelativeTimestamp timestamp={this.props.status.get('created_at')} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a href={this.props.status.getIn(['account', 'url'])} className='status__display-name' rel='noopener noreferrer'>
|
||||
<div className='status__avatar'>
|
||||
<Avatar account={this.props.status.get('account')} size={48} />
|
||||
</div>
|
||||
|
||||
<DisplayName account={this.props.status.get('account')} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<StatusContent status={this.props.status} />
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='modal-root__modal actions-modal'>
|
||||
{status}
|
||||
|
||||
<ul className={classNames({ 'with-status': !!status })}>
|
||||
<ul>
|
||||
{this.props.actions.map(this.renderAction)}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
"keyboard_shortcuts.bookmark": "to bookmark",
|
||||
"keyboard_shortcuts.secondary_toot": "to send toot using secondary privacy setting",
|
||||
"keyboard_shortcuts.toggle_collapse": "to collapse/uncollapse toots",
|
||||
"media_gallery.sensitive": "Sensitive",
|
||||
"moved_to_warning": "This account is marked as moved to {moved_to_link}, and may thus not accept new follows.",
|
||||
"navigation_bar.app_settings": "App settings",
|
||||
"navigation_bar.featured_users": "Featured users",
|
||||
|
@ -158,7 +157,6 @@
|
|||
"status.is_poll": "This toot is a poll",
|
||||
"status.local_only": "Only visible from your instance",
|
||||
"status.react": "React",
|
||||
"status.sensitive_toggle": "Click to view",
|
||||
"status.uncollapse": "Uncollapse",
|
||||
"suggestions.dismiss": "Dismiss suggestion",
|
||||
"tenor.error": "Oops! Something went wrong. Please, try again.",
|
||||
|
|
|
@ -602,7 +602,7 @@ body > [data-popper-placement] {
|
|||
height: 16px;
|
||||
}
|
||||
|
||||
.autosuggest-account .display-name > span {
|
||||
.autosuggest-account .display-name__account {
|
||||
color: $lighter-text-color;
|
||||
}
|
||||
|
||||
|
@ -698,6 +698,22 @@ body > [data-popper-placement] {
|
|||
.icon-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.compose-form__upload-button-icon {
|
||||
line-height: 27px;
|
||||
}
|
||||
|
||||
.compose-form__sensitive-button {
|
||||
display: none;
|
||||
|
||||
&.compose-form__sensitive-button--visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.compose-form__sensitive-button__icon {
|
||||
line-height: 27px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-button,
|
||||
|
@ -821,11 +837,6 @@ body > [data-popper-placement] {
|
|||
line-height: 24px;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
|
||||
& > .display-name {
|
||||
line-height: unset;
|
||||
height: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.reply-indicator__display-avatar {
|
||||
|
@ -1027,12 +1038,6 @@ body > [data-popper-placement] {
|
|||
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
||||
cursor: auto;
|
||||
|
||||
@supports (-ms-overflow-style: -ms-autohiding-scrollbar) {
|
||||
// Add margin to avoid Edge auto-hiding scrollbar appearing over content.
|
||||
// On Edge 16 this is 16px and Edge <=15 it's 12px, so aim for 16px.
|
||||
padding-inline-end: 28px; // 12px + 16px
|
||||
}
|
||||
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
|
@ -1057,8 +1062,9 @@ body > [data-popper-placement] {
|
|||
}
|
||||
|
||||
&.light {
|
||||
.status__relative-time {
|
||||
color: $lighter-text-color;
|
||||
.status__relative-time,
|
||||
.status__visibility-icon {
|
||||
color: $light-text-color;
|
||||
}
|
||||
|
||||
.status__display-name {
|
||||
|
@ -1259,8 +1265,6 @@ body > [data-popper-placement] {
|
|||
.account {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
|
||||
.account__display-name {
|
||||
flex: 1 1 auto;
|
||||
|
@ -1334,10 +1338,6 @@ body > [data-popper-placement] {
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
.account__avatar-wrapper {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.account__avatar {
|
||||
@include avatar-radius;
|
||||
|
||||
|
@ -1471,10 +1471,13 @@ a.status__display-name,
|
|||
}
|
||||
|
||||
.detailed-status__display-name {
|
||||
color: $secondary-text-color;
|
||||
display: block;
|
||||
line-height: 24px;
|
||||
margin-bottom: 15px;
|
||||
color: $darker-text-color;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
margin-bottom: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
strong,
|
||||
|
@ -1485,16 +1488,10 @@ a.status__display-name,
|
|||
}
|
||||
|
||||
strong {
|
||||
font-size: 16px;
|
||||
color: $primary-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.detailed-status__display-avatar {
|
||||
float: left;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
|
||||
.status__relative-time,
|
||||
.detailed-status__datetime {
|
||||
&:hover {
|
||||
|
@ -2174,6 +2171,7 @@ $ui-header-height: 55px;
|
|||
.columns-area--mobile {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
.column,
|
||||
|
@ -4147,19 +4145,18 @@ a.status-card.compact:hover {
|
|||
background: $base-overlay-background;
|
||||
color: $darker-text-color;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 4px;
|
||||
appearance: none;
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
padding: 0;
|
||||
color: lighten($darker-text-color, 8%);
|
||||
}
|
||||
|
||||
.status__content > & {
|
||||
margin-top: 15px; // Add margin when used bare for NSFW video player
|
||||
}
|
||||
@include fullwidth-gallery;
|
||||
}
|
||||
|
||||
.media-spoiler__warning {
|
||||
|
@ -4170,7 +4167,7 @@ a.status-card.compact:hover {
|
|||
.media-spoiler__trigger {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.spoiler-button {
|
||||
|
@ -4838,10 +4835,6 @@ a.status-card.compact:hover {
|
|||
flex: 1 1 auto;
|
||||
color: $lighter-text-color;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-inline-start: 10px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
display: block;
|
||||
|
@ -4873,11 +4866,6 @@ a.status-card.compact:hover {
|
|||
min-width: 75%;
|
||||
}
|
||||
|
||||
.account__header__wrapper {
|
||||
flex: 0 0 auto;
|
||||
background: lighten($ui-base-color, 4%);
|
||||
}
|
||||
|
||||
.account__disclaimer {
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
|
@ -5742,9 +5730,9 @@ a.status-card.compact:hover {
|
|||
display: flex;
|
||||
}
|
||||
|
||||
.video-modal__container {
|
||||
.video-modal .video-player {
|
||||
max-height: 80vh;
|
||||
max-width: 100vw;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.audio-modal__container {
|
||||
|
@ -6141,8 +6129,7 @@ a.status-card.compact:hover {
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: $ui-secondary-color;
|
||||
padding: 10px;
|
||||
line-height: 36px;
|
||||
padding: 10px; // purposefully reduce padding in glitch-soc
|
||||
|
||||
& > div {
|
||||
flex: 1 1 auto;
|
||||
|
@ -7461,8 +7448,11 @@ img.modal-warning {
|
|||
|
||||
.notification__filter-bar,
|
||||
.account__section-headline {
|
||||
// deliberate glitch-soc choice for now
|
||||
background: darken($ui-base-color, 4%);
|
||||
background: darken(
|
||||
$ui-base-color,
|
||||
4%
|
||||
); // deliberate glitch-soc choice for now
|
||||
|
||||
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
||||
cursor: default;
|
||||
display: flex;
|
||||
|
@ -7601,24 +7591,6 @@ noscript {
|
|||
}
|
||||
}
|
||||
|
||||
// glitch-specific “sensitive” label on displayed images; TODO: remove it?
|
||||
.sensitive-marker {
|
||||
margin: 0 3px;
|
||||
border-radius: 2px;
|
||||
padding: 2px 6px;
|
||||
color: rgba($primary-text-color, 0.8);
|
||||
background: rgba($base-overlay-background, 0.5);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.9;
|
||||
transition: opacity 0.1s ease;
|
||||
|
||||
.media-gallery:hover & {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.embed-modal {
|
||||
width: auto;
|
||||
max-width: 80vw;
|
||||
|
@ -8410,7 +8382,6 @@ noscript {
|
|||
|
||||
&--compact &__item {
|
||||
padding: 10px;
|
||||
padding-inline-end: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8475,11 +8446,6 @@ noscript {
|
|||
color: $primary-text-color;
|
||||
text-decoration: none;
|
||||
|
||||
.icon {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
|
|
Loading…
Add table
Reference in a new issue