Merge branch 'master' into feature-private-federation

This commit is contained in:
Eugen 2017-04-19 15:40:14 +02:00 committed by GitHub
commit 20fe22a4a9
160 changed files with 1326 additions and 137169 deletions

View file

@ -74,6 +74,7 @@ SMTP_FROM_ADDRESS=notifications@example.com
# S3_PROTOCOL=https
# S3_HOSTNAME=
# S3_ENDPOINT=
# S3_SIGNATURE_VERSION=
# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
# S3_CLOUDFRONT_HOST=

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 334 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 369 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 366 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 349 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 373 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 331 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 370 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 362 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 378 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 1.6 MiB

View file

@ -0,0 +1,34 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import PureRenderMixin from 'react-addons-pure-render-mixin';
const filename = url => url.split('/').pop().split('#')[0].split('?')[0];
const AttachmentList = React.createClass({
propTypes: {
media: ImmutablePropTypes.list.isRequired
},
mixins: [PureRenderMixin],
render () {
const { media } = this.props;
return (
<div className='attachment-list'>
<div className='attachment-list__icon'>
<i className='fa fa-link' />
</div>
<ul className='attachment-list__list'>
{media.map(attachment =>
<li key={attachment.get('id')}>
<a href={attachment.get('remote_url')} target='_blank' rel='noopener'>{filename(attachment.get('remote_url'))}</a>
</li>
)}
</ul>
</div>
);
}
});
export default AttachmentList;

View file

@ -63,6 +63,10 @@ const AutosuggestTextarea = React.createClass({
this.props.onSuggestionsClearRequested();
}
// auto-resize textarea
e.target.style.height = 'auto';
e.target.style.height = `${e.target.scrollHeight}px`;
this.props.onChange(e);
},

View file

