Merge pull request #342 from glitch-soc/merge-upstream

Merge upstream
This commit is contained in:
David Yip 2018-01-20 16:37:35 -06:00 committed by GitHub
commit 24b6e4121f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
202 changed files with 721 additions and 899 deletions

View file

@ -1 +1 @@
2.4.2 2.5.0

View file

@ -40,20 +40,20 @@ addons:
- yarn - yarn
rvm: rvm:
- 2.3.4
- 2.4.2 - 2.4.2
- 2.5.0
services: services:
- redis-server - redis-server
install: install:
- gem update --system
- nvm install - nvm install
- bundle install --path=vendor/bundle --without development production --retry=3 --jobs=16 - bundle install --path=vendor/bundle --without development production --retry=3 --jobs=16
- yarn install - yarn install
before_script: before_script:
- bundle exec rake parallel:create parallel:load_schema parallel:prepare - ./bin/rails parallel:create parallel:load_schema parallel:prepare assets:precompile
- bundle exec rails assets:precompile
- ln -s /usr/bin/x86_64-linux-gnu-g++-6 "$HOME/g++" - ln -s /usr/bin/x86_64-linux-gnu-g++-6 "$HOME/g++"
script: script:

View file

@ -1,4 +1,4 @@
FROM ruby:2.4.2-alpine3.6 FROM ruby:2.5.0-alpine3.7
LABEL maintainer="https://github.com/tootsuite/mastodon" \ LABEL maintainer="https://github.com/tootsuite/mastodon" \
description="A GNU Social-compatible microblogging server" description="A GNU Social-compatible microblogging server"
@ -40,6 +40,7 @@ RUN apk -U upgrade \
protobuf \ protobuf \
su-exec \ su-exec \
tini \ tini \
tzdata \
&& update-ca-certificates \ && update-ca-certificates \
&& mkdir -p /tmp/src /opt \ && mkdir -p /tmp/src /opt \
&& wget -O yarn.tar.gz "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ && wget -O yarn.tar.gz "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '>= 2.3.0', '< 2.5.0' ruby '>= 2.3.0', '< 2.6.0'
gem 'pkg-config', '~> 1.2' gem 'pkg-config', '~> 1.2'
@ -29,7 +29,7 @@ gem 'browser'
gem 'charlock_holmes', '~> 0.7.5' gem 'charlock_holmes', '~> 0.7.5'
gem 'iso-639' gem 'iso-639'
gem 'cld3', '~> 3.2.0' gem 'cld3', '~> 3.2.0'
gem 'devise', '~> 4.3' gem 'devise', '~> 4.4'
gem 'devise-two-factor', '~> 3.0' gem 'devise-two-factor', '~> 3.0'
gem 'doorkeeper', '~> 4.2' gem 'doorkeeper', '~> 4.2'
gem 'fast_blank', '~> 1.0' gem 'fast_blank', '~> 1.0'

View file

@ -110,7 +110,7 @@ GEM
activesupport activesupport
charlock_holmes (0.7.5) charlock_holmes (0.7.5)
chunky_png (1.3.8) chunky_png (1.3.8)
cld3 (3.2.1) cld3 (3.2.2)
ffi (>= 1.1.0, < 1.10.0) ffi (>= 1.1.0, < 1.10.0)
climate_control (0.2.0) climate_control (0.2.0)
cocaine (0.5.8) cocaine (0.5.8)
@ -125,7 +125,7 @@ GEM
css_parser (1.6.0) css_parser (1.6.0)
addressable addressable
debug_inspector (0.0.3) debug_inspector (0.0.3)
devise (4.3.0) devise (4.4.0)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2) railties (>= 4.1.0, < 5.2)
@ -569,7 +569,7 @@ DEPENDENCIES
charlock_holmes (~> 0.7.5) charlock_holmes (~> 0.7.5)
cld3 (~> 3.2.0) cld3 (~> 3.2.0)
climate_control (~> 0.2) climate_control (~> 0.2)
devise (~> 4.3) devise (~> 4.4)
devise-two-factor (~> 3.0) devise-two-factor (~> 3.0)
doorkeeper (~> 4.2) doorkeeper (~> 4.2)
dotenv-rails (~> 2.2) dotenv-rails (~> 2.2)
@ -651,7 +651,7 @@ DEPENDENCIES
webpush webpush
RUBY VERSION RUBY VERSION
ruby 2.4.2p198 ruby 2.5.0p0
BUNDLED WITH BUNDLED WITH
1.16.1 1.16.1

View file

@ -32,7 +32,7 @@ module UserTrackingConcern
end end
def regenerate_feed! def regenerate_feed!
Redis.current.setnx("account:#{current_user.account_id}:regeneration", true) == 1 && Redis.current.expire("account:#{current_user.account_id}:regeneration", 3_600 * 24) Redis.current.setnx("account:#{current_user.account_id}:regeneration", true) && Redis.current.expire("account:#{current_user.account_id}:regeneration", 1.day.seconds)
RegenerationWorker.perform_async(current_user.account_id) RegenerationWorker.perform_async(current_user.account_id)
end end
end end

View file

@ -6,6 +6,6 @@ module InstanceHelper
end end
def site_hostname def site_hostname
Rails.configuration.x.local_domain @site_hostname ||= Addressable::URI.parse("//#{Rails.configuration.x.local_domain}").display_uri.host
end end
end end

View file

@ -296,7 +296,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: lighten($ui-base-color, 13%) url('~images/wave-drawer.png') no-repeat bottom / 100% auto; background: lighten($ui-base-color, 13%) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234.80078 31.757813" width="234.80078" height="31.757812"><path d="M19.599609 0c-1.05 0-2.10039.375-2.90039 1.125L0 16.925781v14.832031h234.80078V17.025391l-16.5-15.900391c-1.6-1.5-4.20078-1.5-5.80078 0l-13.80078 13.099609c-1.6 1.5-4.19883 1.5-5.79883 0L179.09961 1.125c-1.6-1.5-4.19883-1.5-5.79883 0L159.5 14.224609c-1.6 1.5-4.20078 1.5-5.80078 0L139.90039 1.125c-1.6-1.5-4.20078-1.5-5.80078 0l-13.79883 13.099609c-1.6 1.5-4.20078 1.5-5.80078 0L100.69922 1.125c-1.600001-1.5-4.198829-1.5-5.798829 0l-13.59961 13.099609c-1.6 1.5-4.200781 1.5-5.800781 0L61.699219 1.125c-1.6-1.5-4.198828-1.5-5.798828 0L42.099609 14.224609c-1.6 1.5-4.198828 1.5-5.798828 0L22.5 1.125C21.7.375 20.649609 0 19.599609 0z" fill="#{hex-color($ui-base-color)}"/></svg>') no-repeat bottom / 100% auto;
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
display: flex; display: flex;
@ -311,7 +311,7 @@
} }
> .mastodon { > .mastodon {
background: url('~images/mastodon-ui.png') no-repeat left bottom / contain; background: url('~images/elephant_ui_plane.svg') no-repeat left bottom / contain;
flex: 1; flex: 1;
} }
} }

View file

