Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: Dockerfile app/javascript/packs/common.js config/webpack/loaders/sass.js config/webpack/shared.js db/schema.rb package.json yarn.lock A lot of the conflicts come from updating webpack. Even though upstream deleted app/javascript/packs/common.js, I kept glitch-soc's version as it unifies JS/CSS packs behavior across flavours. Ported glitch changes to webpack 4.x
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// This file will be loaded on admin pages, regardless of theme.
|
||||
|
||||
import { delegate } from 'rails-ujs';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function handleDeleteStatus(event) {
|
||||
const [data] = event.detail;
|
||||
|
||||
@@ -128,7 +128,7 @@ export function expandDomainBlocks() {
|
||||
return (dispatch, getState) => {
|
||||
const url = getState().getIn(['domain_lists', 'blocks', 'next']);
|
||||
|
||||
if (url === null) {
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
8
app/javascript/mastodon/common.js
Normal file
8
app/javascript/mastodon/common.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import Rails from 'rails-ujs';
|
||||
|
||||
export function start() {
|
||||
require('font-awesome/css/font-awesome.css');
|
||||
require.context('../images/', true);
|
||||
|
||||
Rails.start();
|
||||
};
|
||||
@@ -7,7 +7,7 @@ import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { me, invitesEnabled } from '../../initial_state';
|
||||
import { me, invitesEnabled, version } from '../../initial_state';
|
||||
import { fetchFollowRequests } from '../../actions/accounts';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -149,7 +149,7 @@ export default class GettingStarted extends ImmutablePureComponent {
|
||||
<FormattedMessage
|
||||
id='getting_started.open_source_notice'
|
||||
defaultMessage='Mastodon is open source software. You can contribute or report issues on GitHub at {github}.'
|
||||
values={{ github: <a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>tootsuite/mastodon</a> }}
|
||||
values={{ github: <span><a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>tootsuite/mastodon</a> (v{version})</span> }}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { LoadingBar } from 'react-redux-loading-bar';
|
||||
import ZoomableImage from './zoomable_image';
|
||||
|
||||
export default class ImageLoader extends React.PureComponent {
|
||||
@@ -23,6 +24,7 @@ export default class ImageLoader extends React.PureComponent {
|
||||
state = {
|
||||
loading: true,
|
||||
error: false,
|
||||
width: null,
|
||||
}
|
||||
|
||||
removers = [];
|
||||
@@ -122,6 +124,7 @@ export default class ImageLoader extends React.PureComponent {
|
||||
|
||||
setCanvasRef = c => {
|
||||
this.canvas = c;
|
||||
if (c) this.setState({ width: c.offsetWidth });
|
||||
}
|
||||
|
||||
render () {
|
||||
@@ -135,6 +138,7 @@ export default class ImageLoader extends React.PureComponent {
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />
|
||||
{loading ? (
|
||||
<canvas
|
||||
className='image-loader__preview-canvas'
|
||||
|
||||
@@ -13,5 +13,6 @@ export const me = getMeta('me');
|
||||
export const searchEnabled = getMeta('search_enabled');
|
||||
export const maxChars = getMeta('max_toot_chars') || 500;
|
||||
export const invitesEnabled = getMeta('invites_enabled');
|
||||
export const version = getMeta('version');
|
||||
|
||||
export default initialState;
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"account.direct": "Direct message @{name}",
|
||||
"account.disclaimer_full": "Information below may reflect the user's profile incompletely.",
|
||||
"account.domain_blocked": "Domain hidden",
|
||||
"account.edit_profile": "Edit profile",
|
||||
"account.follow": "Follow",
|
||||
"account.followers": "Followers",
|
||||
"account.follows": "Follows",
|
||||
"account.edit_profile": "Uprav profil",
|
||||
"account.follow": "Sleduj",
|
||||
"account.followers": "Sledovatelé",
|
||||
"account.follows": "Sleduje",
|
||||
"account.follows_you": "Follows you",
|
||||
"account.hide_reblogs": "Hide boosts from @{name}",
|
||||
"account.media": "Media",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"compose_form.hashtag_warning": "Αυτό το τουτ δεν θα εμφανίζεται κάτω από κανένα hashtag καθώς είναι αφανές. Μόνο τα δημόσια τουτ μπορούν να αναζητηθούν ανά hashtag.",
|
||||
"compose_form.lock_disclaimer": "Ο λογαριασμός σου δεν είναι {locked}. Οποιοσδήποτε μπορεί να σε ακολουθήσει για να δει τις δημοσιεύσεις σας προς τους ακολούθους σας.",
|
||||
"compose_form.lock_disclaimer.lock": "κλειδωμένος",
|
||||
"compose_form.placeholder": "Τι έχεις στο μυαλό σου;",
|
||||
"compose_form.placeholder": "Τι σκέφτεσαι;",
|
||||
"compose_form.publish": "Τουτ",
|
||||
"compose_form.publish_loud": "{publish}!",
|
||||
"compose_form.sensitive.marked": "Το πολυμέσο έχει σημειωθεί ως ευαίσθητο",
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"navigation_bar.domain_blocks": "دامینهای پنهانشده",
|
||||
"navigation_bar.edit_profile": "ویرایش نمایه",
|
||||
"navigation_bar.favourites": "پسندیدهها",
|
||||
"navigation_bar.filters": "Muted words",
|
||||
"navigation_bar.filters": "واژگان بیصداشده",
|
||||
"navigation_bar.follow_requests": "درخواستهای پیگیری",
|
||||
"navigation_bar.info": "اطلاعات تکمیلی",
|
||||
"navigation_bar.keyboard_shortcuts": "میانبرهای صفحهکلید",
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
"navigation_bar.domain_blocks": "非表示にしたドメイン",
|
||||
"navigation_bar.edit_profile": "プロフィールを編集",
|
||||
"navigation_bar.favourites": "お気に入り",
|
||||
"navigation_bar.filters": "Muted words",
|
||||
"navigation_bar.filters": "フィルター設定",
|
||||
"navigation_bar.follow_requests": "フォローリクエスト",
|
||||
"navigation_bar.info": "このインスタンスについて",
|
||||
"navigation_bar.keyboard_shortcuts": "ホットキー",
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"navigation_bar.domain_blocks": "Verborgen domeinen",
|
||||
"navigation_bar.edit_profile": "Profiel bewerken",
|
||||
"navigation_bar.favourites": "Favorieten",
|
||||
"navigation_bar.filters": "Muted words",
|
||||
"navigation_bar.filters": "Genegeerde woorden",
|
||||
"navigation_bar.follow_requests": "Volgverzoeken",
|
||||
"navigation_bar.info": "Over deze server",
|
||||
"navigation_bar.keyboard_shortcuts": "Sneltoetsen",
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"navigation_bar.domain_blocks": "Domenis resconduts",
|
||||
"navigation_bar.edit_profile": "Modificar lo perfil",
|
||||
"navigation_bar.favourites": "Favorits",
|
||||
"navigation_bar.filters": "Muted words",
|
||||
"navigation_bar.filters": "Mots ignorats",
|
||||
"navigation_bar.follow_requests": "Demandas d’abonament",
|
||||
"navigation_bar.info": "Mai informacions",
|
||||
"navigation_bar.keyboard_shortcuts": "Acorchis clavièr",
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"navigation_bar.domain_blocks": "Domínios escondidos",
|
||||
"navigation_bar.edit_profile": "Editar perfil",
|
||||
"navigation_bar.favourites": "Favoritos",
|
||||
"navigation_bar.filters": "Muted words",
|
||||
"navigation_bar.filters": "Palavras silenciadas",
|
||||
"navigation_bar.follow_requests": "Seguidores pendentes",
|
||||
"navigation_bar.info": "Mais informações",
|
||||
"navigation_bar.keyboard_shortcuts": "Atalhos de teclado",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"account.disclaimer_full": "Inofrmácie uvedené nižšie nemusia byť úplným odrazom uživateľovho účtu.",
|
||||
"account.domain_blocked": "Doména ukrytá",
|
||||
"account.edit_profile": "Upraviť profil",
|
||||
"account.follow": "Následovať",
|
||||
"account.follow": "Následuj",
|
||||
"account.followers": "Sledujúci",
|
||||
"account.follows": "Následuje",
|
||||
"account.follows_you": "Následuje ťa",
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function loaded() {
|
||||
const TimelineContainer = require('../mastodon/containers/timeline_container').default;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
loadPolyfills().then(() => {
|
||||
require('../mastodon/main').default();
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import ready from '../mastodon/ready';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function main() {
|
||||
const IntlRelativeFormat = require('intl-relativeformat').default;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function loaded() {
|
||||
const ComposeContainer = require('../mastodon/containers/compose_container').default;
|
||||
|
||||
@@ -165,6 +165,11 @@
|
||||
color: $valid-value-color;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.negative-hint {
|
||||
color: $error-value-color;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.simple_form {
|
||||
|
||||
@@ -1478,6 +1478,7 @@ a.account__display-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
.image-loader__preview-canvas {
|
||||
max-width: $media-modal-media-max-width;
|
||||
@@ -1486,8 +1487,8 @@ a.account__display-name {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
&.image-loader--loading .image-loader__preview-canvas {
|
||||
filter: blur(2px);
|
||||
.loading-bar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&.image-loader--amorphous .image-loader__preview-canvas {
|
||||
|
||||
Reference in New Issue
Block a user