@ -5,6 +5,7 @@ import PureRenderMixin from 'react-addons-pure-render-mixin';
import DisplayName from './display_name';
import MediaGallery from './media_gallery';
import VideoPlayer from './video_player';
import AttachmentList from './attachment_list';
import StatusContent from './status_content';
import StatusActionBar from './status_action_bar';
import { FormattedMessage } from 'react-intl';
@ -77,7 +78,9 @@ const Status = React.createClass({
}
if (status.get('media_attachments').size > 0 && !this.props.muted) {
if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
media = <VideoPlayer media={status.getIn(['media_attachments', 0])} sensitive={status.get('sensitive')} onOpenVideo={this.props.onOpenVideo} />;
} else {
media = <MediaGallery media={status.get('media_attachments')} sensitive={status.get('sensitive')} height={110} onOpenMedia={this.props.onOpenMedia} autoPlayGif={this.props.autoPlayGif} />;

View file

@ -10,6 +10,7 @@ const messages = defineMessages({
mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' },
block: { id: 'account.block', defaultMessage: 'Block @{name}' },
reply: { id: 'status.reply', defaultMessage: 'Reply' },
replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },
reblog: { id: 'status.reblog', defaultMessage: 'Reblog' },
favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
open: { id: 'status.open', defaultMessage: 'Expand this status' },
@ -95,10 +96,19 @@ const StatusActionBar = React.createClass({
let reblogIcon = 'retweet';
if (status.get('visibility') === 'direct') reblogIcon = 'envelope';
else if (status.get('visibility') === 'private') reblogIcon = 'lock';
let reply_icon;
let reply_title;
if (status.get('in_reply_to_id', null) === null) {
reply_icon = "reply";
reply_title = intl.formatMessage(messages.reply);
} else {
reply_icon = "reply-all";
reply_title = intl.formatMessage(messages.replyAll);
}
return (
<div style={{ marginTop: '10px', overflow: 'hidden' }}>
<div style={{ float: 'left', marginRight: '18px'}}><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_id', null) === null ? 'reply' : 'reply-all'} onClick={this.handleReplyClick} /></div>
<div style={{ float: 'left', marginRight: '18px'}}><IconButton title={reply_title} icon={reply_icon} onClick={this.handleReplyClick} /></div>
<div style={{ float: 'left', marginRight: '18px'}}><IconButton disabled={status.get('visibility') === 'private' || status.get('visibility') === 'direct'} active={status.get('reblogged')} title={intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>
<div style={{ float: 'left', marginRight: '18px'}}><IconButton animate={true} active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} activeStyle={{ color: '#ca8f04' }} /></div>

View file

@ -131,6 +131,7 @@ const ComposeForm = React.createClass({
render () {
const { intl, needsPrivacyWarning, mentionedDomains, onPaste } = this.props;
const disabled = this.props.is_submitting;
const text = [this.props.spoiler_text, this.props.text].join('');
let publishText = '';
let privacyWarning = '';
@ -197,8 +198,8 @@ const ComposeForm = React.createClass({
</div>
<div style={{ display: 'flex' }}>
<div style={{ paddingTop: '10px', marginRight: '16px', lineHeight: '36px' }}><CharacterCounter max={500} text={[this.props.spoiler_text, this.props.text].join('')} /></div>
<div style={{ paddingTop: '10px' }}><Button text={publishText} onClick={this.handleSubmit} disabled={disabled} /></div>
<div style={{ paddingTop: '10px', marginRight: '16px', lineHeight: '36px' }}><CharacterCounter max={500} text={text} /></div>
<div style={{ paddingTop: '10px' }}><Button text={publishText} onClick={this.handleSubmit} disabled={disabled || text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length > 500} /></div>
</div>
</div>
</div>

View file

@ -5,6 +5,7 @@ import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from '../../../components/media_gallery';
import VideoPlayer from '../../../components/video_player';
import AttachmentList from '../../../components/attachment_list';
import { Link } from 'react-router';
import { FormattedDate, FormattedNumber } from 'react-intl';
import CardContainer from '../containers/card_container';
@ -40,12 +41,14 @@ const DetailedStatus = React.createClass({
let applicationLink = '';
if (status.get('media_attachments').size > 0) {
if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
media = <AttachmentList media={status.get('media_attachments')} />;
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
media = <VideoPlayer sensitive={status.get('sensitive')} media={status.getIn(['media_attachments', 0])} width={300} height={150} onOpenVideo={this.props.onOpenVideo} autoplay />;
} else {
media = <MediaGallery sensitive={status.get('sensitive')} media={status.get('media_attachments')} height={300} onOpenMedia={this.props.onOpenMedia} autoPlayGif={this.props.autoPlayGif} />;
}
} else {
} else if (status.get('spoiler_text').length === 0) {
media = <CardContainer statusId={status.get('id')} />;
}

View file

@ -13,7 +13,7 @@ const TabsBar = React.createClass({
<Link className='tabs-bar__link secondary' activeClassName='active' to='/timelines/public/local'><i className='fa fa-fw fa-users' /><FormattedMessage id='tabs_bar.local_timeline' defaultMessage='Local' /></Link>
<Link className='tabs-bar__link secondary' activeClassName='active' to='/timelines/public'><i className='fa fa-fw fa-globe' /><FormattedMessage id='tabs_bar.federated_timeline' defaultMessage='Federated' /></Link>
<Link className='tabs-bar__link primary' activeClassName='active' style={{ flexGrow: '0', flexBasis: '30px' }} to='/getting-started'><i className='fa fa-fw fa-bars' /></Link>
<Link className='tabs-bar__link primary' activeClassName='active' style={{ flexGrow: '0', flexBasis: '30px' }} to='/getting-started'><i className='fa fa-fw fa-asterisk' /></Link>
</div>
);
}

View file

@ -112,6 +112,7 @@ const en = {
"status.reblog": "Boost",
"status.reblogged_by": "{name} boosted",
"status.reply": "Reply",
"status.replyAll": "Reply to thread",
"status.report": "Report @{name}",
"status.sensitive_toggle": "Click to view",
"status.sensitive_warning": "Sensitive content",

View file

@ -1,17 +1,17 @@
const ja = {
"account.block": "@{name} さんをブロック",
"account.block": "ブロック",
"account.disclaimer": "このユーザーは他のインスタンスに所属しているため、数字が正確で無い場合があります。",
"account.edit_profile": "プロフィールを編集",
"account.follow": "フォロー",
"account.followers": "フォロワー",
"account.follows": "フォロー",
"account.follows_you": "フォローされています",
"account.mention": "@{name} さんに返信",
"account.mention": "返信",
"account.mute": "ミュート",
"account.posts": "投稿",
"account.report": "@{name}を通報する",
"account.report": "通報",
"account.requested": "承認待ち",
"account.unblock": "@{name} さんのブロック解除",
"account.unblock": "ブロック解除",
"account.unfollow": "フォロー解除",
"account.unmute": "ミュート解除",
"boost_modal.combo": "次からは{combo}を押せば、これをスキップできます。",
@ -110,17 +110,18 @@ const ja = {
"report.target": "問題のユーザー",
"search.placeholder": "検索",
"search.status_by": "{name}からの投稿",
"search_results.total": "{count} {count, plural, one {result} other {results}} 件",
"search_results.total": "{count} 件",
"status.delete": "削除",
"status.favourite": "お気に入り",
"status.load_more": "もっと見る",
"status.media_hidden": "非表示のメデイア",
"status.mention": "@{name} さんへの返信",
"status.mention": "返信",
"status.open": "詳細を表示",
"status.reblog": "ブースト",
"status.reblogged_by": "{name} さんにブーストされました",
"status.reply": "返信",
"status.report": "@{name} さんを通報",
"status.replyAll": "全員に返信",
"status.report": "通報",
"status.sensitive_toggle": "クリックして表示",
"status.sensitive_warning": "不適切なコンテンツ",
"status.show_less": "隠す",

View file

@ -22,9 +22,9 @@ const zh_cn = {
"account.disclaimer": "由于这个账户处于另一个服务站,实际数字会比这个更多。",
"account.edit_profile": "修改个人资料",
"account.follow": "关注",
"account.followers": "关注的人",
"account.followers": "关注",
"account.follows_you": "关注你",
"account.follows": "正关注",
"account.follows": "正关注",
"account.mention": "提及 @{name}",
"account.mute": "将 @{name} 静音",
"account.posts": "嘟文",
@ -66,10 +66,10 @@ const zh_cn = {
"follow_request.authorize": "批准",
"follow_request.reject": "拒绝",
"getting_started.about_addressing": "只要你知道一位用户的用户名称和域名,你可以用“@用户名称@域名”的格式在搜索栏寻找该用户。",
"getting_started.about_shortcuts": "只要该用户是在你现在的服务站开立,你可以直接输入用户𠱷搜索。同样的规则适用于在嘟文提及别的用户。",
"getting_started.about_shortcuts": "只要该用户是在你现在的服务站开立,你就可以直接输入用户名搜索。在嘟文中提及别的用户也是如此。",
"getting_started.apps": "手机或桌面应用程序",
"getting_started.heading": "开始使用",
"getting_started.open_source_notice": "Mastodon 是一个开放源码的软件。你可以在官方 GitHub ({github}) 贡献或者回报问题。你亦可过{apps}阅读 Mastodon 上的消息。",
"getting_started.open_source_notice": "Mastodon 是一个开放源码的软件。你可以在官方 GitHub ({github}) 贡献或者回报问题。你亦可过{apps}阅读 Mastodon 上的消息。",
"home.column_settings.advanced": "高端",
"home.column_settings.basic": "基本",
"home.column_settings.filter_regex": "使用正则表达式 (regex) 过滤",

View file

@ -14,8 +14,9 @@
.sidebar {
width: 240px;
height: 100%;
padding: 20px 0;
padding: 0;
overflow-y: auto;
.logo {
display: block;
margin: 40px auto;
@ -27,6 +28,7 @@
list-style: none;
border-radius: 4px 0 0 4px;
overflow: hidden;
margin-bottom: 20px;
a {
display: block;
@ -55,6 +57,7 @@
ul {
background: darken($color1, 4%);
border-radius: 0 0 0 4px;
margin: 0;
a {
border: 0;

View file

@ -1196,7 +1196,6 @@ a.status__content__spoiler-link {
display: block;
box-sizing: border-box;
width: 100%;
resize: none;
margin: 0;
color: $color1;
padding: 10px;
@ -1220,11 +1219,17 @@ a.status__content__spoiler-link {
}
.autosuggest-textarea__textarea {
height: 100px;
min-height: 100px;
background: $color5;
border-radius: 4px 4px 0 0;
padding-bottom: 0;
padding-right: 10px + 22px;
resize: none;
@media screen and (max-width: 600px) {
height: 100px !important; // prevent auto-resize textarea
resize: vertical;
}
}
.autosuggest-textarea__suggestions {
@ -2346,3 +2351,53 @@ button.icon-button.active i.fa-retweet {
}
}
}
.attachment-list {
display: flex;
font-size: 14px;
border: 1px solid lighten($color1, 8%);
border-radius: 4px;
margin-top: 14px;
overflow: hidden;
}
.attachment-list__icon {
flex: 0 0 auto;
color: lighten($color1, 26%);
padding: 8px 18px;
cursor: default;
border-right: 1px solid lighten($color1, 8%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 26px;
.fa {
display: block;
}
}
.attachment-list__list {
list-style: none;
padding: 4px 0;
padding-left: 8px;
display: flex;
flex-direction: column;
justify-content: center;
li {
display: block;
padding: 4px 0;
}
a {
text-decoration: none;
color: lighten($color1, 26%);
font-weight: 500;
&:hover {
text-decoration: underline;
}
}
}

View file

@ -8,4 +8,3 @@
font-weight: 400;
font-style: normal;
}

View file

@ -1,113 +1,3 @@
/*
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-bold-webfont.eot');
src: font-url('roboto-mono/robotomono-bold-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-bold-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-bold-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-bold-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-bold-webfont.svg#roboto_monobold') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-bolditalic-webfont.eot');
src: font-url('roboto-mono/robotomono-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-bolditalic-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-bolditalic-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-bolditalic-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-bolditalic-webfont.svg#roboto_monobold_italic') format('svg');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-italic-webfont.eot');
src: font-url('roboto-mono/robotomono-italic-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-italic-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-italic-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-italic-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-italic-webfont.svg#roboto_monoitalic') format('svg');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-light-webfont.eot');
src: font-url('roboto-mono/robotomono-light-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-light-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-light-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-light-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-light-webfont.svg#roboto_monolight') format('svg');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-lightitalic-webfont.eot');
src: font-url('roboto-mono/robotomono-lightitalic-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-lightitalic-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-lightitalic-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-lightitalic-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-lightitalic-webfont.svg#roboto_monolight_italic') format('svg');
font-weight: 300;
font-style: italic;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-medium-webfont.eot');
src: font-url('roboto-mono/robotomono-medium-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-medium-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-medium-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-medium-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-medium-webfont.svg#roboto_monomedium') format('svg');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-mediumitalic-webfont.eot');
src: font-url('roboto-mono/robotomono-mediumitalic-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-mediumitalic-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-mediumitalic-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-mediumitalic-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-mediumitalic-webfont.svg#roboto_monomedium_italic') format('svg');
font-weight: 500;
font-style: italic;
}
*/
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-regular-webfont.eot');
@ -118,37 +8,4 @@
font-url('roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
font-weight: 400;
font-style: normal;
}
/*
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-thin-webfont.eot');
src: font-url('roboto-mono/robotomono-thin-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-thin-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-thin-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-thin-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-thin-webfont.svg#roboto_monothin') format('svg');
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: font-url('roboto-mono/robotomono-thinitalic-webfont.eot');
src: font-url('roboto-mono/robotomono-thinitalic-webfont.eot?#iefix') format('embedded-opentype'),
font-url('roboto-mono/robotomono-thinitalic-webfont.woff2') format('woff2'),
font-url('roboto-mono/robotomono-thinitalic-webfont.woff') format('woff'),
font-url('roboto-mono/robotomono-thinitalic-webfont.ttf') format('truetype'),
font-url('roboto-mono/robotomono-thinitalic-webfont.svg#roboto_monothin_italic') format('svg');
font-weight: 200;
font-style: italic;
}*/

Some files were not shown because too many files have changed in this diff Show more