@ -77,13 +77,12 @@
height: 80vh; height: 80vh;
width: 80vw; width: 80vw;
max-width: 520px; max-width: 520px;
max-height: 420px; max-height: 470px;
.react-swipeable-view-container > div { .react-swipeable-view-container > div {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 25px;
display: none; display: none;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -156,23 +155,32 @@
.onboarding-modal__nav, .onboarding-modal__nav,
.error-modal__nav { .error-modal__nav {
color: darken($ui-secondary-color, 34%); color: darken($ui-secondary-color, 34%);
background-color: transparent;
border: 0; border: 0;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
padding: 0; padding: 10px 25px;
line-height: inherit; line-height: inherit;
height: auto; height: auto;
margin: -10px;
border-radius: 4px;
background-color: transparent;
&:hover, &:hover,
&:focus, &:focus,
&:active { &:active {
color: darken($ui-secondary-color, 38%); color: darken($ui-secondary-color, 38%);
background-color: darken($ui-secondary-color, 16%);
} }
&.onboarding-modal__done, &.onboarding-modal__done,
&.onboarding-modal__next { &.onboarding-modal__next {
color: $ui-highlight-color; color: $ui-base-color;
&:hover,
&:focus,
&:active {
color: darken($ui-base-color, 4%);
}
} }
} }
} }
@ -208,6 +216,8 @@
.onboarding-modal__page__wrapper { .onboarding-modal__page__wrapper {
pointer-events: none; pointer-events: none;
padding: 25px;
padding-bottom: 0;
&.onboarding-modal__page__wrapper--active { &.onboarding-modal__page__wrapper--active {
pointer-events: auto; pointer-events: auto;
@ -235,6 +245,10 @@
} }
} }
.navigation-bar a {
color: inherit;
}
p { p {
font-size: 16px; font-size: 16px;
color: lighten($ui-base-color, 8%); color: lighten($ui-base-color, 8%);
@ -262,29 +276,56 @@
} }
} }
.onboarding-modal__page__wrapper-0 {
background: url('~images/elephant_ui_greeting.svg') no-repeat left bottom / auto 250px;
height: 100%;
padding: 0;
}
.onboarding-modal__page-one { .onboarding-modal__page-one {
display: flex; &__lead {
align-items: center; padding: 65px;
padding-top: 45px;
padding-bottom: 0;
margin-bottom: 10px;
h1 {
font-size: 26px;
line-height: 36px;
margin-bottom: 8px;
} }
.onboarding-modal__page-one__elephant-friend { p {
background: url('~images/elephant-friend-1.png') no-repeat center center / contain; margin-bottom: 0;
width: 155px; }
height: 193px;
margin-right: 15px;
} }
@media screen and (max-width: 400px) { &__extra {
.onboarding-modal__page-one { padding-right: 65px;
flex-direction: column; padding-left: 185px;
align-items: normal; text-align: center;
}
} }
.onboarding-modal__page-one__elephant-friend { .display-case {
width: 100%; text-align: center;
height: 30vh; font-size: 15px;
max-height: 160px; margin-bottom: 15px;
margin-bottom: 5vh;
&__label {
font-weight: 500;
color: $ui-base-color;
margin-bottom: 5px;
text-transform: uppercase;
font-size: 12px;
}
&__case {
background: $ui-base-color;
color: $ui-secondary-color;
font-weight: 500;
padding: 10px;
border-radius: 4px;
} }
} }
@ -374,16 +415,6 @@
} }
} }
.onboarding-modal__image {
border-radius: 8px;
width: 70vw;
max-width: 450px;
max-height: auto;
display: block;
margin: auto;
margin-bottom: 20px;
}
.onboard-sliders { .onboard-sliders {
display: inline-block; display: inline-block;
max-width: 30px; max-width: 30px;

View file

@ -1,5 +1,5 @@
.modal-layout { .modal-layout {
background: $ui-base-color url('~images/wave-modal.png') repeat-x bottom fixed; background: $ui-base-color url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234.80078 31.757813" width="234.80078" height="31.757812"><path d="M19.599609 0c-1.05 0-2.10039.375-2.90039 1.125L0 16.925781v14.832031h234.80078V17.025391l-16.5-15.900391c-1.6-1.5-4.20078-1.5-5.80078 0l-13.80078 13.099609c-1.6 1.5-4.19883 1.5-5.79883 0L179.09961 1.125c-1.6-1.5-4.19883-1.5-5.79883 0L159.5 14.224609c-1.6 1.5-4.20078 1.5-5.80078 0L139.90039 1.125c-1.6-1.5-4.20078-1.5-5.80078 0l-13.79883 13.099609c-1.6 1.5-4.20078 1.5-5.80078 0L100.69922 1.125c-1.600001-1.5-4.198829-1.5-5.798829 0l-13.59961 13.099609c-1.6 1.5-4.200781 1.5-5.800781 0L61.699219 1.125c-1.6-1.5-4.198828-1.5-5.798828 0L42.099609 14.224609c-1.6 1.5-4.198828 1.5-5.798828 0L22.5 1.125C21.7.375 20.649609 0 19.599609 0z" fill="#{hex-color($ui-base-lighter-color)}"/></svg>') repeat-x bottom fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
@ -15,6 +15,6 @@
> * { > * {
flex: 1; flex: 1;
max-height: 235px; max-height: 235px;
background: url('~images/mastodon-ui.png') no-repeat left bottom / contain; background: url('~images/elephant_ui_plane.svg') no-repeat left bottom / contain;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,4 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
</svg>

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -24,14 +24,23 @@ const messages = defineMessages({
const PageOne = ({ acct, domain }) => ( const PageOne = ({ acct, domain }) => (
<div className='onboarding-modal__page onboarding-modal__page-one'> <div className='onboarding-modal__page onboarding-modal__page-one'>
<div style={{ flex: '0 0 auto' }}> <div className='onboarding-modal__page-one__lead'>
<div className='onboarding-modal__page-one__elephant-friend' />
</div>
<div>
<h1><FormattedMessage id='onboarding.page_one.welcome' defaultMessage='Welcome to Mastodon!' /></h1> <h1><FormattedMessage id='onboarding.page_one.welcome' defaultMessage='Welcome to Mastodon!' /></h1>
<p><FormattedMessage id='onboarding.page_one.federation' defaultMessage='Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.' /></p> <p><FormattedMessage id='onboarding.page_one.federation' defaultMessage='Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.' /></p>
<p><FormattedMessage id='onboarding.page_one.handle' defaultMessage='You are on {domain}, so your full handle is {handle}' values={{ domain, handle: <strong>@{acct}@{domain}</strong> }} /></p> </div>
<div className='onboarding-modal__page-one__extra'>
<div className='display-case'>
<div className='display-case__label'>
<FormattedMessage id='onboarding.page_one.full_handle' defaultMessage='Your full handle' />
</div>
<div className='display-case__case'>
@{acct}@{domain}
</div>
</div>
<p><FormattedMessage id='onboarding.page_one.handle_hint' defaultMessage='This is what you would tell your friends to search for.' /></p>
</div> </div>
</div> </div>
); );
@ -46,7 +55,7 @@ const PageTwo = ({ myAccount }) => (
<div className='figure non-interactive'> <div className='figure non-interactive'>
<div className='pseudo-drawer'> <div className='pseudo-drawer'>
<NavigationBar account={myAccount} /> <NavigationBar account={myAccount} />
</div>
<ComposeForm <ComposeForm
text='Awoo! #introductions' text='Awoo! #introductions'
suggestions={ImmutableList()} suggestions={ImmutableList()}
@ -63,6 +72,7 @@ const PageTwo = ({ myAccount }) => (
showSearch showSearch
/> />
</div> </div>
</div>
<p><FormattedMessage id='onboarding.page_two.compose' defaultMessage='Write posts from the compose column. You can upload images, change privacy settings, and add content warnings with the icons below.' /></p> <p><FormattedMessage id='onboarding.page_two.compose' defaultMessage='Write posts from the compose column. You can upload images, change privacy settings, and add content warnings with the icons below.' /></p>
</div> </div>
@ -251,18 +261,12 @@ export default class OnboardingModal extends React.PureComponent {
const hasMore = currentIndex < pages.length - 1; const hasMore = currentIndex < pages.length - 1;
const nextOrDoneBtn = hasMore ? ( const nextOrDoneBtn = hasMore ? (
<button <button onClick={this.handleNext} className='onboarding-modal__nav onboarding-modal__next shake-bottom'>
onClick={this.handleNext} <FormattedMessage id='onboarding.next' defaultMessage='Next' /> <i className='fa fa-fw fa-chevron-right' />
className='onboarding-modal__nav onboarding-modal__next'
>
<FormattedMessage id='onboarding.next' defaultMessage='Next' />
</button> </button>
) : ( ) : (
<button <button onClick={this.handleClose} className='onboarding-modal__nav onboarding-modal__done shake-bottom'>
onClick={this.handleClose} <FormattedMessage id='onboarding.done' defaultMessage='Done' /> <i className='fa fa-fw fa-check' />
className='onboarding-modal__nav onboarding-modal__done'
>
<FormattedMessage id='onboarding.done' defaultMessage='Done' />
</button> </button>
); );
@ -270,9 +274,10 @@ export default class OnboardingModal extends React.PureComponent {
<div className='modal-root__modal onboarding-modal'> <div className='modal-root__modal onboarding-modal'>
<ReactSwipeableViews index={currentIndex} onChangeIndex={this.handleSwipe} className='onboarding-modal__pager'> <ReactSwipeableViews index={currentIndex} onChangeIndex={this.handleSwipe} className='onboarding-modal__pager'>
{pages.map((page, i) => { {pages.map((page, i) => {
const className = classNames('onboarding-modal__page__wrapper', { const className = classNames('onboarding-modal__page__wrapper', `onboarding-modal__page__wrapper-${i}`, {
'onboarding-modal__page__wrapper--active': i === currentIndex, 'onboarding-modal__page__wrapper--active': i === currentIndex,
}); });
return ( return (
<div key={i} className={className}>{page}</div> <div key={i} className={className}>{page}</div>
); );
@ -294,6 +299,7 @@ export default class OnboardingModal extends React.PureComponent {
const className = classNames('onboarding-modal__dot', { const className = classNames('onboarding-modal__dot', {
active: i === currentIndex, active: i === currentIndex,
}); });
return ( return (
<div <div
key={`dot-${i}`} key={`dot-${i}`}

View file

@ -181,7 +181,8 @@
"onboarding.page_four.home": "The home timeline shows posts from people you follow.", "onboarding.page_four.home": "The home timeline shows posts from people you follow.",
"onboarding.page_four.notifications": "The notifications column shows when someone interacts with you.", "onboarding.page_four.notifications": "The notifications column shows when someone interacts with you.",
"onboarding.page_one.federation": "Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.", "onboarding.page_one.federation": "Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.",
"onboarding.page_one.handle": "You are on {domain}, so your full handle is {handle}", "onboarding.page_one.full_handle": "Your full handle",
"onboarding.page_one.handle_hint": "This is what you would tell your friends to search for.",
"onboarding.page_one.welcome": "Welcome to Mastodon!", "onboarding.page_one.welcome": "Welcome to Mastodon!",
"onboarding.page_six.admin": "Your instance's admin is {admin}.", "onboarding.page_six.admin": "Your instance's admin is {admin}.",
"onboarding.page_six.almost_done": "Almost done...", "onboarding.page_six.almost_done": "Almost done...",

View file

@ -139,6 +139,7 @@
"loading_indicator.label": "加载中……", "loading_indicator.label": "加载中……",
"media_gallery.toggle_visible": "切换显示/隐藏", "media_gallery.toggle_visible": "切换显示/隐藏",
"missing_indicator.label": "找不到内容", "missing_indicator.label": "找不到内容",
"missing_indicator.sublabel": "无法找到此资源",
"mute_modal.hide_notifications": "同时隐藏来自这个用户的通知", "mute_modal.hide_notifications": "同时隐藏来自这个用户的通知",
"navigation_bar.blocks": "被屏蔽的用户", "navigation_bar.blocks": "被屏蔽的用户",
"navigation_bar.community_timeline": "本站时间轴", "navigation_bar.community_timeline": "本站时间轴",
@ -174,7 +175,8 @@
"onboarding.page_four.home": "你的“主页”时间轴上显示的是你的关注对象所发布的嘟文。", "onboarding.page_four.home": "你的“主页”时间轴上显示的是你的关注对象所发布的嘟文。",
"onboarding.page_four.notifications": "如果有人与你互动了,他们就会出现在“通知”栏中哦~", "onboarding.page_four.notifications": "如果有人与你互动了,他们就会出现在“通知”栏中哦~",
"onboarding.page_one.federation": "Mastodon 是由一系列独立的服务器共同打造的强大的社交网络,我们将这些各自独立而又相互连接的服务器叫做“实例”。", "onboarding.page_one.federation": "Mastodon 是由一系列独立的服务器共同打造的强大的社交网络,我们将这些各自独立而又相互连接的服务器叫做“实例”。",
"onboarding.page_one.handle": "你是在 {domain} 上注册的,所以你的完整用户地址是 {handle}。", "onboarding.page_one.full_handle": "你的完整用户地址",
"onboarding.page_one.handle_hint": "你的朋友们需要这个才能通过搜索功能找到你。",
"onboarding.page_one.welcome": "欢迎来到 Mastodon", "onboarding.page_one.welcome": "欢迎来到 Mastodon",
"onboarding.page_six.admin": "{admin} 是你所在服务器实例的管理员。", "onboarding.page_six.admin": "{admin} 是你所在服务器实例的管理员。",
"onboarding.page_six.almost_done": "差不多了……", "onboarding.page_six.almost_done": "差不多了……",
@ -197,6 +199,8 @@
"privacy.public.short": "公开", "privacy.public.short": "公开",
"privacy.unlisted.long": "所有人可见,但不会出现在公共时间轴上", "privacy.unlisted.long": "所有人可见,但不会出现在公共时间轴上",
"privacy.unlisted.short": "不公开", "privacy.unlisted.short": "不公开",
"regeneration_indicator.label": "加载中……",
"regeneration_indicator.sublabel": "你的主页时间轴正在准备中!",
"relative_time.days": "{number}天", "relative_time.days": "{number}天",
"relative_time.hours": "{number}时", "relative_time.hours": "{number}时",
"relative_time.just_now": "刚刚", "relative_time.just_now": "刚刚",

View file

@ -40,7 +40,7 @@ const normalizeTimeline = (state, timeline, statuses, next, isPartial) => {
mMap.set('loaded', true); mMap.set('loaded', true);
mMap.set('isLoading', false); mMap.set('isLoading', false);
if (!hadNext) mMap.set('next', next); if (!hadNext) mMap.set('next', next);
mMap.set('items', wasLoaded ? ids.concat(oldIds) : ids); mMap.set('items', wasLoaded ? ids.concat(oldIds) : oldIds.concat(ids));
mMap.set('isPartial', isPartial); mMap.set('isPartial', isPartial);
})); }));
}; };

View file

@ -6,7 +6,6 @@
@import 'mastodon/reset'; @import 'mastodon/reset';
@import 'mastodon/basics'; @import 'mastodon/basics';
@import 'mastodon/modal';
@import 'mastodon/containers'; @import 'mastodon/containers';
@import 'mastodon/lists'; @import 'mastodon/lists';
@import 'mastodon/footer'; @import 'mastodon/footer';
@ -15,7 +14,9 @@
@import 'mastodon/forms'; @import 'mastodon/forms';
@import 'mastodon/accounts'; @import 'mastodon/accounts';
@import 'mastodon/stream_entries'; @import 'mastodon/stream_entries';
@import 'mastodon/boost';
@import 'mastodon/components'; @import 'mastodon/components';
@import 'mastodon/modal';
@import 'mastodon/emoji_picker'; @import 'mastodon/emoji_picker';
@import 'mastodon/about'; @import 'mastodon/about';
@import 'mastodon/tables'; @import 'mastodon/tables';

View file

@ -17,7 +17,7 @@ body {
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
} }
.email_body { .email-body {
td, td,
div, div,
a, a,
@ -228,6 +228,19 @@ h3 {
line-height: 25px; line-height: 25px;
} }
h5 {
font-size: 16px;
line-height: 21px;
font-weight: 700;
color: lighten($ui-base-color, 34%);
}
.input-cell {
h5 {
margin-top: 4px;
}
}
.input { .input {
td { td {
background: darken($ui-base-color, 8%); background: darken($ui-base-color, 8%);
@ -356,6 +369,19 @@ h3 {
font-weight: 500 !important; font-weight: 500 !important;
} }
} }
&.button-small {
td {
border-radius: 4px;
font-size: 14px;
padding: 8px 16px;
a {
padding: 5px 16px !important;
line-height: 26px !important;
}
}
}
} }
.button-default { .button-default {
@ -379,6 +405,14 @@ h3 {
padding-right: 16px; padding-right: 16px;
} }
.padded-bottom {
padding-bottom: 32px;
}
.margin-bottom {
margin-bottom: 20px;
}
.hero-icon { .hero-icon {
width: 64px; width: 64px;
@ -463,8 +497,50 @@ h3 {
border-top: 1px solid lighten($ui-base-color, 8%); border-top: 1px solid lighten($ui-base-color, 8%);
} }
ul {
padding-left: 15px;
margin-top: 0;
margin-bottom: 0;
padding-top: 16px;
li {
margin-bottom: 16px;
color: lighten($ui-base-color, 26%);
span {
color: $ui-primary-color;
}
}
}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) { @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
body { body {
min-height: 1024px !important; min-height: 1024px !important;
} }
} }
@media (max-width: 697px) {
.email-container,
.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6 {
width: 100% !important;
max-width: none !important;
}
.email-start {
padding-top: 16px !important;
}
.email-end {
padding-bottom: 16px !important;
}
.padded {
padding-left: 0 !important;
padding-right: 0 !important;
}
}

View file

@ -1419,6 +1419,10 @@
color: $primary-text-color; color: $primary-text-color;
} }
a {
color: inherit;
}
.permalink { .permalink {
text-decoration: none; text-decoration: none;
} }
@ -1762,7 +1766,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: lighten($ui-base-color, 13%) url('~images/wave-drawer.png') no-repeat bottom / 100% auto; background: lighten($ui-base-color, 13%) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234.80078 31.757813" width="234.80078" height="31.757812"><path d="M19.599609 0c-1.05 0-2.10039.375-2.90039 1.125L0 16.925781v14.832031h234.80078V17.025391l-16.5-15.900391c-1.6-1.5-4.20078-1.5-5.80078 0l-13.80078 13.099609c-1.6 1.5-4.19883 1.5-5.79883 0L179.09961 1.125c-1.6-1.5-4.19883-1.5-5.79883 0L159.5 14.224609c-1.6 1.5-4.20078 1.5-5.80078 0L139.90039 1.125c-1.6-1.5-4.20078-1.5-5.80078 0l-13.79883 13.099609c-1.6 1.5-4.20078 1.5-5.80078 0L100.69922 1.125c-1.600001-1.5-4.198829-1.5-5.798829 0l-13.59961 13.099609c-1.6 1.5-4.200781 1.5-5.800781 0L61.699219 1.125c-1.6-1.5-4.198828-1.5-5.798828 0L42.099609 14.224609c-1.6 1.5-4.198828 1.5-5.798828 0L22.5 1.125C21.7.375 20.649609 0 19.599609 0z" fill="#{hex-color($ui-base-color)}"/></svg>') no-repeat bottom / 100% auto;
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
display: flex; display: flex;
@ -1777,7 +1781,7 @@
} }
> .mastodon { > .mastodon {
background: url('~images/mastodon-ui.png') no-repeat left bottom / contain; background: url('~images/elephant_ui_plane.svg') no-repeat left bottom / contain;
flex: 1; flex: 1;
} }
} }
@ -2154,10 +2158,7 @@
} }
} }
@import 'boost';
.no-reduce-motion button.icon-button i.fa-retweet { .no-reduce-motion button.icon-button i.fa-retweet {
background-position: 0 0; background-position: 0 0;
height: 19px; height: 19px;
transition: background-position 0.9s steps(10); transition: background-position 0.9s steps(10);
@ -2763,6 +2764,7 @@
flex: 1 1 auto; flex: 1 1 auto;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@supports(display: grid) { // hack to fix Chrome <57 @supports(display: grid) { // hack to fix Chrome <57
contain: strict; contain: strict;
} }
@ -2808,11 +2810,48 @@
} }
} }
.pulse-loading { .no-reduce-motion .pulse-loading {
transform-origin: center center; transform-origin: center center;
animation: heartbeat 1.5s ease-in-out infinite both; animation: heartbeat 1.5s ease-in-out infinite both;
} }
@keyframes shake-bottom {
0%,
100% {
transform: rotate(0deg);
transform-origin: 50% 100%;
}
10% {
transform: rotate(2deg);
}
20%,
40%,
60% {
transform: rotate(-4deg);
}
30%,
50%,
70% {
transform: rotate(4deg);
}
80% {
transform: rotate(-2deg);
}
90% {
transform: rotate(2deg);
}
}
.no-reduce-motion .shake-bottom {
transform-origin: 50% 100%;
animation: shake-bottom 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) 2s 2 both;
}
.emoji-picker-dropdown__menu { .emoji-picker-dropdown__menu {
background: $simple-background-color; background: $simple-background-color;
position: absolute; position: absolute;
@ -3318,13 +3357,12 @@
height: 80vh; height: 80vh;
width: 80vw; width: 80vw;
max-width: 520px; max-width: 520px;
max-height: 420px; max-height: 470px;
.react-swipeable-view-container > div { .react-swipeable-view-container > div {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 25px;
display: none; display: none;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -3397,23 +3435,32 @@
.onboarding-modal__nav, .onboarding-modal__nav,
.error-modal__nav { .error-modal__nav {
color: darken($ui-secondary-color, 34%); color: darken($ui-secondary-color, 34%);
background-color: transparent;
border: 0; border: 0;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
padding: 0; padding: 10px 25px;
line-height: inherit; line-height: inherit;
height: auto; height: auto;
margin: -10px;
border-radius: 4px;
background-color: transparent;
&:hover, &:hover,
&:focus, &:focus,
&:active { &:active {
color: darken($ui-secondary-color, 38%); color: darken($ui-secondary-color, 38%);
background-color: darken($ui-secondary-color, 16%);
} }
&.onboarding-modal__done, &.onboarding-modal__done,
&.onboarding-modal__next { &.onboarding-modal__next {
color: $ui-highlight-color; color: $ui-base-color;
&:hover,
&:focus,
&:active {
color: darken($ui-base-color, 4%);
}
} }
} }
} }
@ -3449,6 +3496,8 @@
.onboarding-modal__page__wrapper { .onboarding-modal__page__wrapper {
pointer-events: none; pointer-events: none;
padding: 25px;
padding-bottom: 0;
&.onboarding-modal__page__wrapper--active { &.onboarding-modal__page__wrapper--active {
pointer-events: auto; pointer-events: auto;
@ -3476,6 +3525,10 @@
} }
} }
.navigation-bar a {
color: inherit;
}
p { p {
font-size: 16px; font-size: 16px;
color: lighten($ui-base-color, 8%); color: lighten($ui-base-color, 8%);
@ -3503,29 +3556,56 @@
} }
} }
.onboarding-modal__page__wrapper-0 {
background: url('~images/elephant_ui_greeting.svg') no-repeat left bottom / auto 250px;
height: 100%;
padding: 0;
}
.onboarding-modal__page-one { .onboarding-modal__page-one {
display: flex; &__lead {
align-items: center; padding: 65px;
padding-top: 45px;
padding-bottom: 0;
margin-bottom: 10px;
h1 {
font-size: 26px;
line-height: 36px;
margin-bottom: 8px;
} }
.onboarding-modal__page-one__elephant-friend { p {
background: url('~images/elephant-friend-1.png') no-repeat center center / contain; margin-bottom: 0;
width: 155px; }
height: 193px;
margin-right: 15px;
} }
@media screen and (max-width: 400px) { &__extra {
.onboarding-modal__page-one { padding-right: 65px;
flex-direction: column; padding-left: 185px;
align-items: normal; text-align: center;
}
} }
.onboarding-modal__page-one__elephant-friend { .display-case {
width: 100%; text-align: center;
height: 30vh; font-size: 15px;
max-height: 160px; margin-bottom: 15px;
margin-bottom: 5vh;
&__label {
font-weight: 500;
color: $ui-base-color;
margin-bottom: 5px;
text-transform: uppercase;
font-size: 12px;
}
&__case {
background: $ui-base-color;
color: $ui-secondary-color;
font-weight: 500;
padding: 10px;
border-radius: 4px;
} }
} }
@ -3615,16 +3695,6 @@
} }
} }
.onboarding-modal__image {
border-radius: 8px;
width: 70vw;
max-width: 450px;
max-height: auto;
display: block;
margin: auto;
margin-bottom: 20px;
}
.onboard-sliders { .onboard-sliders {
display: inline-block; display: inline-block;
max-width: 30px; max-width: 30px;

View file

@ -1,5 +1,5 @@
.modal-layout { .modal-layout {
background: $ui-base-color url('~images/wave-modal.png') repeat-x bottom fixed; background: $ui-base-color url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234.80078 31.757813" width="234.80078" height="31.757812"><path d="M19.599609 0c-1.05 0-2.10039.375-2.90039 1.125L0 16.925781v14.832031h234.80078V17.025391l-16.5-15.900391c-1.6-1.5-4.20078-1.5-5.80078 0l-13.80078 13.099609c-1.6 1.5-4.19883 1.5-5.79883 0L179.09961 1.125c-1.6-1.5-4.19883-1.5-5.79883 0L159.5 14.224609c-1.6 1.5-4.20078 1.5-5.80078 0L139.90039 1.125c-1.6-1.5-4.20078-1.5-5.80078 0l-13.79883 13.099609c-1.6 1.5-4.20078 1.5-5.80078 0L100.69922 1.125c-1.600001-1.5-4.198829-1.5-5.798829 0l-13.59961 13.099609c-1.6 1.5-4.200781 1.5-5.800781 0L61.699219 1.125c-1.6-1.5-4.198828-1.5-5.798828 0L42.099609 14.224609c-1.6 1.5-4.198828 1.5-5.798828 0L22.5 1.125C21.7.375 20.649609 0 19.599609 0z" fill="#{hex-color($ui-base-lighter-color)}"/></svg>') repeat-x bottom fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
@ -15,6 +15,6 @@
> * { > * {
flex: 1; flex: 1;
max-height: 235px; max-height: 235px;
background: url('~images/mastodon-ui.png') no-repeat left bottom / contain; background: url('~images/elephant_ui_plane.svg') no-repeat left bottom / contain;
} }
} }

View file

@ -69,12 +69,13 @@ class ActivityPub::Activity
def distribute(status) def distribute(status)
crawl_links(status) crawl_links(status)
notify_about_reblog(status) if reblog_of_local_account?(status)
notify_about_mentions(status)
# Only continue if the status is supposed to have # Only continue if the status is supposed to have
# arrived in real-time # arrived in real-time
return unless @options[:override_timestamps] return unless @options[:override_timestamps]
notify_about_reblog(status) if reblog_of_local_account?(status)
notify_about_mentions(status)
distribute_to_followers(status) distribute_to_followers(status)
end end

View file

@ -54,4 +54,15 @@ class UserMailer < Devise::Mailer
mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject') mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject')
end end
end end
def welcome(user)
@resource = user
@instance = Rails.configuration.x.local_domain
return if @resource.disabled?
I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email, subject: I18n.t('user_mailer.welcome.subject')
end
end
end end

View file

@ -104,7 +104,7 @@ class Account < ApplicationRecord
has_many :lists, through: :list_accounts has_many :lists, through: :list_accounts
# Account migrations # Account migrations
belongs_to :moved_to_account, class_name: 'Account' belongs_to :moved_to_account, class_name: 'Account', optional: true
scope :remote, -> { where.not(domain: nil) } scope :remote, -> { where.not(domain: nil) }
scope :local, -> { where(domain: nil) } scope :local, -> { where(domain: nil) }

View file

@ -13,7 +13,7 @@
class AccountDomainBlock < ApplicationRecord class AccountDomainBlock < ApplicationRecord
include Paginable include Paginable
belongs_to :account, required: true belongs_to :account
validates :domain, presence: true, uniqueness: { scope: :account_id } validates :domain, presence: true, uniqueness: { scope: :account_id }
after_create :remove_blocking_cache after_create :remove_blocking_cache

View file

@ -16,8 +16,8 @@
class Admin::ActionLog < ApplicationRecord class Admin::ActionLog < ApplicationRecord
serialize :recorded_changes serialize :recorded_changes
belongs_to :account, required: true belongs_to :account
belongs_to :target, required: true, polymorphic: true belongs_to :target, polymorphic: true
default_scope -> { order('id desc') } default_scope -> { order('id desc') }

View file

@ -13,8 +13,8 @@
class Block < ApplicationRecord class Block < ApplicationRecord
include Paginable include Paginable
belongs_to :account, required: true belongs_to :account
belongs_to :target_account, class_name: 'Account', required: true belongs_to :target_account, class_name: 'Account'
validates :account_id, uniqueness: { scope: :target_account_id } validates :account_id, uniqueness: { scope: :target_account_id }

View file

@ -9,6 +9,6 @@
# #
class ConversationMute < ApplicationRecord class ConversationMute < ApplicationRecord
belongs_to :account, required: true belongs_to :account
belongs_to :conversation, required: true belongs_to :conversation
end end

View file

@ -13,8 +13,8 @@
class Favourite < ApplicationRecord class Favourite < ApplicationRecord
include Paginable include Paginable
belongs_to :account, inverse_of: :favourites, required: true belongs_to :account, inverse_of: :favourites
belongs_to :status, inverse_of: :favourites, counter_cache: true, required: true belongs_to :status, inverse_of: :favourites, counter_cache: true
has_one :notification, as: :activity, dependent: :destroy has_one :notification, as: :activity, dependent: :destroy

View file

@ -14,12 +14,11 @@
class Follow < ApplicationRecord class Follow < ApplicationRecord
include Paginable include Paginable
belongs_to :account, counter_cache: :following_count, required: true belongs_to :account, counter_cache: :following_count
belongs_to :target_account, belongs_to :target_account,
class_name: 'Account', class_name: 'Account',
counter_cache: :followers_count, counter_cache: :followers_count
required: true
has_one :notification, as: :activity, dependent: :destroy has_one :notification, as: :activity, dependent: :destroy

View file

@ -14,8 +14,8 @@
class FollowRequest < ApplicationRecord class FollowRequest < ApplicationRecord
include Paginable include Paginable
belongs_to :account, required: true belongs_to :account
belongs_to :target_account, class_name: 'Account', required: true belongs_to :target_account, class_name: 'Account'
has_one :notification, as: :activity, dependent: :destroy has_one :notification, as: :activity, dependent: :destroy

View file

@ -20,7 +20,7 @@ class Import < ApplicationRecord
self.inheritance_column = false self.inheritance_column = false
belongs_to :account, required: true belongs_to :account
enum type: [:following, :blocking, :muting] enum type: [:following, :blocking, :muting]

View file

@ -14,7 +14,7 @@
# #
class Invite < ApplicationRecord class Invite < ApplicationRecord
belongs_to :user, required: true belongs_to :user
has_many :users, inverse_of: :invite has_many :users, inverse_of: :invite
scope :available, -> { where(expires_at: nil).or(where('expires_at >= ?', Time.now.utc)) } scope :available, -> { where(expires_at: nil).or(where('expires_at >= ?', Time.now.utc)) }

View file

@ -15,7 +15,7 @@ class List < ApplicationRecord
PER_ACCOUNT_LIMIT = 50 PER_ACCOUNT_LIMIT = 50
belongs_to :account belongs_to :account, optional: true
has_many :list_accounts, inverse_of: :list, dependent: :destroy has_many :list_accounts, inverse_of: :list, dependent: :destroy
has_many :accounts, through: :list_accounts has_many :accounts, through: :list_accounts

View file

@ -10,9 +10,9 @@
# #
class ListAccount < ApplicationRecord class ListAccount < ApplicationRecord
belongs_to :list, required: true belongs_to :list
belongs_to :account, required: true belongs_to :account
belongs_to :follow, required: true belongs_to :follow
validates :account_id, uniqueness: { scope: :list_id } validates :account_id, uniqueness: { scope: :list_id }

View file

@ -62,8 +62,8 @@ class MediaAttachment < ApplicationRecord
}, },
}.freeze }.freeze
belongs_to :account, inverse_of: :media_attachments belongs_to :account, inverse_of: :media_attachments, optional: true
belongs_to :status, inverse_of: :media_attachments belongs_to :status, inverse_of: :media_attachments, optional: true
has_attached_file :file, has_attached_file :file,
styles: ->(f) { file_styles f }, styles: ->(f) { file_styles f },

