From f5bf5ebb82e3af420dcd23d602b1be6cc86838e1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 3 May 2017 02:04:16 +0200 Subject: [PATCH] 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 * Add react definitions to places that use JSX * Add Procfile.dev for running rails, webpack and streaming API at the same time --- .babelrc | 22 +- .foreman | 1 + .gitignore | 4 +- .postcssrc.yml | 4 + .travis.yml | 7 +- Dockerfile | 15 +- Gemfile | 34 +- Gemfile.lock | 43 +- Procfile.dev | 3 + app/assets/javascripts/application.js | 15 - app/assets/javascripts/application_public.js | 9 - app/assets/javascripts/components.js | 15 - .../components/autosuggest_account.jsx | 16 - .../compose/components/autosuggest_status.jsx | 15 - .../components/account_authorize.jsx | 44 - .../features/getting_started/index.jsx | 66 - .../javascripts/components/locales/bg.jsx | 68 - .../javascripts/components/locales/eo.jsx | 68 - .../javascripts/components/locales/es.jsx | 93 - .../javascripts/components/locales/fi.jsx | 68 - .../javascripts/components/locales/hu.jsx | 57 - .../javascripts/components/locales/index.jsx | 57 - .../javascripts/components/locales/uk.jsx | 57 - .../components => stylesheets}/.gitkeep | 0 app/assets/stylesheets/fonts/montserrat.scss | 11 - app/assets/stylesheets/fonts/roboto-mono.scss | 12 - app/assets/stylesheets/fonts/roboto.scss | 52 - app/helpers/application_helper.rb | 6 +- .../fonts/montserrat/Montserrat-Regular.eot | Bin .../fonts/montserrat/Montserrat-Regular.ttf | Bin .../fonts/montserrat/Montserrat-Regular.woff | Bin .../fonts/montserrat/Montserrat-Regular.woff2 | Bin .../robotomono-regular-webfont.eot | Bin .../robotomono-regular-webfont.svg | 0 .../robotomono-regular-webfont.ttf | Bin .../robotomono-regular-webfont.woff | Bin .../robotomono-regular-webfont.woff2 | Bin .../fonts/roboto/roboto-bold-webfont.eot | Bin .../fonts/roboto/roboto-bold-webfont.svg | 0 .../fonts/roboto/roboto-bold-webfont.ttf | Bin .../fonts/roboto/roboto-bold-webfont.woff | Bin .../fonts/roboto/roboto-bold-webfont.woff2 | Bin .../fonts/roboto/roboto-italic-webfont.eot | Bin .../fonts/roboto/roboto-italic-webfont.svg | 0 .../fonts/roboto/roboto-italic-webfont.ttf | Bin .../fonts/roboto/roboto-italic-webfont.woff | Bin .../fonts/roboto/roboto-italic-webfont.woff2 | Bin .../fonts/roboto/roboto-medium-webfont.eot | Bin .../fonts/roboto/roboto-medium-webfont.svg | 0 .../fonts/roboto/roboto-medium-webfont.ttf | Bin .../fonts/roboto/roboto-medium-webfont.woff | Bin .../fonts/roboto/roboto-medium-webfont.woff2 | Bin .../fonts/roboto/roboto-regular-webfont.eot | Bin .../fonts/roboto/roboto-regular-webfont.svg | 0 .../fonts/roboto/roboto-regular-webfont.ttf | Bin .../fonts/roboto/roboto-regular-webfont.woff | Bin .../fonts/roboto/roboto-regular-webfont.woff2 | Bin app/{assets => javascript}/images/.keep | 0 .../images/background-photo.jpg | Bin .../images/boost_sprite.png | Bin .../images/elephant-friend.png | Bin .../images/fluffy-elephant-friend.png | Bin app/{assets => javascript}/images/logo.png | Bin app/{assets => javascript}/images/logo.svg | 0 .../images/mastodon-getting-started.png | Bin .../images/mastodon-not-found.png | Bin .../images/mastodon.jpg | Bin .../images/mastodon_small.jpg | Bin .../images/screenshot.png | Bin app/{assets => javascript}/images/void.png | Bin app/javascript/mastodon/.gitkeep | 0 .../mastodon/actions/accounts.js} | 0 .../mastodon/actions/alerts.js} | 0 .../mastodon/actions/blocks.js} | 0 .../mastodon/actions/cards.js} | 0 .../mastodon/actions/compose.js} | 0 .../mastodon/actions/favourites.js} | 0 .../mastodon/actions/interactions.js} | 0 .../mastodon/actions/modal.js} | 0 .../mastodon/actions/mutes.js} | 0 .../mastodon/actions/notifications.js} | 0 .../mastodon/actions/onboarding.js} | 0 .../mastodon/actions/reports.js} | 0 .../mastodon/actions/search.js} | 0 .../mastodon/actions/settings.js} | 0 .../mastodon/actions/statuses.js} | 0 .../mastodon/actions/store.js} | 0 .../mastodon/actions/timelines.js} | 0 .../api.jsx => javascript/mastodon/api.js} | 0 .../mastodon/components/account.js} | 4 +- .../mastodon/components/attachment_list.js} | 1 + .../components/autosuggest_textarea.js} | 4 +- .../mastodon/components/avatar.js} | 5 + .../mastodon/components/button.js} | 1 + .../mastodon/components/collapsable.js} | 1 + .../components/column_back_button.js} | 1 + .../components/column_back_button_slim.js} | 1 + .../components/column_collapsable.js} | 1 + .../mastodon/components/display_name.js} | 1 + .../mastodon/components/dropdown_menu.js} | 1 + .../components/extended_video_player.js} | 1 + .../mastodon/components/icon_button.js} | 1 + .../mastodon/components/load_more.js} | 1 + .../mastodon/components/loading_indicator.js} | 1 + .../mastodon/components/media_gallery.js} | 1 + .../mastodon/components/missing_indicator.js} | 5 +- .../mastodon/components/permalink.js} | 9 +- .../components/relative_timestamp.js} | 1 + .../mastodon/components/status.js} | 4 +- .../mastodon/components/status_action_bar.js} | 1 + .../mastodon/components/status_content.js} | 12 +- .../mastodon/components/status_list.js} | 4 +- .../mastodon/components/video_player.js} | 16 +- .../mastodon/containers/account_container.js} | 0 .../mastodon/containers/mastodon.js} | 10 +- .../mastodon/containers/status_container.js} | 1 + .../mastodon/emoji.js} | 0 .../account/components/action_bar.js} | 1 + .../features/account/components/header.js} | 6 +- .../account_timeline/components/header.js} | 4 +- .../containers/header_container.js} | 1 + .../features/account_timeline/index.js} | 4 +- .../mastodon/features/blocks/index.js} | 4 +- .../features/community_timeline/index.js} | 1 + .../compose/components/autosuggest_account.js | 26 + .../compose/components/character_counter.js} | 1 + .../compose/components/compose_form.js} | 4 +- .../components/emoji_picker_dropdown.js} | 1 + .../compose/components/navigation_bar.js} | 9 +- .../compose/components/privacy_dropdown.js} | 1 + .../compose/components/reply_indicator.js} | 4 +- .../features/compose/components/search.js} | 2 +- .../compose/components/search_results.js} | 4 +- .../compose/components/text_icon_button.js} | 1 + .../compose/components/upload_button.js} | 1 + .../compose/components/upload_form.js} | 1 + .../compose/components/upload_progress.js} | 1 + .../features/compose/components/warning.js} | 1 + .../autosuggest_account_container.js} | 0 .../autosuggest_status_container.js} | 0 .../containers/compose_form_container.js} | 0 .../containers/navigation_container.js} | 0 .../containers/privacy_dropdown_container.js} | 0 .../containers/reply_indicator_container.js} | 0 .../compose/containers/search_container.js} | 0 .../containers/search_results_container.js} | 0 .../containers/sensitive_button_container.js} | 1 + .../containers/spoiler_button_container.js} | 0 .../containers/upload_button_container.js} | 0 .../containers/upload_form_container.js} | 0 .../containers/upload_progress_container.js} | 0 .../compose/containers/warning_container.js} | 1 + .../mastodon/features/compose/index.js} | 1 + .../features/favourited_statuses/index.js} | 7 +- .../mastodon/features/favourites/index.js} | 4 +- .../components/account_authorize.js | 51 + .../account_authorize_container.js} | 0 .../features/follow_requests/index.js} | 4 +- .../mastodon/features/followers/index.js} | 4 +- .../mastodon/features/following/index.js} | 4 +- .../features/generic_not_found/index.js} | 1 + .../features/getting_started/index.js | 73 + .../features/hashtag_timeline/index.js} | 1 + .../components/column_settings.js} | 1 + .../home_timeline/components/setting_text.js} | 1 + .../containers/column_settings_container.js} | 0 .../mastodon/features/home_timeline/index.js} | 1 + .../mastodon/features/mutes/index.js} | 4 +- .../components/clear_column_button.js} | 1 + .../components/column_settings.js} | 1 + .../notifications/components/notification.js} | 4 +- .../components/setting_toggle.js} | 1 + .../containers/column_settings_container.js} | 0 .../containers/notification_container.js} | 0 .../mastodon/features/notifications/index.js} | 1 + .../features/public_timeline/index.js} | 1 + .../mastodon/features/reblogs/index.js} | 4 +- .../report/components/status_check_box.js} | 1 + .../containers/status_check_box_container.js} | 0 .../mastodon/features/report/index.js} | 1 + .../features/status/components/action_bar.js} | 1 + .../features/status/components/card.js} | 1 + .../status/components/detailed_status.js} | 4 +- .../status/containers/card_container.js} | 0 .../mastodon/features/status/index.js} | 4 +- .../features/ui/components/boost_modal.js} | 4 +- .../features/ui/components/column.js} | 15 +- .../features/ui/components/column_header.js} | 1 + .../features/ui/components/column_link.js} | 1 + .../ui/components/column_subheading.js} | 13 +- .../features/ui/components/columns_area.js} | 1 + .../ui/components/confirmation_modal.js} | 1 + .../features/ui/components/media_modal.js} | 4 +- .../features/ui/components/modal_root.js} | 1 + .../ui/components/onboarding_modal.js} | 1 + .../features/ui/components/tabs_bar.js} | 1 + .../features/ui/components/upload_area.js} | 1 + .../features/ui/components/video_modal.js} | 4 +- .../ui/containers/loading_bar_container.js} | 0 .../ui/containers/modal_container.js} | 0 .../ui/containers/notifications_container.js} | 0 .../ui/containers/status_list_container.js} | 0 .../mastodon/features/ui/index.js} | 7 +- .../mastodon/is_mobile.js} | 0 .../mastodon/link_header.js} | 0 .../mastodon/locales/ar.json} | 99 +- app/javascript/mastodon/locales/bg.json | 163 ++ .../mastodon/locales/de.json} | 63 +- .../mastodon/locales/defaultMessages.json | 1068 ++++++++++ .../mastodon/locales/en.json} | 22 +- app/javascript/mastodon/locales/eo.json | 163 ++ app/javascript/mastodon/locales/es.json | 163 ++ .../mastodon/locales/fa.json} | 73 +- app/javascript/mastodon/locales/fi.json | 163 ++ .../mastodon/locales/fr.json} | 60 +- .../mastodon/locales/he.json} | 50 +- .../mastodon/locales/hr.json} | 66 +- app/javascript/mastodon/locales/hu.json | 163 ++ .../mastodon/locales/id.json} | 16 +- app/javascript/mastodon/locales/index.js | 57 + .../mastodon/locales/io.json} | 65 +- .../mastodon/locales/it.json} | 66 +- .../mastodon/locales/ja.json} | 52 +- .../mastodon/locales/nl.json} | 69 +- .../mastodon/locales/no.json} | 73 +- .../mastodon/locales/oc.json} | 249 ++- .../mastodon/locales/pt-BR.json} | 66 +- .../mastodon/locales/pt.json} | 66 +- .../mastodon/locales/ru.json} | 39 +- app/javascript/mastodon/locales/uk.json | 163 ++ .../mastodon/locales/whitelist_ar.json | 2 + .../mastodon/locales/whitelist_bg.json | 2 + .../mastodon/locales/whitelist_de.json | 2 + .../mastodon/locales/whitelist_en.json | 2 + .../mastodon/locales/whitelist_eo.json | 2 + .../mastodon/locales/whitelist_es.json | 2 + .../mastodon/locales/whitelist_fa.json | 2 + .../mastodon/locales/whitelist_fi.json | 2 + .../mastodon/locales/whitelist_fr.json | 2 + .../mastodon/locales/whitelist_hr.json | 2 + .../mastodon/locales/whitelist_hu.json | 2 + .../mastodon/locales/whitelist_id.json | 2 + .../mastodon/locales/whitelist_io.json | 2 + .../mastodon/locales/whitelist_it.json | 2 + .../mastodon/locales/whitelist_ja.json | 2 + .../mastodon/locales/whitelist_nl.json | 2 + .../mastodon/locales/whitelist_no.json | 2 + .../mastodon/locales/whitelist_oc.json | 2 + .../mastodon/locales/whitelist_pt-BR.json | 2 + .../mastodon/locales/whitelist_pt.json | 2 + .../mastodon/locales/whitelist_ru.json | 2 + .../mastodon/locales/whitelist_uk.json | 2 + .../mastodon/locales/whitelist_zh-CN.json | 2 + .../mastodon/locales/whitelist_zh-HK.json | 2 + .../mastodon/locales/zh-CN.json} | 98 +- .../mastodon/locales/zh-HK.json} | 91 +- .../mastodon/middleware/errors.js} | 0 .../mastodon/middleware/loading_bar.js} | 0 .../mastodon/middleware/sounds.js} | 0 app/javascript/mastodon/reducers/accounts.js | 133 ++ .../mastodon/reducers/accounts_counters.js} | 10 +- .../mastodon/reducers/alerts.js} | 0 .../mastodon/reducers/cards.js} | 0 .../mastodon/reducers/compose.js} | 0 .../mastodon/reducers/index.js} | 2 + .../mastodon/reducers/meta.js} | 0 .../mastodon/reducers/modal.js} | 0 .../mastodon/reducers/notifications.js} | 4 +- .../mastodon/reducers/relationships.js} | 0 .../mastodon/reducers/reports.js} | 0 .../mastodon/reducers/search.js} | 0 .../mastodon/reducers/settings.js} | 4 + .../mastodon/reducers/status_lists.js} | 2 +- .../mastodon/reducers/statuses.js} | 0 .../mastodon/reducers/timelines.js} | 8 +- .../mastodon/reducers/user_lists.js} | 8 +- .../rtl.jsx => javascript/mastodon/rtl.js} | 0 .../mastodon/selectors/index.js} | 5 +- .../mastodon/store/configureStore.js} | 0 .../mastodon/stream.js} | 0 .../uuid.jsx => javascript/mastodon/uuid.js} | 0 app/javascript/packs/application.js | 29 + .../extras.jsx => javascript/packs/public.js} | 8 +- .../styles}/about.scss | 0 .../styles}/accounts.scss | 0 .../styles}/admin.scss | 0 .../styles}/application.scss | 1 - .../styles}/basics.scss | 2 +- .../styles}/boost.scss | 0 .../styles}/compact_header.scss | 0 .../styles}/components.scss | 19 +- .../styles}/containers.scss | 0 app/javascript/styles/fonts/montserrat.scss | 11 + app/javascript/styles/fonts/roboto-mono.scss | 12 + app/javascript/styles/fonts/roboto.scss | 52 + .../styles}/footer.scss | 0 .../styles}/forms.scss | 0 .../styles}/landing_strip.scss | 0 .../styles}/lists.scss | 0 .../styles}/reset.scss | 0 .../styles}/rtl.scss | 0 .../styles}/stream_entries.scss | 0 .../styles}/tables.scss | 0 .../styles}/variables.scss | 0 app/views/about/show.html.haml | 8 +- app/views/home/index.html.haml | 4 +- app/views/layouts/admin.html.haml | 4 +- app/views/layouts/application.html.haml | 4 +- app/views/layouts/auth.html.haml | 4 +- app/views/layouts/embedded.html.haml | 2 +- app/views/layouts/public.html.haml | 2 +- bin/webpack | 33 + bin/webpack-dev-server | 33 + bin/yarn | 11 + config/application.rb | 4 - config/environments/development.rb | 2 - config/environments/production.rb | 2 - config/initializers/assets.rb | 2 +- config/webpack/configuration.js | 26 + config/webpack/development.js | 16 + config/webpack/development.server.js | 18 + config/webpack/development.server.yml | 17 + config/webpack/loaders/assets.js | 12 + config/webpack/loaders/babel.js | 5 + config/webpack/loaders/coffee.js | 4 + config/webpack/loaders/erb.js | 9 + config/webpack/loaders/sass.js | 14 + config/webpack/paths.yml | 33 + config/webpack/production.js | 44 + config/webpack/shared.js | 59 + config/webpack/test.js | 6 + config/webpack/translationRunner.js | 34 + docker-compose.yml | 17 +- package.json | 58 +- .../api/v1/accounts_controller_spec.rb | 7 +- spec/features/log_in_spec.rb | 2 +- spec/javascript/components/avatar.test.jsx | 2 +- spec/javascript/components/button.test.jsx | 2 +- .../components/display_name.test.jsx | 2 +- .../components/dropdown_menu.test.jsx | 2 +- .../features/ui/components/column.test.jsx | 4 +- .../components/loading_indicator.test.jsx | 2 +- yarn.lock | 1758 ++++++++++------- 343 files changed, 5299 insertions(+), 2081 deletions(-) create mode 100644 .foreman create mode 100644 .postcssrc.yml create mode 100644 Procfile.dev delete mode 100644 app/assets/javascripts/application.js delete mode 100644 app/assets/javascripts/application_public.js delete mode 100644 app/assets/javascripts/components.js delete mode 100644 app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx delete mode 100644 app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx delete mode 100644 app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx delete mode 100644 app/assets/javascripts/components/features/getting_started/index.jsx delete mode 100644 app/assets/javascripts/components/locales/bg.jsx delete mode 100644 app/assets/javascripts/components/locales/eo.jsx delete mode 100644 app/assets/javascripts/components/locales/es.jsx delete mode 100644 app/assets/javascripts/components/locales/fi.jsx delete mode 100644 app/assets/javascripts/components/locales/hu.jsx delete mode 100644 app/assets/javascripts/components/locales/index.jsx delete mode 100644 app/assets/javascripts/components/locales/uk.jsx rename app/assets/{javascripts/components => stylesheets}/.gitkeep (100%) delete mode 100644 app/assets/stylesheets/fonts/montserrat.scss delete mode 100644 app/assets/stylesheets/fonts/roboto-mono.scss delete mode 100644 app/assets/stylesheets/fonts/roboto.scss rename app/{assets => javascript}/fonts/montserrat/Montserrat-Regular.eot (100%) rename app/{assets => javascript}/fonts/montserrat/Montserrat-Regular.ttf (100%) rename app/{assets => javascript}/fonts/montserrat/Montserrat-Regular.woff (100%) rename app/{assets => javascript}/fonts/montserrat/Montserrat-Regular.woff2 (100%) rename app/{assets => javascript}/fonts/roboto-mono/robotomono-regular-webfont.eot (100%) rename app/{assets => javascript}/fonts/roboto-mono/robotomono-regular-webfont.svg (100%) rename app/{assets => javascript}/fonts/roboto-mono/robotomono-regular-webfont.ttf (100%) rename app/{assets => javascript}/fonts/roboto-mono/robotomono-regular-webfont.woff (100%) rename app/{assets => javascript}/fonts/roboto-mono/robotomono-regular-webfont.woff2 (100%) rename app/{assets => javascript}/fonts/roboto/roboto-bold-webfont.eot (100%) rename app/{assets => javascript}/fonts/roboto/roboto-bold-webfont.svg (100%) rename app/{assets => javascript}/fonts/roboto/roboto-bold-webfont.ttf (100%) rename app/{assets => javascript}/fonts/roboto/roboto-bold-webfont.woff (100%) rename app/{assets => javascript}/fonts/roboto/roboto-bold-webfont.woff2 (100%) rename app/{assets => javascript}/fonts/roboto/roboto-italic-webfont.eot (100%) rename app/{assets => javascript}/fonts/roboto/roboto-italic-webfont.svg (100%) rename app/{assets => javascript}/fonts/roboto/roboto-italic-webfont.ttf (100%) rename app/{assets => javascript}/fonts/roboto/roboto-italic-webfont.woff (100%) rename app/{assets => javascript}/fonts/roboto/roboto-italic-webfont.woff2 (100%) rename app/{assets => javascript}/fonts/roboto/roboto-medium-webfont.eot (100%) rename app/{assets => javascript}/fonts/roboto/roboto-medium-webfont.svg (100%) rename app/{assets => javascript}/fonts/roboto/roboto-medium-webfont.ttf (100%) rename app/{assets => javascript}/fonts/roboto/roboto-medium-webfont.woff (100%) rename app/{assets => javascript}/fonts/roboto/roboto-medium-webfont.woff2 (100%) rename app/{assets => javascript}/fonts/roboto/roboto-regular-webfont.eot (100%) rename app/{assets => javascript}/fonts/roboto/roboto-regular-webfont.svg (100%) rename app/{assets => javascript}/fonts/roboto/roboto-regular-webfont.ttf (100%) rename app/{assets => javascript}/fonts/roboto/roboto-regular-webfont.woff (100%) rename app/{assets => javascript}/fonts/roboto/roboto-regular-webfont.woff2 (100%) rename app/{assets => javascript}/images/.keep (100%) rename app/{assets => javascript}/images/background-photo.jpg (100%) rename app/{assets => javascript}/images/boost_sprite.png (100%) rename app/{assets => javascript}/images/elephant-friend.png (100%) rename app/{assets => javascript}/images/fluffy-elephant-friend.png (100%) rename app/{assets => javascript}/images/logo.png (100%) rename app/{assets => javascript}/images/logo.svg (100%) rename app/{assets => javascript}/images/mastodon-getting-started.png (100%) rename app/{assets => javascript}/images/mastodon-not-found.png (100%) rename app/{assets => javascript}/images/mastodon.jpg (100%) rename app/{assets => javascript}/images/mastodon_small.jpg (100%) rename app/{assets => javascript}/images/screenshot.png (100%) rename app/{assets => javascript}/images/void.png (100%) create mode 100644 app/javascript/mastodon/.gitkeep rename app/{assets/javascripts/components/actions/accounts.jsx => javascript/mastodon/actions/accounts.js} (100%) rename app/{assets/javascripts/components/actions/alerts.jsx => javascript/mastodon/actions/alerts.js} (100%) rename app/{assets/javascripts/components/actions/blocks.jsx => javascript/mastodon/actions/blocks.js} (100%) rename app/{assets/javascripts/components/actions/cards.jsx => javascript/mastodon/actions/cards.js} (100%) rename app/{assets/javascripts/components/actions/compose.jsx => javascript/mastodon/actions/compose.js} (100%) rename app/{assets/javascripts/components/actions/favourites.jsx => javascript/mastodon/actions/favourites.js} (100%) rename app/{assets/javascripts/components/actions/interactions.jsx => javascript/mastodon/actions/interactions.js} (100%) rename app/{assets/javascripts/components/actions/modal.jsx => javascript/mastodon/actions/modal.js} (100%) rename app/{assets/javascripts/components/actions/mutes.jsx => javascript/mastodon/actions/mutes.js} (100%) rename app/{assets/javascripts/components/actions/notifications.jsx => javascript/mastodon/actions/notifications.js} (100%) rename app/{assets/javascripts/components/actions/onboarding.jsx => javascript/mastodon/actions/onboarding.js} (100%) rename app/{assets/javascripts/components/actions/reports.jsx => javascript/mastodon/actions/reports.js} (100%) rename app/{assets/javascripts/components/actions/search.jsx => javascript/mastodon/actions/search.js} (100%) rename app/{assets/javascripts/components/actions/settings.jsx => javascript/mastodon/actions/settings.js} (100%) rename app/{assets/javascripts/components/actions/statuses.jsx => javascript/mastodon/actions/statuses.js} (100%) rename app/{assets/javascripts/components/actions/store.jsx => javascript/mastodon/actions/store.js} (100%) rename app/{assets/javascripts/components/actions/timelines.jsx => javascript/mastodon/actions/timelines.js} (100%) rename app/{assets/javascripts/components/api.jsx => javascript/mastodon/api.js} (100%) rename app/{assets/javascripts/components/components/account.jsx => javascript/mastodon/components/account.js} (95%) rename app/{assets/javascripts/components/components/attachment_list.jsx => javascript/mastodon/components/attachment_list.js} (96%) rename app/{assets/javascripts/components/components/autosuggest_textarea.jsx => javascript/mastodon/components/autosuggest_textarea.js} (97%) rename app/{assets/javascripts/components/components/avatar.jsx => javascript/mastodon/components/avatar.js} (92%) rename app/{assets/javascripts/components/components/button.jsx => javascript/mastodon/components/button.js} (97%) rename app/{assets/javascripts/components/components/collapsable.jsx => javascript/mastodon/components/collapsable.js} (96%) rename app/{assets/javascripts/components/components/column_back_button.jsx => javascript/mastodon/components/column_back_button.js} (96%) rename app/{assets/javascripts/components/components/column_back_button_slim.jsx => javascript/mastodon/components/column_back_button_slim.js} (96%) rename app/{assets/javascripts/components/components/column_collapsable.jsx => javascript/mastodon/components/column_collapsable.js} (98%) rename app/{assets/javascripts/components/components/display_name.jsx => javascript/mastodon/components/display_name.js} (96%) rename app/{assets/javascripts/components/components/dropdown_menu.jsx => javascript/mastodon/components/dropdown_menu.js} (98%) rename app/{assets/javascripts/components/components/extended_video_player.jsx => javascript/mastodon/components/extended_video_player.js} (97%) rename app/{assets/javascripts/components/components/icon_button.jsx => javascript/mastodon/components/icon_button.js} (98%) rename app/{assets/javascripts/components/components/load_more.jsx => javascript/mastodon/components/load_more.js} (92%) rename app/{assets/javascripts/components/components/loading_indicator.jsx => javascript/mastodon/components/loading_indicator.js} (90%) rename app/{assets/javascripts/components/components/media_gallery.jsx => javascript/mastodon/components/media_gallery.js} (99%) rename app/{assets/javascripts/components/components/missing_indicator.jsx => javascript/mastodon/components/missing_indicator.js} (55%) rename app/{assets/javascripts/components/components/permalink.jsx => javascript/mastodon/components/permalink.js} (73%) rename app/{assets/javascripts/components/components/relative_timestamp.jsx => javascript/mastodon/components/relative_timestamp.js} (95%) rename app/{assets/javascripts/components/components/status.jsx => javascript/mastodon/components/status.js} (96%) rename app/{assets/javascripts/components/components/status_action_bar.jsx => javascript/mastodon/components/status_action_bar.js} (99%) rename app/{assets/javascripts/components/components/status_content.jsx => javascript/mastodon/components/status_content.js} (93%) rename app/{assets/javascripts/components/components/status_list.jsx => javascript/mastodon/components/status_list.js} (95%) rename app/{assets/javascripts/components/components/video_player.jsx => javascript/mastodon/components/video_player.js} (94%) rename app/{assets/javascripts/components/containers/account_container.jsx => javascript/mastodon/containers/account_container.js} (100%) rename app/{assets/javascripts/components/containers/mastodon.jsx => javascript/mastodon/containers/mastodon.js} (97%) rename app/{assets/javascripts/components/containers/status_container.jsx => javascript/mastodon/containers/status_container.js} (99%) rename app/{assets/javascripts/components/emoji.jsx => javascript/mastodon/emoji.js} (100%) rename app/{assets/javascripts/components/features/account/components/action_bar.jsx => javascript/mastodon/features/account/components/action_bar.js} (99%) rename app/{assets/javascripts/components/features/account/components/header.jsx => javascript/mastodon/features/account/components/header.js} (96%) rename app/{assets/javascripts/components/features/account_timeline/components/header.jsx => javascript/mastodon/features/account_timeline/components/header.js} (93%) rename app/{assets/javascripts/components/features/account_timeline/containers/header_container.jsx => javascript/mastodon/features/account_timeline/containers/header_container.js} (98%) rename app/{assets/javascripts/components/features/account_timeline/index.jsx => javascript/mastodon/features/account_timeline/index.js} (94%) rename app/{assets/javascripts/components/features/blocks/index.jsx => javascript/mastodon/features/blocks/index.js} (93%) rename app/{assets/javascripts/components/features/community_timeline/index.jsx => javascript/mastodon/features/community_timeline/index.js} (99%) create mode 100644 app/javascript/mastodon/features/compose/components/autosuggest_account.js rename app/{assets/javascripts/components/features/compose/components/character_counter.jsx => javascript/mastodon/features/compose/components/character_counter.js} (95%) rename app/{assets/javascripts/components/features/compose/components/compose_form.jsx => javascript/mastodon/features/compose/components/compose_form.js} (98%) rename app/{assets/javascripts/components/features/compose/components/emoji_picker_dropdown.jsx => javascript/mastodon/features/compose/components/emoji_picker_dropdown.js} (99%) rename app/{assets/javascripts/components/features/compose/components/navigation_bar.jsx => javascript/mastodon/features/compose/components/navigation_bar.js} (79%) rename app/{assets/javascripts/components/features/compose/components/privacy_dropdown.jsx => javascript/mastodon/features/compose/components/privacy_dropdown.js} (99%) rename app/{assets/javascripts/components/features/compose/components/reply_indicator.jsx => javascript/mastodon/features/compose/components/reply_indicator.js} (93%) rename app/{assets/javascripts/components/features/compose/components/search.jsx => javascript/mastodon/features/compose/components/search.js} (97%) rename app/{assets/javascripts/components/features/compose/components/search_results.jsx => javascript/mastodon/features/compose/components/search_results.js} (92%) rename app/{assets/javascripts/components/features/compose/components/text_icon_button.jsx => javascript/mastodon/features/compose/components/text_icon_button.js} (96%) rename app/{assets/javascripts/components/features/compose/components/upload_button.jsx => javascript/mastodon/features/compose/components/upload_button.js} (98%) rename app/{assets/javascripts/components/features/compose/components/upload_form.jsx => javascript/mastodon/features/compose/components/upload_form.js} (98%) rename app/{assets/javascripts/components/features/compose/components/upload_progress.jsx => javascript/mastodon/features/compose/components/upload_progress.js} (97%) rename app/{assets/javascripts/components/features/compose/components/warning.jsx => javascript/mastodon/features/compose/components/warning.js} (93%) rename app/{assets/javascripts/components/features/compose/containers/autosuggest_account_container.jsx => javascript/mastodon/features/compose/containers/autosuggest_account_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/autosuggest_status_container.jsx => javascript/mastodon/features/compose/containers/autosuggest_status_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/compose_form_container.jsx => javascript/mastodon/features/compose/containers/compose_form_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/navigation_container.jsx => javascript/mastodon/features/compose/containers/navigation_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/privacy_dropdown_container.jsx => javascript/mastodon/features/compose/containers/privacy_dropdown_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/reply_indicator_container.jsx => javascript/mastodon/features/compose/containers/reply_indicator_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/search_container.jsx => javascript/mastodon/features/compose/containers/search_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/search_results_container.jsx => javascript/mastodon/features/compose/containers/search_results_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/sensitive_button_container.jsx => javascript/mastodon/features/compose/containers/sensitive_button_container.js} (98%) rename app/{assets/javascripts/components/features/compose/containers/spoiler_button_container.jsx => javascript/mastodon/features/compose/containers/spoiler_button_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/upload_button_container.jsx => javascript/mastodon/features/compose/containers/upload_button_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/upload_form_container.jsx => javascript/mastodon/features/compose/containers/upload_form_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/upload_progress_container.jsx => javascript/mastodon/features/compose/containers/upload_progress_container.js} (100%) rename app/{assets/javascripts/components/features/compose/containers/warning_container.jsx => javascript/mastodon/features/compose/containers/warning_container.js} (98%) rename app/{assets/javascripts/components/features/compose/index.jsx => javascript/mastodon/features/compose/index.js} (99%) rename app/{assets/javascripts/components/features/favourited_statuses/index.jsx => javascript/mastodon/features/favourited_statuses/index.js} (87%) rename app/{assets/javascripts/components/features/favourites/index.jsx => javascript/mastodon/features/favourites/index.js} (91%) create mode 100644 app/javascript/mastodon/features/follow_requests/components/account_authorize.js rename app/{assets/javascripts/components/features/follow_requests/containers/account_authorize_container.jsx => javascript/mastodon/features/follow_requests/containers/account_authorize_container.js} (100%) rename app/{assets/javascripts/components/features/follow_requests/index.jsx => javascript/mastodon/features/follow_requests/index.js} (93%) rename app/{assets/javascripts/components/features/followers/index.jsx => javascript/mastodon/features/followers/index.js} (94%) rename app/{assets/javascripts/components/features/following/index.jsx => javascript/mastodon/features/following/index.js} (94%) rename app/{assets/javascripts/components/features/generic_not_found/index.jsx => javascript/mastodon/features/generic_not_found/index.js} (89%) create mode 100644 app/javascript/mastodon/features/getting_started/index.js rename app/{assets/javascripts/components/features/hashtag_timeline/index.jsx => javascript/mastodon/features/hashtag_timeline/index.js} (98%) rename app/{assets/javascripts/components/features/home_timeline/components/column_settings.jsx => javascript/mastodon/features/home_timeline/components/column_settings.js} (98%) rename app/{assets/javascripts/components/features/home_timeline/components/setting_text.jsx => javascript/mastodon/features/home_timeline/components/setting_text.js} (96%) rename app/{assets/javascripts/components/features/home_timeline/containers/column_settings_container.jsx => javascript/mastodon/features/home_timeline/containers/column_settings_container.js} (100%) rename app/{assets/javascripts/components/features/home_timeline/index.jsx => javascript/mastodon/features/home_timeline/index.js} (98%) rename app/{assets/javascripts/components/features/mutes/index.jsx => javascript/mastodon/features/mutes/index.js} (93%) rename app/{assets/javascripts/components/features/notifications/components/clear_column_button.jsx => javascript/mastodon/features/notifications/components/clear_column_button.js} (96%) rename app/{assets/javascripts/components/features/notifications/components/column_settings.jsx => javascript/mastodon/features/notifications/components/column_settings.js} (99%) rename app/{assets/javascripts/components/features/notifications/components/notification.jsx => javascript/mastodon/features/notifications/components/notification.js} (95%) rename app/{assets/javascripts/components/features/notifications/components/setting_toggle.jsx => javascript/mastodon/features/notifications/components/setting_toggle.js} (96%) rename app/{assets/javascripts/components/features/notifications/containers/column_settings_container.jsx => javascript/mastodon/features/notifications/containers/column_settings_container.js} (100%) rename app/{assets/javascripts/components/features/notifications/containers/notification_container.jsx => javascript/mastodon/features/notifications/containers/notification_container.js} (100%) rename app/{assets/javascripts/components/features/notifications/index.jsx => javascript/mastodon/features/notifications/index.js} (99%) rename app/{assets/javascripts/components/features/public_timeline/index.jsx => javascript/mastodon/features/public_timeline/index.js} (99%) rename app/{assets/javascripts/components/features/reblogs/index.jsx => javascript/mastodon/features/reblogs/index.js} (92%) rename app/{assets/javascripts/components/features/report/components/status_check_box.jsx => javascript/mastodon/features/report/components/status_check_box.js} (97%) rename app/{assets/javascripts/components/features/report/containers/status_check_box_container.jsx => javascript/mastodon/features/report/containers/status_check_box_container.js} (100%) rename app/{assets/javascripts/components/features/report/index.jsx => javascript/mastodon/features/report/index.js} (99%) rename app/{assets/javascripts/components/features/status/components/action_bar.jsx => javascript/mastodon/features/status/components/action_bar.js} (99%) rename app/{assets/javascripts/components/features/status/components/card.jsx => javascript/mastodon/features/status/components/card.js} (98%) rename app/{assets/javascripts/components/features/status/components/detailed_status.jsx => javascript/mastodon/features/status/components/detailed_status.js} (96%) rename app/{assets/javascripts/components/features/status/containers/card_container.jsx => javascript/mastodon/features/status/containers/card_container.js} (100%) rename app/{assets/javascripts/components/features/status/index.jsx => javascript/mastodon/features/status/index.js} (97%) rename app/{assets/javascripts/components/features/ui/components/boost_modal.jsx => javascript/mastodon/features/ui/components/boost_modal.js} (95%) rename app/{assets/javascripts/components/features/ui/components/column.jsx => javascript/mastodon/features/ui/components/column.js} (84%) rename app/{assets/javascripts/components/features/ui/components/column_header.jsx => javascript/mastodon/features/ui/components/column_header.js} (97%) rename app/{assets/javascripts/components/features/ui/components/column_link.jsx => javascript/mastodon/features/ui/components/column_link.js} (96%) rename app/{assets/javascripts/components/features/ui/components/column_subheading.jsx => javascript/mastodon/features/ui/components/column_subheading.js} (62%) rename app/{assets/javascripts/components/features/ui/components/columns_area.jsx => javascript/mastodon/features/ui/components/columns_area.js} (91%) rename app/{assets/javascripts/components/features/ui/components/confirmation_modal.jsx => javascript/mastodon/features/ui/components/confirmation_modal.js} (98%) rename app/{assets/javascripts/components/features/ui/components/media_modal.jsx => javascript/mastodon/features/ui/components/media_modal.js} (95%) rename app/{assets/javascripts/components/features/ui/components/modal_root.jsx => javascript/mastodon/features/ui/components/modal_root.js} (98%) rename app/{assets/javascripts/components/features/ui/components/onboarding_modal.jsx => javascript/mastodon/features/ui/components/onboarding_modal.js} (99%) rename app/{assets/javascripts/components/features/ui/components/tabs_bar.jsx => javascript/mastodon/features/ui/components/tabs_bar.js} (98%) rename app/{assets/javascripts/components/features/ui/components/upload_area.jsx => javascript/mastodon/features/ui/components/upload_area.js} (98%) rename app/{assets/javascripts/components/features/ui/components/video_modal.jsx => javascript/mastodon/features/ui/components/video_modal.js} (88%) rename app/{assets/javascripts/components/features/ui/containers/loading_bar_container.jsx => javascript/mastodon/features/ui/containers/loading_bar_container.js} (100%) rename app/{assets/javascripts/components/features/ui/containers/modal_container.jsx => javascript/mastodon/features/ui/containers/modal_container.js} (100%) rename app/{assets/javascripts/components/features/ui/containers/notifications_container.jsx => javascript/mastodon/features/ui/containers/notifications_container.js} (100%) rename app/{assets/javascripts/components/features/ui/containers/status_list_container.jsx => javascript/mastodon/features/ui/containers/status_list_container.js} (100%) rename app/{assets/javascripts/components/features/ui/index.jsx => javascript/mastodon/features/ui/index.js} (96%) rename app/{assets/javascripts/components/is_mobile.jsx => javascript/mastodon/is_mobile.js} (100%) rename app/{assets/javascripts/components/link_header.jsx => javascript/mastodon/link_header.js} (100%) rename app/{assets/javascripts/components/locales/ar.jsx => javascript/mastodon/locales/ar.json} (63%) create mode 100644 app/javascript/mastodon/locales/bg.json rename app/{assets/javascripts/components/locales/de.jsx => javascript/mastodon/locales/de.json} (69%) create mode 100644 app/javascript/mastodon/locales/defaultMessages.json rename app/{assets/javascripts/components/locales/en.jsx => javascript/mastodon/locales/en.json} (94%) create mode 100644 app/javascript/mastodon/locales/eo.json create mode 100644 app/javascript/mastodon/locales/es.json rename app/{assets/javascripts/components/locales/fa.jsx => javascript/mastodon/locales/fa.json} (76%) create mode 100644 app/javascript/mastodon/locales/fi.json rename app/{assets/javascripts/components/locales/fr.jsx => javascript/mastodon/locales/fr.json} (86%) rename app/{assets/javascripts/components/locales/he.jsx => javascript/mastodon/locales/he.json} (77%) rename app/{assets/javascripts/components/locales/hr.jsx => javascript/mastodon/locales/hr.json} (66%) create mode 100644 app/javascript/mastodon/locales/hu.json rename app/{assets/javascripts/components/locales/id.jsx => javascript/mastodon/locales/id.json} (97%) create mode 100644 app/javascript/mastodon/locales/index.js rename app/{assets/javascripts/components/locales/io.jsx => javascript/mastodon/locales/io.json} (67%) rename app/{assets/javascripts/components/locales/it.jsx => javascript/mastodon/locales/it.json} (67%) rename app/{assets/javascripts/components/locales/ja.jsx => javascript/mastodon/locales/ja.json} (98%) rename app/{assets/javascripts/components/locales/nl.jsx => javascript/mastodon/locales/nl.json} (74%) rename app/{assets/javascripts/components/locales/no.jsx => javascript/mastodon/locales/no.json} (65%) rename app/{assets/javascripts/components/locales/oc.jsx => javascript/mastodon/locales/oc.json} (64%) rename app/{assets/javascripts/components/locales/pt-br.jsx => javascript/mastodon/locales/pt-BR.json} (67%) rename app/{assets/javascripts/components/locales/pt.jsx => javascript/mastodon/locales/pt.json} (67%) rename app/{assets/javascripts/components/locales/ru.jsx => javascript/mastodon/locales/ru.json} (78%) create mode 100644 app/javascript/mastodon/locales/uk.json create mode 100644 app/javascript/mastodon/locales/whitelist_ar.json create mode 100644 app/javascript/mastodon/locales/whitelist_bg.json create mode 100644 app/javascript/mastodon/locales/whitelist_de.json create mode 100644 app/javascript/mastodon/locales/whitelist_en.json create mode 100644 app/javascript/mastodon/locales/whitelist_eo.json create mode 100644 app/javascript/mastodon/locales/whitelist_es.json create mode 100644 app/javascript/mastodon/locales/whitelist_fa.json create mode 100644 app/javascript/mastodon/locales/whitelist_fi.json create mode 100644 app/javascript/mastodon/locales/whitelist_fr.json create mode 100644 app/javascript/mastodon/locales/whitelist_hr.json create mode 100644 app/javascript/mastodon/locales/whitelist_hu.json create mode 100644 app/javascript/mastodon/locales/whitelist_id.json create mode 100644 app/javascript/mastodon/locales/whitelist_io.json create mode 100644 app/javascript/mastodon/locales/whitelist_it.json create mode 100644 app/javascript/mastodon/locales/whitelist_ja.json create mode 100644 app/javascript/mastodon/locales/whitelist_nl.json create mode 100644 app/javascript/mastodon/locales/whitelist_no.json create mode 100644 app/javascript/mastodon/locales/whitelist_oc.json create mode 100644 app/javascript/mastodon/locales/whitelist_pt-BR.json create mode 100644 app/javascript/mastodon/locales/whitelist_pt.json create mode 100644 app/javascript/mastodon/locales/whitelist_ru.json create mode 100644 app/javascript/mastodon/locales/whitelist_uk.json create mode 100644 app/javascript/mastodon/locales/whitelist_zh-CN.json create mode 100644 app/javascript/mastodon/locales/whitelist_zh-HK.json rename app/{assets/javascripts/components/locales/zh-cn.jsx => javascript/mastodon/locales/zh-CN.json} (66%) rename app/{assets/javascripts/components/locales/zh-hk.jsx => javascript/mastodon/locales/zh-HK.json} (66%) rename app/{assets/javascripts/components/middleware/errors.jsx => javascript/mastodon/middleware/errors.js} (100%) rename app/{assets/javascripts/components/middleware/loading_bar.jsx => javascript/mastodon/middleware/loading_bar.js} (100%) rename app/{assets/javascripts/components/middleware/sounds.jsx => javascript/mastodon/middleware/sounds.js} (100%) create mode 100644 app/javascript/mastodon/reducers/accounts.js rename app/{assets/javascripts/components/reducers/accounts.jsx => javascript/mastodon/reducers/accounts_counters.js} (92%) rename app/{assets/javascripts/components/reducers/alerts.jsx => javascript/mastodon/reducers/alerts.js} (100%) rename app/{assets/javascripts/components/reducers/cards.jsx => javascript/mastodon/reducers/cards.js} (100%) rename app/{assets/javascripts/components/reducers/compose.jsx => javascript/mastodon/reducers/compose.js} (100%) rename app/{assets/javascripts/components/reducers/index.jsx => javascript/mastodon/reducers/index.js} (92%) rename app/{assets/javascripts/components/reducers/meta.jsx => javascript/mastodon/reducers/meta.js} (100%) rename app/{assets/javascripts/components/reducers/modal.jsx => javascript/mastodon/reducers/modal.js} (100%) rename app/{assets/javascripts/components/reducers/notifications.jsx => javascript/mastodon/reducers/notifications.js} (95%) rename app/{assets/javascripts/components/reducers/relationships.jsx => javascript/mastodon/reducers/relationships.js} (100%) rename app/{assets/javascripts/components/reducers/reports.jsx => javascript/mastodon/reducers/reports.js} (100%) rename app/{assets/javascripts/components/reducers/search.jsx => javascript/mastodon/reducers/search.js} (100%) rename app/{assets/javascripts/components/reducers/settings.jsx => javascript/mastodon/reducers/settings.js} (95%) rename app/{assets/javascripts/components/reducers/status_lists.jsx => javascript/mastodon/reducers/status_lists.js} (93%) rename app/{assets/javascripts/components/reducers/statuses.jsx => javascript/mastodon/reducers/statuses.js} (100%) rename app/{assets/javascripts/components/reducers/timelines.jsx => javascript/mastodon/reducers/timelines.js} (98%) rename app/{assets/javascripts/components/reducers/user_lists.jsx => javascript/mastodon/reducers/user_lists.js} (85%) rename app/{assets/javascripts/components/rtl.jsx => javascript/mastodon/rtl.js} (100%) rename app/{assets/javascripts/components/selectors/index.jsx => javascript/mastodon/selectors/index.js} (87%) rename app/{assets/javascripts/components/store/configureStore.jsx => javascript/mastodon/store/configureStore.js} (100%) rename app/{assets/javascripts/components/stream.jsx => javascript/mastodon/stream.js} (100%) rename app/{assets/javascripts/components/uuid.jsx => javascript/mastodon/uuid.js} (100%) create mode 100644 app/javascript/packs/application.js rename app/{assets/javascripts/extras.jsx => javascript/packs/public.js} (88%) rename app/{assets/stylesheets => javascript/styles}/about.scss (100%) rename app/{assets/stylesheets => javascript/styles}/accounts.scss (100%) rename app/{assets/stylesheets => javascript/styles}/admin.scss (100%) rename app/{assets/stylesheets => javascript/styles}/application.scss (94%) rename app/{assets/stylesheets => javascript/styles}/basics.scss (93%) rename app/{assets/stylesheets => javascript/styles}/boost.scss (100%) rename app/{assets/stylesheets => javascript/styles}/compact_header.scss (100%) rename app/{assets/stylesheets => javascript/styles}/components.scss (99%) rename app/{assets/stylesheets => javascript/styles}/containers.scss (100%) create mode 100644 app/javascript/styles/fonts/montserrat.scss create mode 100644 app/javascript/styles/fonts/roboto-mono.scss create mode 100644 app/javascript/styles/fonts/roboto.scss rename app/{assets/stylesheets => javascript/styles}/footer.scss (100%) rename app/{assets/stylesheets => javascript/styles}/forms.scss (100%) rename app/{assets/stylesheets => javascript/styles}/landing_strip.scss (100%) rename app/{assets/stylesheets => javascript/styles}/lists.scss (100%) rename app/{assets/stylesheets => javascript/styles}/reset.scss (100%) rename app/{assets/stylesheets => javascript/styles}/rtl.scss (100%) rename app/{assets/stylesheets => javascript/styles}/stream_entries.scss (100%) rename app/{assets/stylesheets => javascript/styles}/tables.scss (100%) rename app/{assets/stylesheets => javascript/styles}/variables.scss (100%) create mode 100755 bin/webpack create mode 100755 bin/webpack-dev-server create mode 100755 bin/yarn create mode 100644 config/webpack/configuration.js create mode 100644 config/webpack/development.js create mode 100644 config/webpack/development.server.js create mode 100644 config/webpack/development.server.yml create mode 100644 config/webpack/loaders/assets.js create mode 100644 config/webpack/loaders/babel.js create mode 100644 config/webpack/loaders/coffee.js create mode 100644 config/webpack/loaders/erb.js create mode 100644 config/webpack/loaders/sass.js create mode 100644 config/webpack/paths.yml create mode 100644 config/webpack/production.js create mode 100644 config/webpack/shared.js create mode 100644 config/webpack/test.js create mode 100644 config/webpack/translationRunner.js diff --git a/.babelrc b/.babelrc index 928d32e3b79c..2c4d9aab3e1d 100644 --- a/.babelrc +++ b/.babelrc @@ -1,7 +1,25 @@ { - "presets": ["es2015", "react"], + "presets": [ + "es2015", + "react", + [ + "env", + { + "loose": true, + "modules": false + } + ] + ], "plugins": [ + "transform-react-jsx-source", + "transform-react-jsx-self", "transform-decorators-legacy", - "transform-object-rest-spread" + "transform-object-rest-spread", + [ + "react-intl", + { + "messagesDir": "./build/messages" + } + ] ] } diff --git a/.foreman b/.foreman new file mode 100644 index 000000000000..722b491f7f27 --- /dev/null +++ b/.foreman @@ -0,0 +1 @@ +procfile: Procfile.dev diff --git a/.gitignore b/.gitignore index c6c468cc79ae..a0a7eac9c61c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ public/assets .env .env.production node_modules/ -neo4j/ +build/ # Ignore Vagrant files .vagrant/ @@ -43,3 +43,5 @@ redis # Ignore vim files *~ *.swp +/public/packs +/node_modules diff --git a/.postcssrc.yml b/.postcssrc.yml new file mode 100644 index 000000000000..bc4f02ab33db --- /dev/null +++ b/.postcssrc.yml @@ -0,0 +1,4 @@ +plugins: + postcss-smart-import: {} + precss: {} + autoprefixer: {} diff --git a/.travis.yml b/.travis.yml index 90a33f51d712..58be0908f480 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,7 @@ language: ruby cache: bundler: true - yarn: true - directories: - - node_modules + yarn: false dist: trusty sudo: false @@ -42,7 +40,8 @@ install: - yarn install before_script: - - bundle exec rails db:create db:migrate + - bundle exec rails db:create db:schema:load + - bundle exec rails assets:precompile script: - bundle exec rspec diff --git a/Dockerfile b/Dockerfile index 9968e82273e2..3e47272587f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,6 @@ EXPOSE 3000 4000 WORKDIR /mastodon -COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/ - RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ && BUILD_DEPS=" \ postgresql-dev \ @@ -23,6 +21,7 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit $BUILD_DEPS \ nodejs@edge \ nodejs-npm@edge \ + git \ libpq \ libxml2 \ libxslt \ @@ -31,14 +30,14 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit imagemagick@edge \ ca-certificates \ && npm install -g npm@3 && npm install -g yarn \ - && bundle install --deployment --without test development \ - && yarn --ignore-optional \ - && yarn cache clean \ - && npm -g cache clean \ && update-ca-certificates \ - && apk del $BUILD_DEPS \ && rm -rf /tmp/* /var/cache/apk/* +COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/ + +RUN bundle install --deployment --without test development \ + && yarn --ignore-optional --pure-lockfile + COPY . /mastodon -VOLUME /mastodon/public/system /mastodon/public/assets +VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs diff --git a/Gemfile b/Gemfile index f946440c6fca..8009e2cbec55 100644 --- a/Gemfile +++ b/Gemfile @@ -5,22 +5,19 @@ ruby '>= 2.3.0', '< 2.5.0' gem 'pkg-config' -gem 'rails', '~> 5.0.2' -gem 'sass-rails', '~> 5.0' -gem 'uglifier', '>= 1.3.0' -gem 'jquery-rails' gem 'puma' +gem 'rails', '~> 5.0.2' +gem 'uglifier', '>= 1.3.0' gem 'hamlit-rails' gem 'pg' gem 'pghero' gem 'dotenv-rails' -gem 'font-awesome-rails' gem 'best_in_place', '~> 3.0.1' +gem 'aws-sdk', '>= 2.0' gem 'paperclip', '~> 5.1' gem 'paperclip-av-transcoder' -gem 'aws-sdk', '>= 2.0' gem 'addressable' gem 'devise' @@ -58,18 +55,18 @@ gem 'sprockets-rails', require: 'sprockets/railtie' gem 'statsd-instrument' gem 'twitter-text' gem 'tzinfo-data' +gem 'webpacker', '~>1.2' gem 'whatlanguage' +# For some reason the view specs start failing without this gem 'react-rails' -gem 'browserify-rails' -gem 'autoprefixer-rails' group :development, :test do - gem 'rspec-rails' - gem 'pry-rails' - gem 'fuubar' gem 'fabrication' + gem 'fuubar' gem 'i18n-tasks', '~> 0.9.6' + gem 'pry-rails' + gem 'rspec-rails' end group :test do @@ -83,24 +80,23 @@ group :test do end group :development do - gem 'rubocop', '0.46.0', require: false - gem 'better_errors' - gem 'binding_of_caller' - gem 'letter_opener' - gem 'letter_opener_web' - gem 'bullet' gem 'active_record_query_trace' gem 'annotate' + gem 'better_errors' + gem 'binding_of_caller' + gem 'bullet' + gem 'letter_opener' + gem 'letter_opener_web' + gem 'rubocop', '0.46.0', require: false gem 'capistrano', '3.8.0' gem 'capistrano-rails' gem 'capistrano-rbenv' gem 'capistrano-yarn' - gem 'capistrano-faster-assets', '~> 1.0' end group :production do + gem 'lograge' gem 'rails_12factor' gem 'redis-rails' - gem 'lograge' end diff --git a/Gemfile.lock b/Gemfile.lock index acda0d387dc1..ab811bcfd6f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,15 +43,13 @@ GEM public_suffix (~> 2.0, >= 2.0.2) airbrussh (1.2.0) sshkit (>= 1.6.1, != 1.7.0) - annotate (2.7.1) - activerecord (>= 3.2, < 6.0) - rake (>= 10.4, < 12.0) + annotate (2.6.5) + activerecord (>= 2.3.0) + rake (>= 0.8.7) arel (7.1.4) ast (2.3.0) attr_encrypted (3.0.3) encryptor (~> 3.0.0) - autoprefixer-rails (6.7.7.2) - execjs av (0.9.0) cocaine (~> 0.5.3) aws-sdk (2.9.12) @@ -76,10 +74,6 @@ GEM rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - browserify-rails (4.1.0) - addressable (>= 2.4.0) - railties (>= 4.0.0, < 5.1) - sprockets (>= 3.6.0) builder (3.2.3) bullet (5.5.1) activesupport (>= 3.0.0) @@ -92,8 +86,6 @@ GEM capistrano-bundler (1.2.0) capistrano (~> 3.1) sshkit (~> 1.2) - capistrano-faster-assets (1.0.2) - capistrano (>= 3.1) capistrano-rails (1.2.3) capistrano (~> 3.1) capistrano-bundler (~> 1.1) @@ -161,8 +153,6 @@ GEM faker (1.7.3) i18n (~> 0.5) fast_blank (1.0.0) - font-awesome-rails (4.7.0.1) - railties (>= 3.2, < 5.1) fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) @@ -210,10 +200,6 @@ GEM rainbow (~> 2.2) terminal-table (>= 1.5.1) jmespath (1.3.1) - jquery-rails (4.3.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) json (2.1.0) kaminari (1.0.1) activesupport (>= 4.1.0) @@ -257,6 +243,7 @@ GEM mimemagic (0.3.2) mini_portile2 (2.1.0) minitest (5.10.1) + multi_json (1.12.1) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (4.1.0) @@ -348,8 +335,8 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (2.2.2) rake - rake (11.3.0) - react-rails (1.11.0) + rake (12.0.0) + react-rails (2.1.0) babel-transpiler (>= 0.7.0) connection_pool execjs @@ -410,13 +397,6 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.4.4) nokogumbo (~> 1.4.1) - sass (3.4.23) - sass-rails (5.0.6) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) sidekiq (4.2.10) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) @@ -473,6 +453,10 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff + webpacker (1.2) + activesupport (>= 4.2) + multi_json (~> 1.2) + railties (>= 4.2) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) @@ -487,15 +471,12 @@ DEPENDENCIES active_record_query_trace addressable annotate - autoprefixer-rails aws-sdk (>= 2.0) best_in_place (~> 3.0.1) better_errors binding_of_caller - browserify-rails bullet capistrano (= 3.8.0) - capistrano-faster-assets (~> 1.0) capistrano-rails capistrano-rbenv capistrano-yarn @@ -507,7 +488,6 @@ DEPENDENCIES fabrication faker fast_blank - font-awesome-rails fuubar goldfinger hamlit-rails @@ -517,7 +497,6 @@ DEPENDENCIES http_accept_language httplog i18n-tasks (~> 0.9.6) - jquery-rails kaminari letter_opener letter_opener_web @@ -554,7 +533,6 @@ DEPENDENCIES rubocop (= 0.46.0) ruby-oembed sanitize - sass-rails (~> 5.0) sidekiq sidekiq-unique-jobs simple-navigation @@ -566,6 +544,7 @@ DEPENDENCIES tzinfo-data uglifier (>= 1.3.0) webmock + webpacker (~> 1.2) whatlanguage RUBY VERSION diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 000000000000..4ecea287c9f3 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,3 @@ +web: bundle exec rails s -p 3000 +stream: yarn run start +webpack: ./bin/webpack-dev-server diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100644 index 441282825969..000000000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require jquery2 -//= require jquery_ujs -//= require components diff --git a/app/assets/javascripts/application_public.js b/app/assets/javascripts/application_public.js deleted file mode 100644 index 7df4891e7878..000000000000 --- a/app/assets/javascripts/application_public.js +++ /dev/null @@ -1,9 +0,0 @@ -//= require jquery2 -//= require jquery_ujs -//= require extras -//= require best_in_place -//= require local_time - -$(function () { - $(".best_in_place").best_in_place(); -}); diff --git a/app/assets/javascripts/components.js b/app/assets/javascripts/components.js deleted file mode 100644 index 1604d5198fdc..000000000000 --- a/app/assets/javascripts/components.js +++ /dev/null @@ -1,15 +0,0 @@ -//= require_self -//= require react_ujs - -window.React = require('react'); -window.ReactDOM = require('react-dom'); -window.Perf = require('react-addons-perf'); - -if (!window.Intl) { - require('intl'); - require('intl/locale-data/jsonp/en.js'); -} - -//= require_tree ./components - -window.Mastodon = require('./components/containers/mastodon'); diff --git a/app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx b/app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx deleted file mode 100644 index bf6a15e5d7fe..000000000000 --- a/app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx +++ /dev/null @@ -1,16 +0,0 @@ -import Avatar from '../../../components/avatar'; -import DisplayName from '../../../components/display_name'; -import ImmutablePropTypes from 'react-immutable-proptypes'; - -const AutosuggestAccount = ({ account }) => ( -
-
- -
-); - -AutosuggestAccount.propTypes = { - account: ImmutablePropTypes.map.isRequired -}; - -export default AutosuggestAccount; diff --git a/app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx b/app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx deleted file mode 100644 index 275b3d5a6f43..000000000000 --- a/app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import { FormattedMessage } from 'react-intl'; -import DisplayName from '../../../components/display_name'; -import ImmutablePropTypes from 'react-immutable-proptypes'; - -const AutosuggestStatus = ({ status }) => ( -
- @{status.getIn(['account', 'acct'])} }} /> -
-); - -AutosuggestStatus.propTypes = { - status: ImmutablePropTypes.map.isRequired -}; - -export default AutosuggestStatus; diff --git a/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx b/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx deleted file mode 100644 index d35a54c12b48..000000000000 --- a/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx +++ /dev/null @@ -1,44 +0,0 @@ -import PropTypes from 'prop-types'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import Permalink from '../../../components/permalink'; -import Avatar from '../../../components/avatar'; -import DisplayName from '../../../components/display_name'; -import emojify from '../../../emoji'; -import IconButton from '../../../components/icon_button'; -import { defineMessages, injectIntl } from 'react-intl'; - -const messages = defineMessages({ - authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' }, - reject: { id: 'follow_request.reject', defaultMessage: 'Reject' } -}); - -const AccountAuthorize = ({ intl, account, onAuthorize, onReject }) => { - const content = { __html: emojify(account.get('note')) }; - - return ( -
-
- -
- -
- -
-
- -
-
-
-
-
- ) -}; - -AccountAuthorize.propTypes = { - account: ImmutablePropTypes.map.isRequired, - onAuthorize: PropTypes.func.isRequired, - onReject: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired -}; - -export default injectIntl(AccountAuthorize); diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx deleted file mode 100644 index bd4920c94f08..000000000000 --- a/app/assets/javascripts/components/features/getting_started/index.jsx +++ /dev/null @@ -1,66 +0,0 @@ -import Column from '../ui/components/column'; -import ColumnLink from '../ui/components/column_link'; -import ColumnSubheading from '../ui/components/column_subheading'; -import { Link } from 'react-router'; -import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; -import ImmutablePropTypes from 'react-immutable-proptypes'; - -const messages = defineMessages({ - heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, - public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' }, - navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation'}, - settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings'}, - community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' }, - preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, - follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, - sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, - favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, - blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, - mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, - info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' } -}); - -const mapStateToProps = state => ({ - me: state.getIn(['accounts', state.getIn(['meta', 'me'])]) -}); - -const GettingStarted = ({ intl, me }) => { - let followRequests = ''; - - if (me.get('locked')) { - followRequests = ; - } - - return ( - -
- - - - - {followRequests} - - - - - - -
- -
-
-

