Commit Graph

99 Commits

Author SHA1 Message Date
Yamagishi Kazutoshi 7403e5d306 Add media timeline (#6631) 2018-05-21 12:43:38 +02:00
Eugen Rochko 4b94e9c65e
Improve payload format of Web Push API now that it's open (#7521)
> Good lord what is happening in there

Previously the contents of the Web Push API payloads closely resembled the structure of JavaScript's [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification). But now that the API is open to non-browser apps, and given that there is no required coupling between contents of the payload and a Notification object, here is how I changed the payload:

```json
{ 
  "access_token": "...",
  "preferred_locale": "en",
  "notification_id": "12345",
  "notification_type": "follow",
  "title": "So and so followed you",
  "body": "This is my bio",
  "icon": "https://example.com/avatar.png"
}
```

The title, body and icon attributes are included as a fallback so you can construct a minimal notification if you cannot perform a network request to the API to get more data.
2018-05-19 14:46:47 +02:00
Akihiko Odaki 1951ff41b3 Do not override the default push notification settings (#6037) 2018-05-19 14:45:58 +02:00
Eugen Rochko dafd7afc5e
Use randomized setTimeout when fallback-polling and re-add since_id (#7522) 2018-05-18 02:32:35 +02:00
Eugen Rochko d185f3ddaf
Use plaintext value for field value tooltips in web UI (#7388)
Fix #7383
2018-05-07 09:30:38 +02:00
Eugen Rochko 61a9018607
Enable custom emojis in profiles (notes, field values, display names) (#7374)
Follow-up to #6124
2018-05-06 11:48:51 +02:00
Yamagishi Kazutoshi 0758b00bfd Refactor resizeImage method (#7236)
- Use URL.createObjectURL (replace from FileReader)
- Use HTMLCanvasElement.prototype.toBlob
  (replace from HTMLCanvasElement.prototype.toDataURL)
- Use Promise (replace callback interface)
2018-04-23 09:15:51 +02:00
Eugen Rochko 05fb6f096d
Resize images before upload in web UI to reduce bandwidth (#7223)
* Resize images before upload in web UI to reduce bandwidth

Fix #7218

* Fix issues

* Do not resize GIFs in JS
2018-04-23 00:43:36 +02:00
Kaito Sinclaire 156b916caf Direct messages column (#4514)
* Added a timeline for Direct statuses
* Lists all Direct statuses you've sent and received
* Displayed in Getting Started
* Streaming server support for direct TL

* Changes to match other timelines in 2.0
2018-04-18 13:09:06 +02:00
abcang 897199910f Improve web api protect (#6343) 2018-04-17 15:23:46 +02:00
abcang 727917e91e Fix caret position after inserting emoji (#7167) 2018-04-17 13:50:33 +02:00
Eugen Rochko 78ed4ab75f
Add bio fields (#6645)
* Add bio fields

- Fix #3211
- Fix #232
- Fix #121

* Display bio fields in web UI

* Fix output of links and missing fields

* Federate bio fields over ActivityPub as PropertyValue

* Improve how the fields are stored, add to Edit profile form

* Add rel=me to links in fields

Fix #121
2018-04-14 12:41:08 +02:00
Eugen Rochko 9e45b051cf
When notification type filtered, ignore live updates for it (#7101)
Fix #5625
2018-04-13 01:20:04 +02:00
Akihiko Odaki 1ed1014546 Free stroage if it is exceeding disk quota (#7061) 2018-04-08 13:32:39 +02:00
Isatis b08ab329f4 retrieve custom emoji list via API instead of before page load (#7047) 2018-04-04 22:25:34 +02:00
unarist 2c51bc0ca5 Add missing rejection handling for Promises (#7008)
* Add eslint-plugin-promise to detect uncaught rejections

* Move alert generation for errors to actions/alert

* Add missing rejection handling for Promises

* Use catch() instead of onReject on then()

Then it will catches rejection from onFulfilled. This detection can be
disabled by `allowThen` option, though.
2018-04-02 14:51:02 +02:00
ThibG a6c129ddbd Add some UI for user-defined domain blocks (#6628)
* Keep list of blocked domains

Might be overkill, but I'm trying to follow the same logic as for blocked users

* Add basic domain block UI

* Add the domain blocks UI to Getting Started

* Fix undefined URL in `fetchDomainBlocks`

* Update all known users' domain_blocking relationship instead of just one's
2018-03-30 12:38:00 +02:00
Emelia Smith d1f34151ae Feature: Direct message from menu (#6956)
* Implement ability to send direct messages from the user menu

* Implement message warning users that direct messages are visible to all mentioned users

* Update locales
2018-03-29 19:08:34 +02:00
unarist 41452e8302 Fix TypeError on follow notification (#6950)
`notification.status` may not be present, e.g. follow notification.
2018-03-29 12:59:12 +02:00
Akihiko Odaki ca42f9b0eb Cache media (#6902) 2018-03-27 12:32:30 +02:00
unarist 605a92b460 Fix moved account handling in IndexedDB feature (#6915)
* Fix stack overflow on importFetchedAccounts

  When the account has moved property, it should process destination
  account instead of source account itself.

* Set account id instead of account object for moved property

  This restores "foo has moved to" indication on account view, and
  fixes `reblog` index on `accounts` object store.
2018-03-26 12:48:01 +02:00
Akihiko Odaki cbf97c03bb Allow clients to fetch notifications made while they were offline (#6886) 2018-03-24 22:07:23 +01:00
Akihiko Odaki 9a1a55ce52 Allow clients to fetch statuses made while they were offline (#6876) 2018-03-24 15:25:15 +01:00
Akihiko Odaki fe398a098e Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
ThibG a5c6c748e0 Cancel outdated pending compose suggestions (#6838) 2018-03-20 12:40:12 +01:00
Eugen Rochko eb2425b53b
Hide loading bar on status interactions (#6774) 2018-03-13 14:30:01 +01:00
Eugen Rochko 4f7f6b3922
Fix follow relationships not loading after notifications fetch (#6746) 2018-03-12 03:20:56 +01:00
Eugen Rochko b6003afcdb
Add show more/less toggle for entire threads in web UI (#6733)
Fix #1258
2018-03-11 09:52:59 +01:00
Eugen Rochko cfa9b6e13a
Remove text requirement when media attached from statuses (#6672) 2018-03-07 08:28:52 +01:00
Akihiko Odaki 913a38111f Remove pointer events on the entire UI when a dropdown menu is open (#6648)
* Remove pointer events on the entire UI when a dropdown menu is open

This prevents operations to change the location of the menu such as
scrolling.

* Fix mistake from merge
2018-03-07 02:26:43 +01:00
Akihiko Odaki 460e380d38 Implement tag auto-completion by history (#6621)
This is a functionality similar to one implemented in Pawoo:
21a3c70f80
2018-03-04 20:27:25 +01:00
Eugen Rochko 9110db41c5
Federate pinned statuses over ActivityPub (#6610)
* Federate pinned statuses over ActivityPub

* Display pinned toots in web UI

Fix #6117

* Fix migration

* Fix tests

* Update outbox_serializer.rb

* Update remove_serializer.rb

* Update add_serializer.rb

* Update fetch_featured_collection_service.rb
2018-03-04 09:19:11 +01:00
Eugen Rochko 5131012505
Add "Toots/Toots with replies/Media" tab below profile header (#6572)
* Add "Toots/Toots with replies/Media" tab below profile header

* Add focal point display to account gallery timeline

* Fix visual glitch of standalone GIFV
2018-03-01 02:48:44 +01:00
Eugen Rochko 41a01bec23
Federated reports (#6570)
* Fix #2176: Federated reports

* UI for federated reports

* Add spec for ActivityPub Flag handler

* Add spec for ReportService
2018-02-28 06:54:55 +01:00
Eugen Rochko 90f12f2e5a
Focal points (#6520)
* Add focus param to media API, center thumbnails on focus point

* Add UI for setting a focal point

* Improve focal point icon on upload item

* Use focal point in upload preview

* Add focalPoint property to ActivityPub

* Don't show focal point button for non-image attachments
2018-02-22 00:35:46 +01:00
Eugen Rochko cba2897108
Cache relationships in API (#6482)
* Cache relationships in API

* Fetch relationships for search results in UI

* Only save one account's maps in each cache item
2018-02-18 03:14:46 +01:00
abcang a3c0a20373 Fix initial_state me in push_notification_register (#6349) 2018-01-24 14:37:46 +01:00
Eugen Rochko 79b34a0fa2
Restore onboarding modal (#6303)
* Restore onboarding modal
Revert 5ba8b3a396895ecec083c5258aaf9084d584a7c4

* Change greeting elephant graphic, fix up some design issues

* Fix wrong link color in onboarding modal
2018-01-20 01:32:37 +01:00
Eugen Rochko d799921c75
Replace tutorial modal with welcome e-mail (#6273)
* Remove onboarding modal

* Welcome e-mail

* Send welcome e-mail after confirmation

* Remove obsolete translations
2018-01-18 19:17:25 +01:00
Eugen Rochko 7badad7797
Fix home regeneration (#6251)
* Fix regeneration marker not being removed after completion

* Return HTTP 206 from /api/v1/timelines/home if regeneration in progress
Prioritize RegenerationWorker by putting it into default queue

* Display loading indicator and poll home timeline while it regenerates

* Add graphic to regeneration message

* Make "not found" indicator consistent with home regeneration
2018-01-17 23:56:03 +01:00
nightpool c235711ffe Refactor /api/web APIs to use the centralized axios instance (#6223)
Also adds the ability to decouple the centralized axios logic from the
state dispatcher
2018-01-08 20:01:33 +01:00
Noiob 94230fe565 Fix newlines-to-spaces functionality (#6158)
yay for regexes, amirite
2018-01-02 19:35:24 +01:00
Akihiko Odaki 3ba7cde38d Rename key to path in actions and reducers for settings (#6105) 2018-01-02 13:50:54 +01:00
MitarashiDango 511c6f9625 bug fix (WebPush does not work) (#6120) 2017-12-28 16:20:34 +01:00
Akihiko Odaki 35fdf561be Refactor web_push_subscription (#6047)
* Remove onSave method in mapped properties for column_settings

* Make web_push_subscription.register an action
2017-12-24 04:47:35 +01:00
Yamagishi Kazutoshi cdae7e4c8b Move push notifications settings (regression from #5879) (#5941)
* Move push notifications settings

* fix typo `setf` -> `set`
2017-12-09 14:18:45 +01:00
abcang 99242b92bc Keep WebPush settings (#5879) 2017-12-09 02:31:37 +01:00
Eugen Rochko ec3b449baa
Fix #5630 - Prevent duplicate load of favourites (#5931) 2017-12-09 02:22:13 +01:00
Eugen Rochko e20895f251
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
Neetshin 82884ac5c4 Update mutes.js (#5882) 2017-12-04 20:52:14 +09:00