View file

@ -11,8 +11,8 @@
# #
class Mention < ApplicationRecord class Mention < ApplicationRecord
belongs_to :account, inverse_of: :mentions, required: true belongs_to :account, inverse_of: :mentions
belongs_to :status, required: true belongs_to :status
has_one :notification, as: :activity, dependent: :destroy has_one :notification, as: :activity, dependent: :destroy

View file

@ -14,8 +14,8 @@
class Mute < ApplicationRecord class Mute < ApplicationRecord
include Paginable include Paginable
belongs_to :account, required: true belongs_to :account
belongs_to :target_account, class_name: 'Account', required: true belongs_to :target_account, class_name: 'Account'
validates :account_id, uniqueness: { scope: :target_account_id } validates :account_id, uniqueness: { scope: :target_account_id }

View file

@ -26,15 +26,15 @@ class Notification < ApplicationRecord
STATUS_INCLUDES = [:account, :application, :stream_entry, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, :application, :media_attachments, :tags, mentions: :account]].freeze STATUS_INCLUDES = [:account, :application, :stream_entry, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, :application, :media_attachments, :tags, mentions: :account]].freeze
belongs_to :account belongs_to :account, optional: true
belongs_to :from_account, class_name: 'Account' belongs_to :from_account, class_name: 'Account', optional: true
belongs_to :activity, polymorphic: true belongs_to :activity, polymorphic: true, optional: true
belongs_to :mention, foreign_type: 'Mention', foreign_key: 'activity_id' belongs_to :mention, foreign_type: 'Mention', foreign_key: 'activity_id', optional: true
belongs_to :status, foreign_type: 'Status', foreign_key: 'activity_id' belongs_to :status, foreign_type: 'Status', foreign_key: 'activity_id', optional: true
belongs_to :follow, foreign_type: 'Follow', foreign_key: 'activity_id' belongs_to :follow, foreign_type: 'Follow', foreign_key: 'activity_id', optional: true
belongs_to :follow_request, foreign_type: 'FollowRequest', foreign_key: 'activity_id' belongs_to :follow_request, foreign_type: 'FollowRequest', foreign_key: 'activity_id', optional: true
belongs_to :favourite, foreign_type: 'Favourite', foreign_key: 'activity_id' belongs_to :favourite, foreign_type: 'Favourite', foreign_key: 'activity_id', optional: true
validates :account_id, uniqueness: { scope: [:activity_type, :activity_id] } validates :account_id, uniqueness: { scope: [:activity_type, :activity_id] }
validates :activity_type, inclusion: { in: TYPE_CLASS_MAP.values } validates :activity_type, inclusion: { in: TYPE_CLASS_MAP.values }

