about summary refs log tree commit diff
path: root/app/helpers
AgeCommit message (Collapse)Author
2017-09-23Add emoji autosuggest (#5053)Eugen Rochko
* Add emoji autosuggest Some credit goes to glitch-soc/mastodon#149 * Remove server-side shortcode->unicode conversion * Insert shortcode when suggestion is custom emoji * Remove remnant of server-side emojis * Update style of autosuggestions * Fix wrong emoji filenames generated in autosuggest item * Do not lazy load emoji picker, as that no longer works * Fix custom emoji autosuggest * Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-16Fix filterable_languages method of SettingsHelper (#4966)Akihiko Odaki
2017-09-12Clean up and improve generated OpenGraph tags (#4901)Eugen Rochko
- Return all images as og:image - Return videos as og:image (preview) and og:video - Return profile:username on profiles
2017-09-08Fix language filter codes (#4841)Eugen Rochko
* Fix language filter codes CLD3 returns BCP-47 language identifier, filter settings expect identifiers in the ISO 639-1 format. Convert between formats, and exclude duplicate languages from filter choices (zh-CN->zh) * Fix zh name
2017-09-05swift-enable the paperclip! :paperclip: (#2322)Adam Thurlow
2017-08-30Update status embeds (#4742)Eugen Rochko
- Use statuses controller for embeds instead of stream entries controller - Prefer /@:username/:id/embed URL for embeds - Use /@:username as author_url in OEmbed - Add follow link to embeds which opens web intent in new window - Use redis cache in development - Cache entire embed
2017-08-26Add _:inReplyToAtomUri to ActivityPub (#4702)Eugen Rochko
2017-08-26Add handling of Linked Data Signatures in payloads (#4687)Eugen Rochko
* Add handling of Linked Data Signatures in payloads * Add a way to sign JSON, fix canonicalization of signature options * Fix signatureValue encoding, send out signed JSON when distributing * Add missing security context
2017-08-22Ignore empty response in ActivityPub::FetchRemoteStatusService (#4661)unarist
* Ignore empty response in ActivityPub::FetchRemoteStatusService This fixes `NoMethodError: undefined method `[]' for nil:NilClass` error. * Check json.nil? in JsonLdHelper#supported_context?
2017-08-21Support more variations of ActivityPub keyId in signature (#4630)Eugen Rochko
- Tries to avoid performing HTTP request if the keyId is an actor URI - Likewise if the URI is a fragment URI on top of actor URI - Resolves public key, returns owner if the owner links back to the key
2017-08-21Use URI.join even when S3 enabled (#4652)Yamagishi Kazutoshi
2017-08-17use existing inflections instead of custom helper (#4624)nightpool
* use existing inflections instead of custom helper * use ActiveSupport versions
2017-08-17Show what protocol is used for accounts in admin/accounts#index (#4622)nullkal
* Show what protocol used for in admin/accounts#index * Add frozen_string_literal
2017-08-16Redesign public profiles (#4608)Eugen Rochko
* Redesign public profiles * Responsive design * Change public profile status filtering defaults and add options - No longer displays private/direct toots even if you are permitted access - By default omits replies - "With replies" option - "Media only" option * Redesign account grid cards * Fix style issues
2017-08-14Hook up URL-based resource look-up to ActivityPub (#4589)Eugen Rochko
2017-08-08Add ActivityPub inbox (#4216)Eugen Rochko
* Add ActivityPub inbox * Handle ActivityPub deletes * Handle ActivityPub creates * Handle ActivityPub announces * Stubs for handling all activities that need to be handled * Add ActivityPub actor resolving * Handle conversation URI passing in ActivityPub * Handle content language in ActivityPub * Send accept header when fetching actor, handle JSON parse errors * Test for ActivityPub::FetchRemoteAccountService * Handle public key and icon/image when embedded/as array/as resolvable URI * Implement ActivityPub::FetchRemoteStatusService * Add stubs for more interactions * Undo activities implemented * Handle out of order activities * Hook up ActivityPub to ResolveRemoteAccountService, handle Update Account activities * Add fragment IDs to all transient activity serializers * Add tests and fixes * Add stubs for missing tests * Add more tests * Add more tests
2017-07-27Fallback to site_hostname when site_title is empty (#4394)Yamagishi Kazutoshi
2017-07-21Use the same emoji data on the frontend and backend (#4284)Eugen Rochko
* Use the same emoji data on the frontend and backend * Move emoji.json to repository, add tests This way you don't need to install node dependencies if you only want to run Ruby code
2017-07-19Fix deprecation warning for non-pipeline assets (#4267)Eugen Rochko
2017-07-15Improve ActivityPub representations (#3844)Eugen Rochko
* Improve webfinger templates and make tests more flexible * Clean up AS2 representation of actor * Refactor outbox * Create activities representation * Add representations of followers/following collections, do not redirect /users/:username route if format is empty * Remove unused translations * ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better URL/URI generation * Add ActivityPub::TagManager#to * Represent all attachments as Document instead of Image/Video specifically (Because for remote ones we may not know for sure) Add mentions and hashtags representation to AP notes * Add AP-resolvable hashtag URIs * Use ActiveModelSerializers for ActivityPub * Clean up unused translations * Separate route for object and activity * Adjust cc/to matrices * Add to/cc to activities, ensure announce activity embeds target status and not the wrapper status, add "id" to all collections
2017-07-14HTTP signatures (#4146)Eugen Rochko
* Add Request class with HTTP signature generator Spec: https://tools.ietf.org/html/draft-cavage-http-signatures-06 * Add HTTP signature verification concern * Add test for SignatureVerification concern * Add basic test for Request class * Make PuSH subscribe/unsubscribe requests use new Request class Accidentally fix lease_seconds not being set and sent properly, and change the new minimum subscription duration to 1 day * Make all PuSH workers use new Request class * Make Salmon sender use new Request class * Make FetchLinkService use new Request class * Make FetchAtomService use the new Request class * Make Remotable use the new Request class * Make ResolveRemoteAccountService use the new Request class * Add more tests * Allow +-30 seconds window for signed request to remain valid * Disable time window validation for signed requests, restore 7 days as PuSH subscription duration (which was previous default due to a bug)
2017-07-14Fix #4149, fix #1199 - Store emojis as unicode (#4189)Eugen Rochko
- Use unicode when selecting emoji through picker - Convert shortcodes to unicode when storing text input server-side - Do not convert shortcodes in JS anymore
2017-07-07Togglable filter links (#4021)のら
* Togglable filter links * Rename is_selected to selected?
2017-07-04i18n: Add korean translation (#4064)Gyuhwan Park
* Added Korean Translation (based on japanese) * Update korean translation * Update korean translation: fix syntax error * Updated korean translation * Update korean translation * Update ko.json Translate non-translated parts * Update ko.yml Translated missed parts - and fixed some typos * Create simple_form.ko.yml * Updated korean translation * i18n: fix test fails
2017-07-03Add fa-fw class to user agent icon (#4047)Yamagishi Kazutoshi
2017-06-25Add overview of active sessions (#3929)Eugen Rochko
* Add overview of active sessions * Better display of browser/platform name * Improve how browser information is stored and displayed for sessions overview * Fix test
2017-06-20Fix RTL detection on Ruby side (#3867)unarist
This fixes below bugs: * pipe characters being counted as RTL character * only first word being checked
2017-06-19setting-for-account-deletable (#3852)masarakki
2017-06-10Improve RTL detection (#3682)Eugen Rochko
- Use plaintext - Strip out URLs - Strip out mentions - Strip out hashtags - Strip out whitespace from "overall" count - Consistent between JS and Ruby
2017-06-08Improve RuboCop rules (compatibility to Code Climate) (#3636)Yamagishi Kazutoshi
https://github.com/codeclimate/codeclimate-rubocop/blob/08f8de84ebfb39caa96391e23816877278f6441c/Gemfile.lock#L38 Code Climate is using RuboCop v0.46.0. Change several rules to maintain compatibility.
2017-06-01Resolve custom application stylesheet with Webpack (#3373)Akihiko Odaki (@fn_aki@pawoo.net)
This implementation is a bit smaller and still has the following benefits: * No need of app/javascript/packs/custom.js For custom stylesheet, it typically has only "require('../styles/custom.scss')" and is redundant. * No need to extract vendor stylesheet to another asset Extracting vendor stylesheet could be forgotten by developers who do not use custom stylesheet.
2017-05-27Fix #2922 - Load stylesheet from "custom.css" entrypoint when present (#3332)Eugen Rochko
* Fix #2922 - Load stylesheet from "custom.css" entrypoint when present This is pretty much the same way it worked as before, albeit with having to create app/javascript/packs/custom.js with require('../styles/custom.scss') (or whatever you want really), which will be a blank slate for you to import whatever you want * Remove old assets directory * Extract font-awesome into common.css and always load it
2017-05-19Remove unused style helper (#3145)Matt Jankowski
2017-05-19Improve how params from controller are permitted in filter helper (#3129)Matt Jankowski
The `params` variable here was quite overloaded. It exists via the controller to hold the request params, and was sometimes being used in this helper as that object, but other times was being used as a local variable, or to pass to another method, and this was confusing. This change renames the args for a method away from `params` for more clarity, and extracts the actual usage of the controller-provided `params` to a better-named method for clarity.
2017-05-19Skip asset pipeline for static file in public/ (#3125)Matt Jankowski
2017-05-17Add filter to AccountFilter (#2968)alpaca-tc
2017-05-17Add catalan language (#3084)spla
* Add Catalan language * Add Catalan language * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update settings_helper.rb * Update mastodon.js * Update index.js * Update application.rb * Update ca.yml * removed extra spaces at line 225
2017-05-16chore(landing_strip): hide signup path unless the instance allows ↵Hiroaki Ninomiya
registration. (#3055)
2017-05-08Add Thai langauge (#2903)Koala Yeung
* Updated Thai language * locale: remove unused translation in Thai * locale: add Thai to settings menu and application * locale: fix activerecord.th.yml format
2017-05-07Add Turkish yml file (#2878)Özcan Zafer AYAN
* Add Turkish yml file * Add translation files for Turkish * Deleted click_to_edit key and val Deleted click_to_edit: Düzenlemek için ilgili ayara tıklayınız line
2017-05-05More robust PuSH subscription refreshes (#2799)Eugen Rochko
* Fix #2473 - Use sidekiq scheduler to refresh PuSH subscriptions instead of cron Fix an issue where / in domain would raise exception in TagManager#normalize_domain PuSH subscriptions refresh done in a round-robin way to avoid hammering a single server's hub in sequence. Correct handling of failures/retries through Sidekiq (see also #2613). Optimize Account#with_followers scope. Also, since subscriptions are now delegated to Sidekiq jobs, an uncaught exception will not stop the entire refreshing operation halfway through Fix #2702 - Correct user agent header on outgoing http requests * Add test for SubscribeService * Extract #expiring_accounts into method * Make mastodon:push:refresh no-op * Queues are now defined in sidekiq.yml * Queues are now in sidekiq.yml
2017-05-03Use URI.join for generate asset URL (#2741)Yamagishi Kazutoshi
* Use URI.join for generate asset URL * to String
2017-05-03Replace sprockets/browserify with Webpack (#2617)Eugen Rochko
* Replace browserify with webpack * Add react-intl-translations-manager * Do not minify in development, add offline-plugin for ServiceWorker background cache updates * Adjust tests and dependencies * Fix production deployments * Fix tests * More optimizations * Improve travis cache for npm stuff * Re-run travis * Add back support for custom.scss as before * Remove offline-plugin and babili * Fix issue with Immutable.List().unshift(...values) not working as expected * Make travis load schema instead of running all migrations in sequence * Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in <UI /> * Add react definitions to places that use JSX * Add Procfile.dev for running rails, webpack and streaming API at the same time
2017-05-02Add Hebrew interface translation. (#2573)Ira
* follow the instructions for registering the language as stated on the Tootsuite's docs. * Added translation strings from latest master Adding &rlm; characters to many strings that are misdirected in the interface. A tiny grammar fix Updates of Hebrew strings to v1.3.1 Hebrew translation of the mailer templates. Fix strings and a missing comma. Just discovered two string keys were updated. this should lay Travis' mind to rest at last. Remove mentions before counting characters to decide RTL ratio Fixes for PR #2573 updated strings for latest master Undo RTL counting, moved out to another branch for future consideration...
2017-04-30Downgrade rubocop 0.48.1 => 0.46.0 (#2628)yhirano
* downgrade rubocop 0.48.1 => 0.46.0 * exclude vendor/**/* from rubocop target files * add frozen_string_literal comment line * fix percent literal delimited by ( and ) * fix alignment * remove comment disabling unknown cop
2017-04-28Update settings_helper.rb (#2556)ButterflyOfFire
Correcting language name arabic = العربية
2017-04-27Bump version, improve how version is stored for better commit history (#2526)Eugen Rochko
2017-04-27Added '(dev)' to the title in development mode (#2524)Ashley
* Added different title for dev * Changed indentation
2017-04-27OEmbed support for PreviewCard (#2337)Eugen Rochko
* 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-26Red favicon for dev (#2470)Lindsey Bieda
* Set a dev specific favicon * Consistent spacing * Add trailing slash for consistency * Update to remove interpolation