Commit graph

126 commits

Author SHA1 Message Date
Nolan Lawson 1e232e455c fix: support KaiOS arrow navigation on public pages (#12251) 2019-11-04 13:03:09 +01:00
Eugen Rochko b9a8b38844
Fix page body not being scrollable in admin layout (#11893)
Hide navigation behind hamburger icon on small screens in admin layout
2019-09-20 10:52:14 +02:00
nzws✨ d0c2c52783 Fix eslint error of import/no-extraneous-dependencies (#11884)
* Fix eslint error of import/no-extraneous-dependencies
- Add history dependency

* refactoring code
2019-09-18 15:41:50 +02:00
ThibG c1e238a77b Fix admin interface showing superfluous reject media/reports on suspended blocks (#11749)
* Fix admin interface showing superfluous reject media/reports on suspended domains

* Fix reject media/reports checkboxes being visible when editing domain block of suspend severity
2019-09-03 22:53:27 +02:00
ThibG 9b6a5ed109 Add public blocks to /about/blocks (#11298)
* Add automatic blocklist display in /about/blocks

Inspired by https://github.com/Gargron/mastodon.social-misc

* Add admin option to set who can see instance blocks

* Normalize locales files

* Rename “Sandbox” to “Silence” for consistency

* Disable /about/blocks when in whitelist mode

* Optionally display rationale for domain blocks

* Only display domain blocks that have user-facing limitations, and order them

* Redesign table of blocked domains to better handle long domain names and rationales

* Change domain blocks ordering now that rationales aren't displayed right away

* Only show explanation for block severities actually in use

* Reword instance block explanations and add disclaimer for public fetch mode
2019-08-19 11:35:48 +02:00
ThibG 7de8c51873 Play animated custom emoji on hover (#11348)
* Play animated custom emoji on hover in status

* Play animated custom emoji on hover in display names

* Play animated custom emoji on hover in bios/bio fields

* Add support for animation on hover on public pages emojis too

* Fix tests

* Code style cleanup
2019-07-21 18:10:40 +02:00
Eugen Rochko aa22b38fdb
Change single-column mode to scroll the whole page (#11359)
Fix #10840
2019-07-19 09:25:22 +02:00
ThibG 4fa6472523 Fix avatar animation on hover when not logged in (#11349) 2019-07-19 09:18:23 +02:00
ThibG e9ddd5a159 Put poll options behind content warnings (#10983)
* Put poll options behind CWs in WebUI

* Put polls behind CWs on public pages

* Add poll icon to public pages CWs

* Revert to not showing an icon in the CW button
2019-06-08 17:40:59 +02:00
Jessica 01b1c377b1 Animate avatar GIFs on-hover on public profiles (#10549)
* Third time is the charm?

* Use full asset URL for data-static and data-original

̀image_tag` expands to the full asset URL, we have to do the same in `data` attributes so that it can work when assets and user data are stored on a different host
2019-04-21 04:47:39 +02:00
ThibG d07b0c038f Hopefully fix input text selection quirks on iOS (#10463)
Fix #10448 (hopefully)
2019-04-03 17:54:54 +02:00
Eugen Rochko 80388a3ffe
Change error graphic to hover-to-play (#10055)
Fix #6060
2019-02-15 23:33:25 +01:00
ThibG 3b3a4d8a17 Fix public hashtag timeline width on mobile, fix scrollbar width compensation (#9824)
* Fix hashtag timeline width being potentially larger than window width

* Add automatic computation of scrollbar width
2019-01-16 20:36:10 +01:00
ThibG 4fb94c758e Add attachment list fallback to public pages (#9780)
* Add attachment list fallback to public pages

Fixes #6714

* Refactor attachments lists
2019-01-13 09:23:54 +00:00
ThibG 70801b850c Postpone scroll-to-detailed status after react components are loaded (#9773) 2019-01-10 15:13:30 +01:00
Paweł Ngei 5c7f641565 Escape HTML in profile name preview in profile settings (#9446)
* fix non-escaped html in the profile settings

* provide a default profile text in case if there's no custom one

* update haml syntax

* simplify default profile name to username

* sanitize user-input html but display emojified icons
2018-12-07 16:42:22 +01:00
Eugen Rochko 73faadad28
Redesign admin accounts index (#9340)
* Improve overview of accounts in admin UI

- Display suspended status, role, last activity and IP prominently
- Default to showing local accounts
- Default to not showing suspended accounts

* Remove unused strings

* Fix tests

* Allow filtering accounts by IP mask
2018-11-26 15:53:27 +01:00
Eugen Rochko 161aeadbb4
Remove character counter from edit profile (#9100)
* Remove display name and bio counter hint, simply limit input

* Remove now redundant translations

* Fix code style issue
2018-10-26 01:55:24 +02:00
Eugen Rochko fd5285658f
Add option to block reports from domain (#8830) 2018-10-20 08:02:44 +02:00
mayaeh e50cb5f4bd Fix that the copy button of verify link did not work. (#8938) 2018-10-09 19:36:13 +02:00
Eugen Rochko f4d549d300
Redesign forms, verify link ownership with rel="me" (#8703)
* Verify link ownership with rel="me"

* Add explanation about verification to UI

* Perform link verifications

* Add click-to-copy widget for verification HTML

* Redesign edit profile page

* Redesign forms

* Improve responsive design of settings pages

* Restore landing page sign-up form

* Fix typo

* Support <link> tags, add spec

* Fix links not being verified on first discovery and passive updates
2018-09-18 16:45:58 +02:00
PatrickRWells 5c42e8b51b Fix CW issues in static view on Safari (Fixes #8354) (#8446)
* Fix CW issues in static view on Safari (8354)

* Fixed formatting issues

* Trailing space
2018-08-26 01:19:13 +02:00
M Somerville 29da56cf75 Hide reject media checkbox when not relevant. (#8426) 2018-08-25 13:26:17 +02:00
Eugen Rochko 78fa926ed5
Add remote interaction dialog for toots (#8202)
* Add remote interaction dialog for toots

* Change AuthorizeFollow into AuthorizeInteraction, support statuses

* Update brakeman.ignore

* Adjust how interaction buttons are display on public pages

* Fix tests
2018-08-18 03:03:12 +02:00
ThibG be0b372a22 Fix admin.js starting rails-ujs twice (fixes #8168) (#8213) 2018-08-15 23:38:31 +02:00
ThibG 1ab8b4b8ea Scroll to linked status in public status view (fixes #7884) (#8130)
When there is a single detailed status on a public page, scroll to it and
replace the history state to not scroll back on refresh (simulates # anchors).
2018-08-06 15:16:02 +02:00
Eugen Rochko bb71538bb5
Redesign public profiles and toots (#8068) 2018-07-28 19:25:33 +02:00
Yamagishi Kazutoshi e9b322d0a6 Upgrade webpack to version v4.x (#6655) 2018-07-14 03:56:41 +02:00
Eugen Rochko 2092d5c0ad
Improve embeds (#7919)
* Make embeds cacheable by reverse proxy

* Make follow button on embeds open remote follow modal

Instead of web+mastodon://, also, turn the button blue, and add a
sign up prompt to the remote follow modal
2018-07-01 04:12:34 +02:00
Yamagishi Kazutoshi f9afd06221 Combine similar components into one on public UI (#7458) 2018-05-12 15:30:06 +02:00
Yamagishi Kazutoshi 16fee0335f Show card modal on public pages (#7428) 2018-05-09 16:22:52 +02:00
Eugen Rochko a9c440637c
Improve report layout (#7188)
* Use table for statuses in report

* Display reported account and reporter in the same table

* Split accounts and general report info into two tables again

* Redesign report statuses table, notes, merge notes and action log

* Remove unused translations

* Fix code style issue

* Fix code style issue

* Fix code style issue
2018-04-20 02:28:48 +02:00
Akihiko Odaki ff7941e652 Show media modal on public pages (#6801) 2018-03-24 12:52:26 +01:00
Akihiko Odaki 7a6eaad445 Do not require images in about.js and share.js (#6622)
They are already required by common.js.
2018-03-04 20:27:40 +01:00
abcang 8cd2828e91 Fix hide and show media button on admin page (#6347) 2018-01-24 13:29:46 +01:00
Eugen Rochko 5276c0a090
HTML e-mails for UserMailer (#6256)
- premailer gem to turn CSS into inline styles automatically
- rework UserMailer templates
- reword UserMailer templates
2018-01-16 03:29:11 +01:00
Yamagishi Kazutoshi bf0ee1a25c Enable ESLint rules import/* (#5414)
* Enable ESLint rules import/*

* fix
2017-10-16 11:12:09 +02:00
Eugen Rochko f486ef2666 Redesign public hashtag pages (#5237) 2017-10-07 20:00:35 +02:00
Nolan Lawson fd7f0732fe Compress and combine emoji data (#5229) 2017-10-06 03:42:34 +02:00
Andrew 0401a24558 Add support for multiple themes (#4959)
* Add support for selecting a theme

* Fix codeclimate issues

* Look up site default style if current user is not available due to e.g. not being logged in

* Remove outdated comment in common.js

* Address requested changes in themes PR

* Fix codeclimate issues

* Explicitly check current_account in application controller and only check theme availability if non-nil

* codeclimate

* explicit precedence with &&

* Fix code style in application_controller according to @nightpool's suggestion, use default style in embedded.html.haml

* codeclimate: indentation + return
2017-09-19 16:36:23 +02:00
Eugen Rochko 2bbf987a0a Redesign video player (#4911)
* Redesign video player

* Use new video player on static public pages too

* Use media gallery component on static public pages too

* Pause video when hiding it

* Full-screen sizing on WebKit

* Add aria labels to video player buttons

* Display link card on public status page

* Fix fullscreen from modal sizing issue

* Remove contain: strict property to fix fullscreen from columns
2017-09-14 03:39:10 +02:00
unarist 47d48fed8d Reset preview image if avatar/header image selection was cancelled (#4893) 2017-09-11 16:19:54 +02:00
Eugen Rochko 6867681c7c Add script to make embedded iframes autosize (#4853) 2017-09-09 16:23:44 +02:00
Eugen Rochko d1a78eba15 Embed modal (#4748)
* Embed modal

* Proxy OEmbed requests from web UI
2017-08-31 03:38:35 +02:00
Eugen Rochko e95bdec7c5 Update status embeds (#4742)
- 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-30 10:23:43 +02:00
unarist fb8aa2b3ba Apply user timezone for the title attribute of .time-ago (#4693) 2017-08-25 17:21:16 +02:00
Eugen Rochko 3c6503038e Add protocol handler. Handle follow intents (#4511)
* Add protocol handler. Handle follow intents

* Add share intent

* Improve code in intents controller

* Adjust share form CSS
2017-08-14 04:53:31 +02:00
Yamagishi Kazutoshi f2390e2803 Dynamicaly change avatar and header bg from account setting (#4289) 2017-07-21 12:47:16 +02:00
Cygnan bc1f9dc24b Fix a typo in public.js (double semicolons) (#4269)
Signed-off-by: Cygnan <mail@cygnan.com>
2017-07-19 13:35:22 +02:00
abcang 4d42a38954 Improve admin page (#4121)
* Improve admin page

* Fix test

* Add spec

* Improve select style
2017-07-18 16:38:22 +02:00
Akihiko Odaki b11ac88692 Require any modules after loading polyfill in entry points (#4231)
app/javascript/mastodon/main.js delayed the execution of modules,
but other entry points didn't. That leads to failure in executing
modules, which requires those polyfills.

Strictly enforce the rule to require any modules after loading
polyfill in entry points.
2017-07-18 00:19:02 +02:00
Akihiko Odaki b15f790221 Require images in common.js (#4232) 2017-07-17 10:23:28 +02:00
Yamagishi Kazutoshi 9008ab3407 Do not load unnecessary script files (#4193) 2017-07-14 11:08:56 +02:00
Eugen Rochko e19eefe219 Redesign the landing page, mount public timeline on it (#4122)
* Redesign the landing page, mount public timeline on it

* Adjust the standalone mounted component to the lacking of router

* Adjust auth layout pages to new design

* Fix tests

* Standalone public timeline polling every 5 seconds

* Remove now obsolete translations

* Add responsive design for new landing page

* Address reviews

* Add floating clouds behind frontpage form

* Use access token from public page when available

* Fix mentions and hashtags links, cursor on status content in standalone mode

* Add footer link to source code

* Fix errors on pages that don't embed the component, use classnames

* Fix tests

* Change anonymous autoPlayGif default to false

* When gif autoplay is disabled, hover to play

* Add option to hide the timeline preview

* Slightly improve alt layout

* Add elephant friend to new frontpage

* Display "back to mastodon" in place of "login" when logged in on frontpage

* Change polling time to 3s
2017-07-11 15:27:59 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) 8784bd79d0 Require stylesheets in common.js (#4152)
Require stylesheets in common.js because stylesheets are shared by the
entry points.
2017-07-11 15:15:42 +02:00
abcang f76e71825d Improve Activity stream spoiler (#4088) 2017-07-06 21:31:03 +02:00
Yamagishi Kazutoshi 3690f04e4a Remove comments for eslint-disable (#3691) 2017-06-11 10:42:42 +02:00
Yamagishi Kazutoshi 140e73bc82 Check ready state of document in public pages (#3652)
* Check ready state of document in public pages

* add check interactive
2017-06-09 15:06:38 +02:00
Yamagishi Kazutoshi bc4fad9e22 Change libraries path to relative (#3433) 2017-05-30 15:13:04 +02:00
Nolan Lawson b42bdd80e8 Extract polyfill loading into single module (#3421) 2017-05-30 15:11:15 +02:00
Yamagishi Kazutoshi 531c1bb245 Add localization of datetime in public page (#3296) 2017-05-25 14:09:25 +02:00
Nolan Lawson 135bdd149e Name the Webpack chunks (#3291) 2017-05-25 03:30:29 +02:00
Sorin Davidoi 8e4d1cba00 Lazy load toots using IntersectionObserver (#3191)
* refactor(components/status_list): Lazy load using IntersectionObserver

* refactor(components/status_list): Avoid setState bottleneck

* refactor(components/status_list): Update state correctly

* fix(components/status): Render if isIntersecting is undefined

* refactor(components/status): Recycle timeout

* refactor(components/status): Reduce animation duration

* refactor(components/status): Use requestIdleCallback

* chore: Split polyfill bundles

* refactor(components/status_list): Increase rootMargin to 300%

* fix(components/status): Check if onRef is not defined

* chore: Add note about polyfill bundle splitting

* fix(components/status): Reduce animation duration to 0.3 seconds
2017-05-24 17:55:00 +02:00
Yamagishi Kazutoshi 84608c3ff8 Add translations for counter of profile (#3214)
ref #3101
2017-05-22 04:45:55 +02:00
Yamagishi Kazutoshi b280c387c8 Add MS Edge support to public.js (#3179) 2017-05-20 18:15:43 +02:00
Yamagishi Kazutoshi 2e112e2406 Improve eslint rules (#3147)
* Add semi to ESLint rules

* Add padded-blocks to ESLint rules

* Add comma-dangle to ESLint rules

* add config/webpack and storyboard

* add streaming/

* yarn test:lint -- --fix
2017-05-20 17:31:47 +02:00
PFM 7eb8b2efad Fix JavaScript error (#3153)
JavaScript error at Safari 10.1(macOS 10.12.4) / iPhone Safari(iOS 10.3.2)
2017-05-19 23:33:42 +02:00
Eugen Rochko 76449df903 Fix character counter not updating for bio (#3101) 2017-05-18 00:38:18 +02:00
Stephen Burgess abe0d9421f Catch import promise in application.js (#3041)
* fix(polyfil): Catch error from promise

https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html

* fix(catch): Error

Make import promise catch a noop with commented out console.log for a debugging hint.

* fix(eslint): Disable eslint console rule

* fix(application): Use console error
2017-05-17 02:59:43 +02:00
Akihiko Odaki 85c9496340 Introduce common JavaScript file (#2981)
* Create common chunk rather than vendor chunk

vendor chunk is a set of modules provided by external vendors, but now we
can have a chunk as a set of modules shared by multiple entry points,
which could be more efficent than having vendor chunk.

* Start rails-ujs in common.js

This is used by /settings/two_factor_authentication.
2017-05-15 20:20:10 +02:00
Nolan Lawson 0ec77c5b3e Add dynamic polyfills for older browsers (#2985)
Fixes #2941
2017-05-11 11:26:06 +02:00
Eugen Rochko 72698bc3b4 Fix regressions from #2683 (#2970)
* Fix regressions from #2683

Properly format spoiler text HTML, while keeping old logic for blankness intact
Process hashtags and mentions in spoiler text
Format spoiler text for Atom
Change "show more" toggle into a button instead of anchor
Fix style regression on dropdowns for detailed statuses

* Fix lint issue

* Convert spoiler text to plaintext in desktop notifications
2017-05-11 00:28:10 +02:00
Akihiko Odaki af6a84da14 Use RegExp for require.context to filter custom stylesheets (#2950)
ExtractTextWebpackPlugin extracts the content of loaded files, which means
it loads files loaded by require.context but not required after that.
However the former implementation is not aware of that.

require.context can have a RegExp to filter files to load. This change
gives a RegExp which matches with SCSSes with 'custom' prefix to
require.context to take advantage of the feature.
2017-05-09 19:51:45 +02:00
Yamagishi Kazutoshi 42eb841dc2 Remove jquery-ujs (#2939)
* Remove jquery-ujs

* fix for eslint
2017-05-09 14:50:43 +02:00
Yamagishi Kazutoshi f000673599 Remove local_time gem, and add similar (#2875) 2017-05-07 15:22:54 +02:00
Eugen Rochko f5bf5ebb82 Replace sprockets/browserify with Webpack (#2617)
* 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-03 02:04:16 +02:00