View file

@ -17,7 +17,7 @@
class Report < ApplicationRecord class Report < ApplicationRecord
belongs_to :account belongs_to :account
belongs_to :target_account, class_name: 'Account' belongs_to :target_account, class_name: 'Account'
belongs_to :action_taken_by_account, class_name: 'Account' belongs_to :action_taken_by_account, class_name: 'Account', optional: true
scope :unresolved, -> { where(action_taken: false) } scope :unresolved, -> { where(action_taken: false) }
scope :resolved, -> { where(action_taken: true) } scope :resolved, -> { where(action_taken: true) }

View file

@ -15,9 +15,9 @@
# #
class SessionActivation < ApplicationRecord class SessionActivation < ApplicationRecord
belongs_to :user, inverse_of: :session_activations, required: true belongs_to :user, inverse_of: :session_activations
belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', dependent: :destroy belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', dependent: :destroy, optional: true
belongs_to :web_push_subscription, class_name: 'Web::PushSubscription', dependent: :destroy belongs_to :web_push_subscription, class_name: 'Web::PushSubscription', dependent: :destroy, optional: true
delegate :token, delegate :token,
to: :access_token, to: :access_token,

View file

@ -34,14 +34,14 @@ class Status < ApplicationRecord
enum visibility: [:public, :unlisted, :private, :direct], _suffix: :visibility enum visibility: [:public, :unlisted, :private, :direct], _suffix: :visibility
belongs_to :application, class_name: 'Doorkeeper::Application' belongs_to :application, class_name: 'Doorkeeper::Application', optional: true
belongs_to :account, inverse_of: :statuses, counter_cache: true, required: true belongs_to :account, inverse_of: :statuses, counter_cache: true
belongs_to :in_reply_to_account, foreign_key: 'in_reply_to_account_id', class_name: 'Account' belongs_to :in_reply_to_account, foreign_key: 'in_reply_to_account_id', class_name: 'Account', optional: true
belongs_to :conversation belongs_to :conversation, optional: true
belongs_to :thread, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :replies belongs_to :thread, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :replies, optional: true
belongs_to :reblog, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblogs, counter_cache: :reblogs_count belongs_to :reblog, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblogs, counter_cache: :reblogs_count, optional: true
has_many :favourites, inverse_of: :status, dependent: :destroy has_many :favourites, inverse_of: :status, dependent: :destroy
has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy

