Compare commits

...
This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.

291 Commits

Author SHA1 Message Date
Kegan Myers 7e398fa712 Make the columns wider 2017-04-28 18:09:31 -05:00
Kegan Myers 169806c495 Use system SSL certs for SMTP 2017-04-28 18:06:49 -05:00
Kegan Myers d9afddd3ef Allow uploading of files to google cloud storage. (dirty, but working) 2017-04-28 18:06:49 -05:00
Eugen Rochko 7406404fa3 Hotfix remote status formatting (#2543) 2017-04-27 23:37:22 +02:00
Eduardo Elias 010e4f2879 Language: Missing keys for pt-BR (#2540) 2017-04-27 22:32:38 +02:00
unarist ebbbcfef1c Update Japanese translation (and English translation file) for JavaScript (#2538)
* Update English translation file for JavaScript

* Update Japanese translation for JavaScript
2017-04-27 20:41:25 +02:00
yhirano 3d776de2cb Change permission from 0755 to 0644 (#2536)
* chmod -x assets.rb

* chmod -x assets/fonts

* raname extname from jpeg to jpg
2017-04-27 19:29:41 +02:00
Yamagishi Kazutoshi 831ff60698 Fix broken oEmbed provider (#2537) 2017-04-27 19:29:11 +02:00
Yamagishi Kazutoshi c25426ca47 Fix Doorkeeper error (#2534)
* Fix Doorkeeper error

* use Doorkeeper::OAuth::Scopes.from_string
2017-04-27 18:04:28 +02:00
jeroenpraat 09b93aaf85 Another (less urgent) Dutch string update (#2533)
* Another (less urgent) update

* Another (less urgent) update

* Dutch strings: consistency:  let's use 'voorkeuren' as a subset of 'instellingen'
2017-04-27 17:54:34 +02:00
Eugen Rochko d4fedf84e0 Cache Status#ancestors recursive query results (#2527) 2017-04-27 17:07:15 +02:00
Eugen Rochko 2af4f3c4e2 Improve shared status verification (#2525)
* Instead of parsing shared status contents verbatim, make roundtrip
to purported original URL. Confirm that the "original" URL is from the
same domain as the author it claims to be from.

* Fix obvious typo, add comment

* Use URI look-up first

* Add test, update Goldfinger dependency to make less useless HTTP requests per Webfinger lookup
2017-04-27 17:06:47 +02:00
jeroenpraat b8e7eee837 Last minute Dutch update and fix (after checking on live 1.3RC) (#2529)
* Update and fix

* Update and fix Dutch strings
2017-04-27 17:00:03 +02:00
Eugen Rochko b48c9013aa Bump version, improve how version is stored for better commit history (#2526) 2017-04-27 15:22:19 +02:00
Matt Jankowski b48f2cbc8b Catch error when server decryption fails on 2FA (#2512) 2017-04-27 15:18:21 +02:00
Ashley 1736badf28 Added '(dev)' to the title in development mode (#2524)
* Added different title for dev

* Changed indentation
2017-04-27 15:17:55 +02:00
Eugen Rochko 88725d6ce8 OEmbed support for PreviewCard (#2337)
* OEmbed support for PreviewCard

* Improve ProviderDiscovery code failure treatment

* Do not crawl links if there is a content warning, since those
don't display a link card anyway

* Reset db schema

* Fresh migrate

* Fix rubocop style issues
Fix #1681 - return existing access token when applicable instead of creating new

* Fix test

* Extract http client to helper

* Improve oembed controller
2017-04-27 14:42:22 +02:00
Yamagishi Kazutoshi be0a01145b Sync a locale files for JavaScript (#2513)
There are multiple messages missing in en.jsx.
It is very troublesome when translating other languages.
2017-04-27 12:03:28 +02:00
Tomohiro Suwa 1f805a6377 Don't need to include ActiveModel::Validations (#2521) 2017-04-27 12:02:55 +02:00
Evan Minto e595ccb294 Add ActivityPub Actor id to WebFinger JSON. (#2522) 2017-04-27 12:02:41 +02:00
Lindsey Bieda 43a29a9d0f Add aria-label to icon driven dropdown menus (#2516) 2017-04-27 12:01:36 +02:00
Kaylee 0dd71af5fa Copy over "Boost" hover text fix to detailed view. (#2508)
from #1754, should close out #1394
2017-04-27 01:53:55 +02:00
Matt Jankowski 0618f09939 Add spec coverage and refactor authorize_follows controller (#2505) 2017-04-27 00:19:53 +02:00
Koala Yeung a23eaf720e Update Russian translation (rebased) (#2503)
* Fix syntax error

* Remove two_factor_auth.warning (appears obsolete)

* Add missing strings in ru.yml

A lot of new strings translated, especially for the newly added admin section

* Update Russian translation

* Fix merge conflicts

Redid Works by @rkarabut
2017-04-26 22:33:54 +02:00
Koala Yeung 9d3fc1281d travis: Add yarn and nodejs caching (#2504)
Also cache node_module and yarn cache in Travis test process.
Improves speed for Travis tests.
2017-04-26 22:32:23 +02:00
Matt Jankowski 8857cabca4 Domain block service cleanup (#2490)
* Add coverage for domain block service with silence

* Get rid of warning about find_each and order

* Move domain_block to attr_reader

* Move optional clear_media into silence_accounts method

* Use blocked_domain method to reduce passed vars

* Extract blocked_domain_accounts method to find accounts on the domain

* Extract media_from_blocked_domain method to find relevant attachments

* Separate destruction of account images and account attachments
2017-04-26 20:09:01 +02:00
Matt Jankowski affd75936e Add spec for Status.as_home_timeline (#2451) 2017-04-26 20:08:30 +02:00
Matt Jankowski 3e78b7cc3a Updated renamed i18n keys in `de` translation (#2500) 2017-04-26 19:33:10 +02:00
Matthieu Paret 647a148d4d fix indentation in translation file (#2498) 2017-04-26 18:48:43 +02:00
yhirano bb777c24ff add task to report code statistics (#2489) 2017-04-26 18:47:22 +02:00
Benedikt Geißler 0576daf5f9 Update German translation (#2485) 2017-04-26 15:46:14 +02:00
Quent-in c442cade78 Update of simple_forum OC (#2486)
Now perfectly similar to the English one.
2017-04-26 15:45:58 +02:00
Yamagishi Kazutoshi 6004b143a8 Update Japanese translation (#2487)
follow up #1309 & #2279
2017-04-26 15:45:47 +02:00
Lindsey Bieda 25cbb8454c Red favicon for dev (#2470)
* Set a dev specific favicon

* Consistent spacing

* Add trailing slash for consistency

* Update to remove interpolation
2017-04-26 15:45:27 +02:00
Tomohiro Suwa 416c9675fc Don't toot request with only blank characters (#2154)
* Don't toot request with only blank characters

* Enable toot button if no text
2017-04-26 15:18:09 +02:00
Yamagishi Kazutoshi 6a1e287053 Fix undefined variable in OnboardingModal (#2482) 2017-04-26 15:15:47 +02:00
Koala Yeung 5bda32e460 Update ar.jsx (#2469)
Adding more missing strings.
2017-04-26 14:55:14 +02:00
anon 6137268e79 Update Japanese translation for activitypub and authorized followers (#2471)
* Update Japanese translation for activitypub and authorized followers

* Fixed Japanese translation by review
2017-04-26 14:54:35 +02:00
Wonderfall 234e931db2 fix onboarding modal (#2477) 2017-04-26 14:54:12 +02:00
Eugen Rochko fdcb55a0a6 Fix various regressions (#2466) 2017-04-26 04:40:27 +02:00
Eugen Rochko d97a0525aa Fix #2261 - noopener typo (#2463) 2017-04-26 03:55:51 +02:00
Francis Chong 193dddb433 Add media dimensions (#2448)
* Fixes #1985

- add migration AddMediaAttachmentMeta, which add meta field to media_attachments
- before saving attachment, set file meta if needed
- add meta in api

* add spec

* align the “size” format for image and video

* fix code climate

* fixes media_attachment_spec.rb
2017-04-26 03:48:12 +02:00
Keiji, Yoshimi 8fe36654ef attach_media should be in transaction of creation status (#2426) 2017-04-26 03:47:44 +02:00
Yamagishi Kazutoshi 8ee1af9530 Move a locale files for ActiveRecord (#2461)
ref #2162 and fix #2460
2017-04-26 02:16:30 +02:00
Michael Deeb e4c294432f Added the repository field and a script for after npm version (#2459) 2017-04-26 01:51:51 +02:00
JP DeVries 3ebaeccec9 Toolbar icons accessible names (#1424)
Closes tootsuite/mastodon#1349

This is my first PR and I’m only checking in the source JSX file.
Please let me know if it should be checked in after being built also.
2017-04-26 01:44:50 +02:00
Guillaume Lo Re 7177e37b99 Stricter whitelist rules (#2213)
* Stricter whitelist rules

* Linting

* Added spec for blacklisting

* Test subdomain blacklist on domain whitelist

* No need to split

* Change spec name
2017-04-26 01:22:51 +02:00
Amelia fbc5099402 Make the getting started ui more intuitive (#1309) 2017-04-26 01:21:05 +02:00
Quent-in 45b379abac Missing occitan locale file (#2446)
Based on the device.en file
2017-04-25 23:26:53 +02:00
Mingye Wang 6ae975996e Refine CW placeholder in Chinese jsx files (#2447) 2017-04-25 23:26:46 +02:00
Mingye Wang 5d26c70a9c Complete proofreading and addition for zh-CN YML translations (#2445)
* proofread & update zh-CN setting form locale

* Pull in new devise zh-CN translations from their wiki

https://github.com/plataformatec/devise/wiki/I18n,
more precisely https://gist.github.com/Artoria2e5/6d2a06ca9e92a417afc627b5000f4690

* pull in zh-CN translation for doorkeeper

... from https://github.com/doorkeeper-gem/doorkeeper-i18n/pull/31/
2017-04-25 23:26:33 +02:00
esetomo 322cbf83c8 fix typo on daily tasks logging (#2450) 2017-04-25 20:35:20 +02:00
Mingye Wang fc99d11703 Convert to "container-based" travis build (#2449)
* Convert to "container-based" travis build

Since all ppa sources used are currently whitelisted by Travis, why don't we convert to a "sudo-less" structure that promises a shorter build start time?

* Explicitly disable sudo in Travis
2017-04-25 20:14:34 +02:00
Ash Furrow 48652cb41e Fixes string length issue for multibyte characters. (#2443) 2017-04-25 17:37:51 +02:00
Ash Furrow d4f7f11c3c Adds logging for daily tasks (#2438)
* Adds logging for daily tasks.

* Fixes Code Climate issues in #2438.
2017-04-25 16:44:48 +02:00
Stephen Burgess 1ce951d0be Adjust status action bar icons (#2424)
Set status action bar to have display flex and center align items so dropdown icon appears center aligned with other icons. Make styles alpha organized.

Add hover state to boost icon - lighten color on hover.
2017-04-25 15:16:09 +02:00
Hiroe Jun 52c119052a Refactor seed.rb (#2430) 2017-04-25 15:15:37 +02:00
alpaca-tc 9317ec8eb1 Localize with i18n for Devise::FailureApp (#2309)
This PR fixes I18n.locale for rake middlewares. Mastodon uses Devise that depends on Warden.
Warden::Manager can be found in rake middleware. It is outside of the controller.

In the case of authentication failed, warden calls throw(:warden). At the time Warden::Manager
delegates request to failure_app to generate response and flash[:alert] after catching it.
Unfortunately, I18n.locale is already reset then because I18n.with_locale is enabled only
inside the controller. If we used I18n.locale=, Devise::FailureApp could get the current locale.
2017-04-25 15:06:41 +02:00
STJrInuyasha 1b9447853b Login link for single user instances (#2393)
* Login link for single user instances

* Flip the if statement around
Fixes AuthorizationController tests
2017-04-25 15:06:24 +02:00
Evan Minto 122d59ac41 Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. (#2410)
* Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes.

* Fix code style and test failures for OutboxController.

* Attempt to fix CI errors.
2017-04-25 15:06:06 +02:00
Eugen Rochko 8b5179d006 Fix #2402 - Add Idempotency-Key header to PostStatusService that prevents (#2419)
duplicates. Web UI regenerates UUID for that header every time the compose
form is changed or successfully submitted

Also, fix Farsi i18n overwriting the English one
2017-04-25 15:04:49 +02:00
Yamagishi Kazutoshi 3ea5b948a4 Decodes URL containing IDN (#2436) 2017-04-25 15:03:51 +02:00
Matt Jankowski 164bad171f Fix Persian translation (#2428) (#2432)
Settings page contained labels in Persian, when I was using English.
2017-04-25 05:17:52 -04:00
Ash Furrow acc691851d Username above toot box UI changes (#2418)
* Makes username above toot box into a link.

* Prepends username above toot box with an @.
2017-04-25 04:45:27 +02:00
178inaba d2159deaf2 Optimize account search (#2421) 2017-04-25 04:44:43 +02:00
Eugen 17c591ffba Punycode URI normalization (#2370)
* Fix #2119 - Whenever about to send a HTTP request, normalize the URI

* Add test for IDN request in FetchLinkCardService

* Perform IDN normalization on domains before they are stored in the DB
2017-04-25 02:47:31 +02:00
Masoud Abkenar bb04a9be52 Persian translation (#2405)
* Persian translation

* adding :fa to make the site use the rtl stylesheet

based on [this comment](https://github.com/tootsuite/mastodon/pull/2405#issuecomment-296721105)

* fix missing quotes

* add 'fa' locale
2017-04-24 22:39:15 +02:00
Eugen 338df98ddf Add more FeedManager#filter? tests (#2413) 2017-04-24 22:37:24 +02:00
Eugen da022e1e4f Run i18n-tasks normalize (#2412) 2017-04-24 20:52:55 +02:00
Stephen Burgess f098f55cab fix(styles): Spoiler trigger zindex, close modal button position (#2406)
#2338
2017-04-24 20:20:16 +02:00
Shin Adachi bc955eaf61 add `patch` method support to CORS (#2408) 2017-04-24 20:19:51 +02:00
Stephen Burgess 2d99c962df Only show upload modal when drag event contains files (#2409)
* fix(upload): Only show upload modal when drag even contains files

* fix(firefox): Close drag window ondragend also

Do not only end drag styles on drag leave, but also on drag end. Fixes firefox bug. #687

* fix(drag-modal): Remove drag modal trigger cruft

* fix(upload-modal): Allow close with escape button
2017-04-24 20:19:33 +02:00
Eugen e59f5c8e13 Add an RTL stylesheet for Arabic i18n (#2378) 2017-04-24 18:03:53 +02:00
Yamagishi Kazutoshi b073b092c9 Force wrap long email address (#2395) 2017-04-24 17:31:01 +02:00
Matt Jankowski 092fdc89fa Fix flashes partial render error for controllers which don't inherit from application controller (#2400)
* Add failing spec for oauth/authorized_applications controller

* Use explicit reference to flashes partial from admin layout

Because some of the controllers which use the admin layout do not inherit from
application controller, this partial is not in their view path.
2017-04-24 17:30:30 +02:00
alpaca-tc d000a0b58a Add index to statuses_tags#status_id (#2394) 2017-04-24 15:10:14 +02:00
Akihiko Odaki cf845fed38 Hide some components rather than unmounting (#2271)
Hide some components rather than unmounting them to allow to show again
quickly and keep the view state such as the scrolled offset.
2017-04-24 04:49:08 +02:00
Yamagishi Kazutoshi 72c984e105 Fix background-size being overwritten (#2382) 2017-04-24 04:10:32 +02:00
Eduardo Elias 3d3707a077 Language: Missing keys for pt and pt-BR (#2355) 2017-04-24 02:49:29 +02:00
Matt Jankowski a0dd90a397 Return force_ssl to the controller (#2380) 2017-04-24 02:44:05 +02:00
Nolan Lawson 1e2a5dded7 Simplify browserify+babelify config (#2377) 2017-04-24 02:19:10 +02:00
Yamagishi Kazutoshi 549ce78cf5 Improve Japanese translation (#2376)
ref #2359

- https://github.com/tootsuite/mastodon/pull/2359#discussion_r112838771
- https://github.com/tootsuite/mastodon/pull/2359#discussion_r112838772
- https://github.com/tootsuite/mastodon/pull/2359#discussion_r112838812
- https://github.com/tootsuite/mastodon/pull/2359#discussion_r112838823
- https://github.com/tootsuite/mastodon/pull/2359#discussion_r112838829
2017-04-24 02:18:41 +02:00
Effy Elden 1801a36414 Report processing improvements (#2349)
* Expose media attachments on reported statuses directly

* Comment out unused bulk report checkbox. Add title to report comment for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report

* Link account name on authorize_follow card back to account

* Add localisation string for report_contents

* Show new admin accounts card partial on report view. Apply simple_format to report comment so newlines are preserved.

* Add new admin accounts card partial, for display quick useful admin stats (e.g. report history, moderation status).

* Fix localized variable
2017-04-24 00:44:37 +02:00
Eugen 501514960a Followers-only post federation (#2111)
* Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers

* Authorized followers controller, stub for bulk action

* Soft block in the background

* Add simple test for new controller

* Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results,
rename "private" post setting to "followers-only", fix pagination style, improve post privacy
preferences style, improve warning style

* Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
2017-04-24 00:38:37 +02:00
Ash Furrow ef5937da1f Fixes problem with showing non-local accounts. (#2371) 2017-04-23 22:15:10 +02:00
ymmtmdk 072c6f1527 Add link for domain in land strip (#2306)
* Add link for domain in land strip

* Use root_path

* Avoid repeating code
2017-04-23 21:45:03 +02:00
Yamagishi Kazutoshi 55e32fe579 Update Japanese translation (#2360)
for #2181
2017-04-23 21:34:48 +02:00
Stephen Burgess 7ee8e50b9c fix(style): Fix styles after classname refactor (#2368)
Float detailed status display avatar left. Only apply display block to display names in status info, not in detailed status. Thanks to @nightpool for finding those. Make star icon in notification show up as gold. Add anchor selector back to status__content__spoiler-link in order to override default anchor style elsewhere.
2017-04-23 21:34:33 +02:00
Stephen Burgess 995f0ad51c feat(cw-button): Add aria controls to CW trigger (#2303)
Add an ID to the CW spoiler input field to give aria-controls a handle on it. Pass that id to the CW trigger button. Modify text icon button component to accept aria controls id value. Add aria-expanded value to text icon button to indicate when it is expanded.
2017-04-23 20:33:44 +02:00
Matt Jankowski 948dd26931 Fix deprecation warnings on activitypub controller specs (#2357) 2017-04-23 19:10:04 +02:00
Matt Jankowski 55e1e12b7d Ensure i18n matches options (#2358)
* Add failing spec showing that human_locales does not match what i18n knows about

* Add missing `ar` key for arabic to human locales

* Remove duplicate `id` key from available locales

* Sort keys in human locales list

* Add spec for human_locale helper
2017-04-23 19:09:52 +02:00
Yamagishi Kazutoshi 6e27e08cb4 Add Japanese translation to EmojiPicker component (#2359) 2017-04-23 19:09:34 +02:00
Yamagishi Kazutoshi d670f72830 Show multibyte URI preview card (#2363) 2017-04-23 19:08:59 +02:00
Matt Jankowski 57cd6546c3 Make HSTS enable optional with force_ssl (#2364) 2017-04-23 19:08:32 +02:00
178inaba 1244630ab4 Add simple_format to simplified_format (#2198) 2017-04-23 14:23:27 +02:00
Effy Elden a9a4710fe1 Alter Vagrantfile to use RVM for Ruby installation (#2346) 2017-04-23 14:21:20 +02:00
Effy Elden cc83ee60fb Export environment variables from .env.vagrant before running rails commands in Vagrant provisioning (#2343) 2017-04-23 14:21:09 +02:00
ThibG 89dc29affb Allow webfinger controller to reply to user@WEB_DOMAIN in addition to user@LOCAL_DOMAIN (#2351)
This provides a hotfix for outbound salmon requests to other Mastodon instances
as they currently will try to resovle user@WEB_DOMAIN instead of user@LOCAL_DOMAIN
(see #2012 and #20312).

Furthermore, this should ease transition from users switching from
LOCAL_DOMAIN = WEB_DOMAIN to another LOCAL_DOMAIN when WEB_DOMAIN does not change.
2017-04-23 14:19:54 +02:00
Ashley 85e09518b9 Halved padding for emoji (#2344) 2017-04-23 14:19:25 +02:00
Stephen Burgess 663f090c45 fix(style): Fix regressions introduced by #2338 (#2345)
Put Column Slim Back Button classnames in order so it is positioned right and top. Add icon button style back to privacy dropdown and upload buttons so they are positioned correctly and do not wiggle. Remove abstracted style from CSS. Add missed class for the upload form thumbnail. Add the missed styles for upload form thumnail. Alphabetize styles for column-back-button. Fix fontSize typo for media-spoiler-video-play-icon.
2017-04-23 14:18:58 +02:00
Joël Quenneville 1cf9e14a41 Test embedded_view related code in a helper (#2282)
The two methods `StreamEntriesHelper#stream_link_target` and
`StreamEntriesHelper#acct` are based on checking whether we are running
in an embedded view.

This adds some test helper code to make the testing easier. We extracted
some "magic strings" to constants to lower the coupling in the specs.
2017-04-23 06:05:52 +02:00
Joël Quenneville 0c2fe22bc1 Add test coverage to CSS class generation (#2285)
The code that generates CSS is based on a lot of boolean conditions.
The possible combinations of these grows exponentially as we add more
conditions.

Since most of the code is conditional on a single boolean, we tested the
following:

1. All `false`
2. All `true`
3. Each individual flag set to `true`

The methods tested are:

* `StreamEntriesHelper#style_classes`
* `StreamEntriesHelper#microformats_classes`
* `StreamEntriesHelper#microformats_h_class`
2017-04-23 06:04:32 +02:00
Koala Yeung 6f0b3b069f Adding arabic string localization (rebased) (#1895)
* Create ar.jsx

* Preparing file for translation.

* Create ar.yml

* Preparing file for translation.

* Create simple_form.ar.yml

* Preparing file for translation.

* Create devise.ar.yml

* Preparing file for translation.

* Create doorkeeper.ar.yml

* Preparing file for translation.

* Update index.jsx

Preparing file for translation.

* Update mastodon.jsx

* Preparing file to translation.
* Correction thanks to @Taekiro
  https://github.com/tootsuite/mastodon/pull/1798#pullrequestreview-32924922

* Update settings_helper.rb

Preparing file to translation.

* Update application.rb

* Preparing file to translation.

* Update simple_form.ar.yml

* Update doorkeeper.ar.yml

* Update devise.ar.yml

* Update ar.yml

* Fix i18n-tasks unused issue (ar)

Remove unused translation strings

* Update application.rb

* Update ar.jsx

* Fix various issues with Arabic translation

* Fix duplication caused in merge
* Fix syntax error in devise.ar.yml
* Fix import error Duplicated incorrect import in mastodon.jsx
* Fix duplication error in locales/index.jsx

* Update ar.yml

* Update ar.jsx

* Update ar.yml

* Update ar.jsx

* Fix ar translation
2017-04-23 05:58:47 +02:00
Ashley 9cd20a7062 Tooltip for boosting depends on toot visibility (#1394) (#1754)
* Made tooltip for boosting depend on visibility

* Removed spaces that were added in merge conflict resolution

* Try again :P

* Added missing bracket

* Changed 'toot' to 'status'
2017-04-23 05:36:40 +02:00
Yamagishi Kazutoshi 219fb317ee Remove unnecessary variable in ColumnLink component (#2341)
Fix bug in cca41ea544 .
2017-04-23 05:21:38 +02:00
Evan Minto 66fd8e7821 ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
2017-04-23 05:21:10 +02:00
Yamagishi Kazutoshi 83e3538181 Update CA certificates in Dockerfile (#2339) 2017-04-23 04:59:56 +02:00
Ash Furrow 723f25a999 Admin UI for confirming users (#2245)
* Shows confirmed status in list.

* Adds ability to confirm users in admin UI.

* Added new english translations.

* Addresses feedback from #2245.

* More feedback.
2017-04-23 04:43:42 +02:00
Eugen 59b1de0bcf Add a confirmation modal: (#2279)
- Deleting a toot
- Muting, blocking someone
- Clearing notifications

Remove source map generation from development environment, as it is a huge
performance sink hole with little gains
2017-04-23 04:39:50 +02:00
Akihiko Odaki df46864b39 Alter Japanese translations for CW and NSFW (#2305)
The previous translation for NSFW, "不適切" means "impertinent". This change
suggests "閲覧注意", which means the content requires precaution, instead.

However, "閲覧注意" was also a translation for CW. CW is now translated as
"警告", which simply means "warnings".
2017-04-23 04:31:40 +02:00
Stephen Burgess cca41ea544 Replace inline styles with CSS classes (BEM) (#2338)
* fix(classnames): Status icon style classnames

Take out inline css and put into classnames for the following components: account, avatar, icon button, status action bar, notification.

* fix(status): Move styles from inline to classes for statuses

Move styles to classnames in components.scss for the following components:

display name
media gallery
status
status content
video player

* fix(classnames): Add classnames to rest of components

Take out inline styles and apply them to classnames in the sass for the following components:

button
column back button
slim column back button
collapsable column
dropdown menu
loading indicator
status list

* fix(classnames): Remove all non-dynamic inline styles

Components affected:

autosuggested
permalink
action bar
header
character counter
compose form
emoji dropdown
privacy dropdown
reply indicator
upload form
account auth
followers
getting started
column settings
mutes
settings
reblogs
status checkbox
report
action bar
status
card
boost modal
media modal
video modal

* fix(permalink): Do not lose classname

* fix(tests): Add space back in display name

* fix(status__wrapper): Remove duplicate css name

Remove incorrect style attribute. Remove style attribute all together. Cursor defaults to "auto" when not specified as 'default'.

* fix(nl): do not lose translations
2017-04-23 04:26:55 +02:00
Matt Jankowski 532bec6e56 Clean up flash display in views (#2336)
* Add flashes partial to DRY up admin/auth layouts

* Further consolidate flash messages
2017-04-23 04:22:34 +02:00
Matt Jankowski ee82d8a876 Move force_ssl check to production config (#2165)
The force_ssl method from controllers does not add all of the options that the
sitewide configuration in a config block does. For example, HSTS enforcement is
not added by the controller method, but is added by this style.
2017-04-23 04:22:22 +02:00
mecab 1646ca75f0 Fix character images' sizing to make it robust (#2327) 2017-04-22 22:28:54 +02:00
jeroenpraat f876665264 Translation emojis and sorted on alphabet (#2328) 2017-04-22 20:22:46 +02:00
ばん 5817bae2da fix can toot whitespace (#2218) 2017-04-22 19:48:55 +02:00
Stephen Burgess 4cfc155560 Improve aria support - Columns and Navigation Drawer Icons (#2299)
* feat(aria): Add aria-labels to underlabelled tab nav items

The drawer tabs which control primary navigation are only labelled by a title which is not available to many screenreaders. Add an aria-label attribute to each link to improve readability with screenreaders. Organize link attributes so link target is first followed by classname.
Issue #1349

* feat(aria): Replace abstract aria role of section with region

Abstract aria roles such as section should not be used in content. Use non-abstract 'region' aria role instead. That role expects an aria-labelledby attribute with an id. Pass an ID to the column header. Remove the aria-label attribute on the ColumnHeader because the same value is output in plaintext as its child.
Issue #1349

* fix(aria): Remove aria-controls attribute until solution is found

Columns do not have wrappers, so these icons can't point to a column wrapper which it controls. Instead these icons function as triggers to show or hide individual columns.
#1349

* fix(typo): Remove type of aria-labelledby instead of aria-label
2017-04-22 17:30:35 +02:00
Wesley Ellis a1174a6d7e Add og:url tags (#2298)
* add og:url to stream_item view

* add og:url and text to about/show

* add og:url to profile, followers and follows pages
2017-04-22 17:29:46 +02:00
Akihiko Odaki 5357329454 Fix TabsBar update (#2300)
This change allows to update TabsBar according to route changes.
2017-04-22 17:29:02 +02:00
Ashley 7fea36d155 Added strings for emoji category localization (#2302) 2017-04-22 17:28:36 +02:00
Keiji, Yoshimi 2bf7e81ed5 update emojione-picker for fixed warnings. (#2324) 2017-04-22 17:28:02 +02:00
Quent-in ca8ae21b52 missing a var (#2320)
oc variable is missing on the second liste
2017-04-22 15:12:09 +02:00
masarakki d0ec4fb828 refactor-cores (#2308) 2017-04-22 15:11:56 +02:00
unarist 4428cf6f07 Fix Japanese translation of privacy disclaimer (#2315) 2017-04-22 15:10:14 +02:00
ThibG fe43991d02 Add author/actor URI to the list of webfinger aliases (#2319)
This fixes outbound salmon requests to remote GNU Social instances
2017-04-22 15:09:49 +02:00
codl 8565ba68f7 strip leading & trailing spaces from remote follow acct (#997) (#2321) 2017-04-22 15:08:30 +02:00
Matt Jankowski 629d35e6f5 [WIP] Html lang on statuses (#2297)
* Add html lang attributes around statuses

* Remove urls from language detection
2017-04-22 04:26:25 +02:00
Matt Jankowski 67dea31b0f 2FA controller cleanup (#2296)
* Add spec coverage for settings/two_factor_auth area

* extract setup method for qr code

* Move otp required check to before action

* Merge method only used once

* Remove duplicate view

* Consolidate creation of @codes for backup

* Move settings/2fq#recovery_codes to settings/recovery_codes#create

* Rename settings/two_factor_auth#disable to #destroy

* Add coverage for the otp required path on 2fa#show

* Clean up the recovery codes list styles

* Move settings/two_factor_auth to settings/two_factor_authentication

* Reorganize the settings two factor auth area

Updated to use a flow like:

- settings/two_factor_authentication goes to a #show view which has a button
  either enable or disable 2fa on the account
- the disable button turns off the otp requirement for the user
- the enable button cycles the user secret and redirects to a confirmation page
- the confirmation page is a #new view which shows the QR code for user
- that page posts to #create which verifies the code, and creates the recovery
  codes
- that create action shares a view with a recovery codes controller which can be
  used separately to reset codes if needed
2017-04-22 04:23:17 +02:00
Ashley 6af21daac9 Allowed the emoji picker 'Search...' string to be localized (#2294) 2017-04-22 03:36:33 +02:00
Eugen 9d3be5579a Improve bio compatibility (#2278)
* Fix #1057 (close #1819) - Move HTML-formatted bio from <poco:note /> to <summary type="html" />

* Ensure <poco:note /> is plaintext for remote accounts, also, by stripping out HTML
2017-04-22 03:33:24 +02:00
Ashley 05ac28f3e4 Added API for single notification dismissal (#2251)
* Added API backend for notification dismissal

* Added render statement

* Changed statement
2017-04-22 02:30:35 +02:00
Akihiko Odaki 0f852c6f74 Do not set port for puma if it is bound to unix socket (#2289)
Setting port after binding a unix socket puma listen to both of an unix
socket and TCP/IP, which is not a desired behavior.
2017-04-22 01:22:20 +02:00
Joël Quenneville 974ac467de Add tests for StreamEntriesHelper#rtl? (#2286)
We used some random Arabic characters to test that the various RTL
conditions got triggered.
2017-04-22 00:13:37 +02:00
Naouak af7d02da5d Fix issue with line return in file (#1947)
Fix #1940
2017-04-21 20:07:47 +02:00
Rachel H 5abd543766 Put space before image (#1735) 2017-04-21 20:06:25 +02:00
Yamagishi Kazutoshi 1948f9e767 Remove deprecated features at React v15.5 (#1905)
* Remove deprecated features at React v15.5

- [x] React.PropTypes
- [x] react-addons-pure-render-mixin
- [x] react-addons-test-utils

* Uncommented out & Add browserify_rails options

* re-add react-addons-shallow

* Fix syntax error from resolve conflicts

* follow up 59a77923b3
2017-04-21 20:05:35 +02:00
Eduardo Elias 27ea2a88c1 Language: Missing keys for pt and pt-BR (#2277) 2017-04-21 19:53:47 +02:00
Akihiko Odaki 16cd648181 Allow to listen Unix socket (#2085)
* Allow puma to listen Unix socket

* streaming: Show the whole listening address instead of the port

Port is not always appropriate (e.g. Unix socket)

* streaming: Close server before exiting

This change especially allows to remove Unix socket before exiting.
2017-04-21 19:24:31 +02:00
Yamagishi Kazutoshi 53b21ac1cd Add Japanese translation for display name and bio counter (#2275)
* Add Japanese translation for display name and bio counter

* Remove dep key
2017-04-21 19:23:20 +02:00
Eduardo Elias e4550811b2 Language: Update missing key for pt and pt-BR (#2276) 2017-04-21 19:23:02 +02:00
Eduardo Elias 704846a258 Fix: missing : for language (#2274) 2017-04-21 19:18:16 +02:00
Koala Yeung 935aecdc32 Add Indonesian (Bahasa Indonesia / id) translation (#2200)
* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* fix InvalidLocaleData on a string

* fix InvalidLocaleData on a string

* Fix language keys in Indonesian ruby locale (id)

Use "id" instead of "en" as object keys.

* Removed obsoleted translation (id)
2017-04-21 19:16:26 +02:00
Koala Yeung 1714f08d75 Add Ido (io) translation (#2202)
* Add Ido (io) translation

* Fix mastodon.jsx for io reference

There is no react-intl support for io. Removed the references.
2017-04-21 19:15:25 +02:00
Matt Jankowski 452dc6b5fe Use local_time gem for timezone replacement (#2174)
For the 'time ago' value of stream entry simple statuses and the timestamp value
of detailed statuses - output their UTC value and use the browser timezone to
convert locally.
2017-04-21 18:19:59 +02:00
Mingye Wang 5c9aa2b732 Fix mangling of ##tag matches (#2194) (#2247)
This commit fixes hashtag_html so it correctly handles matches with multiple hash-signs.

Bug located by @over9001, initial fix suggested by @nightpool.
2017-04-21 18:18:58 +02:00
Ash Furrow 78af88e1f4 Hides superluous details on small screens (#2175)
* Hides superluous details on small screans.

* Addressed feedback from #2175.
2017-04-21 18:17:55 +02:00
Sebastian Morr 74c474a652 Display remaining characters when editing display name and bio (#2219) 2017-04-21 18:17:21 +02:00
Takayoshi Nishida 5e33ad29d4 Fix #2195 - Set locale to error pages (#2255)
* Fix #2195 - Set locale to error pages

* Fix #2195 - Cut duplicate process into one method
2017-04-21 18:11:20 +02:00
Ram Lmn 27a99b19e8 Use local fonts and stop scrollable elements from repainting (#2266) 2017-04-21 18:09:05 +02:00
Matt Jankowski ee0c897bba User settings mutation (#2270)
* Add user spec for settings, highlight global default mutation issue

* Fix mutation issue caused by settings/preferences spec
2017-04-21 18:07:17 +02:00
Yamagishi Kazutoshi ceecf96208 Add crossorigin="anonymous" to about (#2272) 2017-04-21 18:06:43 +02:00
ik-fib 47a3036ea6 Add Mastodon version to user agent (#2253) 2017-04-21 17:26:23 +02:00
jeroenpraat d2dc31a74a Ruby time format fixed (#2259) 2017-04-21 16:47:15 +02:00
Yamagishi Kazutoshi 60a9b938b4 Upgrade jQuery to v2.x (#2246)
Fix #2199 and minifying assets file.

jQuery v1.x is supports legacy browsers.
But, Mastodon does not support legacy browsers.
I think jQuery v1.x is unnecessary.
2017-04-21 16:46:32 +02:00
178inaba dd517b9a55 Fix a bug where the hashtag could not be specified with the streaming API (#2258) 2017-04-21 16:45:14 +02:00
Jérémy Benoist b3329c362e Open authorized application in a new window (#2250)
Like it's already done when you click on an application from a toot, it's opening in a new window.
0254ee9795/app/views/stream_entries/_detailed_status.html.haml (L41)
2017-04-21 16:44:14 +02:00
Mingye Wang b00f4a0cf3 Use new ESLint filename (.json) (#2248)
* Use new ESLint filename (.json)

Codeclimate's ESLint 3 is complaining about the old filename. Let me try changing it.

* point eslint to new rc

(squash this)
2017-04-21 16:43:57 +02:00
Ash Furrow a0ed88a99b Adds version to about/more and API (#2181)
* Adds version.

* Cleans up code.

* Removes standalone endpoint and adds version to instance endpoint.

* Addresses feedback from #2181.
2017-04-21 03:30:59 +02:00
May Kittens Devour Your Soul 25d2853db2 Croatian language updates & fixes (#2203)
* Update hr.jsx

* Update and rename simple.form.hr.yml to simple_form.hr.yml

fixed file name

* Update hr.yml

* Update hr.yml
2017-04-21 03:30:15 +02:00
Quent-in 1930051bde Adjustment of oc.jsx (#2214) 2017-04-21 03:30:01 +02:00
Ash Furrow 6c34eafe02 Enables the Polish translation. (#2235) 2017-04-21 03:29:11 +02:00
jeroenpraat bbff431e3a Updated Dutch strings and added Dutch onboarding modal strings (#2243)
* A bit of more explanation

* Update nl.yml

* That's more elegant

* More consistent and adding missing translation

* Update

* Update

* Added Dutch onboarding modal strings
2017-04-21 03:29:00 +02:00
Mingye Wang 3660a321f0 zh*: minor jsx whitespace fix (#2231) 2017-04-21 03:28:45 +02:00
Yeechan Lu e06f307c2d Fix Chinese (China) translation availability (#2230) 2017-04-21 03:28:38 +02:00
Mingye Wang 3b342be2f2 Initial overhaul at zh-CN YML translations (#2242)
This commit provides a heavy proofreading of zh-CN translations, and
mainly draws from the zh-HK source when a translation is found too
incoherent. Translating directly from en is used when zh-HK translation
is not available.

This commit also completes the tweet-toot (choo-choo, actually) for
zh-cn introduced in #2044. Some minor copyediting, as well as
additional en translations, has been fed back into zh-hk text.
2017-04-21 03:27:45 +02:00
Matt Jankowski 2dda356e3f Clean up settings/preferences controller (#2237)
* Add missing fields group on preferences page

* Clean up settings/preferences controller

* Extract a UserSettingsDecorator
2017-04-21 03:26:52 +02:00
Andrey Blinov 972f6bc861 Fix Textarea height should be reset upon sending toot #2189 (#2236) 2017-04-20 23:53:54 +02:00
Shel R d2514445e1 Repair most egregious mistakes in onboarding modal (#1964)
* Repair most egregious mistakes

The deployed changes broke the pedagogy and curriculum built into the design of the onboarding modals, which had been reviewed and approved by various other contributors. While the changed layouts of the pages make some of the original decisions impossible to re-implement without substantial work, these changes should at least make the modals not outright terrible. 

The empty confusing description of Mastodon was replaced with an actual basic explanation of federation. The language was modified to be friendly and conversational again. Grammatical errors were fixed. The explanations of local and federated timelines were re-ordered to be in the direct that the menus go, top to bottom, and the sentence was re-added which explains that they are what "public timelines" refers to (since this phrasing is used elsewhere in the UI) and suggests the user use them to discover who to follow. A figure of the profile picture that lives above the compose box was padded to page two to serve as a landmark for less technically literate users to easily find the compose box and understand that the next page is moving upwards, so that they can find the search bar. 

Ideally, the elephant artwork should be either removed or replaced with something less depressing.  Room should be made to point users at the notifications column's settings icon because "how do I turn off the notification noise" is one of the most asked questions of new users and those icons are not easily noticeable. This last part may be made obsolete if the settings UI is later re-worked.

* Change copy

This commit addresses copy change suggestions made in the PR discussion

* Add periods to ends of sentences missing periods
* Made "Home" "Federated" "Local" and "Notifications" lowercase
* Separate explanation of "connecting" and the word "instance" into two sentences, to make the sentence less dense.
2017-04-20 18:20:40 +02:00
Alda Marteau-Hardi daa46f14c4 French translation cleanup (#2223)
* Alphabetically order translation keys

* Fix some missing gender neutral translations in french

* Add a comment to remind contributors to order translations by key
2017-04-20 17:19:05 +02:00
Matt Jankowski 1ada494bb2 Admin settings controller refactor, add specs, cleanup (#2225)
* Add render_views for admin/settings spec

* Add coverage for admin/settings#update

* Add coverage for admin/settings typecasting open_registrations setting

* Simplify how admin/settings finds the value for updating

* Rely on activerecord to not update a value that hasnt changed

* Add coverage for non-existent setting

* Use a constant for boolean settings
2017-04-20 17:18:09 +02:00
Keiji, Yoshimi 4df26b2621 it may be mentions_status_id_index is duplicated of index_mentions_on_status_id index. (#2224) 2017-04-20 17:13:06 +02:00
Christoph Witzany 556f68ab15 Make Docker image buildable on ARM (#2065)
* after yarn upgrade

* after manually removing node-gyp as top level dependency
2017-04-20 13:29:38 +02:00
Yamagishi Kazutoshi fdb2689a14 Fix PropTypes warning in OnboardingModal (#2191) 2017-04-20 13:22:54 +02:00
Matt Jankowski 598d3defd5 Use default locale for html lang in layouts (#2212) 2017-04-20 13:09:31 +02:00
Matt Jankowski 7f8044d913 Link to profile/feed/salmon from admin/accounts show page (#2186) 2017-04-20 04:00:02 +02:00
Ash Furrow 66b39ccaed Removes timestamp from URLs. (#2185) 2017-04-20 03:54:24 +02:00
Eugen cae2a26ee3 Fix #2120 - Use Status#as_tag_timeline on public hashtag page (#2182)
* Fix #2120 - Use Status#as_tag_timeline on public hashtag page

* Update tags_controller.rb
2017-04-20 03:54:02 +02:00
Miguel Jacq b79ba3db8a Send nil for SMTP_LOGIN or SMTP_PASSWORD if it was left blank in the envfile, otherwise Ruby still attempts auth even if SMTP_AUTH_METHOD is none (#2180) 2017-04-20 03:12:14 +02:00
Marcin Cieślak 59a77923b3 Add static gif for upload testing (#2168) 2017-04-19 23:47:50 +02:00
Eugen 2e4afccd9d Fix #2108 - Fix gif uploads (#2171)
* Fix #2108 - Fix gif uploads
Add specs for media attachment gifv conversion

* Add ffmpeg to travis

* Make travis install ffmpeg, not libav

* Switch travis to trusty
2017-04-19 23:21:00 +02:00
evilny0 0876a06e45 Updated note about 'none' SMTP authentication method in .env.production.sample (#2167) 2017-04-19 23:16:43 +02:00
Darshak Parikh 43caf1fa5f Add some Spanish translatoins (#2170) 2017-04-19 22:19:41 +02:00
alpaca-tc 2c0d756ad9 Extract error messages to locale file (#2162) 2017-04-19 22:19:32 +02:00
jeroenpraat f06cba3f60 Dutch language strings: a few important fixes (#2163) 2017-04-19 22:19:19 +02:00
György Nádudvari 09dad88853 Fixed hungarian translation (#2158) 2017-04-19 19:21:44 +02:00
Tomohiro Suwa 7832425fdd Fix css for toot button when uploading images (#2161) 2017-04-19 19:21:23 +02:00
fsubal abe16a7026 fix broken style when follower has long description (#2159) 2017-04-19 19:20:51 +02:00
Eugen baabbce672 Fix double-escaping of display names in <title> (#2155) 2017-04-19 17:46:24 +02:00
Eugen 1d47910d3b Fix possibility of unrightful webfinger redirect (#2147)
* Fix possibility of unrightful webfinger redirect

* Add more tests for FollowRemoteAccountService
2017-04-19 17:28:35 +02:00
Matt Jankowski 708bdd53f1 Remove unused view files in accounts/ (#2153) 2017-04-19 17:19:23 +02:00
Yamagishi Kazutoshi 2510119f19 Add meta tags for OGP to following & follow page (#2052)
* Add meta tags for OGP to following & follow page

* simplify render helper

* Follow up #2133

* og:type is only accounts/show

* revert accounts/{following,followers}
2017-04-19 17:17:32 +02:00
matsurai25 fe1ddc3b96 fix Japanese search result translation (#2149)
add 'result' mean, '件' only mean count unit.
2017-04-19 16:41:30 +02:00
Matteo Aquila a3486e0543 Completed Italian translation (#2151)
* Added it.jsx

* Update index.jsx

* Update mastodon.jsx
2017-04-19 16:40:45 +02:00
matsurai25 30183c0a74 fix search text 'zero' (#2150) 2017-04-19 16:40:24 +02:00
geta6 15a4fc5dcc Automatically change the size of textarea (#2128) 2017-04-19 15:39:46 +02:00
Matt Jankowski a8e1afc30a Simplify render in controllers (#2144) 2017-04-19 15:37:42 +02:00
Eugen bfbc2ca0d8 Attachment list for uncached attachments (#2110)
* For undownloaded attachments, set type :unknown, display them as a list in the web UI

* Fix case when attachment type is set explicitly
2017-04-19 15:37:18 +02:00
alpaca-tc 5ce8a1811a Replace User.count -> User.confirmed.count (#2127) 2017-04-19 14:58:27 +02:00
Yamagishi Kazutoshi dca0ffa1a1 Remove unnecessary word from Japanese locale (#2143) 2017-04-19 14:54:47 +02:00
abcang 70891a99a9 Fix html escape characters in the URL (#2138)
* fix character escaping in URL

* add tests

* put a comma after the last item

* add HTML escape test
2017-04-19 14:52:18 +02:00
857b 3572f4423f enable to scroll the setting's page sidebar (#1347)
* enable to scroll the setting's page sidebar

add scroll:auto and use margin instead of padding for the bottom

* Update admin.scss

* Update admin.scss

* Update admin.scss
2017-04-19 14:30:23 +02:00
Joël Quenneville 23eea5c5ae Install Yarn dependencies during setup (#1169)
Previously the `bin/setup` script only installed the Ruby dependencies
via Bundler. This is not sufficient to get the test suite to pass. We
also need the JavaScript dependencies.

This commit installs the JavaScript dependencies as part of the
`bin/setup` script via Yarn.

This allows for a successful

    bin/setup && bundle exec rake

on a fresh clone of the repo.
2017-04-19 14:29:23 +02:00
Alex Dunn 35bdacba7a capistrano: link robots.txt (#1576)
Related to #1533.
2017-04-19 14:28:23 +02:00
Isabelle Knott 97012487ed Do not show link preview card if toot has a spoiler (#1617)
* Do not show link preview card if toot has a spoiler

* == to ===
2017-04-19 14:28:00 +02:00
Ash Furrow 9a7ea7c870 Moves from hamburger icon to asterisk. (#2116) 2017-04-19 14:21:14 +02:00
chrolis 1ac41c873a Improve visibility of mute, block, report menu in Japanese (#2131) 2017-04-19 14:21:00 +02:00
tmyt 6c83fec971 Make configuarable s3_permissions for paperclip (#2139) 2017-04-19 14:20:36 +02:00
Misty De Meo 2bb54d5c57 Update title text for "reply all" button (#2118) 2017-04-19 14:20:04 +02:00
Yamagishi Kazutoshi 8b8e140c71 Change to switch signature version for Amazon S3 (#2124) 2017-04-19 14:18:50 +02:00
Matt Jankowski 8bac0350d1 Restful refactor of accounts/ routes (#2133)
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
2017-04-19 13:52:37 +02:00
Kota Ouchi c0b30c56db Update ja.yml (follow for #2118) (#2137)
* Update ja.yml (follow for #2118)

* typo fix
2017-04-19 13:44:07 +02:00
Isao Sugimoto 0a850a8edb update simple_form.ja.yml (follow for #1991) (#2113) 2017-04-19 03:55:19 +02:00
Isao Sugimoto 71f5cf12d2 update ja.yml (follow for #2106) (#2109) 2017-04-19 00:52:30 +02:00
Michel 9d8bf4ea42 Update fr.yml (#2107)
Just updated some values.
Best regards,
cyweo
2017-04-19 00:52:19 +02:00
Eugen 96268e76e6 Fix wording on admin instances view, fix typos in language detector spec (#2106) 2017-04-18 23:39:51 +02:00
Eugen c6a4ab3b92 Remove unused fonts (#2103) 2017-04-18 23:34:50 +02:00
Eugen e09ab2c0bd Fix #1642, fix #1912 - Dictate content-type file extension (#2078)
* Fix #1642, fix #1912 - Previous change (#1718) did not modify how original file was saved on upload

* Fix for when file is missing
2017-04-18 23:15:44 +02:00
Eugen 6bd1019235 Add more tests for AtomSerializer (#2096) 2017-04-18 22:30:17 +02:00
Isao Sugimoto 0d6c1e9cba missing translate ja.yml (#2100) 2017-04-18 22:29:39 +02:00
Eugen ff5baa5349 Add rate limits for logins and sign-ups by IP (5 in 5 minutes) (#2079)
* Add rate limits for logins and sign-ups by IP (5 in 5 minutes)
Should be enough for normal attempts

* Add rate limit for forgotten password form as well
2017-04-18 22:29:14 +02:00
Matt Jankowski 297c11dba2 Language detection refactor (#2099)
* Extract detect_language to separate class

* Use default locale, not just en

* Add spec to confirm that whatlanguage cant identify empty string

* Allow account locale to override default in language detector

* PostStatusService supplies an account to detect language
2017-04-18 22:20:12 +02:00
happycoloredbanana 0a7588282a Remove API authentication for public statuses (after review) (#1919) 2017-04-18 21:58:57 +02:00
Mingye Wang 3ed219f907 Polish zh-cn js translation (#2090)
* Polish zh-cn js translation

* fixes for problems pointed out by gumblex in #2044
* more effectively differentiate between following/follower

* Fix missing period (zh-cn js)

Maybe squash this commit?

* Fix duplicate word (zh-cn js)
2017-04-18 21:29:31 +02:00
Matt Jankowski 55e1503522 Instances list in admin (#2095)
* Add admin/instances index action

* Add link to instances admin page

* View lists instances

* Instances, grouped by domain, ordered by count

* Use Account.remote scope

* Extract method: Account.by_domain_accounts
2017-04-18 21:09:07 +02:00
Matt Jankowski 66d8f99a30 Admin reports with accounts (#2092)
* Add a ReportFilter class

* Add reports and targeted_reports relationships to Account

* Use ReportFilter from admin/reports controller

* Link to admin/reports filtered views from admin account show view

* Add indexes to reports.account_id and reports.target_account_id
2017-04-18 19:36:18 +02:00
Tomohiro Suwa f23281e31e Disable toot button when above 500 characters (#2088)
* Disable toot button when above 500 characters

* Consider multibyte characters

* Consider spoiler_text
2017-04-18 19:35:55 +02:00
spf 9783d8b6c0 fix admin input display (#1633) 2017-04-18 17:25:44 +02:00
JP DeVries 7525971561 Moving aria-label to div.column (#1769)
* Use landmark regions on columns

Closes mastodon#1720

* Moving aria-label to div.column
2017-04-18 17:21:25 +02:00
Matt Jankowski 84b5fae8e3 Simplify renders in views (#2084)
* Simplify render in mailer views

* Simplify render in about/more view

* Simplify render in accounts follow views

* Simplify render in recovery code views

* Simplify render in stream entry embed

* Simplify render in stream entries status partial

* Simplify render in authorize follow new view
2017-04-18 17:15:30 +02:00
usagi-f d90b1650d8 Update storybook file autoload (#2057) 2017-04-18 16:04:35 +02:00
ik-fib 23ecc681c4 Add "Mastodon" to user agent (#2073)
Remove non-const version string

Freeze option is unnecessary
2017-04-18 16:04:13 +02:00
Keiji, Yoshimi 82bbf57e7a Translate onboarding dialog to japanese (#2062)
* translate onboarding modal to japanese

* fixed translation by feedback
2017-04-18 16:03:27 +02:00
kuro5hin 0790aa9165 Fix streaming server worker count (#2082)
* Make sure we start at least one streaming worker, even if there's only one CPU and we're in production mode.

* Oops, let's make sure we're counting cpus right too.
2017-04-18 15:58:22 +02:00
839 e2a1b574ab Avoid dynamic methods due to processing speed (#2080) 2017-04-18 15:57:46 +02:00
Andrey Blinov 880590ad0d Fix header icons in navigation bar (#2081) 2017-04-18 15:57:16 +02:00
Olivier Humbert ee919bedd6 French translation update (#2063)
fixes
2017-04-18 15:21:47 +02:00
Koala Yeung 0a1b024600 Add Occitan (oc) translation (#2077)
* Added oc.yml

* Added `config/locales/oc.yml`.
  Translated in General Occitan (Quent-in).

* Added oc.jsx (Occitan translation)

* Written in General Occitan (lengadocian)
* Added `app/assets/javascripts/components/locales/oc.js`

* Added doorkeeper.oc.yml

* Added `config/locales/doorkeeper.oc.yml` (Quent-in)

* Added simple_form.oc.yml

* Added `config/locales/simple_form.oc.yml` (Quent-in).

* Merge en.yml changes into oc.yml

Added new strings for translations

* Fix typo in oc.yml

* Update javascript locale support (oc)

* Update ruby locale list (oc)

* Fix oc.yml

* Remove obsoleted translations
* Moved old translation of `reports` to `admin.reports`
2017-04-18 15:21:16 +02:00
Ratmir Karabut 50ed72767d Update Russian translation (#1967)
* Add Russian translation (ru)

* Fix a missing comma

* Fix the wording for better consistency

* Update Russian translation

* Arrange Russian setting alphabetically

* Fix syntax error

* Update Russian translation

* Fix formatting error

* Update Russian translation

* Update Russian translation

* Update ru.jsx

* Fix syntax error

* Remove two_factor_auth.warning (appears obsolete)

* Add missing strings in ru.yml

A lot of new strings translated, especially for the newly added admin section

* Fix translation consistency
2017-04-18 15:20:37 +02:00
geta6 75910abd8f Add hasMore field to account timeline (#2066) 2017-04-18 13:10:49 +02:00
Eugen Rochko 93c13fe691 Merge branch 'patf-pause-gif' 2017-04-18 01:58:14 +02:00
Eugen Rochko 42d54dc9ea Adjust visuals of non-autoplaying GIFV 2017-04-18 01:57:50 +02:00
Eugen Rochko 57d784f1e4 Merge branch 'pause-gif' of git://github.com/patf/mastodon into patf-pause-gif 2017-04-18 01:25:50 +02:00
Matt Jankowski 16d50f60d1 Remove unused methods (#1730)
* Remove unused method #set_counters_maps from api controller

* Remove unused method #set_account_counters_maps from api controller

* Remove unused method Account#followers_domains

* Remove unused User.prolific scope

* Add mastodon:users:admins task to list all admin emails

* Use interpolated query style in Account.triadic_closures

* Coverage for Account.triadic_closures
2017-04-18 01:21:55 +02:00
Eugen Rochko 0e0347ea3c Merge branch 'pixiv-fix/cache_blocking' 2017-04-18 01:20:29 +02:00
Eugen Rochko f5cd0b4956 Rename cache key to exclude_account_ids_for:id, adjust formatting 2017-04-18 01:14:02 +02:00
Eugen Rochko 2fd0473aa1 Merge branch 'fix/cache_blocking' of git://github.com/pixiv/mastodon into pixiv-fix/cache_blocking 2017-04-18 01:09:57 +02:00
Eugen f03fb6c0ae Add forgotten AtomSerializer spec (#2047) 2017-04-18 01:07:46 +02:00
Marcin Cieślak 8d3412c90c Ignore /vendor/bundle (#1880) 2017-04-18 01:02:50 +02:00
Damien Erambert 9cefb5731d Add FR locales to the onboarding modal (#1976)
* Add FR locale for the onboarding modal component

* Slightly increase the max-width and max-height of the onboarding modal

This is done so it doesn't break with locales whose strings would be
too long

* Update FR locales for onboarding upon PR comments
2017-04-18 01:02:02 +02:00
Mingye Wang 00a85f31ca Add simplified Chinese js translation (#2044)
This single-file commit, heavily based on the zh-hk version as of
ec9999c, fixes the missing js locale. Intentional, significant
departures from current zh-cn yml localizations have been marked with
rationales given.
2017-04-18 01:01:32 +02:00
Matt Jankowski 389f8f8249 Instance helper to replace site title helper (#2038)
* Move site title helper to instance helper (name change only)

* Remove newline in <title> tag

* Add site_hostname helper method to wrap up local_domain value

* Use site_hostname helper in places that need local_domain value
2017-04-18 00:16:32 +02:00
jeroenpraat e1e15adf1d Updated, improved and fixed Dutch language strings (#2030)
* Fixed some words

* Improved and more consistent

* Fixes and a bit less 'je'

* Improved and more consistent

* Another round of improvements and consistency

* More improvements and less 'je'

* Update

* Updated with admin strings

* More improvements and additions - not complete yet, but most is there

* This is what we call in Dutch 'the English disease' :-)

* fix comma

* admin.reportsi

* not needed

* hopefully now fixed
2017-04-18 00:16:03 +02:00
Matt Jankowski f96f8d0176 Use .presence instead of ternary on site description for og: content (#2033) 2017-04-17 23:19:45 +02:00
Sam Hewitt a05e7582e4 optimized logo (#2020)
- adjusted elements to fit the pixel grid for better scaling
- optimized the PNG asset and the SVG asset
2017-04-17 21:49:51 +02:00
Matt Jankowski fc122e9d78 README tidy up (#2026)
* Remove docker guide and put it in docs repo

* Move tasks to docs repo

* Move requirements to contributing doc

* Move advice about tagged releases to docs repo

* Move local domain and host config to docs repo

* Link to related tech
2017-04-17 21:28:31 +02:00
Andrey Blinov 7d1e653ec1 Fix import pt_br locale in mastodon.jsx (#2011) 2017-04-17 21:01:42 +02:00
Zac Anger 7b397b1452 Return early from submit if no text. (#1962) 2017-04-17 20:30:38 +02:00
spf 8fd6552bca French i18n-tasks missing fr (#2018) 2017-04-17 20:27:11 +02:00
Matt Jankowski 4ed12cd89a Remove i18n_spec file (#2014)
These were being skipped with `xit`, but we also just added the `unused` task to
the CI server, and it will be caught there. That seems good enough for this,
instead of requiring a full keys check on every local spec suite run.
2017-04-17 20:02:29 +02:00
Matt Jankowski cc1361c149 Media controller specs (#2022)
* Add spec for media controller

* Add MediaAttachment.attached scope

* Simplify methods in media controller
2017-04-17 20:02:00 +02:00
Eugen 15ec4ae07b Fix #1972, fix #1870 - Fix special characters in XML, add tests (#1988)
Also improve efficiency of the mastodon:maintenance:add_static_avatars task
2017-04-17 19:58:54 +02:00
Eugen e43071a2f9 Fix #1897 - Return reblogged: false on unreblog (was wrongly named variable) (#1989) 2017-04-17 19:58:38 +02:00
Matt Jankowski 21a767dcfa Improve handling of HTTP_ACCEPT for webfinger (#2008)
This change includes:

- Improve the spec coverage for incoming request to the webfinger action
- For requests without an accept header (ie, what a browser might look like),
  return a JSON response.
- For requests with an explicit format of xml or json, return that format.
- For requests using an accept header, return that format.

Also adds failing spec showing webfinger does not return xml, which covers the
issue described in: https://github.com/tootsuite/mastodon/issues/1983
2017-04-17 19:58:03 +02:00
Tomohiro Suwa 3399dd7a66 Fix nil query_username (#2013) 2017-04-17 19:57:02 +02:00
alpaca-tc 630de52fdd Required foreign keys (#2003)
* Add `required: true` option to foreign column

* Fixes NoMethodError

```
> Favourite.new.valid?
NoMethodError: undefined method `reblog?' for nil:NilClass
```
2017-04-17 15:54:33 +02:00
IWAI, Masaharu f8546ad5a2 Update Japanese translation (#1993)
Sync text for toot form
2017-04-17 15:15:24 +02:00
Christophe Gesché 4082e1ac7f Update fr.jsx "clear" (Nettoyer peut-être ambigu) (#1987)
Un utiliser mal expérimenté pourrait comprendre "retirer les erreurs".
Ici il s'agit d'une suppression pure et simple, pas une épuration/nettoyage.

clear would be translated "remove" instead of "cleaning" Cleaning can be unterstood "keep but clean"
2017-04-17 15:15:14 +02:00
tom 6b8e95ea00 Make contents of boost confirmation dialog scroll (#1710)
This is necessary for boosting long posts on small screens - see this post for video: https://slime.global/@masklayer/102308
2017-04-17 12:27:19 +02:00
Brad Urani e813810e03 Open sidekiq and pghero admin pages in new browser tabs (#1596)
* Open sidekiq and pghero admin pages in new tabs

* Add missing comma
2017-04-17 12:26:45 +02:00
Patrick Figel ffb99325ca Add gif auto-play/pause preference
This introduces a new per-user preference called
"Auto-play animated GIFs", which is enabled by default. When a
user disables this setting, gifs in toots become click-to-play.

Previews of animated gifs were changed to display the video play
button so that users can distinguish them from regular images.

This setting also affects account avatars in the detailed account
view, which was changed to use the same hover-to-play mechanism
that is used for animated avatars in timelines.

Fixes #1652
2017-04-17 12:14:03 +02:00
Ian Kelling fd62d4de10 Add documentation of SMTP_DOMAIN (#1738)
Without setting it, exim will reject the mail with a message like:
rejected EHLO from [10.20.0.1]: syntactically invalid argument(s): {}
2017-04-17 10:42:29 +02:00
Miguel Jacq e9eaf9e33c Allow using an SMTP server without authentication (#1597)
* Allow using an SMTP server without authentication (e.g Postfix relay on the same host) by setting SMTP_LOGIN and SMTP_AUTH_METHOD to 'none'

* Add note in .env.production.sample about SMTP settings for servers where no auth is required

* Assume that SMTP_LOGIN and SMTP_PASSWORD will be blank if we set SMTP_AUTH_METHOD to none
2017-04-17 10:41:19 +02:00
happycoloredbanana e22f9819bb NFS for shared folder requires a private_network (#1263) 2017-04-17 10:40:14 +02:00
Dale Price f3b86c1bda Add mask-icon.svg (#1572) (#1585)
* Add mask-icon (#1572)

* use updated svg logo for mask-icon
2017-04-17 10:39:54 +02:00
Expenses 833bfd77f2 Added missing `rake secret` command (#1894) 2017-04-17 10:38:59 +02:00
Hugo Gameiro 6685106daa Add Brazilian Portuguese and fix European Portuguese (#1966)
* update portuguese translation

added the missing fields and improved the translation

* pt translations fix

* improve last translation commit

* fix damn quotes

* add pt_br to index.jsx

* add pt-BR to import index.jsx

* add pt-BR to mastodon.jsx

* add pt-BR to settings_helper.rb

* add pt-BR to application.rb

* order alphabetically pt.jsx

* create pt-BR.jsx

* Create devise.pt-BR.yml

* language improvements to devise.pt.yml

* created doorkeeper.pt-BR.yml

* fixes to doorkeeper.pt.yml

* create pt-BR.yml

* improvements to pt.yml

* Create simple_form.pt-BR.yml

* Improvements to simple_form.pt.yml

* improvements to pt.yml
2017-04-17 10:38:27 +02:00
May Kittens Devour Your Soul 8ad6722eea Create hr.jsx (#1945)
* Create hr.jsx

Start of Croatian translation

* Update settings_helper.rb

* Update application.rb

* Update application.rb

* Update index.jsx
2017-04-17 10:38:13 +02:00
Yuki Nakagawa 548ff54714 Optimize user setting page for mobile browser (#1924)
* Remove overflow because it blocks scrolling on mobile safari.

* Add “-webkit-overflow-scrolling: touch;” to enable smooth scroll on mobile safari and other webkit browsers.

* Use radio buttons in user setting page.

Because select tags with long text are not fit in the width of mobile devices.

* Add flex property to fit labels to devise width.

* Change font size of select.

It causes auto zooming on mobile safari.
2017-04-17 10:37:00 +02:00
Matt Jankowski a67909ec1e Rubocop instructions (#1973)
* Rubocop link for Sublime Text

* Fix rubocop links

* Link to gh issues page from contributing doc
2017-04-17 10:35:42 +02:00
Yamagishi Kazutoshi 6afe70db95 Add human locales for zh-tw (#1984) 2017-04-17 10:35:06 +02:00
usagi-f b87a08e160 Add function color remaining text (#1980) 2017-04-17 10:34:33 +02:00
Toshiyuki Takahashi be6cabb315 Improved Japanese translation in ja.yml (#1981) 2017-04-17 10:32:41 +02:00
anon f8ae12909c Fix tiny typo, and added link to terms and conditions in confirmation email for Japanese. (#1975) (#1975) 2017-04-17 10:32:09 +02:00
Ingo Blechschmidt 78bdfc4589 Fix tiny typo (#1956) 2017-04-17 10:29:49 +02:00
saturday06 d87ee1167e Assign user locale on signup (#1982) 2017-04-17 10:29:08 +02:00
geta6 64e1d51025 Improve streaming server with cluster (#1970) 2017-04-17 04:32:30 +02:00
Keiji, Yoshimi 7a5086729a reduce unneed query when post without attachements. (#1907)
* reduce unneed query when post without attachements.

This commit reduce following query:

```
 MediaAttachment Load (0.9ms)  SELECT "media_attachments".* FROM "media_attachments" WHERE "media_attachments"."status
_id" IS NULL AND 1=0 ORDER BY id asc
```

* fixed for more simple changes.
2017-04-17 04:23:13 +02:00
Yamagishi Kazutoshi 5e94643058 Fix minor typo in Japanese translation "保村" -> "保存" (#1968) 2017-04-17 04:22:14 +02:00
Toshiyuki Takahashi dc6fe4e04b Improved Japanese translation in devise.ja.yml (#1969) 2017-04-17 04:22:09 +02:00
Effy Elden acd33101c5 Merge branch 'master' into fix/cache_blocking 2017-04-17 01:41:33 +10:00
Keiji Yoshimi fd81916e86 cache blockings for reducing queries. 2017-04-16 12:20:38 +09:00
590 changed files with 15580 additions and 141373 deletions

View File

@ -35,11 +35,15 @@ OTP_SECRET=
# E-mail configuration
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
# then set SMTP_AUTH_METHOD to 'none' and *comment* SMTP_LOGIN and SMTP_PASSWORD.
# Leaving them blank is not enough for authentication method 'none'.
SMTP_SERVER=smtp.mailgun.org
SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@example.com
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
#SMTP_AUTH_METHOD=plain
#SMTP_OPENSSL_VERIFY_MODE=peer
@ -71,6 +75,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=
@ -81,3 +86,7 @@ SMTP_FROM_ADDRESS=notifications@example.com
# Advanced settings
# If you need to use pgBouncer, you need to disable prepared statements:
# PREPARED_STATEMENTS=false
# Cluster number setting for streaming API server.
# If you comment out following line, cluster number will be `numOfCpuCores - 1`.
STREAMING_CLUSTER_NUM=1

3
.gitignore vendored
View File

@ -4,8 +4,9 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
# Ignore bundler config and downloaded libraries.
/.bundle
/vendor/bundle
# Ignore the default SQLite database.
/db/*.sqlite3

View File

@ -1,5 +1,11 @@
language: ruby
cache: bundler
cache:
bundler: true
yarn: true
directories:
- node_modules
dist: trusty
sudo: false
notifications:
email: false
@ -12,6 +18,13 @@ env:
- CXX=g++-4.8
addons:
postgresql: 9.4
apt:
sources:
- ubuntu-toolchain-r-test
- trusty-media
packages:
- g++-4.8
- ffmpeg
rvm:
- 2.3.4
@ -22,10 +35,6 @@ services:
bundler_args: --without development production --retry=3 --jobs=3
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -qq update
- sudo apt-get -qq install g++-4.8
install:
- nvm install
- npm install -g yarn

View File

@ -7,7 +7,7 @@ There are three ways in which you can contribute to this repository:
2. By working on the back-end application
3. By working on the front-end application
Choosing what to work on in a large open source project is not easy. The list of GitHub issues may provide some ideas, but not every feature request has been greenlit. Likewise, not every change or feature that resolves a personal itch will be merged into the main repository. Some communication ahead of time may be wise. If your addition creates a new feature or setting, or otherwise changes how things work in some substantial way, please remember to submit a correlating pull request to document your changes in the [documentation](http://github.com/tootsuite/documentation).
Choosing what to work on in a large open source project is not easy. The list of [GitHub issues](https://github.com/tootsuite/mastodon/issues) may provide some ideas, but not every feature request has been greenlit. Likewise, not every change or feature that resolves a personal itch will be merged into the main repository. Some communication ahead of time may be wise. If your addition creates a new feature or setting, or otherwise changes how things work in some substantial way, please remember to submit a correlating pull request to document your changes in the [documentation](http://github.com/tootsuite/documentation).
Below are the guidelines for working on pull requests:
@ -21,9 +21,17 @@ Below are the guidelines for working on pull requests:
- No orthographic mistakes
- No Markdown syntax errors
## Requirements
- Ruby
- Node.js
- PostgreSQL
- Redis
- Nginx (optional)
## Back-end application
It is expected that you have a working development environment set up. The development environment includes rubocop, which checks your Ruby code for compliance with our style guide and best practices. Sublime Text, likely like other editors, has a Rubocop plugin that runs checks on files as you edit them. The codebase also has a test suite.
It is expected that you have a working development environment set up. The development environment includes [rubocop](https://github.com/bbatsov/rubocop), which checks your Ruby code for compliance with our style guide and best practices. Sublime Text, likely like other editors, has a [Rubocop plugin](https://github.com/pderichs/sublime_rubocop) that runs checks on files as you edit them. The codebase also has a test suite.
* The codebase is not perfect, at the time of writing, but it is expected that you do not introduce new code style violations
* The rspec test suite must pass
@ -41,4 +49,3 @@ It is expected that you have a working development environment set up (see back-
* If you are introducing new strings, they must be using localization methods
If the JavaScript or CSS assets won't compile due to a syntax error, it's a good sign that the pull request isn't ready for submission yet.

View File

@ -17,6 +17,7 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit
postgresql-dev \
libxml2-dev \
libxslt-dev \
python \
build-base" \
&& apk -U upgrade && apk add \
$BUILD_DEPS \
@ -28,11 +29,13 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit
ffmpeg \
file \
imagemagick@edge \
ca-certificates \
&& npm install -g npm@3 && npm install -g yarn \
&& bundle install --deployment --without test development \
&& yarn --ignore-optional \
&& yarn cache clean \
&& npm -g cache clean \
&& update-ca-certificates \
&& apk del $BUILD_DEPS \
&& rm -rf /tmp/* /var/cache/apk/*

View File

@ -21,6 +21,7 @@ gem 'best_in_place', '~> 3.0.1'
gem 'paperclip', '~> 5.1'
gem 'paperclip-av-transcoder'
gem 'aws-sdk', '>= 2.0'
gem 'fog'
gem 'addressable'
gem 'devise'
@ -35,6 +36,7 @@ gem 'http_accept_language'
gem 'httplog'
gem 'kaminari'
gem 'link_header'
gem 'local_time'
gem 'nokogiri'
gem 'oj'
gem 'ostatus2', '~> 1.1'
@ -48,6 +50,7 @@ gem 'rails-settings-cached'
gem 'redis', '~>3.2', require: ['redis', 'redis/connection/hiredis']
gem 'rqrcode'
gem 'ruby-oembed', require: 'oembed'
gem 'sanitize'
gem 'sidekiq'
gem 'sidekiq-unique-jobs'
gem 'simple-navigation'

View File

@ -1,6 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
actioncable (5.0.2)
actionpack (= 5.0.2)
nio4r (>= 1.2, < 3.0)
@ -111,11 +112,19 @@ GEM
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
colorize (0.8.1)
concurrent-ruby (1.0.5)
connection_pool (2.2.1)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.2)
debug_inspector (0.0.2)
devise (4.2.1)
bcrypt (~> 3.0)
@ -145,19 +154,148 @@ GEM
thread_safe
encryptor (3.0.0)
erubis (2.7.0)
excon (0.55.0)
execjs (2.7.0)
fabrication (2.16.1)
faker (1.7.3)
i18n (~> 0.5)
fast_blank (1.0.0)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.38.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-cloudatcost (~> 0.1.0)
fog-core (~> 1.32)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-json
fog-local
fog-openstack
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-rackspace
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-vsphere (>= 0.4.0)
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
fog-aliyun (0.1.0)
fog-core (~> 1.27)
fog-json (~> 1.0)
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (1.3.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.11.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-cloudatcost (0.1.2)
fog-core (~> 1.36)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.43.0)
builder
excon (~> 0.49)
formatador (~> 0.2)
fog-dynect (0.0.3)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.3.1)
fog-core (~> 1.27)
fog-openstack (0.1.20)
fog-core (>= 1.40)
fog-json (>= 1.0)
ipaddress (>= 0.8)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (3.0.0)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-rackspace (0.1.4)
fog-core (>= 1.35)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.8)
fog-radosgw (0.0.5)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.7.5)
fog-core
fog-json
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.1.4)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
fog-core
fog-json
fog-terremark (0.1.0)
fog-core
fog-xml
fog-vmfusion (0.1.0)
fission
fog-core
fog-voxel (0.1.0)
fog-core
fog-xml
fog-vsphere (1.9.1)
fog-core
rbvmomi (~> 1.9)
fog-xenserver (0.3.0)
fog-core
fog-xml
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
formatador (0.2.5)
fuubar (2.2.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
globalid (0.3.7)
activesupport (>= 4.1.0)
goldfinger (1.1.2)
goldfinger (1.2.0)
addressable (~> 2.4)
http (~> 2.0)
nokogiri (~> 1.6)
@ -197,6 +335,8 @@ GEM
parser (>= 2.2.3.0)
rainbow (~> 2.2)
terminal-table (>= 1.5.1)
inflecto (0.0.2)
ipaddress (0.8.3)
jmespath (1.3.1)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
@ -224,6 +364,8 @@ GEM
letter_opener (~> 1.0)
railties (>= 3.2)
link_header (0.0.8)
local_time (1.0.3)
coffee-rails
lograge (0.4.1)
actionpack (>= 4, < 5.1)
activesupport (>= 4, < 5.1)
@ -243,12 +385,15 @@ GEM
mimemagic (0.3.2)
mini_portile2 (2.1.0)
minitest (5.10.1)
multi_json (1.12.1)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.1.0)
nio4r (2.0.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
nokogumbo (1.4.10)
nokogiri
oj (2.18.5)
openssl (2.0.3)
orm_adapter (0.5.0)
@ -332,6 +477,11 @@ GEM
thor (>= 0.18.1, < 2.0)
rainbow (2.2.1)
rake (12.0.0)
rbvmomi (1.11.0)
builder (~> 3.0)
json (>= 1.8)
nokogiri (~> 1.5)
trollop (~> 2.1)
react-rails (1.11.0)
babel-transpiler (>= 0.7.0)
connection_pool
@ -389,6 +539,10 @@ GEM
ruby-oembed (0.12.0)
ruby-progressbar (1.8.1)
safe_yaml (1.0.4)
sanitize (4.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.4.4)
nokogumbo (~> 1.4.1)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
@ -433,6 +587,7 @@ GEM
thread (0.2.2)
thread_safe (0.3.6)
tilt (2.0.7)
trollop (2.1.2)
twitter-text (1.14.5)
unf (~> 0.1.0)
tzinfo (1.2.3)
@ -443,7 +598,7 @@ GEM
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.3)
unf_ext (0.0.7.4)
unicode-display_width (1.1.3)
uniform_notifier (1.10.0)
warden (1.2.7)
@ -456,6 +611,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
whatlanguage (1.0.6)
xml-simple (1.1.5)
xpath (2.0.0)
nokogiri (~> 1.3)
@ -485,6 +641,7 @@ DEPENDENCIES
fabrication
faker
fast_blank
fog
font-awesome-rails
fuubar
goldfinger
@ -500,6 +657,7 @@ DEPENDENCIES
letter_opener
letter_opener_web
link_header
local_time
lograge
microformats2
nokogiri
@ -530,6 +688,7 @@ DEPENDENCIES
rspec-sidekiq
rubocop
ruby-oembed
sanitize
sass-rails (~> 5.0)
sidekiq
sidekiq-unique-jobs

123
README.md
View File

@ -9,7 +9,7 @@ Mastodon
Mastodon is a free, open-source social network server. A decentralized solution to commercial platforms, it avoids the risks of a single company monopolizing your communication. Anyone can run Mastodon and participate in the social network seamlessly.
An alternative implementation of the GNU social project. Based on ActivityStreams, Webfinger, PubsubHubbub and Salmon.
An alternative implementation of the GNU social project. Based on [ActivityStreams](https://en.wikipedia.org/wiki/Activity_Streams_(format)), [Webfinger](https://en.wikipedia.org/wiki/WebFinger), [PubsubHubbub](https://en.wikipedia.org/wiki/PubSubHubbub) and [Salmon](https://en.wikipedia.org/wiki/Salmon_(protocol)).
Click on the screenshot to watch a demo of the UI:
@ -48,126 +48,9 @@ If you would like, you can [support the development of this project on Patreon][
- **Deployable via Docker**
You don't need to mess with dependencies and configuration if you want to try Mastodon, if you have Docker and Docker Compose the deployment is extremely easy
## Checking out
## Deployment
If you want a stable release for production use, you should use tagged releases. To checkout the latest available tagged version:
git clone https://github.com/tootsuite/mastodon.git
cd mastodon
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
## Configuration
- `LOCAL_DOMAIN` should be the domain/hostname of your instance. This is **absolutely required** as it is used for generating unique IDs for everything federation-related
- `LOCAL_HTTPS` set it to `true` if HTTPS works on your website. This is used to generate canonical URLs, which is also important when generating and parsing federation-related IDs
Consult the example configuration file, `.env.production.sample` for the full list. Among other things you need to set details for the SMTP server you are going to use.
## Requirements
- Ruby
- Node.js
- PostgreSQL
- Redis
- Nginx
## Running with Docker and Docker-Compose
[![](https://images.microbadger.com/badges/version/gargron/mastodon.svg)](https://microbadger.com/images/gargron/mastodon "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/gargron/mastodon.svg)](https://microbadger.com/images/gargron/mastodon "Get your own image badge on microbadger.com")
The project now includes a `Dockerfile` and a `docker-compose.yml` file (which requires at least docker-compose version `1.10.0`).
Review the settings in `docker-compose.yml`. Note that it is not default to store the postgresql database and redis databases in a persistent storage location,
so you may need or want to adjust the settings there.
Then, you need to fill in the `.env.production` file:
cp .env.production.sample .env.production
nano .env.production
Do NOT change the `REDIS_*` or `DB_*` settings when running with the default docker configurations.
You will need to fill in, at least: `LOCAL_DOMAIN`, `LOCAL_HTTPS`, `PAPERCLIP_SECRET`, `SECRET_KEY_BASE`, `OTP_SECRET`, and the `SMTP_*` settings. To generate the `PAPERCLIP_SECRET`, `SECRET_KEY_BASE`, and `OTP_SECRET`, you may use:
Before running the first time, you need to build the images:
docker-compose build
docker-compose run --rm web rake secret
Do this once for each of those keys, and copy the result into the `.env.production` file in the appropriate field.
Then you should run the `db:migrate` command to create the database, or migrate it from an older release:
docker-compose run --rm web rails db:migrate
Then, you will also need to precompile the assets:
docker-compose run --rm web rails assets:precompile
before you can launch the docker image with:
docker-compose up
If you wish to run this as a daemon process instead of monitoring it on console, use instead:
docker-compose up -d
Then you may login to your new Mastodon instance by browsing to http://localhost:3000/
Following that, make sure that you read the [production guide](docs/Running-Mastodon/Production-guide.md). You are probably going to want to understand how
to configure Nginx to make your Mastodon instance available to the rest of the world.
The container has two volumes, for the assets and for user uploads, and optionally two more, for the postgresql and redis databases.
The default docker-compose.yml maps them to the repository's `public/assets` and `public/system` directories, you may wish to put them somewhere else. Likewise, the PostgreSQL and Redis images have data containers that you may wish to map somewhere where you know how to find them and back them up.
**Note**: The `--rm` option for docker-compose will remove the container that is created to run a one-off command after it completes. As data is stored in volumes it is not affected by that container clean-up.
### Tasks
- `rake mastodon:media:clear` removes uploads that have not been attached to any status after a while, you would want to run this from a periodic cronjob
- `rake mastodon:push:clear` unsubscribes from PuSH notifications for remote users that have no local followers. You may not want to actually do that, to keep a fuller footprint of the fediverse or in case your users will soon re-follow
- `rake mastodon:push:refresh` re-subscribes PuSH for expiring remote users, this should be run periodically from a cronjob and quite often as the expiration time depends on the particular hub of the remote user
- `rake mastodon:feeds:clear_all` removes all timelines, which forces them to be re-built on the fly next time a user tries to fetch their home/mentions timeline. Only for troubleshooting
- `rake mastodon:feeds:clear` removes timelines of users who haven't signed in lately, which allows to save RAM and improve message distribution. This is required to be run periodically so that when they login again the regeneration process will trigger
Running any of these tasks via docker-compose would look like this:
docker-compose run --rm web rake mastodon:media:clear
### Updating
This approach makes updating to the latest version a real breeze.
1. `git pull` to download updates from the repository
2. `docker-compose build` to compile the Docker image out of the changed source files
3. (optional) `docker-compose run --rm web rails db:migrate` to perform database migrations. Does nothing if your database is up to date
4. (optional) `docker-compose run --rm web rails assets:precompile` to compile new JS and CSS assets
5. `docker-compose up -d` to re-create (restart) containers and pick up the changes
## Deployment without Docker
Docker is great for quickly trying out software, but it has its drawbacks too. If you prefer to run Mastodon without using Docker, refer to the [production guide](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Production-guide.md) for examples, configuration and instructions.
## Deployment on Scalingo
[![Deploy on Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy?source=https://github.com/tootsuite/mastodon#master)
[You can view a guide for deployment on Scalingo here.](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Scalingo-guide.md)
## Deployment on Heroku (experimental)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
Mastodon can run on [Heroku](https://heroku.com), but it gets expensive and impractical due to how Heroku prices resource usage. [You can view a guide for deployment on Heroku here](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Heroku-guide.md), but you have been warned.
## Development with Vagrant
A quick way to get a development environment up and running is with Vagrant. You will need recent versions of [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) installed.
[You can find the guide for setting up a Vagrant development environment here.](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Vagrant-guide.md)
There are guides in the documentation repository for [deploying on various platforms](https://github.com/tootsuite/documentation#running-mastodon).
## Contributing

27
Vagrantfile vendored
View File

@ -35,22 +35,12 @@ sudo apt-get install \
libreadline-dev \
-y
# Install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Install rvm
cd /vagrant
echo "Compiling Ruby $(cat .ruby-version): warning, this takes a while!!!"
rbenv install $(cat .ruby-version)
rbenv global $(cat .ruby-version)
read RUBY_VERSION < .ruby-version
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VERSION
source /home/vagrant/.rvm/scripts/rvm
# Configure database
sudo -u postgres createuser -U postgres vagrant -s
@ -62,6 +52,7 @@ bundle install
yarn install
# Build Mastodon
export $(cat ".env.vagrant" | xargs)
bundle exec rails db:setup
bundle exec rails assets:precompile
@ -107,7 +98,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.hostsupdater.remove_on_suspend = false
end
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
if config.vm.networks.any? { |type, options| type == :private_network }
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
else
config.vm.synced_folder ".", "/vagrant"
end
# Otherwise, you can access the site at http://localhost:3000
config.vm.network :forwarded_port, guest: 80, host: 3000

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

View File

View File

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View File

View File

View File

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

0
app/assets/fonts/roboto/roboto-bold-webfont.eot Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-bold-webfont.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

0
app/assets/fonts/roboto/roboto-bold-webfont.ttf Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-bold-webfont.woff Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-bold-webfont.woff2 Executable file → Normal file
View File

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

0
app/assets/fonts/roboto/roboto-italic-webfont.eot Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-italic-webfont.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

0
app/assets/fonts/roboto/roboto-italic-webfont.ttf Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-italic-webfont.woff Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-italic-webfont.woff2 Executable file → Normal file
View File

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

0
app/assets/fonts/roboto/roboto-medium-webfont.eot Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-medium-webfont.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

0
app/assets/fonts/roboto/roboto-medium-webfont.ttf Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-medium-webfont.woff Executable file → Normal file
View File

0
app/assets/fonts/roboto/roboto-medium-webfont.woff2 Executable file → Normal file
View File

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