tootsuite/mastodon, apps: }} />

-
-
-
- ); -}; - -GettingStarted.propTypes = { - intl: PropTypes.object.isRequired, - me: ImmutablePropTypes.map.isRequired -}; - -export default connect(mapStateToProps)(injectIntl(GettingStarted)); diff --git a/app/assets/javascripts/components/locales/bg.jsx b/app/assets/javascripts/components/locales/bg.jsx deleted file mode 100644 index a194cdbddd8f..000000000000 --- a/app/assets/javascripts/components/locales/bg.jsx +++ /dev/null @@ -1,68 +0,0 @@ -const bg = { - "column_back_button.label": "Назад", - "lightbox.close": "Затвори", - "loading_indicator.label": "Зареждане...", - "status.mention": "Споменаване", - "status.delete": "Изтриване", - "status.reply": "Отговор", - "status.reblog": "Споделяне", - "status.favourite": "Предпочитани", - "status.reblogged_by": "{name} сподели", - "status.sensitive_warning": "Деликатно съдържание", - "status.sensitive_toggle": "Покажи", - "video_player.toggle_sound": "Звук", - "account.mention": "Споменаване", - "account.edit_profile": "Редактирай профила си", - "account.unblock": "Не блокирай", - "account.unfollow": "Не следвай", - "account.block": "Блокирай", - "account.follow": "Последвай", - "account.posts": "Публикации", - "account.follows": "Следвам", - "account.followers": "Последователи", - "account.follows_you": "Твой последовател", - "account.requested": "В очакване на одобрение", - "getting_started.heading": "Първи стъпки", - "getting_started.about_addressing": "Можеш да последваш потребител, ако знаеш потребителското му име и домейна, на който се намира, като в полето за търсене ги въведеш по този начин: име@домейн", - "getting_started.about_shortcuts": "Ако с търсения потребител се намирате на един и същ домейн, достатъчно е да въведеш само името. Същото важи и за споменаване на хора в публикации.", - "getting_started.about_developer": "Можеш да потърсиш разработчика на този проект като: Gargron@mastodon.social", - "getting_started.open_source_notice": "Mastodon е софтуер с отворен код. Можеш да помогнеш или да докладваш за проблеми в Github: {github}.", - "column.home": "Начало", - "column.mentions": "Споменавания", - "column.public": "Публичен канал", - "column.notifications": "Известия", - "tabs_bar.compose": "Съставяне", - "tabs_bar.home": "Начало", - "tabs_bar.mentions": "Споменавания", - "tabs_bar.public": "Публичен канал", - "tabs_bar.notifications": "Известия", - "compose_form.placeholder": "Какво си мислиш?", - "compose_form.publish": "Раздумай", - "compose_form.sensitive": "Отбележи съдържанието като деликатно", - "compose_form.spoiler": "Скрий текста зад предупреждение", - "compose_form.private": "Отбележи като поверително", - "compose_form.privacy_disclaimer": "Поверителни публикации ще бъдат изпратени до споменатите потребители на {domains}. Доверяваш ли се на {domainsCount, plural, one {that server} other {those servers}}, че няма да издаде твоята публикация?", - "compose_form.unlisted": "Не показвай в публичния канал", - "navigation_bar.edit_profile": "Редактирай профил", - "navigation_bar.preferences": "Предпочитания", - "navigation_bar.public_timeline": "Публичен канал", - "navigation_bar.logout": "Излизане", - "reply_indicator.cancel": "Отказ", - "search.placeholder": "Търсене", - "search.account": "Акаунт", - "search.hashtag": "Хаштаг", - "upload_button.label": "Добави медия", - "upload_form.undo": "Отмяна", - "notification.follow": "{name} те последва", - "notification.favourite": "{name} хареса твоята публикация", - "notification.reblog": "{name} сподели твоята публикация", - "notification.mention": "{name} те спомена", - "notifications.column_settings.alert": "Десктоп известия", - "notifications.column_settings.show": "Покажи в колона", - "notifications.column_settings.follow": "Нови последователи:", - "notifications.column_settings.favourite": "Предпочитани:", - "notifications.column_settings.mention": "Споменавания:", - "notifications.column_settings.reblog": "Споделяния:", -}; - -export default bg; diff --git a/app/assets/javascripts/components/locales/eo.jsx b/app/assets/javascripts/components/locales/eo.jsx deleted file mode 100644 index 8c118b31fa50..000000000000 --- a/app/assets/javascripts/components/locales/eo.jsx +++ /dev/null @@ -1,68 +0,0 @@ -const eo = { - "column_back_button.label": "Reveni", - "lightbox.close": "Fermi", - "loading_indicator.label": "Ŝarĝanta...", - "status.mention": "Mencii @{name}", - "status.delete": "Forigi", - "status.reply": "Respondi", - "status.reblog": "Diskonigi", - "status.favourite": "Favori", - "status.reblogged_by": "{name} diskonigita", - "status.sensitive_warning": "Tikla enhavo", - "status.sensitive_toggle": "Alklaki por vidi", - "video_player.toggle_sound": "Aktivigi sonojn", - "account.mention": "Mencii @{name}", - "account.edit_profile": "Redakti la profilon", - "account.unblock": "Malbloki @{name}", - "account.unfollow": "Malsekvi", - "account.block": "Bloki @{name}", - "account.follow": "Sekvi", - "account.posts": "Mesaĝoj", - "account.follows": "Sekvatoj", - "account.followers": "Sekvantoj", - "account.follows_you": "Sekvas vin", - "account.requested": "Atendas aprobon", - "getting_started.heading": "Por komenci", - "getting_started.about_addressing": "Vi povas sekvi homojn se vi konas la uzantnomon kaj domajnon tajpinte retpoŝtecan adreson en la serĉilon.", - "getting_started.about_shortcuts": "Se la celita uzanto troviĝas en la sama domajno de vi, uzi nur la uzantnomon sufiĉos. La sama regulo validas por mencii aliajn uzantojn en mesaĝo.", - "getting_started.open_source_notice": "Mastodon estas malfermitkoda programo. Vi povas kontribui aŭ raporti problemojn en github je {github}. {apps}.", - "column.home": "Hejmo", - "column.community": "Loka tempolinio", - "column.public": "Fratara tempolinio", - "column.notifications": "Sciigoj", - "tabs_bar.compose": "Ekskribi", - "tabs_bar.home": "Hejmo", - "tabs_bar.mentions": "Sciigoj", - "tabs_bar.public": "Fratara tempolinio", - "tabs_bar.notifications": "Sciigoj", - "compose_form.placeholder": "Pri kio vi pensas?", - "compose_form.publish": "Hup", - "compose_form.sensitive": "Marki ke la enhavo estas tikla", - "compose_form.spoiler": "Kaŝi la tekston malantaŭ averto", - "compose_form.private": "Marki ke la enhavo estas privata", - "compose_form.privacy_disclaimer": "Via privata mesaĝo estos sendita nur al menciitaj uzantoj en {domains}. Ĉu vi fidas {domainsCount, plural, one {tiun servilon} other {tiujn servilojn}}? Mesaĝa privateco funkcias nur en aperaĵoj de Mastodon. Se {domains} {domainsCount, plural, one {ne estas aperaĵo de Mastodon} other {ne estas aperaĵoj de Mastodon}}, estos neniu indiko ke via mesaĝo estas privata, kaj ĝi povus esti diskonigita aŭ videbligita al necelitaj ricevantoj.", - "compose_form.unlisted": "Ne afiŝi en publikaj tempolinioj", - "navigation_bar.edit_profile": "Redakti la profilon", - "navigation_bar.preferences": "Preferoj", - "navigation_bar.community_timeline": "Loka tempolinio", - "navigation_bar.public_timeline": "Fratara tempolinio", - "navigation_bar.logout": "Elsaluti", - "reply_indicator.cancel": "Rezigni", - "search.placeholder": "Serĉi", - "search.account": "Konto", - "search.hashtag": "Kradvorto", - "upload_button.label": "Aldoni enhavaĵon", - "upload_form.undo": "Malfari", - "notification.follow": "{name} sekvis vin", - "notification.favourite": "{name} favoris vian mesaĝon", - "notification.reblog": "{name} diskonigis vian mesaĝon", - "notification.mention": "{name} menciis vin", - "notifications.column_settings.alert": "Retumilaj atentigoj", - "notifications.column_settings.show": "Montri en kolono", - "notifications.column_settings.follow": "Novaj sekvantoj:", - "notifications.column_settings.favourite": "Favoroj:", - "notifications.column_settings.mention": "Mencioj:", - "notifications.column_settings.reblog": "Diskonigoj:", -}; - -export default eo; diff --git a/app/assets/javascripts/components/locales/es.jsx b/app/assets/javascripts/components/locales/es.jsx deleted file mode 100644 index bbd6e07c147a..000000000000 --- a/app/assets/javascripts/components/locales/es.jsx +++ /dev/null @@ -1,93 +0,0 @@ -const es = { - "column_back_button.label": "Atrás", - "lightbox.close": "Cerrar", - "loading_indicator.label": "Cargando...", - "status.mention": "Mencionar", - "status.delete": "Borrar", - "status.reply": "Responder", - "status.reblog": "Retoot", - "status.favourite": "Favorito", - "status.reblogged_by": "Retooteado por {name}", - "status.sensitive_warning": "Contenido sensible", - "status.sensitive_toggle": "Click para ver", - "status.show_more": "Mostrar más", - "status.show_less": "Mostrar menos", - "status.open": "Expandir estado", - "status.report": "Reportar", - "video_player.toggle_sound": "Act/Desac. sonido", - "account.mention": "Mencionar", - "account.edit_profile": "Editar perfil", - "account.unblock": "Desbloquear", - "account.unfollow": "Dejar de seguir", - "account.mute": "Silenciar", - "account.block": "Bloquear", - "account.follow": "Seguir", - "account.posts": "Publicaciones", - "account.follows": "Seguir", - "account.followers": "Seguidores", - "account.follows_you": "Te sigue", - "account.requested": "Esperando aprobación", - "getting_started.heading": "Primeros pasos", - "getting_started.about_addressing": "Puedes seguir a gente si conoces su nombre de usuario y el dominio en el que están registrados, introduciendo algo similar a una dirección de correo electrónico en el formulario en la parte superior de la barra lateral.", - "getting_started.about_shortcuts": "Si el usuario que buscas está en el mismo dominio que tú, simplemente funcionará introduciendo el nombre de usuario. La misma regla se aplica para mencionar a usuarios.", - "getting_started.open_source_notice": "Mastodon es software libre. Puedes contribuir o reportar errores en {github}. {apps}.", - "column.home": "Inicio", - "column.community": "Historia local", - "column.public": "Historia federada", - "column.notifications": "Notificaciones", - "column.blocks": "Usuarios bloqueados", - "column.favourites": "Favoritos", - "column.follow_requests": "Solicitudes para seguirte", - "column.mutes": "Usuarios silenciados", - "tabs_bar.compose": "Redactar", - "tabs_bar.home": "Inicio", - "tabs_bar.mentions": "Menciones", - "tabs_bar.public": "Público", - "tabs_bar.notifications": "Notificaciones", - "compose_form.placeholder": "¿En qué estás pensando?", - "compose_form.publish": "Tootear", - "compose_form.sensitive": "Marcar contenido como sensible", - "compose_form.spoiler": "Ocultar texto tras advertencia", - "compose_form.spoiler_placeholder": "Advertencia de contenido", - "composer_form.private": "Marcar como privado", - "composer_form.privacy_disclaimer": "Tu estado se mostrará a los usuarios mencionados en {domains}. Tu estado podrá ser visto en otras instancias, quizás no quieras que tu estado sea visto por otros usuarios.", - "compose_form.unlisted": "No mostrar en la historia federada", - "navigation_bar.edit_profile": "Editar perfil", - "navigation_bar.preferences": "Preferencias", - "navigation_bar.community_timeline": "Historia local", - "navigation_bar.public_timeline": "Historia federada", - "navigation_bar.favourites": "Favoritos", - "navigation_bar.blocks": "Usuarios bloqueados", - "navigation_bar.info": "Información adicional", - "navigation_bar.logout": "Cerrar sesión", - "navigation_bar.follow_requests": "Solicitudes para seguirte", - "navigation_bar.mutes": "Usuarios silenciados", - "reply_indicator.cancel": "Cancelar", - "search.placeholder": "Buscar", - "search.account": "Cuenta", - "search.hashtag": "Etiqueta", - "upload_button.label": "Subir multimedia", - "upload_form.undo": "Deshacer", - "notification.follow": "{name} te empezó a seguir", - "notification.favourite": "{name} marcó tu estado como favorito", - "notification.reblog": "{name} ha retooteado tu estado", - "notification.mention": "{name} te ha mencionado", - "notifications.column_settings.alert": "Notificaciones de escritorio", - "notifications.column_settings.show": "Mostrar en columna", - "notifications.column_settings.follow": "Nuevos seguidores:", - "notifications.column_settings.favourite": "Favoritos:", - "notifications.column_settings.mention": "Menciones:", - "notifications.column_settings.reblog": "Retoots:", - "emoji_button.label": "Insertar emoji", - "privacy.public.short": "Público", - "privacy.public.long": "Mostrar en la historia federada", - "privacy.unlisted.short": "Sin federar", - "privacy.unlisted.long": "No mostrar en la historia federada", - "privacy.private.short": "Privado", - "privacy.private.long": "Sólo mostrar a seguidores", - "privacy.direct.short": "Directo", - "privacy.direct.long": "Sólo mostrar a los usuarios mencionados", - "privacy.change": "Ajustar privacidad" -}; - -export default es; diff --git a/app/assets/javascripts/components/locales/fi.jsx b/app/assets/javascripts/components/locales/fi.jsx deleted file mode 100644 index b3ae4bc56947..000000000000 --- a/app/assets/javascripts/components/locales/fi.jsx +++ /dev/null @@ -1,68 +0,0 @@ -const fi = { - "column_back_button.label": "Takaisin", - "lightbox.close": "Sulje", - "loading_indicator.label": "Ladataan...", - "status.mention": "Mainitse @{name}", - "status.delete": "Poista", - "status.reply": "Vastaa", - "status.reblog": "Buustaa", - "status.favourite": "Tykkää", - "status.reblogged_by": "{name} buustasi", - "status.sensitive_warning": "Arkaluontoista sisältöä", - "status.sensitive_toggle": "Klikkaa nähdäksesi", - "video_player.toggle_sound": "Äänet päälle/pois", - "account.mention": "Mainitse @{name}", - "account.edit_profile": "Muokkaa", - "account.unblock": "Salli @{name}", - "account.unfollow": "Lopeta seuraaminen", - "account.block": "Estä @{name}", - "account.follow": "Seuraa", - "account.posts": "Postit", - "account.follows": "Seuraa", - "account.followers": "Seuraajia", - "account.follows_you": "Seuraa sinua", - "account.requested": "Odottaa hyväksyntää", - "getting_started.heading": "Aloitus", - "getting_started.about_addressing": "Voit seurata ihmisiä jos tiedät heidän käyttäjänimensä ja domainin missä he ovat syöttämällä e-mail-esque osoitteen Etsi kenttään.", - "getting_started.about_shortcuts": "Jos etsimäsi henkilö on samassa domainissa kuin sinä, pelkkä käyttäjänimi kelpaa. Sama pätee kun mainitset ihmisiä statuksessasi", - "getting_started.open_source_notice": "Mastodon Mastodon on avoimen lähdekoodin ohjelma. Voit avustaa tai raportoida ongelmia GitHub palvelussa {github}. {apps}.", - "column.home": "Koti", - "column.community": "Paikallinen aikajana", - "column.public": "Yleinen aikajana", - "column.notifications": "Ilmoitukset", - "tabs_bar.compose": "Luo", - "tabs_bar.home": "Koti", - "tabs_bar.mentions": "Maininnat", - "tabs_bar.public": "Yleinen aikajana", - "tabs_bar.notifications": "Ilmoitukset", - "compose_form.placeholder": "Mitä sinulla on mielessä?", - "compose_form.publish": "Toot", - "compose_form.sensitive": "Merkitse media herkäksi", - "compose_form.spoiler": "Piiloita teksti varoituksen taakse", - "compose_form.private": "Merkitse yksityiseksi", - "compose_form.privacy_disclaimer": "Sinun yksityinen status toimitetaan mainitsemallesi käyttäjille domaineissa {domains}. Luotatko {domainsCount, plural, one {tähän palvelimeen} other {näihin palvelimiin}}? Postauksen yksityisyys toimii van Mastodon palvelimilla. Jos {domains} {domainsCount, plural, one {ei ole Mastodon palvelin} other {eivät ole Mastodon palvelin}}, viestiin ei tule Yksityinen-merkintää, ja sitä voidaan boostata tai muuten tehdä näkyväksi muille vastaanottajille.", - "compose_form.unlisted": "Älä näytä yleisillä aikajanoilla", - "navigation_bar.edit_profile": "Muokkaa profiilia", - "navigation_bar.preferences": "Ominaisuudet", - "navigation_bar.community_timeline": "Paikallinen aikajana", - "navigation_bar.public_timeline": "Yleinen aikajana", - "navigation_bar.logout": "Kirjaudu ulos", - "reply_indicator.cancel": "Peruuta", - "search.placeholder": "Hae", - "search.account": "Tili", - "search.hashtag": "Hashtag", - "upload_button.label": "Lisää mediaa", - "upload_form.undo": "Peru", - "notification.follow": "{name} seurasi sinua", - "notification.favourite": "{name} tykkäsi statuksestasi", - "notification.reblog": "{name} buustasi statustasi", - "notification.mention": "{name} mainitsi sinut", - "notifications.column_settings.alert": "Työpöytä ilmoitukset", - "notifications.column_settings.show": "Näytä sarakkeessa", - "notifications.column_settings.follow": "Uusia seuraajia:", - "notifications.column_settings.favourite": "Tykkäyksiä:", - "notifications.column_settings.mention": "Mainintoja:", - "notifications.column_settings.reblog": "Buusteja:", -}; - -export default fi; diff --git a/app/assets/javascripts/components/locales/hu.jsx b/app/assets/javascripts/components/locales/hu.jsx deleted file mode 100644 index b68df66fd6d2..000000000000 --- a/app/assets/javascripts/components/locales/hu.jsx +++ /dev/null @@ -1,57 +0,0 @@ -const hu = { - "column_back_button.label": "Vissza", - "lightbox.close": "Bezárás", - "loading_indicator.label": "Betöltés...", - "status.mention": "Említés", - "status.delete": "Törlés", - "status.reply": "Válasz", - "status.reblog": "Reblog", - "status.favourite": "Kedvenc", - "status.reblogged_by": "{name} reblogolta", - "status.sensitive_warning": "Érzékeny tartalom", - "status.sensitive_toggle": "Katt a megtekintéshez", - "video_player.toggle_sound": "Hang kapcsolása", - "account.mention": "Említés", - "account.edit_profile": "Profil szerkesztése", - "account.unblock": "Blokkolás levétele", - "account.unfollow": "Követés abbahagyása", - "account.block": "Blokkolás", - "account.follow": "Követés", - "account.posts": "Posts", - "account.follows": "Követve", - "account.followers": "Követők", - "account.follows_you": "Követnek téged", - "getting_started.heading": "Első lépések", - "getting_started.about_addressing": "Követhetsz embereket felhasználónevük és a doménjük ismeretében, amennyiben megadod ezt az e-mail-szerű címet az oldalsáv tetején lévő rubrikában.", - "getting_started.about_shortcuts": "Ha a célzott személy azonos doménen tartózkodik, a felhasználónév elegendő. Ugyanez érvényes mikor személyeket említesz az állapotokban.", - "getting_started.about_developer": "A projekt fejlesztője követhető, mint Gargron@mastodon.social", - "column.home": "Kezdőlap", - "column.mentions": "Említések", - "column.public": "Nyilvános", - "column.notifications": "Értesítések", - "tabs_bar.compose": "Összeállítás", - "tabs_bar.home": "Kezdőlap", - "tabs_bar.mentions": "Említések", - "tabs_bar.public": "Nyilvános", - "tabs_bar.notifications": "Notifications", - "compose_form.placeholder": "Mire gondolsz?", - "compose_form.publish": "Tülk!", - "compose_form.sensitive": "Tartalom érzékenynek jelölése", - "compose_form.unlisted": "Listázatlan mód", - "navigation_bar.edit_profile": "Profil szerkesztése", - "navigation_bar.preferences": "Beállítások", - "navigation_bar.public_timeline": "Nyilvános időfolyam", - "navigation_bar.logout": "Kijelentkezés", - "reply_indicator.cancel": "Mégsem", - "search.placeholder": "Keresés", - "search.account": "Fiók", - "search.hashtag": "Hashtag", - "upload_button.label": "Média hozzáadása", - "upload_form.undo": "Mégsem", - "notification.follow": "{name} követ téged", - "notification.favourite": "{name} kedvencnek jelölte az állapotod", - "notification.reblog": "{name} reblogolta az állapotod", - "notification.mention": "{name} megemlített" -}; - -export default hu; diff --git a/app/assets/javascripts/components/locales/index.jsx b/app/assets/javascripts/components/locales/index.jsx deleted file mode 100644 index 0c84724014cf..000000000000 --- a/app/assets/javascripts/components/locales/index.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import ar from './ar'; -import en from './en'; -import de from './de'; -import es from './es'; -import fa from './fa'; -import he from './he'; -import hr from './hr'; -import hu from './hu'; -import io from './io'; -import it from './it'; -import fr from './fr'; -import nl from './nl'; -import no from './no'; -import oc from './oc'; -import pt from './pt'; -import pt_br from './pt-br'; -import uk from './uk'; -import fi from './fi'; -import eo from './eo'; -import ru from './ru'; -import ja from './ja'; -import zh_hk from './zh-hk'; -import zh_cn from './zh-cn'; -import bg from './bg'; -import id from './id'; - -const locales = { - ar, - en, - de, - es, - fa, - he, - hr, - hu, - io, - it, - fr, - nl, - no, - oc, - pt, - 'pt-BR': pt_br, - uk, - fi, - eo, - ru, - ja, - 'zh-HK': zh_hk, - 'zh-CN': zh_cn, - bg, - id, -}; - -export default function getMessagesForLocale (locale) { - return locales[locale]; -}; diff --git a/app/assets/javascripts/components/locales/uk.jsx b/app/assets/javascripts/components/locales/uk.jsx deleted file mode 100644 index 84a348c210a2..000000000000 --- a/app/assets/javascripts/components/locales/uk.jsx +++ /dev/null @@ -1,57 +0,0 @@ -const uk = { - "column_back_button.label": "Назад", - "lightbox.close": "Закрити", - "loading_indicator.label": "Завантаження...", - "status.mention": "Згадати", - "status.delete": "Видалити", - "status.reply": "Відповісти", - "status.reblog": "Передмухнути", - "status.favourite": "Подобається", - "status.reblogged_by": "{name} передмухнув(-ла)", - "status.sensitive_warning": "Непристойний зміст", - "status.sensitive_toggle": "Натисніть, щоб подивитися", - "video_player.toggle_sound": "Увімкнути/вимкнути звук", - "account.mention": "Згадати", - "account.edit_profile": "Налаштування профілю", - "account.unblock": "Розблокувати", - "account.unfollow": "Відписатися", - "account.block": "Заблокувати", - "account.follow": "Підписатися", - "account.posts": "Пости", - "account.follows": "Підписки", - "account.followers": "Підписники", - "account.follows_you": "Підписаний", - "getting_started.heading": "Ласкаво просимо", - "getting_started.about_addressing": "Ви можете підписуватись на людей, якщо ви знаєте їх ім'я користувача чи домен, шляхом введення email-подібної адреси у верхньому рядку бокової панелі.", - "getting_started.about_shortcuts": "Якщо користувач, якого ви шукаєте, знаходиться на тому ж домені, що й ви, можна просто ввести ім'я користувача. Це правило стосується й згадування людей у статусах.", - "getting_started.about_developer": "Розробник проекту знаходиться за адресою Gargron@mastodon.social", - "column.home": "Головна", - "column.mentions": "Згадування", - "column.public": "Стіна", - "column.notifications": "Сповіщення", - "tabs_bar.compose": "Написати", - "tabs_bar.home": "Головна", - "tabs_bar.mentions": "Згадування", - "tabs_bar.public": "Стіна", - "tabs_bar.notifications": "Сповіщення", - "compose_form.placeholder": "Що у Вас на думці?", - "compose_form.publish": "Дмухнути", - "compose_form.sensitive": "Непристойний зміст", - "compose_form.unlisted": "Таємний режим", - "navigation_bar.edit_profile": "Редагувати профіль", - "navigation_bar.preferences": "Налаштування", - "navigation_bar.public_timeline": "Публічна стіна", - "navigation_bar.logout": "Вийти", - "reply_indicator.cancel": "Відмінити", - "search.placeholder": "Пошук", - "search.account": "Аккаунт", - "search.hashtag": "Хештеґ", - "upload_button.label": "Додати медіа", - "upload_form.undo": "Відмінити", - "notification.follow": "{name} підписався(-лась) на Вас", - "notification.favourite": "{name} сподобався ваш допис", - "notification.reblog": "{name} передмухнув(-ла) Ваш статус", - "notification.mention": "{name} згадав(-ла) Вас" -}; - -export default uk; diff --git a/app/assets/javascripts/components/.gitkeep b/app/assets/stylesheets/.gitkeep similarity index 100% rename from app/assets/javascripts/components/.gitkeep rename to app/assets/stylesheets/.gitkeep diff --git a/app/assets/stylesheets/fonts/montserrat.scss b/app/assets/stylesheets/fonts/montserrat.scss deleted file mode 100644 index 8705b3fa9e63..000000000000 --- a/app/assets/stylesheets/fonts/montserrat.scss +++ /dev/null @@ -1,11 +0,0 @@ -@font-face { - font-family: 'Montserrat'; - src: local('Montserrat'); - src: font-url('montserrat/Montserrat-Regular.eot'); - src: font-url('montserrat/Montserrat-Regular.eot?#iefix') format('embedded-opentype'), - font-url('montserrat/Montserrat-Regular.woff2') format('woff2'), - font-url('montserrat/Montserrat-Regular.woff') format('woff'), - font-url('montserrat/Montserrat-Regular.ttf') format('truetype'); - font-weight: 400; - font-style: normal; -} diff --git a/app/assets/stylesheets/fonts/roboto-mono.scss b/app/assets/stylesheets/fonts/roboto-mono.scss deleted file mode 100644 index f46ce6b68a01..000000000000 --- a/app/assets/stylesheets/fonts/roboto-mono.scss +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Roboto Mono'; - src: local('Roboto Mono'); - src: font-url('roboto-mono/robotomono-regular-webfont.eot'); - src: font-url('roboto-mono/robotomono-regular-webfont.eot?#iefix') format('embedded-opentype'), - font-url('roboto-mono/robotomono-regular-webfont.woff2') format('woff2'), - font-url('roboto-mono/robotomono-regular-webfont.woff') format('woff'), - font-url('roboto-mono/robotomono-regular-webfont.ttf') format('truetype'), - font-url('roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg'); - font-weight: 400; - font-style: normal; -} diff --git a/app/assets/stylesheets/fonts/roboto.scss b/app/assets/stylesheets/fonts/roboto.scss deleted file mode 100644 index fc62869d4c5a..000000000000 --- a/app/assets/stylesheets/fonts/roboto.scss +++ /dev/null @@ -1,52 +0,0 @@ -@font-face { - font-family: 'Roboto'; - src: local('Roboto'); - src: font-url('roboto/roboto-italic-webfont.eot'); - src: font-url('roboto/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'), - font-url('roboto/roboto-italic-webfont.woff2') format('woff2'), - font-url('roboto/roboto-italic-webfont.woff') format('woff'), - font-url('roboto/roboto-italic-webfont.ttf') format('truetype'), - font-url('roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg'); - font-weight: normal; - font-style: italic; -} - -@font-face { - font-family: 'Roboto'; - src: local('Roboto'); - src: font-url('roboto/roboto-bold-webfont.eot'); - src: local('Roboto bold'), local('roboto-bold'), - font-url('roboto/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'), - font-url('roboto/roboto-bold-webfont.woff2') format('woff2'), - font-url('roboto/roboto-bold-webfont.woff') format('woff'), - font-url('roboto/roboto-bold-webfont.ttf') format('truetype'), - font-url('roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg'); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: local('Roboto'); - src: font-url('roboto/roboto-medium-webfont.eot'); - src: font-url('roboto/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'), - font-url('roboto/roboto-medium-webfont.woff2') format('woff2'), - font-url('roboto/roboto-medium-webfont.woff') format('woff'), - font-url('roboto/roboto-medium-webfont.ttf') format('truetype'), - font-url('roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg'); - font-weight: 500; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: local('Roboto'); - src: font-url('roboto/roboto-regular-webfont.eot'); - src: font-url('roboto/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'), - font-url('roboto/roboto-regular-webfont.woff2') format('woff2'), - font-url('roboto/roboto-regular-webfont.woff') format('woff'), - font-url('roboto/roboto-regular-webfont.ttf') format('truetype'), - font-url('roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg'); - font-weight: normal; - font-style: normal; -} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 14c7447c052a..92ffac33b362 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,7 +10,7 @@ module ApplicationHelper end def add_rtl_body_class(other_classes) - other_classes = "#{other_classes} rtl" if [:ar, :fa].include?(I18n.locale) + other_classes = "#{other_classes} rtl" if [:ar, :fa, :he].include?(I18n.locale) other_classes end @@ -22,4 +22,8 @@ module ApplicationHelper def title Rails.env.production? ? site_title : "#{site_title} (Dev)" end + + def fa_icon(icon) + content_tag(:i, nil, class: 'fa ' + icon.split(' ').map { |cl| "fa-#{cl}" }.join(' ')) + end end diff --git a/app/assets/fonts/montserrat/Montserrat-Regular.eot b/app/javascript/fonts/montserrat/Montserrat-Regular.eot similarity index 100% rename from app/assets/fonts/montserrat/Montserrat-Regular.eot rename to app/javascript/fonts/montserrat/Montserrat-Regular.eot diff --git a/app/assets/fonts/montserrat/Montserrat-Regular.ttf b/app/javascript/fonts/montserrat/Montserrat-Regular.ttf similarity index 100% rename from app/assets/fonts/montserrat/Montserrat-Regular.ttf rename to app/javascript/fonts/montserrat/Montserrat-Regular.ttf diff --git a/app/assets/fonts/montserrat/Montserrat-Regular.woff b/app/javascript/fonts/montserrat/Montserrat-Regular.woff similarity index 100% rename from app/assets/fonts/montserrat/Montserrat-Regular.woff rename to app/javascript/fonts/montserrat/Montserrat-Regular.woff diff --git a/app/assets/fonts/montserrat/Montserrat-Regular.woff2 b/app/javascript/fonts/montserrat/Montserrat-Regular.woff2 similarity index 100% rename from app/assets/fonts/montserrat/Montserrat-Regular.woff2 rename to app/javascript/fonts/montserrat/Montserrat-Regular.woff2 diff --git a/app/assets/fonts/roboto-mono/robotomono-regular-webfont.eot b/app/javascript/fonts/roboto-mono/robotomono-regular-webfont.eot similarity index 100% rename from app/assets/fonts/roboto-mono/robotomono-regular-webfont.eot rename to app/javascript/fonts/roboto-mono/robotomono-regular-webfont.eot diff --git a/app/assets/fonts/roboto-mono/robotomono-regular-webfont.svg b/app/javascript/fonts/roboto-mono/robotomono-regular-webfont.svg similarity index 100% rename from app/assets/fonts/roboto-mono/robotomono-regular-webfont.svg rename to app/javascript/fonts/roboto-mono/robotomono-regular-webfont.svg diff --git a/app/assets/fonts/roboto-mono/robotomono-regular-webfont.ttf b/app/javascript/fonts/roboto-mono/robotomono-regular-webfont.ttf similarity index 100% rename from app/assets/fonts/roboto-mono/robotomono-regular-webfont.ttf rename to app/javascript/fonts/roboto-mono/robotomono-regular-webfont.ttf diff --git a/app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff b/app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff similarity index 100% rename from app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff rename to app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff diff --git a/app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff2 b/app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff2 similarity index 100% rename from app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff2 rename to app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff2 diff --git a/app/assets/fonts/roboto/roboto-bold-webfont.eot b/app/javascript/fonts/roboto/roboto-bold-webfont.eot similarity index 100% rename from app/assets/fonts/roboto/roboto-bold-webfont.eot rename to app/javascript/fonts/roboto/roboto-bold-webfont.eot diff --git a/app/assets/fonts/roboto/roboto-bold-webfont.svg b/app/javascript/fonts/roboto/roboto-bold-webfont.svg similarity index 100% rename from app/assets/fonts/roboto/roboto-bold-webfont.svg rename to app/javascript/fonts/roboto/roboto-bold-webfont.svg diff --git a/app/assets/fonts/roboto/roboto-bold-webfont.ttf b/app/javascript/fonts/roboto/roboto-bold-webfont.ttf similarity index 100% rename from app/assets/fonts/roboto/roboto-bold-webfont.ttf rename to app/javascript/fonts/roboto/roboto-bold-webfont.ttf diff --git a/app/assets/fonts/roboto/roboto-bold-webfont.woff b/app/javascript/fonts/roboto/roboto-bold-webfont.woff similarity index 100% rename from app/assets/fonts/roboto/roboto-bold-webfont.woff rename to app/javascript/fonts/roboto/roboto-bold-webfont.woff diff --git a/app/assets/fonts/roboto/roboto-bold-webfont.woff2 b/app/javascript/fonts/roboto/roboto-bold-webfont.woff2 similarity index 100% rename from app/assets/fonts/roboto/roboto-bold-webfont.woff2 rename to app/javascript/fonts/roboto/roboto-bold-webfont.woff2 diff --git a/app/assets/fonts/roboto/roboto-italic-webfont.eot b/app/javascript/fonts/roboto/roboto-italic-webfont.eot similarity index 100% rename from app/assets/fonts/roboto/roboto-italic-webfont.eot rename to app/javascript/fonts/roboto/roboto-italic-webfont.eot diff --git a/app/assets/fonts/roboto/roboto-italic-webfont.svg b/app/javascript/fonts/roboto/roboto-italic-webfont.svg similarity index 100% rename from app/assets/fonts/roboto/roboto-italic-webfont.svg rename to app/javascript/fonts/roboto/roboto-italic-webfont.svg diff --git a/app/assets/fonts/roboto/roboto-italic-webfont.ttf b/app/javascript/fonts/roboto/roboto-italic-webfont.ttf similarity index 100% rename from app/assets/fonts/roboto/roboto-italic-webfont.ttf rename to app/javascript/fonts/roboto/roboto-italic-webfont.ttf diff --git a/app/assets/fonts/roboto/roboto-italic-webfont.woff b/app/javascript/fonts/roboto/roboto-italic-webfont.woff similarity index 100% rename from app/assets/fonts/roboto/roboto-italic-webfont.woff rename to app/javascript/fonts/roboto/roboto-italic-webfont.woff diff --git a/app/assets/fonts/roboto/roboto-italic-webfont.woff2 b/app/javascript/fonts/roboto/roboto-italic-webfont.woff2 similarity index 100% rename from app/assets/fonts/roboto/roboto-italic-webfont.woff2 rename to app/javascript/fonts/roboto/roboto-italic-webfont.woff2 diff --git a/app/assets/fonts/roboto/roboto-medium-webfont.eot b/app/javascript/fonts/roboto/roboto-medium-webfont.eot similarity index 100% rename from app/assets/fonts/roboto/roboto-medium-webfont.eot rename to app/javascript/fonts/roboto/roboto-medium-webfont.eot diff --git a/app/assets/fonts/roboto/roboto-medium-webfont.svg b/app/javascript/fonts/roboto/roboto-medium-webfont.svg similarity index 100% rename from app/assets/fonts/roboto/roboto-medium-webfont.svg rename to app/javascript/fonts/roboto/roboto-medium-webfont.svg diff --git a/app/assets/fonts/roboto/roboto-medium-webfont.ttf b/app/javascript/fonts/roboto/roboto-medium-webfont.ttf similarity index 100% rename from app/assets/fonts/roboto/roboto-medium-webfont.ttf rename to app/javascript/fonts/roboto/roboto-medium-webfont.ttf diff --git a/app/assets/fonts/roboto/roboto-medium-webfont.woff b/app/javascript/fonts/roboto/roboto-medium-webfont.woff similarity index 100% rename from app/assets/fonts/roboto/roboto-medium-webfont.woff rename to app/javascript/fonts/roboto/roboto-medium-webfont.woff diff --git a/app/assets/fonts/roboto/roboto-medium-webfont.woff2 b/app/javascript/fonts/roboto/roboto-medium-webfont.woff2 similarity index 100% rename from app/assets/fonts/roboto/roboto-medium-webfont.woff2 rename to app/javascript/fonts/roboto/roboto-medium-webfont.woff2 diff --git a/app/assets/fonts/roboto/roboto-regular-webfont.eot b/app/javascript/fonts/roboto/roboto-regular-webfont.eot similarity index 100% rename from app/assets/fonts/roboto/roboto-regular-webfont.eot rename to app/javascript/fonts/roboto/roboto-regular-webfont.eot diff --git a/app/assets/fonts/roboto/roboto-regular-webfont.svg b/app/javascript/fonts/roboto/roboto-regular-webfont.svg similarity index 100% rename from app/assets/fonts/roboto/roboto-regular-webfont.svg rename to app/javascript/fonts/roboto/roboto-regular-webfont.svg diff --git a/app/assets/fonts/roboto/roboto-regular-webfont.ttf b/app/javascript/fonts/roboto/roboto-regular-webfont.ttf similarity index 100% rename from app/assets/fonts/roboto/roboto-regular-webfont.ttf rename to app/javascript/fonts/roboto/roboto-regular-webfont.ttf diff --git a/app/assets/fonts/roboto/roboto-regular-webfont.woff b/app/javascript/fonts/roboto/roboto-regular-webfont.woff similarity index 100% rename from app/assets/fonts/roboto/roboto-regular-webfont.woff rename to app/javascript/fonts/roboto/roboto-regular-webfont.woff diff --git a/app/assets/fonts/roboto/roboto-regular-webfont.woff2 b/app/javascript/fonts/roboto/roboto-regular-webfont.woff2 similarity index 100% rename from app/assets/fonts/roboto/roboto-regular-webfont.woff2 rename to app/javascript/fonts/roboto/roboto-regular-webfont.woff2 diff --git a/app/assets/images/.keep b/app/javascript/images/.keep similarity index 100% rename from app/assets/images/.keep rename to app/javascript/images/.keep diff --git a/app/assets/images/background-photo.jpg b/app/javascript/images/background-photo.jpg similarity index 100% rename from app/assets/images/background-photo.jpg rename to app/javascript/images/background-photo.jpg diff --git a/app/assets/images/boost_sprite.png b/app/javascript/images/boost_sprite.png similarity index 100% rename from app/assets/images/boost_sprite.png rename to app/javascript/images/boost_sprite.png diff --git a/app/assets/images/elephant-friend.png b/app/javascript/images/elephant-friend.png similarity index 100% rename from app/assets/images/elephant-friend.png rename to app/javascript/images/elephant-friend.png diff --git a/app/assets/images/fluffy-elephant-friend.png b/app/javascript/images/fluffy-elephant-friend.png similarity index 100% rename from app/assets/images/fluffy-elephant-friend.png rename to app/javascript/images/fluffy-elephant-friend.png diff --git a/app/assets/images/logo.png b/app/javascript/images/logo.png similarity index 100% rename from app/assets/images/logo.png rename to app/javascript/images/logo.png diff --git a/app/assets/images/logo.svg b/app/javascript/images/logo.svg similarity index 100% rename from app/assets/images/logo.svg rename to app/javascript/images/logo.svg diff --git a/app/assets/images/mastodon-getting-started.png b/app/javascript/images/mastodon-getting-started.png similarity index 100% rename from app/assets/images/mastodon-getting-started.png rename to app/javascript/images/mastodon-getting-started.png diff --git a/app/assets/images/mastodon-not-found.png b/app/javascript/images/mastodon-not-found.png similarity index 100% rename from app/assets/images/mastodon-not-found.png rename to app/javascript/images/mastodon-not-found.png diff --git a/app/assets/images/mastodon.jpg b/app/javascript/images/mastodon.jpg similarity index 100% rename from app/assets/images/mastodon.jpg rename to app/javascript/images/mastodon.jpg diff --git a/app/assets/images/mastodon_small.jpg b/app/javascript/images/mastodon_small.jpg similarity index 100% rename from app/assets/images/mastodon_small.jpg rename to app/javascript/images/mastodon_small.jpg diff --git a/app/assets/images/screenshot.png b/app/javascript/images/screenshot.png similarity index 100% rename from app/assets/images/screenshot.png rename to app/javascript/images/screenshot.png diff --git a/app/assets/images/void.png b/app/javascript/images/void.png similarity index 100% rename from app/assets/images/void.png rename to app/javascript/images/void.png diff --git a/app/javascript/mastodon/.gitkeep b/app/javascript/mastodon/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/app/assets/javascripts/components/actions/accounts.jsx b/app/javascript/mastodon/actions/accounts.js similarity index 100% rename from app/assets/javascripts/components/actions/accounts.jsx rename to app/javascript/mastodon/actions/accounts.js diff --git a/app/assets/javascripts/components/actions/alerts.jsx b/app/javascript/mastodon/actions/alerts.js similarity index 100% rename from app/assets/javascripts/components/actions/alerts.jsx rename to app/javascript/mastodon/actions/alerts.js diff --git a/app/assets/javascripts/components/actions/blocks.jsx b/app/javascript/mastodon/actions/blocks.js similarity index 100% rename from app/assets/javascripts/components/actions/blocks.jsx rename to app/javascript/mastodon/actions/blocks.js diff --git a/app/assets/javascripts/components/actions/cards.jsx b/app/javascript/mastodon/actions/cards.js similarity index 100% rename from app/assets/javascripts/components/actions/cards.jsx rename to app/javascript/mastodon/actions/cards.js diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/javascript/mastodon/actions/compose.js similarity index 100% rename from app/assets/javascripts/components/actions/compose.jsx rename to app/javascript/mastodon/actions/compose.js diff --git a/app/assets/javascripts/components/actions/favourites.jsx b/app/javascript/mastodon/actions/favourites.js similarity index 100% rename from app/assets/javascripts/components/actions/favourites.jsx rename to app/javascript/mastodon/actions/favourites.js diff --git a/app/assets/javascripts/components/actions/interactions.jsx b/app/javascript/mastodon/actions/interactions.js similarity index 100% rename from app/assets/javascripts/components/actions/interactions.jsx rename to app/javascript/mastodon/actions/interactions.js diff --git a/app/assets/javascripts/components/actions/modal.jsx b/app/javascript/mastodon/actions/modal.js similarity index 100% rename from app/assets/javascripts/components/actions/modal.jsx rename to app/javascript/mastodon/actions/modal.js diff --git a/app/assets/javascripts/components/actions/mutes.jsx b/app/javascript/mastodon/actions/mutes.js similarity index 100% rename from app/assets/javascripts/components/actions/mutes.jsx rename to app/javascript/mastodon/actions/mutes.js diff --git a/app/assets/javascripts/components/actions/notifications.jsx b/app/javascript/mastodon/actions/notifications.js similarity index 100% rename from app/assets/javascripts/components/actions/notifications.jsx rename to app/javascript/mastodon/actions/notifications.js diff --git a/app/assets/javascripts/components/actions/onboarding.jsx b/app/javascript/mastodon/actions/onboarding.js similarity index 100% rename from app/assets/javascripts/components/actions/onboarding.jsx rename to app/javascript/mastodon/actions/onboarding.js diff --git a/app/assets/javascripts/components/actions/reports.jsx b/app/javascript/mastodon/actions/reports.js similarity index 100% rename from app/assets/javascripts/components/actions/reports.jsx rename to app/javascript/mastodon/actions/reports.js diff --git a/app/assets/javascripts/components/actions/search.jsx b/app/javascript/mastodon/actions/search.js similarity index 100% rename from app/assets/javascripts/components/actions/search.jsx rename to app/javascript/mastodon/actions/search.js diff --git a/app/assets/javascripts/components/actions/settings.jsx b/app/javascript/mastodon/actions/settings.js similarity index 100% rename from app/assets/javascripts/components/actions/settings.jsx rename to app/javascript/mastodon/actions/settings.js diff --git a/app/assets/javascripts/components/actions/statuses.jsx b/app/javascript/mastodon/actions/statuses.js similarity index 100% rename from app/assets/javascripts/components/actions/statuses.jsx rename to app/javascript/mastodon/actions/statuses.js diff --git a/app/assets/javascripts/components/actions/store.jsx b/app/javascript/mastodon/actions/store.js similarity index 100% rename from app/assets/javascripts/components/actions/store.jsx rename to app/javascript/mastodon/actions/store.js diff --git a/app/assets/javascripts/components/actions/timelines.jsx b/app/javascript/mastodon/actions/timelines.js similarity index 100% rename from app/assets/javascripts/components/actions/timelines.jsx rename to app/javascript/mastodon/actions/timelines.js diff --git a/app/assets/javascripts/components/api.jsx b/app/javascript/mastodon/api.js similarity index 100% rename from app/assets/javascripts/components/api.jsx rename to app/javascript/mastodon/api.js diff --git a/app/assets/javascripts/components/components/account.jsx b/app/javascript/mastodon/components/account.js similarity index 95% rename from app/assets/javascripts/components/components/account.jsx rename to app/javascript/mastodon/components/account.js index 81439bd25701..9016bedb6374 100644 --- a/app/assets/javascripts/components/components/account.jsx +++ b/app/javascript/mastodon/components/account.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Avatar from './avatar'; @@ -5,6 +6,7 @@ import DisplayName from './display_name'; import Permalink from './permalink'; import IconButton from './icon_button'; import { defineMessages, injectIntl } from 'react-intl'; +import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ follow: { id: 'account.follow', defaultMessage: 'Follow' }, @@ -14,7 +16,7 @@ const messages = defineMessages({ unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' } }); -class Account extends React.PureComponent { +class Account extends ImmutablePureComponent { constructor (props, context) { super(props, context); diff --git a/app/assets/javascripts/components/components/attachment_list.jsx b/app/javascript/mastodon/components/attachment_list.js similarity index 96% rename from app/assets/javascripts/components/components/attachment_list.jsx rename to app/javascript/mastodon/components/attachment_list.js index 54841fa51ce6..6df578b77dc5 100644 --- a/app/assets/javascripts/components/components/attachment_list.jsx +++ b/app/javascript/mastodon/components/attachment_list.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; diff --git a/app/assets/javascripts/components/components/autosuggest_textarea.jsx b/app/javascript/mastodon/components/autosuggest_textarea.js similarity index 97% rename from app/assets/javascripts/components/components/autosuggest_textarea.jsx rename to app/javascript/mastodon/components/autosuggest_textarea.js index 9a4d5b7e3294..6d8d3b2a34f1 100644 --- a/app/assets/javascripts/components/components/autosuggest_textarea.jsx +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -1,7 +1,9 @@ +import React from 'react'; import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { isRtl } from '../rtl'; +import ImmutablePureComponent from 'react-immutable-pure-component'; const textAtCursorMatchesToken = (str, caretPosition) => { let word; @@ -28,7 +30,7 @@ const textAtCursorMatchesToken = (str, caretPosition) => { } }; -class AutosuggestTextarea extends React.Component { +class AutosuggestTextarea extends ImmutablePureComponent { constructor (props, context) { super(props, context); diff --git a/app/assets/javascripts/components/components/avatar.jsx b/app/javascript/mastodon/components/avatar.js similarity index 92% rename from app/assets/javascripts/components/components/avatar.jsx rename to app/javascript/mastodon/components/avatar.js index d1a00ac3968d..47f2715c783f 100644 --- a/app/assets/javascripts/components/components/avatar.jsx +++ b/app/javascript/mastodon/components/avatar.js @@ -1,21 +1,26 @@ +import React from 'react'; import PropTypes from 'prop-types'; class Avatar extends React.PureComponent { constructor (props, context) { super(props, context); + this.state = { hovering: false }; + this.handleMouseEnter = this.handleMouseEnter.bind(this); this.handleMouseLeave = this.handleMouseLeave.bind(this); } handleMouseEnter () { + if (this.props.animate) return; this.setState({ hovering: true }); } handleMouseLeave () { + if (this.props.animate) return; this.setState({ hovering: false }); } diff --git a/app/assets/javascripts/components/components/button.jsx b/app/javascript/mastodon/components/button.js similarity index 97% rename from app/assets/javascripts/components/components/button.jsx rename to app/javascript/mastodon/components/button.js index 00d80b1fd0eb..1063e0289eb7 100644 --- a/app/assets/javascripts/components/components/button.jsx +++ b/app/javascript/mastodon/components/button.js @@ -1,3 +1,4 @@ +import React from 'react'; import PropTypes from 'prop-types'; class Button extends React.PureComponent { diff --git a/app/assets/javascripts/components/components/collapsable.jsx b/app/javascript/mastodon/components/collapsable.js similarity index 96% rename from app/assets/javascripts/components/components/collapsable.jsx rename to app/javascript/mastodon/components/collapsable.js index 0810768f0541..a61f67d8e470 100644 --- a/app/assets/javascripts/components/components/collapsable.jsx +++ b/app/javascript/mastodon/components/collapsable.js @@ -1,3 +1,4 @@ +import React from 'react'; import { Motion, spring } from 'react-motion'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/column_back_button.jsx b/app/javascript/mastodon/components/column_back_button.js similarity index 96% rename from app/assets/javascripts/components/components/column_back_button.jsx rename to app/javascript/mastodon/components/column_back_button.js index 70110f0aa778..bedc417fd05d 100644 --- a/app/assets/javascripts/components/components/column_back_button.jsx +++ b/app/javascript/mastodon/components/column_back_button.js @@ -1,3 +1,4 @@ +import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/column_back_button_slim.jsx b/app/javascript/mastodon/components/column_back_button_slim.js similarity index 96% rename from app/assets/javascripts/components/components/column_back_button_slim.jsx rename to app/javascript/mastodon/components/column_back_button_slim.js index 719690097197..9aa7e92c2489 100644 --- a/app/assets/javascripts/components/components/column_back_button_slim.jsx +++ b/app/javascript/mastodon/components/column_back_button_slim.js @@ -1,3 +1,4 @@ +import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/column_collapsable.jsx b/app/javascript/mastodon/components/column_collapsable.js similarity index 98% rename from app/assets/javascripts/components/components/column_collapsable.jsx rename to app/javascript/mastodon/components/column_collapsable.js index 2cb44086216e..7979468590da 100644 --- a/app/assets/javascripts/components/components/column_collapsable.jsx +++ b/app/javascript/mastodon/components/column_collapsable.js @@ -1,3 +1,4 @@ +import React from 'react'; import { Motion, spring } from 'react-motion'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/display_name.jsx b/app/javascript/mastodon/components/display_name.js similarity index 96% rename from app/assets/javascripts/components/components/display_name.jsx rename to app/javascript/mastodon/components/display_name.js index d7257e09285f..6bdd06db7604 100644 --- a/app/assets/javascripts/components/components/display_name.jsx +++ b/app/javascript/mastodon/components/display_name.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import escapeTextContentForBrowser from 'escape-html'; import emojify from '../emoji'; diff --git a/app/assets/javascripts/components/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.js similarity index 98% rename from app/assets/javascripts/components/components/dropdown_menu.jsx rename to app/javascript/mastodon/components/dropdown_menu.js index f5ee27a11c90..aed0757b1051 100644 --- a/app/assets/javascripts/components/components/dropdown_menu.jsx +++ b/app/javascript/mastodon/components/dropdown_menu.js @@ -1,3 +1,4 @@ +import React from 'react'; import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/extended_video_player.jsx b/app/javascript/mastodon/components/extended_video_player.js similarity index 97% rename from app/assets/javascripts/components/components/extended_video_player.jsx rename to app/javascript/mastodon/components/extended_video_player.js index bbbe09da8ed4..34ede66fd088 100644 --- a/app/assets/javascripts/components/components/extended_video_player.jsx +++ b/app/javascript/mastodon/components/extended_video_player.js @@ -1,3 +1,4 @@ +import React from 'react'; import PropTypes from 'prop-types'; class ExtendedVideoPlayer extends React.PureComponent { diff --git a/app/assets/javascripts/components/components/icon_button.jsx b/app/javascript/mastodon/components/icon_button.js similarity index 98% rename from app/assets/javascripts/components/components/icon_button.jsx rename to app/javascript/mastodon/components/icon_button.js index 67c6513fd01a..87324b6c8189 100644 --- a/app/assets/javascripts/components/components/icon_button.jsx +++ b/app/javascript/mastodon/components/icon_button.js @@ -1,3 +1,4 @@ +import React from 'react'; import { Motion, spring } from 'react-motion'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/load_more.jsx b/app/javascript/mastodon/components/load_more.js similarity index 92% rename from app/assets/javascripts/components/components/load_more.jsx rename to app/javascript/mastodon/components/load_more.js index f59ff110381c..36dae79af876 100644 --- a/app/assets/javascripts/components/components/load_more.jsx +++ b/app/javascript/mastodon/components/load_more.js @@ -1,3 +1,4 @@ +import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/loading_indicator.jsx b/app/javascript/mastodon/components/loading_indicator.js similarity index 90% rename from app/assets/javascripts/components/components/loading_indicator.jsx rename to app/javascript/mastodon/components/loading_indicator.js index 61e0a0f15327..c09244834ec6 100644 --- a/app/assets/javascripts/components/components/loading_indicator.jsx +++ b/app/javascript/mastodon/components/loading_indicator.js @@ -1,3 +1,4 @@ +import React from 'react'; import { FormattedMessage } from 'react-intl'; const LoadingIndicator = () => ( diff --git a/app/assets/javascripts/components/components/media_gallery.jsx b/app/javascript/mastodon/components/media_gallery.js similarity index 99% rename from app/assets/javascripts/components/components/media_gallery.jsx rename to app/javascript/mastodon/components/media_gallery.js index 58e134f50067..dc08c457d248 100644 --- a/app/assets/javascripts/components/components/media_gallery.jsx +++ b/app/javascript/mastodon/components/media_gallery.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; diff --git a/app/assets/javascripts/components/components/missing_indicator.jsx b/app/javascript/mastodon/components/missing_indicator.js similarity index 55% rename from app/assets/javascripts/components/components/missing_indicator.jsx rename to app/javascript/mastodon/components/missing_indicator.js index 75129ae14ba8..87df7f61ce35 100644 --- a/app/assets/javascripts/components/components/missing_indicator.jsx +++ b/app/javascript/mastodon/components/missing_indicator.js @@ -1,8 +1,11 @@ +import React from 'react'; import { FormattedMessage } from 'react-intl'; const MissingIndicator = () => (
- +
+ +
); diff --git a/app/assets/javascripts/components/components/permalink.jsx b/app/javascript/mastodon/components/permalink.js similarity index 73% rename from app/assets/javascripts/components/components/permalink.jsx rename to app/javascript/mastodon/components/permalink.js index ccbe4944f1f1..26444f27c31c 100644 --- a/app/assets/javascripts/components/components/permalink.jsx +++ b/app/javascript/mastodon/components/permalink.js @@ -1,6 +1,7 @@ +import React from 'react'; import PropTypes from 'prop-types'; -class Permalink extends React.Component { +class Permalink extends React.PureComponent { constructor (props, context) { super(props, context); @@ -17,7 +18,11 @@ class Permalink extends React.Component { render () { const { href, children, className, ...other } = this.props; - return {children}; + return ( + + {children} + + ); } } diff --git a/app/assets/javascripts/components/components/relative_timestamp.jsx b/app/javascript/mastodon/components/relative_timestamp.js similarity index 95% rename from app/assets/javascripts/components/components/relative_timestamp.jsx rename to app/javascript/mastodon/components/relative_timestamp.js index 9ab472e2cb2a..9c7a8121e756 100644 --- a/app/assets/javascripts/components/components/relative_timestamp.jsx +++ b/app/javascript/mastodon/components/relative_timestamp.js @@ -1,3 +1,4 @@ +import React from 'react'; import { injectIntl, FormattedRelative } from 'react-intl'; import PropTypes from 'prop-types'; diff --git a/app/assets/javascripts/components/components/status.jsx b/app/javascript/mastodon/components/status.js similarity index 96% rename from app/assets/javascripts/components/components/status.jsx rename to app/javascript/mastodon/components/status.js index 193231837610..39ed6dd4fd6a 100644 --- a/app/assets/javascripts/components/components/status.jsx +++ b/app/javascript/mastodon/components/status.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Avatar from './avatar'; @@ -11,8 +12,9 @@ import StatusActionBar from './status_action_bar'; import { FormattedMessage } from 'react-intl'; import emojify from '../emoji'; import escapeTextContentForBrowser from 'escape-html'; +import ImmutablePureComponent from 'react-immutable-pure-component'; -class Status extends React.PureComponent { +class Status extends ImmutablePureComponent { constructor (props, context) { super(props, context); diff --git a/app/assets/javascripts/components/components/status_action_bar.jsx b/app/javascript/mastodon/components/status_action_bar.js similarity index 99% rename from app/assets/javascripts/components/components/status_action_bar.jsx rename to app/javascript/mastodon/components/status_action_bar.js index 29938f23eb82..dc4466d6cfc5 100644 --- a/app/assets/javascripts/components/components/status_action_bar.jsx +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; diff --git a/app/assets/javascripts/components/components/status_content.jsx b/app/javascript/mastodon/components/status_content.js similarity index 93% rename from app/assets/javascripts/components/components/status_content.jsx rename to app/javascript/mastodon/components/status_content.js index 714c00951a2d..1d462103bcc5 100644 --- a/app/assets/javascripts/components/components/status_content.jsx +++ b/app/javascript/mastodon/components/status_content.js @@ -1,3 +1,4 @@ +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import escapeTextContentForBrowser from 'escape-html'; import PropTypes from 'prop-types'; @@ -18,10 +19,11 @@ class StatusContent extends React.PureComponent { this.handleMouseDown = this.handleMouseDown.bind(this) this.handleMouseUp = this.handleMouseUp.bind(this); this.handleSpoilerClick = this.handleSpoilerClick.bind(this); + this.setRef = this.setRef.bind(this); }; componentDidMount () { - const node = ReactDOM.findDOMNode(this); + const node = this.node; const links = node.querySelectorAll('a'); for (var i = 0; i < links.length; ++i) { @@ -84,6 +86,10 @@ class StatusContent extends React.PureComponent { this.setState({ hidden: !this.state.hidden }); } + setRef (c) { + this.node = c; + } + render () { const { status } = this.props; const { hidden } = this.state; @@ -119,12 +125,13 @@ class StatusContent extends React.PureComponent { {mentionsPlaceholder} -