View file

@ -11,8 +11,8 @@
# #
class StatusPin < ApplicationRecord class StatusPin < ApplicationRecord
belongs_to :account, required: true belongs_to :account
belongs_to :status, required: true belongs_to :status
validates_with StatusPinValidator validates_with StatusPinValidator
end end

View file

@ -19,7 +19,7 @@ class Subscription < ApplicationRecord
MIN_EXPIRATION = 1.day.to_i MIN_EXPIRATION = 1.day.to_i
MAX_EXPIRATION = 30.days.to_i MAX_EXPIRATION = 30.days.to_i
belongs_to :account, required: true belongs_to :account
validates :callback_url, presence: true validates :callback_url, presence: true
validates :callback_url, uniqueness: { scope: :account_id } validates :callback_url, uniqueness: { scope: :account_id }

View file

@ -50,8 +50,8 @@ class User < ApplicationRecord
devise :registerable, :recoverable, :rememberable, :trackable, :validatable, devise :registerable, :recoverable, :rememberable, :trackable, :validatable,
:confirmable :confirmable
belongs_to :account, inverse_of: :user, required: true belongs_to :account, inverse_of: :user
belongs_to :invite, counter_cache: :uses belongs_to :invite, counter_cache: :uses, optional: true
accepts_nested_attributes_for :account accepts_nested_attributes_for :account
has_many :applications, class_name: 'Doorkeeper::Application', as: :owner has_many :applications, class_name: 'Doorkeeper::Application', as: :owner
@ -223,5 +223,6 @@ class User < ApplicationRecord
def update_statistics! def update_statistics!
BootstrapTimelineWorker.perform_async(account_id) BootstrapTimelineWorker.perform_async(account_id)
ActivityTracker.increment('activity:accounts:local') ActivityTracker.increment('activity:accounts:local')
UserMailer.welcome(self).deliver_later
end end
end end

