Commit Graph

1367 Commits

Author SHA1 Message Date
Matt Jankowski b352a8e5d4 Default to json type for webfinger requests (#1583) 2017-04-12 16:03:37 +02:00
Matt Jankowski fd102059aa Clean up stylesheet organization (#1591) 2017-04-12 16:01:59 +02:00
Matt Jankowski 323671a653 Silence more scope order warnings (#1604) 2017-04-12 15:58:08 +02:00
Koala Yeung 24eb45425e Add Traditional Chinese, Hong Kong translation (zh-HK) (#1544)
* Added Chinese Traditional Hong Kong (zh-HK) for Ruby

* Added translations for Ruby.

* Added Chinese Traditional Hong Kong (zh-HK) for JS

* Added translations for javascript code.

* Rearrange language references in mastodon.jsx

* Break `addLocaleData` into multiple lines. Make future commit more readable.
* Roughly re-sort the languages in alphabetical orders
  (only manually put English on top because it is default).

* Sort application.rb locale with alphabetical order

With exception that English (default language) goes first.
Improve code readability.

* Resort language selection box alphabetically

Sort HUMAN_LOCALES in the alphabetical order of display name
(except English, the default language, come first).

Improve usability.
2017-04-12 08:50:50 +02:00
Eugen 8ead070b94 Improve emoji picker look (#1493)
* Improve emoji picker look

* Add hover animation to emojis in picker
2017-04-11 23:23:34 +02:00
Eugen b22b2cbfac Fix #1491 - Fix broken notifications, broken Link header parsing for exclude_types (#1548) 2017-04-11 22:53:58 +02:00
Matt Jankowski 3ddd936b03 Refactor exports controller (#1567)
* Add basic coverage for settings/exports controller

* Remove unused @account variable from settings/exports controller

* Add coverage for download export actions

* Remove deprecated `render :text` in favor of `send_data` for csv downloads

* Add model to handle exports

* Use Export class in settings/exports controller

* Simplify settings/exports controller methods

* Move settings/export to more restful routes
2017-04-11 22:00:43 +02:00
Henry Smith 1921c5416b Fix console error when scrolling a column with no scrollable content (#1574) 2017-04-11 21:58:28 +02:00
lindwurm fc47c1d00e [about] Moving docs link to tootsuite/documentation (#1573)
related: 1236529e39

Signed-off-by: lindwurm <lindwurm.q@gmail.com>
2017-04-11 21:57:05 +02:00
Thomas Citharel 327a6e166f Update french locale (#1525)
* Update devise.fr.yml fixing minor typos

* add missing strings

* Fix a translation and add translation for devise part

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-04-11 21:54:40 +02:00
pinfort 6f5268b02d Add Japanese translation (#1552)
* add device.ja.yml

* update device.ja.yml

* add file simple_form.ja.yml

* 👍Added doorkeeper.ja.yml

* add ja.yml

* Update doorkeeper.ja.yml

fixed url to uri

* update ja.yml

* fix some translations

* fix japanese grammar of a translate

* fix some translates

* fix ja.yml

* add ja.jsx

* add Japanese user mail views

* Added japanese translate locales

* Added :ja to available_locales

こっちも

* Added "日本語" to HUMAN_LOCALES

* Imported/Added ja to addLocaleData

* update ja.jsx
2017-04-11 21:52:09 +02:00
Matt Jankowski 89e8e110c8 Imports controller errors (#1553)
* Add spec for settings/imports controller

* Add failing spec for settings/imports#create

* Fix broken imports

* Refactor ImportWorker
2017-04-11 21:40:14 +02:00
Eugen Rochko 9f7ea77d0c Merge branch 'master' of github.com:tootsuite/mastodon 2017-04-11 21:30:48 +02:00
Eugen Rochko 960181fd99 Fix look of the modals 2017-04-11 21:24:17 +02:00
Eugen Rochko 2a7602cad4 Merge branch 'master' of https://github.com/blackle/mastodon into blackle-master 2017-04-11 20:43:56 +02:00
Komic 47aacb773b Better background-photo.jpeg (#1560)
Fixed the nasty banding & recompressed it at about the same level
2017-04-11 19:51:13 +02:00
Matt Jankowski 82d9336114 Increase breakpoint size for bio on account show (#1559) 2017-04-11 19:35:06 +02:00
Matt Jankowski e60286a344 Remove unused methods from StreamEntriesHelper (#1365)
Removes:

- avatar_for_status_url
- relative_time
- reblogged_by_me_class
- favourited_by_me_class
2017-04-11 19:32:02 +02:00
Matt Jankowski 53850bce93 Remove unused AtomBuilderHelper (#1364)
This was used in the views/atom/user_stream.xml.ruby file, which no longer is
used.
2017-04-11 19:31:22 +02:00
blackle 06444bf050 Allow user to disable the boost confirm dialog in preferences 2017-04-11 10:10:16 -04:00
blackle f53fb6aa66 Bypass boost confirm modal if alt is pressed 2017-04-11 08:34:14 -04:00
Corey Dutson c9b9225951 Adjust css for user detail page (#1463)
- details a background for contrast
- add 5px padding to the top of the `details-counters` children to line them up with the bio to the right (Which has a 5px padding on the top)
2017-04-11 14:20:18 +02:00
blackle 01e5447e35 Add boost confirm modal 2017-04-10 22:35:55 -04:00
Matt Jankowski 4ada50985a Pagination improvements (#1445)
* Replace will_paginate with kaminari

* Use #page instead of #paginate in controllers

* Replace will_paginate.page_gap with pagination.truncate in i18n

* Customize kaminari views to match prior styles

* Set kaminari options to match prior behavior

* Replace will_paginate with paginate in views
2017-04-11 01:11:41 +02:00
Eugen 12f72e1740 When avatar/header are GIF, generate static versions (#1428)
* When avatar/header are GIF, generate static versions.
Account API returns "avatar"/"avatar_static", "header"/"header_static"
Static version is the same as original for other cases
Web UI de-animates avatars in toots, lists of users

Fix #441, fix #596, prerequisite for #1064

* Fix JS test

* Add rake task to generate static avatars/headers from GIF ones, add test
2017-04-11 00:38:58 +02:00
Matt Jankowski b57eed4584 Remove order prior to .find_in_batches (#1470)
The `Status` class has a default order on it, so when this query gets built and
gets all the way to `find_in_batches` there is an order already there.

When `find_in_batches` is run it discards any existing order on the query, and
emits a warning to the logs if there is one there.

This change removes the order prior calling `find_in_batches`, which will stop
the logged warning from occurring as well.
2017-04-11 00:38:34 +02:00
Matthias Jouan 3fd5385e7b Add username as a title for mentions (#1385)
Add a title attribute on mention links for both notifications
and mentions in statuses.

Related to #1350
2017-04-11 00:35:35 +02:00
Eugen 2810013b93 API param to exclude notification types from response (#1341)
* Add exclude_types param to /api/v1/notifications

* Exclude notification types in web UI through exclude_types in the API
2017-04-10 23:45:29 +02:00
Matt Jankowski 0687ab8ae3 Clean up generation of account webfinger string (#1477)
* Consolidate webfinger string creation under Account#to_webfinger_s

* Introduce Account#local_username_and_domain for consolidation
2017-04-10 22:58:06 +02:00
Chris Martin ae57b3a8c5 Add more specific class names to notification divs (#1120) 2017-04-10 22:41:52 +02:00
Rachel H f690320fb9 Keep newlines in xml (#1397) 2017-04-10 21:32:45 +02:00
Stephen Burgess 553170b77a Fix #1097 When onClick is falsy, do not make status content clickable (#1434) 2017-04-10 21:31:26 +02:00
Jessica Stokes 8a6096a3de Allow typing a toot while an image uploads (#1429)
This patch stops disabling the toot text field when an image is uploading. Instead, you can type to your heart's content and when the image uploads it'll append the image URL, and restore the position of your cursor to wherever it was in the toot text just prior. Effectively, the image URL is appended to the toot, and typing is not interrupted at all! 
2017-04-10 21:30:58 +02:00
Matt Jankowski d2f6d9b9fb Fix issue with missing emojify class in views (#1455)
* Add missing emojify class to landing strip

* Add missing emojify class to simple_status partial
2017-04-10 21:27:52 +02:00
Matt Jankowski dbe9f33fdc Admin base controller (#1465)
* Add Admin::BaseController to wrap admin area

Extracts the setting of the `admin` layout and verifying that users are admins
to a common base class for the admin/ controllers.

* Add basic coverage for admin/reports and admin/settings controllers
2017-04-10 21:27:03 +02:00
Corey Dutson 087ca3009b Adjust background of emoji panel (#1461)
Addresses #1451 which notes the emoji picker is too light. I agree, so I submit this adjustment.

Changes:
Changed the background to a darkened version of another system color
2017-04-10 20:56:14 +02:00
Jessica Stokes db7c7d1af1 Improve scrolling behaviour (#1415)
* Replace column margin with padding

This improves horizontal scrolling behaviour significantly; scrolled flex elements are... a little weird.

* Move clear column button styling to css
2017-04-10 16:27:30 +02:00
Ram Lmn 42fb4faa0f Fix icon and emoji sizes (#1403)
Fixes icons and emoji size issues described in #1233.
2017-04-10 13:02:09 +02:00
Ratmir Karabut 9043b32183 Add Russian translation (ru) (#1023)
* Add Russian translation (ru)

* Fix a missing comma

* Fix the wording for better consistency
2017-04-10 12:52:06 +02:00
Jantso Porali e30bbb1cb0 Fix for Import issue from URL (#1416) 2017-04-10 12:49:34 +02:00
Gavin Mogan 8bdf02812c Add search to emoji picker (#1395) 2017-04-10 09:58:09 +02:00
Eugen 93db265be7 Do not store last visited URL from API controllers (#1330)
Sign-in redirects you back to last visited URL, but in case of API requests,
this sometimes redirected users to an API URL that, of course, greeted them
with an {"error":"The access token is invalid"}
2017-04-09 22:21:52 +02:00
Eugen c172919745 Fix #1339 - better Atom titles (#1343) 2017-04-09 20:55:54 +02:00
Eugen 15d442cf9d Fix /api/v1/accounts/update_credentials tests (#1357) 2017-04-09 20:23:14 +02:00
Hugo Gameiro 4ea4ef9d0f update portuguese translation (#1280)
added the missing fields and improved the translation
2017-04-09 18:49:26 +02:00
ThibG d19ed18388 Get handle from atom feed's author/email field instead of guessing from URL (#1344)
The goal of this change is to enhance Mastodon's handling of remote domains
for which the APIs reside on a different host (see issue #1032).

Indeed, when a remote user unknown to Mastodon is mentionned, only its profile
URL (e.g. https://social.example.org/users/User) is known, and Mastodon has to
build a @username@domain handle for it. To do so, Mastodon fetches the user's
atom feed (e.g., https://social.example.org/users/User.atom) and uses its
content to get the username part of the handle, and the URL's host part to
build the domain (e.g., @User@social.example.org). This handle is then used
for a Webfinger request.

In the case where example.org serves the Webfinger info for @User@example.org
and all feeds and APIs are hosted at social.example.org, Mastodon will still
build @User@social.example.org and fail at resolving the account's details
through Webfinger.

This patch changes this behaviour by using the author's email address from
the atom feed to build the handle. In Mastodon-generated atom feeds, the
email address is always the handle it expects for federation.
2017-04-09 18:43:48 +02:00
David Authier f0bd439486 Use HTTP Accept-Language to detect locale (#1166)
* Use HTTP Accept-Language to detect locale

* Fix gem order to comply with codeclimate

* Sort gem to comply with rubocop

* I18n.default_locale fallback when there is no accept-language header
2017-04-09 18:40:24 +02:00
David Celis d4fe6cd2bf Allow users to update their Account in the API (#1179)
* Allow users to update their Account in the API

It would be nice for API clients to be able to allow users to update
their accounts without having to wrap Mastodon in a web view. This patch
adds an API endpoint to let users submit a PATCH for their account.

Signed-off-by: David Celis <me@davidcel.is>

* Add /api/v1/accounts/update_credentials to the API docs

Signed-off-by: David Celis <me@davidcel.is>
2017-04-09 18:33:40 +02:00
Matt Jankowski ea6c930c04 Helper cleanup (#1348)
* Remove unused helper files

* Add coverage for application helper

* Add coverage for StreamEntriesHelper #display_name
2017-04-09 17:11:37 +02:00
StefOfficiel 12e29c9660 Update fr.jsx (#1329)
* Update fr.jsx

* Remove duplicate translation
2017-04-09 14:58:08 +02:00
Olivier Humbert 082bef3027 French translation update (#1271)
* Update confirmation_instructions.fr.html.erb

consistency across the French translation

* Update 

consistency across the French translation

* Update fr.yml

a bunch of consistency across the French translation + a few typos

* Update doorkeeper.fr.yml

consistency across the French translation (punctuation)
2017-04-09 14:55:58 +02:00
Jonathan Klee ba2aea3a80 add empty notifications french translation (#1111) 2017-04-09 14:54:02 +02:00
Matt Jankowski e5282e4ec0 Clean up about page (#1282)
* Add InstancePresenter to expose site details

* Clean up about controller, use instance presenter
2017-04-09 14:47:25 +02:00
Brian Mock 53eb31f124 Fixes #1311 margin shouldn't stay fixed (#1312) 2017-04-09 14:45:26 +02:00
Matt Jankowski 388ec0d5b6 Search cleanup (#1333)
* Clean up SQL output in Tag and Account search methods

* Add basic coverage for Tag.search_for

* Add coverage for Account.search_for

* Add coverage for Account.advanced_search_for
2017-04-09 14:45:01 +02:00
Rachel H b1881a3d48 Fix nonworking clear notices button (#1316) 2017-04-09 11:35:23 +02:00
Eugen b89f007862 Make public timelines API not require user context/app credentials (#1291)
* Make /api/v1/timelines/public and /api/v1/timelines/tag/:id public
Fix #1156 - respect query params when generating pagination links in API

* Apply pagination fix to more APIs
2017-04-08 23:39:31 +02:00
Eugen 9acdb166e8 Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled (#1278)
* Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled
TOTP secret is not shown again after 2FA is enabled

* Clean up
2017-04-08 22:20:08 +02:00
Pavel Djundik 470eb0042e Improve responsiveness of registration form and closed banner (#1265) 2017-04-08 18:31:50 +02:00
Pavel Djundik fc146a19cc Improve about page responsiveness (#1252) 2017-04-08 15:28:23 +02:00
Eugen 982fef811e Fix #1141, fix #1126 - Avatar/profile info fetching (#1215)
* Fix #1141, fix #1126 - Work through UpdateRemoteProfileService for both <feed> and <entry> top-level tags

* Improve code quality, remove line unrelated to fix
2017-04-08 13:26:03 +02:00
Thomas Citharel 41f8fde83e Update french translation (#1148)
Add french translation for emails sent

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Add non-breaking spaces

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

changes and fixes to the nbsps

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

French update

a few fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-04-08 13:11:16 +02:00
Markus Amalthea Magnuson 157f0a2aa7 Add titles to more icons, and change clear notifications icon. (#1101) 2017-04-08 13:07:55 +02:00
Nicolai von Neudeck c803f5b440 Updated German translation (#1248)
Fixed various spelling and grammar mistakes.
Used more gender-neutral language.
2017-04-08 13:04:58 +02:00
Alda Marteau-Hardi 35eff3f2d0 Add some missing strings to prevent some React warning in the console (#1230) 2017-04-08 12:16:16 +02:00
Matt Jankowski ca44c13455 Use Setting.site_title value for `og:site_name` occurrences (#1194)
* Add helper method to return Setting.site_title

* Use site_title helper in application layout

* Use site_title value for og:site_name
2017-04-08 12:15:40 +02:00
Eugen 7d5ea5c170 Merge pull request #1224 from chrisheninger/patch-1
Add SVG version of logo to repo
2017-04-08 11:37:37 +02:00
Eugen 33849acfa7 Merge pull request #1218 from R0ckweb/patch-2
Fix #1141 on remote follow
2017-04-08 11:37:13 +02:00
Eugen c141f0a886 Merge pull request #1216 from tootsuite/fix-default-locale-regression
Fix #1165 - Default locale no longer breaks form submissions
2017-04-08 11:36:43 +02:00
Eugen 55d03da303 Merge pull request #1213 from tootsuite/fix-accounts-initial-case
Fix #801 - Respect webfinger's canonical response of username/domain
2017-04-08 11:36:35 +02:00
Kurtis Rainbolt-Greene 40703b96fa Merge branch 'master' into fix-default-locale-regression 2017-04-07 20:50:21 -07:00
Kurtis Rainbolt-Greene 1e4453405b Merge branch 'master' into patch-2 2017-04-07 20:48:27 -07:00
Chris Heninger 0ad694f96b Add SVG version of logo to repo 2017-04-07 20:40:18 -07:00
Shel R fef478781d Merge branch 'master' into master 2017-04-07 22:21:21 -04:00
Shel R 9f43e3b428 Merge branch 'master' into patch-4 2017-04-07 22:02:26 -04:00
Yann GUERN 485d75a805 #1141 on remote follow
The async action is send before persist, account.id not yet generated

Pull queue receive 'nil' so no profile update.
2017-04-08 03:24:35 +02:00
Eugen Rochko 4b621188ad Fix #1165 - before_action was called before protect_from_forgery 2017-04-08 02:30:50 +02:00
Eugen Rochko b2a7218ab7 Fix #801 - Respect webfinger's canonical response of username/domain 2017-04-08 01:07:42 +02:00
Eugen 1961825ff9 Merge pull request #1183 from thoughtbot/cp-post-status-service-specs
Add specs for PostStatusService
2017-04-07 22:30:28 +02:00
Chad Pytel ad5ddd5e95 Use I18n for media attachment validation errors
These are currently user facing errors, but are not localized. This adds the
ability for these messages to be localized.
2017-04-07 14:23:18 -04:00
Joël Quenneville d4c94fa004 DRY up reblog vs original status check
Checking reblog vs original status was happening in multiple places
across the app. For views, this logic was encapsulated in a helper
method named `proper_status` but in the other layers of the app, the
logic was duplicated.

Because the logic is used at all layers of the app, we extracted it into
a `Status#proper` method on the model and changed all uses of the logic
to use this method. There is now a single source of truth for this
condition.

We added test coverage to untested methods that got refactored.
2017-04-07 14:18:30 -04:00
Eugen 4e41cd9ab8 Merge pull request #1146 from tootsuite/fix-object-type-nil-exception
Fix nil#object_type error
2017-04-07 13:08:51 +02:00
Eugen c9b23a93c7 Merge branch 'master' into fix-object-type-nil-exception 2017-04-07 13:07:36 +02:00
Eugen 0adee18d73 Merge branch 'master' into feature-customized-default-locale 2017-04-07 13:07:03 +02:00
Eugen Rochko 8a6d8de60a Fix nil#object_type error 2017-04-07 13:05:34 +02:00
Jantso Porali 786e6f94b9 Update Finnish translations, add sample Minio config (#954) 2017-04-07 12:58:12 +02:00
Eugen Rochko e3a3422a65 Allow setting of default language through config
Setting of locale in controller extracted to Localized concern,
the doorkeeper authorized applications controller moved under
custom namespace with inclusion of Localized, which resolves the
"it sometimes appears in a different random language" bug
2017-04-07 12:40:26 +02:00
Eugen Rochko 624a9a7136 Re-add forgotten <author> element on standalone <entry> 2017-04-07 12:21:00 +02:00
Eugen 1c351709bc Force UTF8 encoding on generated XML (#1140) 2017-04-07 11:09:14 +02:00
Eugen 6d6a429af8 Rewrite Atom generation from stream entries to use Ox instead of Nokogiri (#1124)
* Rewrite Atom generation from stream entries to use Ox instead of Nokogiri::Builder

StreamEntry is now limited to only statuses, which allows some optimization. Removed
extra queries on AccountsController#show. AtomSerializer instead of AtomBuilderHelper
used in AccountsController#show, StreamEntriesController#show, StreamEntryRenderer
and PubSubHubbub::DistributionWorker

PubSubHubbub::DistributionWorker moves n+1 DomainBlock query to PubSubHubbub::DeliveryWorker
instead.

All Salmon slaps that aren't based on StreamEntry still use AtomBuilderHelper and Nokogiri

* All Salmon slaps now use Ox instead of Nokogiri. No touch from status on account
2017-04-07 05:56:56 +02:00
Matt Jankowski 97ae53daa8 Reduce size of background-photo.jpeg
Reduced by running through `guetzli` image optimizer.
2017-04-06 16:24:57 -04:00
Eugen Rochko 51d7caaf19 Fix wrong pubsub channel on public timelines 2017-04-06 04:03:23 +02:00
Eugen a9c0062e80 Merge pull request #1013 from blackle/master
Catch more errors in process_follows so it doesn't fail
2017-04-06 02:35:34 +02:00
Eugen Rochko dbd529109e Fix notifications delivered to wrong pubsub channel, optimized RemoveStatusService,
slightly optimized FanOutOnWriteService again
2017-04-06 02:26:59 +02:00
blackle 540d6efe88 Catch more errors in process_follows so it doesn't fail 2017-04-05 20:04:13 -04:00
Eugen Rochko 5442083b3c Split SalmonWorker into smaller parts, move profile updating into another job 2017-04-05 21:43:10 +02:00
André Lewin bf7cefa516 Merge branch 'master' into master 2017-04-05 20:28:58 +02:00
Eugen Rochko 5b95be1c42 Replace calls to FeedManager#inline_render and #broadcast 2017-04-05 19:45:18 +02:00
Eugen c9ebd5d19f Fix wrong variable used in publish channel 2017-04-05 18:58:32 +02:00
Eugen 1b8c244dff Add proper message to PushUpdateWorker, use redis directly 2017-04-05 18:48:41 +02:00