Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- app/controllers/settings/follower_domains_controller.rb
  Removed upstream. Did the same here. Maybe we should not have?
- config/locales/en.yml
  Upstream removed the “Authorized followers” page and associated
  translations. This is too close in the file to our glitch-soc-specific
  “flavour” string. No actual conflict.
- config/locales/ja.yml
  Same as above.
- config/locales/pl.yml
  Same as above.
- config/navigation.rb
  No real conflict. New route added too close to the glitch-soc-specific
  “flavours” one.
- config/webpack/configuration.js
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
- config/webpack/loaders/babel.js
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
  The contents of this file have been moved to package.json.
- config/webpack/shared.js
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
- config/webpacker.yml
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
- jest.config.js
  The contents of this file have been moved to package.json.
- package.json
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
- yarn.lock
  Upstream refactored the webpack(er) configuration quite a bit.
  Tried to keep up.
This commit is contained in:
Thibaut Girka
2019-03-16 13:52:55 +01:00
122 changed files with 2456 additions and 2454 deletions

View File

@ -0,0 +1,39 @@
import React from 'react';
import PropTypes from 'prop-types';
import illustration from '../../images/elephant_ui_disappointed.svg';
export default class ErrorBoundary extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
};
state = {
hasError: false,
stackTrace: undefined,
componentStack: undefined,
}
componentDidCatch(error, info) {
this.setState({
hasError: true,
stackTrace: error.stack,
componentStack: info && info.componentStack,
});
}
render() {
const { hasError } = this.state;
if (!hasError) {
return this.props.children;
}
return (
<div>
<img src={illustration} alt='' />
</div>
);
}
}

View File

@ -13,6 +13,7 @@ import { connectUserStream } from '../actions/streaming';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
import initialState from '../initial_state';
import ErrorBoundary from '../components/error_boundary';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
@ -75,7 +76,9 @@ export default class Mastodon extends React.PureComponent {
return (
<IntlProvider locale={locale} messages={messages}>
<Provider store={store}>
<MastodonMount />
<ErrorBoundary>
<MastodonMount />
</ErrorBoundary>
</Provider>
</IntlProvider>
);

View File

@ -53,6 +53,11 @@ class Bundle extends React.PureComponent {
const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props;
const cachedMod = Bundle.cache.get(fetchComponent);
if (fetchComponent === undefined) {
this.setState({ mod: null });
return Promise.resolve();
}
onFetch();
if (cachedMod) {

View File

@ -73,6 +73,10 @@
"compose_form.lock_disclaimer": "Váš účet není {locked}. Kdokoliv vás může sledovat a vidět vaše příspěvky pouze pro sledující.",
"compose_form.lock_disclaimer.lock": "uzamčen",
"compose_form.placeholder": "Co se vám honí hlavou?",
"compose_form.poll.add_option": "Přidat volbu",
"compose_form.poll.duration": "Délka ankety",
"compose_form.poll.option_placeholder": "Volba {number}",
"compose_form.poll.remove_option": "Odstranit tuto volbu",
"compose_form.publish": "Tootnout",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive.marked": "Mediální obsah je označen jako citlivý",
@ -151,6 +155,9 @@
"home.column_settings.basic": "Základní",
"home.column_settings.show_reblogs": "Zobrazit boosty",
"home.column_settings.show_replies": "Zobrazit odpovědi",
"intervals.full.days": "{number, plural, one {# den} few {# dny} many {# dne} other {# dní}}",
"intervals.full.hours": "{number, plural, one {# hodina} few {# hodiny} many {# hodiny} other {# hodin}}",
"intervals.full.minutes": "{number, plural, one {# minuta} few {# minuty} many {# minuty} other {# minut}}",
"introduction.federation.action": "Další",
"introduction.federation.federated.headline": "Federovaná",
"introduction.federation.federated.text": "Veřejné příspěvky z jiných serverů na fediverse se zobrazí na federované časové ose.",
@ -240,6 +247,7 @@
"notification.favourite": "{name} si oblíbil/a váš toot",
"notification.follow": "{name} vás začal/a sledovat",
"notification.mention": "{name} vás zmínil/a",
"notification.poll": "Anketa, ve které jste hlasoval/a, skončila",
"notification.reblog": "{name} boostnul/a váš toot",
"notifications.clear": "Vymazat oznámení",
"notifications.clear_confirmation": "Jste si jistý/á, že chcete trvale vymazat všechna vaše oznámení?",
@ -264,6 +272,8 @@
"poll.refresh": "Refresh",
"poll.total_votes": "{count, plural, one {# vote} other {# votes}}",
"poll.vote": "Vote",
"poll_button.add_poll": "Přidat anketu",
"poll_button.remove_poll": "Odstranit anketu",
"privacy.change": "Změnit soukromí tootu",
"privacy.direct.long": "Odeslat pouze zmíněným uživatelům",
"privacy.direct.short": "Přímý",
@ -356,6 +366,7 @@
"upload_area.title": "Přetažením nahrajete",
"upload_button.label": "Přidat média (JPEG, PNG, GIF, WebM, MP4, MOV)",
"upload_error.limit": "Byl překročen limit nahraných souborů.",
"upload_error.poll": "Nahrávání souborů není povoleno u anket.",
"upload_form.description": "Popis pro zrakově postižené",
"upload_form.focus": "Změnit náhled",
"upload_form.undo": "Smazat",

View File

@ -140,6 +140,15 @@ a.table-action-link {
input {
margin-top: 8px;
}
&--aligned {
display: flex;
align-items: center;
input {
margin-top: 0;
}
}
}
&__actions,
@ -183,6 +192,10 @@ a.table-action-link {
&__content {
padding-top: 12px;
padding-bottom: 16px;
&--unpadded {
padding: 0;
}
}
}
@ -197,4 +210,10 @@ a.table-action-link {
font-weight: 700;
}
}
.nothing-here {
border: 1px solid darken($ui-base-color, 8%);
border-top: 0;
box-shadow: none;
}
}