View file

@ -24,7 +24,7 @@
%tr %tr
%td.column-cell %td.column-cell
= link_to root_url do = link_to root_url do
= image_tag full_pack_url('logo_full.svg'), alt: 'Mastodon', height: 34, class: 'logo' = image_tag full_pack_url('logo_full.png'), alt: 'Mastodon', height: 34, class: 'logo'
= yield = yield
@ -41,15 +41,12 @@
%tr %tr
%td.blank-cell.footer %td.blank-cell.footer
.email-row .email-row
.col-4 .col-6
%table.column{ cellspacing: 0, cellpadding: 0 } %table.column{ cellspacing: 0, cellpadding: 0 }
%tbody %tbody
%td.column-cell %td.column-cell
%p= t 'about.hosted_on', domain: site_hostname %p= t 'about.hosted_on', domain: site_hostname
%p= link_to t('application_mailer.notification_preferences'), settings_notifications_url %p= link_to t('application_mailer.notification_preferences'), settings_notifications_url
.col-2
%table.column{ cellspacing: 0, cellpadding: 0 }
%tbody
%td.column-cell.text-right %td.column-cell.text-right
= link_to root_url do = link_to root_url do
= image_tag full_pack_url('logo_transparent.svg'), alt: 'Mastodon', height: 24 = image_tag full_pack_url('logo_transparent.png'), alt: 'Mastodon', height: 24

