Commit Graph

3648 Commits (0d900416f71ab9c1a2e6636afd8ce024bfa966bb)

Author SHA1 Message Date
kibigo! f9387aabaa Glitch doesn't have a home stylesheet anymore 2017-12-07 14:32:52 -08:00
kibigo! 31674d5083 Packaged local_settings styles in common 2017-12-07 13:36:18 -08:00
Lynx Kotoura 7cd63f0aae ReFix font-weight of <strong> element for CJK fonts (#5920)
Also apply to Japanese and Korean.
Fix font-weight in landing pages.
2017-12-07 21:35:19 +01:00
SerCom_KC a77bf28ec1 Fix font-weight of <strong> element for CJK fonts (#5914)
* Fix font-weight for CJK fonts

* Use `font-weight: 700;` for mobile support

* Fix indentation

* Remove trailing whitespace

* Remove trailing whitespace
2017-12-07 16:01:52 +01:00
Yamagishi Kazutoshi 87f1b249c1 Hide moved account's follow button in search result (#5913) 2017-12-07 15:59:31 +01:00
Quenty31 57e0d88c19 OC language update (#5905)
* Update

* update

* Update oc.yml

* bundle exec i18n-tasks normalize

* Update oc.yml
2017-12-07 15:28:13 +09:00
David Yip 82cd4a0a3c Fix hide reblogs in glitch frontend (#5909)
This applies 6bb4fb008a to the glitch copy
of the Mastodon frontend.
2017-12-06 22:35:45 -06:00
David Yip 9075094715 Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-master 2017-12-06 22:34:42 -06:00
David Yip 04b03999c2 Merge pull request #241 from glitch-soc/no-dm-option
Add option to remove DMs from home (#126)
2017-12-06 22:20:55 -06:00
Jenkins 099159741b Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-12-07 04:17:14 +00:00
Yamagishi Kazutoshi a7f20ed185 Remove duplicate annotate (#5910)
* Remove duplicate annotate

* Remove blank line
2017-12-07 04:53:42 +01:00
Akihiko Odaki ce3989fc6a Add embed_url to preview cards (#5775) 2017-12-07 03:37:43 +01:00
Yamagishi Kazutoshi 6bb4fb008a Fix hide reblogs (regression from #5887) (#5909) 2017-12-07 03:37:31 +01:00
kibigo! 8dc8ea2c0a Add option to remove DMs from home (#126) 2017-12-06 17:50:27 -08:00
David Yip 08290b0b02 Apply Javascript changes in tootsuite/mastodon#5887 to glitch flavour (#239) 2017-12-06 18:23:28 -06:00
kibigo! 41f9a4d4e4 Fix common packs when other pack also there 2017-12-06 15:34:19 -08:00
David Yip 6a5ba9d129 Use settings pack for InvitesController (#229) 2017-12-06 17:20:04 -06:00
beatrix f0b37f92a9 Merge pull request #229 from glitch-soc/glitch-theme
Advanced Next-Level Flavours And Skins For Mastodon™
2017-12-06 17:44:07 -05:00
David Yip 63c41247ff Prepend check_enabled_deletion to Settings::DeletesController (#229)
The specs for Settings::DeletesController include an example that
sets Settings.open_deletion to false and expects the "if deletion is not
available, redirect to root" logic to run.  However, this spec does not
set up a user, which means that the spec (intentionally or otherwise)
expects this redirection to work with unauthenticated access.

We should preserve that behavior.  To do so, we prepend the deletion
check to the action chain set up by Settings::BaseController, so that
said check occurs before the authenticate_user! check.
2017-12-06 16:19:43 -06:00
Jenkins a3a7b6a848 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-12-06 20:17:13 +00:00
Marcin Mikołajczak e3422e363b i18n: 🇵🇱 (#5903)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-12-07 05:04:35 +09:00
Lynx Kotoura d3d52615ab Fix list editor modal on narrow devices (#5904) 2017-12-06 19:48:48 +01:00
Lynx Kotoura 1696fe1c84 Fix extra space between status text and username (#5902) 2017-12-06 17:53:25 +01:00
aschmitz cbaddc6447 Break out nested relationship API keys (#5887)
* Break out nested relationship API keys

This closes #5856 by restoring the existing behavior of the `muting`
and `following` keys (returning booleans rather than truthy or false).
It adds `showing_reblogs` and `muting_notifications` keys:

* `showing_reblogs` returns true if:
  1. You've requested to follow the user, with reblogs shown, or
  2. You are following the user, with reblogs shown.
* `muting_notifications` returns true if you have muted the user and
  their notifications as well.

* Rubocop fix

* Fix pulling reblog/mute status from relationships

I could swear this had passed tests before, but apparently not.
Works now.

* More test fixes

Really, you'd expect this to be more straightforward.
2017-12-06 16:10:54 +01:00
Yamagishi Kazutoshi eeb17ff02d Fix emoji picker scrollbar (regression from #5046) (#5901) 2017-12-06 12:18:27 +01:00
Yamagishi Kazutoshi f6b7869a2c Handle submit event of new list form (#5895) 2017-12-06 12:18:10 +01:00
Yamagishi Kazutoshi 9c1cbddf70 Search only from followees (#5897) 2017-12-06 11:44:23 +01:00
Yamagishi Kazutoshi fba46b6072 Using double splat operator (#5859) 2017-12-06 11:41:57 +01:00
Eugen Rochko b037fbf9f4 Remove rabl dependency (#5894)
* Remove rabl dependency

* Replicate old Oj configuration
2017-12-06 15:04:49 +09:00
mayaeh e1cabf86d5 Update Japanese translations. (#5893) 2017-12-06 03:22:11 +01:00
Eugen Rochko ff4c28a305 Lists redis clean-up (#5886)
* When list is deleted, remove feed from redis

* Clean up list feeds of inactive users
2017-12-05 23:20:27 +01:00
Eugen Rochko 1e7f022fa2 Add list of lists component to web UI (#5811)
* Add list of lists component to web UI

* Add list adding

* Add list removing

* List editor modal

* Add API account search limited by following=true relation

* Rework list editor modal

* Remove mandatory pagination of GET /api/v1/lists/:id/accounts

* Adjust search input placeholder

* Fix rspec (#5890)

* i18n: (zh-CN) Add missing translations for #5811 (#5891)

* i18n: (zh-CN) yarn manage:translations -- zh-CN

* i18n: (zh-CN) Add missing translations for #5811

* Fix some issues

- Display loading/missing state for list timelines
- Order lists alphabetically in overview
- Fix async list editor reset
- Redirect to /lists after deleting unpinned list
- Redirect to / after pinning a list

* Remove dead list columns when a list is deleted or fetch returns 404
2017-12-05 23:02:27 +01:00
SerCom_KC 125ad3e931 Update Chinese (Simplified) translations for version 2.1.0rc1 (#5849)
* i18n: (zh-CN) Add missing translations for multiple PRs.
Related PRs: #5838 #5762 #5835 #5837 #5832 #5823 #5814 #5757

* i18n: (zh-CN) Fix translation for #5823 / #5835

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Change `发送者` to `作者`

* i18n: (zh-CN) Add missing translations for #5862

* i18n: (zh-CN) Add missing translation for #5874

* i18n: (zh-CN) Improve translations for keyboard shortcuts
2017-12-06 00:46:04 +09:00
Neetshin 52f1c89aef Add aria-autocomplete='list' in Textaria (#5889)
ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete
2017-12-05 11:32:00 +01:00
kibigo! fd7be49523 Various fixes 2017-12-04 21:58:10 -08:00
David Yip 0002d12c24 current_theme -> current_flavour (#229) 2017-12-04 11:35:35 -06:00
David Yip 1221e3075d Merge branch 'gs-master' into glitch-theme 2017-12-04 11:07:01 -06:00
Jenkins da7ccfeca2 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-12-04 12:17:13 +00:00
Neetshin 2a3097b4cf Update mutes.js (#5882) 2017-12-04 20:52:14 +09:00
kibigo! 935946020f Fixed a name + localizations 2017-12-04 00:19:39 -08:00
kibigo! 3760da1321 Fixed image require 2017-12-03 23:52:13 -08:00
kibigo! 882055afd0 Rename themes -> flavours ? ? 2017-12-03 23:26:40 -08:00
kibigo! cc70ca9b76 Fixed typos 2017-12-03 22:30:45 -08:00
Jenkins 92b6ca9028 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-12-03 21:17:13 +00:00
Lynx Kotoura 16ff931a56 Add keyboard shortcuts link to getting-started navigation (#5874)
* Add keyboard shortcuts link to getting-started navigation

* i18n: 🇵🇱

* yarn manage:translations
2017-12-03 21:29:51 +01:00
Lynx Kotoura 2d6f2dac11 Add back button to keyboard shortcuts legend column (#5872) 2017-12-03 21:29:41 +01:00
Jenkins 822dea26c3 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-12-02 14:17:11 +00:00
cormo 0bd728a690 Remove redundant import statement in SCSS (#5864)
* Remove redudant import statement in SCSS

* Fix wrong chmod
2017-12-02 08:42:20 +09:00
Yamagishi Kazutoshi 1447ef1d44 Add invite filter (#5862) 2017-12-01 16:40:02 +01:00
Yamagishi Kazutoshi 7f0a01a20c Fix invites form path (#5861) 2017-12-01 12:26:57 +01:00
Yamagishi Kazutoshi 53145abfbf Allow admin to deactivate invite created by users (#5860) 2017-12-01 12:26:19 +01:00
kibigo! 36b9f4df56 Skins support 2017-11-30 19:29:47 -08:00
mayaeh 9cb7c90412 Update Japanese translations for KeyboardShortcuts. (#5858) 2017-12-01 01:35:47 +01:00
Jenkins a7a59f927d Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-30 03:17:12 +00:00
Eugen Rochko cfe67ba832 Add semi-support for Video/Image objects in ActivityPub (#5848)
* Add semi-support for Video/Image objects in ActivityPub

Video and Image objects will create corresponding status records
with manually crafted text contents (title + URL)

* Extract html-url-finding logic into JsonLdHelper

* Fallback to id when url missing, extract supported object types
2017-11-30 04:06:20 +01:00
Eugen Rochko 2421fd745a Fix too many forwards (#5854)
* Avoid sending explicit Undo->Announce when original deleted

* Do not forward a reply back to the server that sent it

* Deduplicate inboxes of rebloggers' followers for delete forwarding

* Adjust test

* Fix wrong class, bad SQL, wrong variable, outdated comment
2017-11-30 03:50:05 +01:00
Jenkins e8446e3724 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-29 22:17:13 +00:00
Mayu Laierlence a9413c2bb9 Fix Korean translation (#5853)
"어플리케이션" -> "애플리케이션"
2017-11-30 07:16:29 +09:00
Marcin Mikołajczak b95f1b130a i18n: 🇵🇱 (#5851)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-29 20:51:24 +09:00
David Yip 4a4c6304c1 Merge pull request #232 from glitch-soc/hotkeys-glitch
Implement status hotkeys + spoiler expanding
2017-11-28 17:34:03 -06:00
David Yip a1d9c68198 Merge remote-tracking branch 'origin/master' into gs-master 2017-11-28 11:45:13 -06:00
Yamagishi Kazutoshi d6846dce20 Show "expired" in invite index (#5838)
* Show "expired" in invite index

* "Force expire" -> "Deactivate"
2017-11-28 15:41:02 +01:00
aschmitz ce341c7cf6 Allow hiding of reblogs from followed users (#5762)
* Allow hiding of reblogs from followed users

This adds a new entry to the account menu to allow users to hide
future reblogs from a user (and then if they've done that, to show
future reblogs instead).

This does not remove or add historical reblogs from/to the user's
timeline; it only affects new statuses.

The API for this operates by sending a "reblogs" key to the follow
endpoint. If this is sent when starting a new follow, it will be
respected from the beginning of the follow relationship (even if
the follow request must be approved by the followee). If this is
sent when a follow relationship already exists, it will simply
update the existing follow relationship. As with the notification
muting, this will now return an object ({reblogs: [true|false]}) or
false for each follow relationship when requesting relationship
information for an account. This should cause few issues due to an
object being truthy in many languages, but some modifications may
need to be made in pickier languages.

Database changes: adds a show_reblogs column (default true,
non-nullable) to the follows and follow_requests tables. Because
these are non-nullable, we use the existing MigrationHelpers to
perform this change without locking those tables, although the
tables are likely to be small anyway.

Tests included.

See also <https://github.com/glitch-soc/mastodon/pull/212>.

* Rubocop fixes

* Code review changes

* Test fixes

This patchset closes #648 and resolves #3271.

* Rubocop fix

* Revert reblogs defaulting in argument, fix tests

It turns out we needed this for the same reason we needed it in muting:
if nil gets passed in somehow (most usually by an API client not passing
any value), we need to detect and handle it.

We could specify a default in the parameter and then also catch nil, but
there's no great reason to duplicate the default value.
2017-11-28 15:00:35 +01:00
ThibG f33fd11c87 Fix handling of temporary failures in ProcessMentionsService (#5842)
* Add test for temporary account resolving failures in ProcessMentionsService

* Fix processing of mentions to already-known remote accounts on temporary failures
2017-11-28 15:00:22 +01:00
Yamagishi Kazutoshi a132f4576d Refactor KeyboardShortcuts component (#5835) 2017-11-28 14:32:27 +01:00
nullkal 35e3791ba4 Fix account migration feature (#5837)
* Make removable account migration

* Fix error during update of account migration setting

* Add notice when update account migration setting
2017-11-28 14:31:23 +01:00
Marcin Mikołajczak 5f51992e16 i18n: 🇵🇱 (#5841)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-28 19:30:18 +09:00
David Yip bc10a0dced Merge remote-tracking branch 'tootsuite/master' 2017-11-27 22:33:26 -06:00
kibigo! 4497b83982 Adds spoiler hotkey support to detailed statuses 2017-11-27 14:05:03 -08:00
Eugen Rochko 55d9abcceb Add UI for setting up account migration (#5832) 2017-11-27 22:47:06 +01:00
kibigo! fac7e31101 Implement status hotkeys + spoiler expanding 2017-11-27 13:30:01 -08:00
Joshua Wood 0b045ba7ab Add Keyboard Shortcuts Legend (#5823)
* Add Keyboard Shortcuts Legend

Adds a "Keyboard Shortcuts" legend (displayed in the rightmost column)
which is toggled via a new "?" hotkey. When subsequently pressed from
the Keyboard Shortcuts legend, "?" will navigate back to the previous
location.

* Add hidden table headings.

Makes the headings available for accessibility but hides them visually.
2017-11-27 21:31:58 +01:00
David Yip c9dd67a733 Merge remote-tracking branch 'origin/master' into gs-master 2017-11-27 11:29:04 -06:00
Yamagishi Kazutoshi d5e4cb2ca1 Use account.username when display_name is empty (#5828) 2017-11-27 16:09:52 +01:00
Eugen Rochko bc8c951083 Add consumable invites (#5814)
* Add consumable invites

* Add UI for generating invite codes

* Add tests

* Display max uses and expiration in invites table, delete invite

* Remove unused column and redundant validator

- Default follows not used, probably bad idea
- InviteCodeValidator is redundant because RegistrationsController
  checks invite code validity

* Add admin setting to disable invites

* Add admin UI for invites, configurable role for invite creation

- Admin UI that lists everyone's invites, always available
- Admin setting min_invite_role to control who can invite people
- Non-admin invite UI only visible if users are allowed to

* Do not remove invites from database, expire them instantly
2017-11-27 16:07:59 +01:00
Jenkins f504ac4ff6 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-27 05:17:11 +00:00
Alda Marteau-Hardi 191993c811 Use account.display_name for og:title single toot pages (#5821) 2017-11-27 05:31:26 +01:00
Akihiko Odaki ce0d30feb7 Do not filter the status collection after muting and blocking (#5815)
Filtering the status collection wipes out even the profiles of muted and
blocked accounts. However, the behavior is inconsistent with the server-
side behavior.
2017-11-26 01:45:17 +01:00
SerCom_KC 7cdf02f2d4 i18n: (zh-CN) Add translations for #5746 & #5750 (#5816) 2017-11-26 02:38:40 +09:00
Akihiko Odaki 16a49799cf Allow to open a modal for embedded photo (#5777) 2017-11-25 15:41:45 +01:00
Akihiko Odaki 7df80c9e83 Rename ariaLabel property of Dropdown to title (#5813)
DropdownMenu has ariaLabel property, but it is actually applied to title
property of IconButton. Keep it consistent.
2017-11-25 15:41:08 +01:00
spla eddbf2e485 Updated Catalan strings (#5801)
* Updated Catalan strings

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* bundle exec i18n-tasks

* Update ca.json

* Update simple_form.ca.yml
2017-11-25 23:22:59 +09:00
Jenkins 7fcbe5faee Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-25 05:17:15 +00:00
Yamagishi Kazutoshi 8fde0aed51 Add Japanese translations (#5810)
* yarn manage:translations

* Add Japanese translation for #5087

* Add Japanese translation for #5616

* Add Japanese translation for #5746

* Add Japanese translation for #5750
2017-11-25 03:39:57 +01:00
William Pitcock a4bb95d8b3 status: preserve visibility attribute when reblogging (infoleak fix) (#5789)
this should fix *all* remaining visibility-related mastodon ostatus infoleaks.
thanks to @csaurus@gnusocial.de for pointing out the infoleak.
2017-11-25 01:36:08 +01:00
Eugen Rochko bf8eab12ba Display list column (#5750) 2017-11-25 00:35:37 +01:00
abcang 3db3ca1258 Fix unnecessary order (#5807) 2017-11-24 18:41:07 +01:00
sdukhovni 019c39bf1d Don't remove originals of boosted toots from timeline (#5479)
* Don't remove originals of boosted toots from timeline

* Remove unused argument to updateTimeline
2017-11-24 14:43:53 +01:00
Akihiko Odaki 0319b92979 Do not require onClose property in NavigationBar (#5802)
NavigationBar can be used as mock as it is in OnboardingModal. In such a
case, onClose property is not required.
2017-11-24 13:13:17 +01:00
Jenkins 359ba16721 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-24 01:17:20 +00:00
Eugen Rochko efc97d404c Add logging of admin actions (#5757)
* Add logging of admin actions

* Update brakeman whitelist

* Log creates, updates and destroys with history of changes

* i18n: Update Polish translation (#5782)

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* Split admin navigation into moderation and administration

* Redesign audit log page

* 🇵🇱 (#5795)

* Add color coding to audit log

* Change dismiss->resolve, log all outcomes of report as resolve

* Update terminology (e-mail blacklist) (#5796)

* Update terminology (e-mail blacklist)

imho looks better

* Update en.yml

* Fix code style issues

* i18n-tasks normalize
2017-11-24 02:05:53 +01:00
kibigo! 3860750d5d Styling fixes 2017-11-21 19:00:07 -08:00
kibigo! ea77b60648 Update statuses on hidden toggle (Fixes #227) 2017-11-21 18:27:34 -08:00
kibigo! eadf1c38a5 Minor fixes 2017-11-21 18:17:38 -08:00
Jenkins a2e4d79b1c Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-21 17:17:11 +00:00
Marcin Mikołajczak c75bc101ba i18n: Update Polish translation - front-end added (#231)
* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-21 17:53:13 +01:00
Joan Montané daec402a58 Update and fix Catalan translation (#5773)
* Update activerecord.ca.yml

* Update ca.yml

* Update devise.ca.yml

* Update doorkeeper.ca.yml

* Update simple_form.ca.yml

* fix syntax error for ca translation

* fix syntax errors in ca translations

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-21 23:17:28 +09:00
kibigo! 8aeda4f064 Finalized theme loading and stuff 2017-11-20 22:13:37 -08:00
Jenkins 1c33bd3d3a Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-21 05:17:12 +00:00
abcang 4e409e629d Fixed duplicating URL of photo type of oEmbed (#5763) 2017-11-20 20:45:54 +01:00
Jenkins 9c9b105d43 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-19 15:17:12 +00:00
abcang ef14321fff Fix NoMethodError at ActivityPub::FetchRemoteStatusService (#5753) 2017-11-19 15:33:15 +01:00
abcang defb2fd0b0 Fix N+1 at notification (#5752) 2017-11-19 15:32:48 +01:00
David Yip 1dc24ece41 Merge remote-tracking branch 'tootsuite/master' 2017-11-19 01:30:29 -06:00
Yamagishi Kazutoshi bffc1b880b Add “staff” badge to admin user pages (#5735)
* Allow staff badge to change from setting to hidden

* i18n: Update Polish translation
2017-11-19 04:13:57 +01:00
beatrix 34ba45e47c Merge pull request #226 from glitch-soc/glitch-theme
Glitch/Vanilla themes
2017-11-18 20:32:17 -05:00
kibigo! 2b05c3aaa1 Merge remote-tracking branch 'cybre/theme_win95' into glitch-theme 2017-11-18 15:18:00 -08:00
kibigo! e56a32a46b WIP static themeing 2017-11-18 15:12:52 -08:00
kibigo! 25361848e3 Enabled vanilla thmee 2017-11-18 11:06:04 -08:00
kibigo! f0aedba604 Public pack fix 2017-11-18 11:05:39 -08:00
kibigo! a8c0c7a2c1 Media styling 2017-11-18 11:05:23 -08:00
kibigo! 0c90d1ab38 Font styles are now packagified 2017-11-18 11:05:00 -08:00
Eugen Rochko b89f614bd7 Profile redirect notes (#5746)
* Serialize moved accounts into REST and ActivityPub APIs

* Parse federated moved accounts from ActivityPub

* Add note about moved accounts to public profiles

* Add moved account message to web UI

* Fix code style issues
2017-11-18 19:39:02 +01:00
beatrix 27ca589183 Merge pull request #208 from yipdw/keyword-mute
Run keyword mutes on hashtags
2017-11-18 12:06:40 -05:00
Jenkins cea7dec340 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-18 06:17:14 +00:00
SerCom_KC e618b6c136 Updating Chinese (Simplified) translations (#5725)
* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Change `静音` to `隐藏`

* i18n: (zh-CN) Add translations for #5087 & #5669

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translation for #5728
2017-11-18 14:35:11 +09:00
kibigo! 5466150ea4 Removed glitch tests 2017-11-17 19:29:17 -08:00
kibigo! 7c5614c667 Restore vanilla components 2017-11-17 19:29:16 -08:00
kibigo! 68304a6ce5 Forking glitch theme 2017-11-17 19:29:16 -08:00
beatrix 61585f2c42 Merge pull request #223 from glitch-soc/glitchsoc/feature/configurable-status-size
Make character limit configurable (from tootsuite/mastodon#5697)
2017-11-17 19:02:40 -05:00
David Yip 08751360a0 Update annotations on Follow, FollowRequest, and Mute.
Follow and FollowRequest had conflicts in their schema annotations, so I
ran latest migrations and let annotate_models fix them up.
2017-11-17 17:41:15 -06:00
David Yip f1279d8ff3 Merge remote-tracking branch 'origin/master' into merge-upstream 2017-11-17 17:40:00 -06:00
Eugen Rochko e149067561 Lists (#5703)
* Add structure for lists

* Add list timeline streaming API

* Add list APIs, bind list-account relation to follow relation

* Add API for adding/removing accounts from lists

* Add pagination to lists API

* Add pagination to list accounts API

* Adjust scopes for new APIs

- Creating and modifying lists merely requires "write" scope
- Fetching information about lists merely requires "read" scope

* Add test for wrong user context on list timeline

* Clean up tests
2017-11-18 00:16:48 +01:00
David Yip ce27681a76 Merge pull request #222 from yipdw/merge/tootsuite/master
Merge upstream (5982d57.. 065e238)
2017-11-17 14:35:16 -06:00
David Yip e5a2158e2a Merge remote-tracking branch 'lambadalambda/feature/configurable-status-size' into glitchsoc/feature/configurable-status-size 2017-11-17 14:28:16 -06:00
beatrix 57e301c5be Merge pull request #221 from glitch-soc/local-only-policy
Update StatusPolicy to check current_account for local_only? toots.
2017-11-17 15:17:49 -05:00
Jenkins 065e2388ba Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-17 20:17:12 +00:00
David Yip 87c1f91505 Merge pull request #218 from glitch-soc/themed-prefetching
Themed preloading
2017-11-17 14:01:23 -06:00
Lynx Kotoura 731c859097 Increase contrast of Admin badges (#5740)
To comply WCAG 2.0 guidelines on contrast ratio.
2017-11-17 19:59:53 +01:00
Clworld 6547ebee48 Fix regression #5467: fixes emoji copy (#5739) 2017-11-17 18:22:31 +01:00
David Yip bcdd0f8b9d Update StatusPolicy to check current_account for local_only? toots.
StatusPolicy#account was renamed to StatusPolicy#current_account in
upstream.  This commit renames the local-only changes to match and
augments the #show? policy spec with what we expect for local-only
toots.
2017-11-17 09:07:21 -06:00
unarist 5982d570de Move "Permissions" row into main table in /admin/accounts/:id (#5734) 2017-11-17 15:18:20 +01:00
David Yip ff4e474bcd Add trailing comma in mapStateToProps
Consistency, eslint, etc.
2017-11-17 00:24:22 -06:00
David Yip c687853d80 Merge pull request #219 from glitch-soc/no-spin
Remove 'spin' theme
2017-11-17 00:14:24 -06:00
David Yip 801ecbfa5a Throw layout, isWide, navbarUnder back into mapStateToProps.
This gets wide view, auto layout, and navbar-under-mobile working again.
2017-11-17 00:11:01 -06:00
kibigo! bbef750b04 Removes spin theme 2017-11-16 21:54:12 -08:00
kibigo! 5845057adb Themed prefetching 2017-11-16 21:37:08 -08:00
David Yip 5f689cdf78 Merge remote-tracking branch 'origin/master' into gs-master 2017-11-16 22:52:37 -06:00
ysksn 08cb63c360 Remove empty strings (#5732) 2017-11-17 10:52:30 +09:00
Eugen Rochko 3df46ce5a8 Fix some rubocop style issues (#5730) 2017-11-17 10:06:26 +09:00
Eugen Rochko 21d01d5809 Display moderator badge (green), admin badge changed to red (#5728) 2017-11-17 01:22:38 +01:00
Renato "Lond" Cerqueira f366a83c6c Improve language filter (#5724)
* Scrub text of html before detecting language.

* Detect language on statuses coming from activitypub.

* Fix rubocop comments.

* Remove custom emoji from text before language detection
2017-11-16 13:51:38 +01:00
ysksn bf1d4a2cb9 Fix AccountFinderConcern::AccountFinder#with_usernames (#5722) 2017-11-16 12:13:03 +01:00
Surinna Curtis 02ae609d9a Merge tootsuite/master at ab48f2b239 2017-11-16 01:21:16 -06:00
David Yip b4725cad17 Replace =~ with #matches?. #208.
=~ made sense when we were passing it through to a regex, but we're no
longer doing that: TagMatcher looks at individual tags and returns a
value that *looks* like what you get out of #=~ but really isn't that
meaningful.  Probably a good idea to not subvert convention like this
and instead use a name with guessable intent.
2017-11-15 18:27:25 -06:00
David Yip 21e138379d Prefix cache keys with the matcher type. #208.
We already know about one regex limitation, which is that they cannot
segment words in e.g. Japanese, Chinese, or Thai.  It may also end up
that regex matching is too slow compared to other methods.

However, the regex is an implementation detail.  We still want the
ability to switch between "occurs anywhere" and "match whole word", and
caching the matcher result is likely to still be important (since the
matcher itself won't change nearly as often as status ingress rate).
Therefore, we ought to be able to change the cache keys to reflect a
change of data structure.

(Old cache keys expire within minutes, so they shouldn't be too big of
an issue.  Old cache keys could also be explicitly removed by an
instance administrator.)
2017-11-15 18:12:31 -06:00
David Yip 2c6a2d588c Match keyword mute filter on hashtags. #208.
It is reasonable to expect someone to enter #foo to mute hashtag #foo.
However, tags are recorded on statuses without the preceding #.
To adjust for this, we build a separate tag matcher and use
Tag::HASHTAG_RE to extract a hashtag from the hashtag syntax.
2017-11-15 18:12:29 -06:00
David Yip dd29a41b61 Also run the keyword matcher on a status' tags. #208. 2017-11-15 18:12:26 -06:00
beatrix ed1cf698a2 Merge pull request #212 from aschmitz/feat/mute-reblogs
Allow hiding reblogs on a per-follow basis
2017-11-15 12:01:17 -05:00
ysksn 475b7cecb5 Delegate some methods of User to @settings (#5706)
* Move some tests of User into Settings::ScopedSettings

* Add a test for User@settings
2017-11-15 16:05:20 +01:00
masarakki 7d3b67e1c8 reusable-streaming (#5709) 2017-11-15 16:04:15 +01:00
Surinna Curtis 582dd1b7c7 Optional notification muting (#5087)
* Add a hide_notifications column to mutes

* Add muting_notifications? and a notifications argument to mute!

* block notifications in notify_service from hard muted accounts

* Add specs for how mute! interacts with muting_notifications?

* specs testing that hide_notifications in mutes actually hides notifications

* Add support for muting notifications in MuteService

* API support for muting notifications (and specs)

* Less gross passing of notifications flag

* Break out a separate mute modal with a hide-notifications checkbox.

* Convert profile header mute to use mute modal

* Satisfy eslint.

* specs for MuteService notifications params

* add trailing newlines to files for Pork :)

* Put the label for the hide notifications checkbox in a label element.

* Add a /api/v1/mutes/details route that just returns the array of mutes.

* Define a serializer for /api/v1/mutes/details

* Add more specs for the /api/v1/mutes/details endpoint

* Expose whether a mute hides notifications in the api/v1/relationships endpoint

* Show whether muted users' notifications are muted in account lists

* Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint

* make the hide/unhide notifications buttons work

* satisfy eslint

* In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal.

* fix a missing import

* add an explanatory comment to AccountInteractions

* Refactor handling of default params for muting to make code cleaner

* minor code style fixes oops

* Fixed a typo that was breaking the account mute API endpoint

* Apply white-space: nowrap to account relationships icons

* Fix code style issues

* Remove superfluous blank line

* Rename /api/v1/mutes/details -> /api/v2/mutes

* Don't serialize "account" in MuteSerializer

Doing so is somewhat unnecessary since it's always the current user's account.

* Fix wrong variable name in api/v2/mutes

* Use Toggle in place of checkbox in the mute modal.

* Make the Toggle in the mute modal look better

* Code style changes in specs and removed an extra space

* Code review suggestions from akihikodaki

Also fixed a syntax error in tests for AccountInteractions.

* Make AddHideNotificationsToMute Concurrent

It's not clear how much this will benefit instances in practice, as the
number of mutes tends to be pretty small, but this should prevent any
blocking migrations nonetheless.

* Fix up migration things

* Remove /api/v2/mutes
2017-11-15 03:56:41 +01:00
ThibG 74de5566d4 Filter searched toots to be consistent with blocking behaviors (#5383) 2017-11-15 01:53:33 +01:00
ThibG 4531b67c3e Use already-known remote user data if resolving temporarily fails in mentions (#5702) 2017-11-15 01:06:49 +01:00
Eugen Rochko 80873c1134 Add option to block direct messages from people you don't follow (#5669)
* Add option to block direct messages from people you don't follow

Fix #5326

* If the DM responds to a toot by recipient, allow it through

* i18n: Update Polish translation (for #5669) (#5673)
2017-11-14 21:12:57 +01:00
SerCom_KC 66a0141691 Updating Chinese (Simplified) translations (#5643)
* i18n: (zh-CN) Bug fix for note-counter.

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add support.array key for better wording

* Revert "i18n: (zh-CN) Add support.array key for better wording"

This reverts commit 27bf9a946e886213e827cd985d4f62419db57534.
Looks like this commit can't get pass the checks, revert it for now.

* i18n: (zh-CN) Change `客户端` to `应用`

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations (#5635)

* i18n: (zh-CN) Change `两步验证` to `双重认证`

* i18n: (zh-CN) Improve translations
2017-11-14 20:44:42 +01:00
Yamagishi Kazutoshi 3a51544e9a Add uniqueness to block email domains (#5692) 2017-11-14 20:37:17 +01:00
Marcin Mikołajczak fa89e5d911 i18n: Update Polish translation (#5699)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-14 20:36:11 +01:00
Lain Iwakura a77e03ede4 Rename MAX_CHARS to MAX_TOOT_CHARS to be more specific. 2017-11-14 17:56:38 +01:00
Lain Iwakura f517cbae22 Code style fixes. 2017-11-14 16:54:04 +01:00
Lain Iwakura 3de2814a5a Handle character limit in initial state in frontend. 2017-11-14 16:24:10 +01:00
Lain Iwakura a45f3cdc69 Return character limit in API and initial state. 2017-11-14 16:23:12 +01:00
Lain Iwakura 666540f4a8 Make character limit configurable. 2017-11-14 16:22:34 +01:00
Andrew 1d0a72c00b Updates and fixes to win95 theme 2017-11-14 01:22:48 -08:00
Anna e só c4c9003f84 l10n: PT-BR translation updated (#5681)
* Improved e-mail messages; delted repeated words

* pt-BR.json translations updated

* Revert "pt-BR.json translations updated"

This reverts commit 108c460531196fed6e6d14f93e8d8d047c835ffd.

* Updated pt-BR.json

* pt-BR.yml updated
2017-11-14 11:07:38 +09:00
David Yip 13ec4a9a20 Maintain case-insensitivity when merging multiple matchers (#213)
When given two regexps, Regexp.union preserves the options set (or not
set) on each regex; this meant that none of the multiline (m),
case-insensitivity (i), or extended syntax (x) options were set.  Our
regexps are written expecting the m, i, and x options were set on all of
them, so we need to make sure that we preserve that behavior.
2017-11-13 11:06:02 -06:00
Daniel Hunsaker 96504fd1ec Update model annotations to use BIGINT for IDs (#5461)
All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.
2017-11-12 16:18:50 +01:00
aschmitz 3fe59e7d97 Actually filter blocked reblogs from feed
And even a relevant test. Whoops.
2017-11-11 22:10:49 -06:00
Eugen Rochko 9caf162432 Fix #5632 - Reset column loading status after fetch fail (#5659) 2017-11-12 12:51:07 +09:00
aschmitz 869cfdfda6 Don't update follower counts on reblog toggle 2017-11-11 21:42:22 -06:00
aschmitz 76008c3e8c Updates per code review
Thanks, @valerauko!
2017-11-11 14:37:23 -06:00
Eugen Rochko 97178b6d86 Add moderator role and add pundit policies for admin actions (#5635)
* Add moderator role and add pundit policies for admin actions

* Add rake task for turning user into mod and revoking it again

* Fix handling of unauthorized exception

* Deliver new report e-mails to staff, not just admins

* Add promote/demote to admin UI, hide some actions conditionally

* Fix unused i18n
2017-11-11 20:23:33 +01:00
ThibG df882d5a59 Retry thread resolving (#5599)
Thread resolving is one of the few tasks that isn't retried on failure.
One common cause for failure of this task is a well-connected user replying to
a toot from a little-connected user on a small instance: the small instance
will get many requests at once, and will often fail to answer requests within
the 10 seconds timeout used by Mastodon.

This changes makes the ThreadResolveWorker retry a few times, with a
rapidly-increasing time before retries and large random contribution in order
to spread the load over time.
2017-11-11 16:49:04 +01:00
aschmitz 2f1fdd37d3 Per-user reblog hiding implementation/fixes/tests
Note that this will only hide/show *future* reblogs by a user, and does
nothing to remove/add reblogs that are already in the timeline. I don't
think that's a particularly confusing behavior, and it's a lot easier
to implement (similar to mutes, I believe).
2017-11-10 22:04:54 -06:00
Lynx Kotoura 37992a1012 Fix focused background color of direct toots (#5642) 2017-11-09 19:40:34 +01:00
aschmitz 2aedd8eaad "Show reblogs" per-follower UI/database changes
TODO:

* Tests (particularly for FollowRequests).
* Anything to respect the setting when putting reblogs in timelines.
2017-11-09 08:41:10 -06:00
ysksn 26f52a2551 Add and Remove tests for FollowRequest (#5622)
* Add a test for FollowRequest#authorize!

* Remove tests

There is no need to test
ActiveModel::Validations::ClassMethods#validates.

* Make an alias of destroy! as reject!

Instead of defining the method,
make an alias of destroy! as reject! because of reducing test.
2017-11-09 14:36:52 +01:00
unarist 1cb6606055 Show confirmation dialog on leaving WebUI while composing (#5616)
* Show confirmation dialog on leaving WebUI while composing

Currently, Back button and Back hotkey can cause leaving from WebUI, as well as browser's back button. Users may hit those buttons accidentally, and their composing text will be lost.

So this prevents it by showing confirmation dialog from `onbeforeunload` event.

* Fix message and comments
2017-11-09 14:34:41 +01:00
Quenty31 a7db7bdd96 i10n OC: Memorial (#5615) + #5467 (#5623)
* Changed ĩ => ï

* Changed ĩ => ï

* Add ability to disable login and mark accounts as memorial (#5615)
2017-11-08 15:19:49 +01:00
ThibG 5abd97e5ba Fix process mentions for local users, as local users are considered to use OStatus (#5618) 2017-11-07 22:15:15 +01:00
nullkal 863958ce09 Eliminate space around emoji (#5474)
* Eliminate space around emoji

* More improve emoji style

* Make more compatible with Twemoji

* Make scss-lint happy

* Make not modify normal emoji's behavior

* Decrease status__action-bar's margin-top to 5px

* Make the test be passed

* Revert "Make the test be passed"

This reverts commit 54a8c60e5907ef20a5ceb5ab2c86a933e06f3ece.

* Revert "Make not modify normal emoji's behavior"

This reverts commit 6a5bdf0c11df16ebd190cb3ab9d2e8f1349f435a.
2017-11-07 19:09:53 +01:00
ThibG 4912f539c3 Twidere mention workaround (#5552)
* Work around Twidere and Tootdon bug

Tootdon and Twidere construct @user@domain handles from mentions in toots based
solely on the mention text and account URI's domain without performing any
webfinger call or retrieving account info from the Mastodon server.

As a result, when a remote user has WEB_DOMAIN ≠ LOCAL_DOMAIN, Twidere and
Tootdon will construct the mention as @user@WEB_DOMAIN. Now, this will usually
resolve to the correct account (since the recommended configuration is to have
WEB_DOMAIN perform webfinger redirections to LOCAL_DOMAIN) when processing
mentions, but won't do so when displaying them (as it does not go through the
whole account resolution at that time).

This change rewrites mentions to the resolved account, so that displaying the
mentions will work.

* Use lookbehind instead of non-capturing group in MENTION_RE

Indeed, substitutions with the previous regexp would erroneously eat any
preceding whitespace, which would lead to concatenated mentions in the
previous commit.

Note that users will “lose” up to one character space per mention for their
toots, as that regexp is also used to remove the domain-part of mentioned
users for character counting purposes, and it also erroneously removed the
preceding character if it was a space.
2017-11-07 19:08:14 +01:00
Eugen Rochko 7f1a0241c1 Add ability to disable login and mark accounts as memorial (#5615)
Fix #5597
2017-11-07 19:06:44 +01:00
voidSatisfaction dc63306620 fix: slang to adequate word (#5453) 2017-11-07 14:49:50 +01:00
nullkal 19f82492ab Show the local couterpart of emoji when it exists in /admin/custom_emojis (#5467)
* Show the local couterpart of emoji when it exists in admin/custom_emojis

* Fix indentation

* Fix error

* Add class table-action-link to Overwrite link

* Make it enable to overwrite emojis

* Make Code Climate happy
2017-11-07 14:49:32 +01:00
MIYAGI Hikaru 3506668438 Avoid emojifying on invisible text (#5558) 2017-11-07 14:48:13 +01:00
ThibG 02608c2292 Do not process undeliverable mentions (#5598)
* Resolve remote accounts when mentioned even if they are already known

This commit reduces the risk of not having up-to-date public key or protocol
information for a remote account, which is required to deliver toots
(especially direct messages).

* Do not add mentions in private messages for remote users we cannot deliver to

Mastodon does not deliver private and direct toots to OStatus users, as there
is no guarantee the remote software understands the toot's privacy. However,
users currently do not get any feedback on it (Mastodon won't attempt delivery,
but the toot will be displayed exactly the same way to the user).

This change introduces *some* feedback by not processing mentions that are
not going to be delivered. A long-term solution is still needed to have
delivery receipts or at least some better indication of what is going on, but
at least an user can see *something* is up.
2017-11-07 14:47:39 +01:00
ThibG a8249d2486 Resolve remote accounts when mentioned even if they are already known (#5539)
This commit reduces the risk of not having up-to-date public key or protocol
information for a remote account, which is required to deliver toots
(especially direct messages).
2017-11-07 14:31:57 +01:00
nullkal 64fbf1d6e5 Make fullscreen video in detailed status plays in fullscreen (Partly Fix #5160) (#5611)
* Make fullscreen video in detailed status plays in fullscreen (Fix #5160)

* Directly assign the initial state
2017-11-07 14:24:55 +01:00
kedama 82e9df5e3c Hide disabled custom emojis from emoji picker and emoji auto suggestions. (#5613)
Make the same behavior as /api/v1/custom_emojis.
2017-11-07 14:24:21 +01:00
kibigo! f9e8e1357e Mastodon GO! -> v0.1.1 2017-11-06 20:00:03 -08:00
kibigo! b0f88fbdc1 Autocollapse boosts option 2017-11-05 15:05:12 -08:00
MIYAGI Hikaru 70726e0f72 don't display any descendants of .invisible (#5567)
* don't display any descendants of .invisible

* reduce the scope of selector

* remove some rules for image

* lint
2017-11-05 13:05:50 +01:00
beatrix 0f6d6186b6 Merge pull request #204 from glitch-soc/with-mastodon-go
Introducing: Mastodon GO!
2017-11-04 09:14:08 -04:00
kibigo! 23a15bd315 Introducing: Mastodon GO! 2017-11-04 05:48:42 -07:00
Quenty31 b6f057365d l10n Occitan (#5586)
* Update OC: time format

Correction for time format according to: https://opinion.jornalet.com/conselh-linguistic-de-jornalet/blog/2379/la-notacion-oraria-en-occitan
Harmonisation words in menu and confirmation windows

* Update for unlisted custum emoji + #5577

* correction subjonctiu

It's either siasque or siague

* Corrections

Any : qual que, in two words, else it means "some".
And "siasque" with S even if I don't pronounce it at all.

* Update oc.json
2017-11-03 17:42:30 +09:00
MitarashiDango 3068add21d add account search condition (instance domain) (#5577) 2017-11-01 14:46:05 +01:00
Sorin Davidoi 2c6bb251c5 refactor(features/ui): Avoid useless renders in WrappedSwitch (#5580) 2017-11-01 12:17:53 +01:00
Yamagishi Kazutoshi c858c1a2b8 Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
Nolan Lawson 4a7046e607 Refactor initial state: auto_play_gif (#5576) 2017-11-01 06:58:07 +09:00