View file

@ -1,5 +1,5 @@
<%= yield %> <%= yield %>
--- ---
<%= t('application_mailer.signature', instance: site_hostname) %> <%= t 'about.hosted_on', domain: site_hostname %>
<%= t('application_mailer.settings', link: settings_preferences_url) %> <%= t('application_mailer.settings', link: settings_preferences_url) %>

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_grade.svg'), alt:'' = image_tag full_pack_url('icon_grade.png'), alt:''
%h1= t 'notification_mailer.favourite.title' %h1= t 'notification_mailer.favourite.title'
%p.lead= t('notification_mailer.favourite.body', name: @account.acct) %p.lead= t('notification_mailer.favourite.body', name: @account.acct)

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_person_add.svg'), alt: '' = image_tag full_pack_url('icon_person_add.png'), alt: ''
%h1= t 'notification_mailer.follow.title' %h1= t 'notification_mailer.follow.title'
%p.lead= t('notification_mailer.follow.body', name: @account.acct) %p.lead= t('notification_mailer.follow.body', name: @account.acct)

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_person_add.svg'), alt: '' = image_tag full_pack_url('icon_person_add.png'), alt: ''
%h1= t 'notification_mailer.follow_request.title' %h1= t 'notification_mailer.follow_request.title'
%p.lead= t('notification_mailer.follow_request.body', name: @account.acct) %p.lead= t('notification_mailer.follow_request.body', name: @account.acct)

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_reply.svg'), alt: '' = image_tag full_pack_url('icon_reply.png'), alt: ''
%h1= t 'notification_mailer.mention.title' %h1= t 'notification_mailer.mention.title'
%p.lead= t('notification_mailer.mention.body', name: @status.account.acct) %p.lead= t('notification_mailer.mention.body', name: @status.account.acct)

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_cached.svg'), alt: '' = image_tag full_pack_url('icon_cached.png'), alt: ''
%h1= t 'notification_mailer.reblog.title' %h1= t 'notification_mailer.reblog.title'
%p.lead= t('notification_mailer.reblog.body', name: @account.acct) %p.lead= t('notification_mailer.reblog.body', name: @account.acct)

View file

@ -1,12 +0,0 @@
مرحبا <%= @resource.email %> !
لقد قمت بإنشاء حساب على <%= @instance %>.
لتأكيد التسجيل يرجى النقر على الرابط التالي :
<%= confirmation_url(@resource, confirmation_token: @token) %>
يرجى الإطلاع على شروط الإستخدام <%= terms_url %>
مع أجمل التحيات،
فريق <%= @instance %>

View file

@ -1,12 +0,0 @@
Benvingut <%= @resource.email %> !
Acabes de crear un compte a <%= @instance %>.
Per confirmar la subscripció, si us plua fes clic en el següent vincle :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Si us plau també fes un cop d'ull als nostres termes i condicions <%= terms_url %>
Sincerament,
L'equip <%= @instance %>

View file

@ -1,12 +0,0 @@
Welcome <%= @resource.email %> !
You just created an account on <%= @instance %>.
To confirm your inscription, please click on the following link :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Please also check out our terms and conditions <%= terms_url %>
Sincerely,
The <%= @instance %> team

View file

@ -1,12 +0,0 @@
¡Bienvenido, <%= @resource.email %>!
Acabas de crear una cuenta en <%= @instance %>.
Para confirmar tu registro, por favor ingresa al siguiente enlace:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Por favor, también revisa nuestros términos y condiciones <%= terms_url %>
Sinceramente,
El equipo de <%= @instance %>

View file

@ -1,12 +0,0 @@
خوش آمدید <%= @resource.email %> !
شما الان در <%= @instance %> حساب باز کردید.
برای تأیید عضویت، لطفاً روی پیوند زیر کلیک کنید:
<%= confirmation_url(@resource, confirmation_token: @token) %>
لطفاً همچنین شرایط و مقررات استفادهٔ ما را هم بخوانید <%= terms_url %>
با احترام،
گردانندگان سرور <%= @instance %>

View file

@ -1,5 +0,0 @@
Tervetuloa <%= @resource.email %>!
Voit vahvistaa Mastodon tilisi klikkaamalla alla olevaa linkkiä:
<%= confirmation_url(@resource, confirmation_token: @token) %>

View file

@ -1,14 +0,0 @@
Bonjour <%= @resource.email %> !
Vous venez de vous créer un compte sur <%= @instance %> et nous vous en remercions.
Pour confirmer votre inscription, merci de cliquer sur le lien suivant :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Après votre première connexion, vous pourrez accéder à la documentation de loutil.
Pour rappel, nos conditions dutilisation sont indiquées ici <%= terms_url %>
Amicalement,
Léquipe <%= @instance %>

View file

@ -1,12 +0,0 @@
שלום <%= @resource.email %> !
הרגע יצרת חשבון בקהילה <%= @instance %>.
כדי לוודא את הרשמתך, יש ללחוץ על הקישורית הבאה :
<%= confirmation_url(@resource, confirmation_token: @token) %>
יש לעבור גם על תנאי השימוש <%= terms_url %>
בתודה מראש,
צוות ניהול <%= @instance %>

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_email.svg'), alt: '' = image_tag full_pack_url('icon_email.png'), alt: ''
%h1= t 'devise.mailer.confirmation_instructions.title' %h1= t 'devise.mailer.confirmation_instructions.title'

View file

@ -1,12 +0,0 @@
Selamat datang <%= @resource.email %> !
Anda baru saja membuat akun di <%= @instance %>.
Untuk mengkonfirmasi, silakan klik link berikut ini :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Silakan cek <%= terms_url %> kami
Hormat kami,
Tim <%= @instance %>

View file

@ -1,12 +0,0 @@
Benvenuto <%= @resource.email %> !
Hai appena creato un account su <%= @instance %>.
er confermare la tua iscrizione, fai clic sul seguente link :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Per piacere leggi anche i nostri termini e condizioni <%= terms_url %>
Sinceramente,
Il team <%= @instance %>

View file

@ -1,11 +0,0 @@
ようこそ<%= @resource.email %>さん
<%= @instance %>にアカウントが作成されました。
以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください。
<%= confirmation_url(@resource, confirmation_token: @token) %>
また、インスタンスの<%= link_to '利用規約', terms_url %>についてもご確認ください。
<%= @instance %> チーム

View file

@ -1,10 +0,0 @@
안녕하세요 <%= @resource.email %> 님!
<%= @instance %>에 새로 계정을 만들었습니다.
아래 링크를 눌러 회원가입을 완료 하세요.
<%= confirmation_url(@resource, confirmation_token: @token) %>
약관도 확인 바랍니다. <%= terms_url %>
<%= @instance %> 드림

View file

@ -1,12 +0,0 @@
Welkom <%= @resource.email %> !
Je hebt zojuist een account aangemaakt op <%= @instance %>.
Klik op de volgende link om jouw registratie te bevestigen :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Lees ook onze gebruikersvoorwaarden op <%= terms_url %>
Vriendelijke groet,
De beheerder(s) van <%= @instance %>

View file

@ -1,12 +0,0 @@
Velkommen <%= @resource.email %> !
Du har akkurat opprettet en konto på <%= @instance %>.
For å bekrefte innskriving i manntallet vennligst trykk på følgende lenke :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Vennligst også les våre brukervilkår <%= terms_url %>
Med vennlig hilsen,
Gjengen bak <%= @instance %>

View file

@ -1,14 +0,0 @@
Bonjorn <%= @resource.email %>!
Venètz de vos crear un compte sus <%= @instance %> e vos mercegem :)
er confirmar vòstra inscripcion, mercés de clicar sul ligam seguent:
<%= link_to 'Confirmar mon compte', confirmation_url(@resource, confirmation_token: @token) %>
Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de laisina.
Pensatz tanben de gaitar nòstres <%= link_to 'tèrmes e condicions d\'utilizacion', terms_url %>.
Amistosament,
La còla <%= @instance %>

View file

@ -1,12 +0,0 @@
Witaj, <%= @resource.email %>!
Właśnie utworzyłeś konto na instancji <%= @instance %>.
Aby aktywować konto, odwiedź poniższy link:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Pamiętaj przeczytać nasz regulamin i zasady użytkowania: <%= terms_url %>
Z pozdrowieniami,
Zespół <%= @instance %>

View file

@ -1,12 +0,0 @@
Boas vindas, <%= @resource.email %>!
Você acabou de criar uma conta na instância <%= @instance %>.
Para confirmar o seu cadastro, por favor clique no link a seguir:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Por favor, leia também os nossos termos e condições de uso <%= terms_url %>
Atenciosamente,
A equipe da instância <%= @instance %>

View file

@ -1,12 +0,0 @@
Добро пожаловать, <%= @resource.email %> !
Вы только что завели аккаунт на <%= @instance %>.
Чтобы подтвердить создание аккаунта, пожалуйста, перейдите по этой ссылке:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Также просим Вас прочитать об условиях использования аккаунта здесь: <%= terms_url %>
Искренне Ваши,
Команда <%= @instance %>

View file

@ -1,12 +0,0 @@
Dobrodošao <%= @resource.email %> !
Upravo ste napravili nalog na instanci <%= @instance %>.
Da potvrdite Vašu registraciju, molimo Vas kliknite na sledeći link:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Takođe pogledajte i pravila i uslove korišćenja <%= terms_url %>
S poštovanjem,
<%= @instance %> tim

View file

@ -1,12 +0,0 @@
Добродошао <%= @resource.email %> !
Управо сте направили налог на инстанци <%= @instance %>.
Да потврдите Вашу регистрацију, молимо Вас кликните на следећи линк:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Такође погледајте и правила и услове коришћења <%= terms_url %>
С поштовањем,
<%= @instance %> тим

View file

@ -1,12 +0,0 @@
Välkommen <%= @resource.email %> !
Du har precis skapat ett konto på <%= @instance %>.
För att bekräfta din inskrift, vänligen klicka på följande länk :
<%= confirmation_url(@resource, confirmation_token: @token) %>
Vänligen läs även våra användarvillkor <%= terms_url %>
Vänliga hälsningar,
Teamet på <%= @instance %>

View file

@ -0,0 +1,12 @@
<%= t 'devise.mailer.confirmation_instructions.title' %>
===
<%= t 'devise.mailer.confirmation_instructions.explanation', host: site_hostname %>
=> <%= confirmation_url(@resource, confirmation_token: @token) %>
<%= strip_tags(t('devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: terms_url)) %>
=> <%= about_more_url %>
=> <%= terms_url %>

View file

@ -1,13 +0,0 @@
Aramıza hoşgeldin <%= @resource.email %>
Bu sunucumuzda yeni bir hesap oluşturduğunu görüyoruz: <%= @instance %>.
Siz olduğunuzu teyit edebilmemiz için lütfen aşağıdaki linke tıklayınız:
<%= confirmation_url(@resource, confirmation_token: @token) %>
Ayrıca kullanım şartları ve koşulları sayfamızı inceleyebilirsin <%= terms_url %>
En içten dileklerimizle,
<%= @instance %> ekibi

View file

@ -1,10 +0,0 @@
<%= @resource.email %>,你好呀!
你刚刚在 <%= @instance %> 创建了一个帐户呢。
点击下面的链接来完成注册啦:
<%= confirmation_url(@resource, confirmation_token: @token) %>
记得读一读我们的使用条款哦:<%= terms_url %>
来自 <%= @instance %> 管理团队

View file

@ -1,13 +0,0 @@
Hello <%= @resource.email %>!
<% if @resource&.unconfirmed_email? %>
We're contacting you to notify you that the email you use on <%= @instance %> is being changed to <%= @resource.unconfirmed_email %>.
<% else %>
We're contacting you to notify you that the email you use on <%= @instance %> has been changed to <%= @resource.email %>.
<% end %>
If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the instance admin if you're locked out of your account.
Sincerely,
The <%= @instance %> team

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('icon_email.svg'), alt: '' = image_tag full_pack_url('icon_email.png'), alt: ''
%h1= t 'devise.mailer.email_changed.title' %h1= t 'devise.mailer.email_changed.title'
%p.lead= t 'devise.mailer.email_changed.explanation' %p.lead= t 'devise.mailer.email_changed.explanation'

View file

@ -1,11 +0,0 @@
Hello <%= @resource.email %>!
<% if @resource&.unconfirmed_email? %>
<%= @instance %>で使っているメールアドレスが<%= @resource.unconfirmed_email %>に変更されようとしています。
<% else %>
<%= @instance %>で使っているメールアドレスが<%= @resource.email %>に変更されました。
<% end %>
メールアドレスを変更した覚えがない場合、誰かがあなたのアカウントにアクセスしたおそれがあります。すぐにパスワードを変更するか、アカウントにアクセスできない場合はインスタンスの管理者に連絡してください。
<%= @instance %>チームより

View file

@ -1,13 +0,0 @@
Bonjorn <%= @resource.email %>!
<% if @resource&.unconfirmed_email? %>
Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.unconfirmed_email %>.
<% else %>
Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.email %>.
<% end %>
Savètz pas demandat aqueste cambiament dadreça, poiriá arribar que qualquun mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator dinstància se laccès a vòstre compte vos es barrat.
Amistosament,
La còla <%= @instance %>

View file

@ -1,13 +0,0 @@
Witaj, <%= @resource.email %>!
<% if @resource&.unconfirmed_email? %>
Informujemy, że e-mail używany przez Ciebie na <%= @instance %> został zmieniony na <%= @resource.unconfirmed_email %>.
<% else %>
Informujemy, że e-mail używany przez Ciebie na <%= @instance %> został zmieniony na <%= @resource.email %>.
<% end %>
Jeżeli to nie Ty, prawdopodobnie ktoś uzyskał dostęp do Twojego konta. Zalecana jest natychmiastowa zmiana hasła lub skontaktowanie się z administratorem, jeżeli nie masz dostępu do swojego konta.
Z pozdrowieniami,
Zespół <%= @instance %>

View file

@ -0,0 +1,9 @@
<%= t 'devise.mailer.email_changed.title' %>
===
<%= t 'devise.mailer.email_changed.explanation' %>
<%= @resource.unconfirmed_email %>
<%= t 'devise.mailer.email_changed.extra' %>

View file

@ -1,11 +0,0 @@
<%= @resource.email %>,你好呀!
<% if @resource&.unconfirmed_email? %>
我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址即将变更为 <%= @resource.unconfirmed_email %>。
<% else %>
我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址已经变更为 <%= @resource.unconfirmed_email %>。
<% end %>
如果你并没有请求更改你的电子邮件地址,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。
来自 <%= @instance %> 管理团队

View file

@ -1,3 +0,0 @@
صباح الخير <%= @resource.email %> !
نود أن نخبرك أنه قد تم تعديل كلمة مرور ماستدون الخاصة بك بنجاح.

View file

@ -1,3 +0,0 @@
Hola <%= @resource.email %>!
Aquest correu es per a notificar-te que la teva contrasenya a mastodont.cat ha canviat.

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