Browse Source

Replace sprockets/browserify with Webpack (#2617)

* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
Eugen Rochko 1 year ago
parent
commit
f5bf5ebb82
100 changed files with 87 additions and 789 deletions
  1. 20
    2
      .babelrc
  2. 1
    0
      .foreman
  3. 3
    1
      .gitignore
  4. 4
    0
      .postcssrc.yml
  5. 3
    4
      .travis.yml
  6. 7
    8
      Dockerfile
  7. 12
    16
      Gemfile
  8. 11
    32
      Gemfile.lock
  9. 3
    0
      Procfile.dev
  10. 0
    15
      app/assets/javascripts/application.js
  11. 0
    9
      app/assets/javascripts/application_public.js
  12. 0
    15
      app/assets/javascripts/components.js
  13. 0
    16
      app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx
  14. 0
    15
      app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx
  15. 0
    44
      app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx
  16. 0
    66
      app/assets/javascripts/components/features/getting_started/index.jsx
  17. 0
    68
      app/assets/javascripts/components/locales/bg.jsx
  18. 0
    68
      app/assets/javascripts/components/locales/eo.jsx
  19. 0
    93
      app/assets/javascripts/components/locales/es.jsx
  20. 0
    68
      app/assets/javascripts/components/locales/fi.jsx
  21. 0
    57
      app/assets/javascripts/components/locales/hu.jsx
  22. 0
    57
      app/assets/javascripts/components/locales/index.jsx
  23. 0
    57
      app/assets/javascripts/components/locales/uk.jsx
  24. 0
    0
      app/assets/stylesheets/.gitkeep
  25. 0
    11
      app/assets/stylesheets/fonts/montserrat.scss
  26. 0
    12
      app/assets/stylesheets/fonts/roboto-mono.scss
  27. 0
    52
      app/assets/stylesheets/fonts/roboto.scss
  28. 5
    1
      app/helpers/application_helper.rb
  29. 0
    0
      app/javascript/fonts/montserrat/Montserrat-Regular.eot
  30. 0
    0
      app/javascript/fonts/montserrat/Montserrat-Regular.ttf
  31. 0
    0
      app/javascript/fonts/montserrat/Montserrat-Regular.woff
  32. 0
    0
      app/javascript/fonts/montserrat/Montserrat-Regular.woff2
  33. 0
    0
      app/javascript/fonts/roboto-mono/robotomono-regular-webfont.eot
  34. 0
    0
      app/javascript/fonts/roboto-mono/robotomono-regular-webfont.svg
  35. 0
    0
      app/javascript/fonts/roboto-mono/robotomono-regular-webfont.ttf
  36. 0
    0
      app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff
  37. 0
    0
      app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff2
  38. 0
    0
      app/javascript/fonts/roboto/roboto-bold-webfont.eot
  39. 0
    0
      app/javascript/fonts/roboto/roboto-bold-webfont.svg
  40. 0
    0
      app/javascript/fonts/roboto/roboto-bold-webfont.ttf
  41. 0
    0
      app/javascript/fonts/roboto/roboto-bold-webfont.woff
  42. 0
    0
      app/javascript/fonts/roboto/roboto-bold-webfont.woff2
  43. 0
    0
      app/javascript/fonts/roboto/roboto-italic-webfont.eot
  44. 0
    0
      app/javascript/fonts/roboto/roboto-italic-webfont.svg
  45. 0
    0
      app/javascript/fonts/roboto/roboto-italic-webfont.ttf
  46. 0
    0
      app/javascript/fonts/roboto/roboto-italic-webfont.woff
  47. 0
    0
      app/javascript/fonts/roboto/roboto-italic-webfont.woff2
  48. 0
    0
      app/javascript/fonts/roboto/roboto-medium-webfont.eot
  49. 0
    0
      app/javascript/fonts/roboto/roboto-medium-webfont.svg
  50. 0
    0
      app/javascript/fonts/roboto/roboto-medium-webfont.ttf
  51. 0
    0
      app/javascript/fonts/roboto/roboto-medium-webfont.woff
  52. 0
    0
      app/javascript/fonts/roboto/roboto-medium-webfont.woff2
  53. 0
    0
      app/javascript/fonts/roboto/roboto-regular-webfont.eot
  54. 0
    0
      app/javascript/fonts/roboto/roboto-regular-webfont.svg
  55. 0
    0
      app/javascript/fonts/roboto/roboto-regular-webfont.ttf
  56. 0
    0
      app/javascript/fonts/roboto/roboto-regular-webfont.woff
  57. 0
    0
      app/javascript/fonts/roboto/roboto-regular-webfont.woff2
  58. 0
    0
      app/javascript/images/.keep
  59. 0
    0
      app/javascript/images/background-photo.jpg
  60. 0
    0
      app/javascript/images/boost_sprite.png
  61. 0
    0
      app/javascript/images/elephant-friend.png
  62. 0
    0
      app/javascript/images/fluffy-elephant-friend.png
  63. 0
    0
      app/javascript/images/logo.png
  64. 0
    0
      app/javascript/images/logo.svg
  65. 0
    0
      app/javascript/images/mastodon-getting-started.png
  66. 0
    0
      app/javascript/images/mastodon-not-found.png
  67. 0
    0
      app/javascript/images/mastodon.jpg
  68. 0
    0
      app/javascript/images/mastodon_small.jpg
  69. 0
    0
      app/javascript/images/screenshot.png
  70. 0
    0
      app/javascript/images/void.png
  71. 0
    0
      app/javascript/mastodon/.gitkeep
  72. 0
    0
      app/javascript/mastodon/actions/accounts.js
  73. 0
    0
      app/javascript/mastodon/actions/alerts.js
  74. 0
    0
      app/javascript/mastodon/actions/blocks.js
  75. 0
    0
      app/javascript/mastodon/actions/cards.js
  76. 0
    0
      app/javascript/mastodon/actions/compose.js
  77. 0
    0
      app/javascript/mastodon/actions/favourites.js
  78. 0
    0
      app/javascript/mastodon/actions/interactions.js
  79. 0
    0
      app/javascript/mastodon/actions/modal.js
  80. 0
    0
      app/javascript/mastodon/actions/mutes.js
  81. 0
    0
      app/javascript/mastodon/actions/notifications.js
  82. 0
    0
      app/javascript/mastodon/actions/onboarding.js
  83. 0
    0
      app/javascript/mastodon/actions/reports.js
  84. 0
    0
      app/javascript/mastodon/actions/search.js
  85. 0
    0
      app/javascript/mastodon/actions/settings.js
  86. 0
    0
      app/javascript/mastodon/actions/statuses.js
  87. 0
    0
      app/javascript/mastodon/actions/store.js
  88. 0
    0
      app/javascript/mastodon/actions/timelines.js
  89. 0
    0
      app/javascript/mastodon/api.js
  90. 3
    1
      app/javascript/mastodon/components/account.js
  91. 1
    0
      app/javascript/mastodon/components/attachment_list.js
  92. 3
    1
      app/javascript/mastodon/components/autosuggest_textarea.js
  93. 5
    0
      app/javascript/mastodon/components/avatar.js
  94. 1
    0
      app/javascript/mastodon/components/button.js
  95. 1
    0
      app/javascript/mastodon/components/collapsable.js
  96. 1
    0
      app/javascript/mastodon/components/column_back_button.js
  97. 1
    0
      app/javascript/mastodon/components/column_back_button_slim.js
  98. 1
    0
      app/javascript/mastodon/components/column_collapsable.js
  99. 1
    0
      app/javascript/mastodon/components/display_name.js
  100. 0
    0
      app/javascript/mastodon/components/dropdown_menu.js

+ 20
- 2
.babelrc View File

@@ -1,7 +1,25 @@
1 1
 {
2
-  "presets": ["es2015", "react"],
2
+  "presets": [
3
+    "es2015",
4
+    "react",
5
+    [
6
+      "env",
7
+      {
8
+        "loose": true,
9
+        "modules": false
10
+      }
11
+    ]
12
+  ],
3 13
   "plugins": [
14
+    "transform-react-jsx-source",
15
+    "transform-react-jsx-self",
4 16
     "transform-decorators-legacy",
5
-    "transform-object-rest-spread"
17
+    "transform-object-rest-spread",
18
+    [
19
+      "react-intl",
20
+      {
21
+        "messagesDir": "./build/messages"
22
+      }
23
+    ]
6 24
   ]
7 25
 }

+ 1
- 0
.foreman View File

@@ -0,0 +1 @@
1
+procfile: Procfile.dev

+ 3
- 1
.gitignore View File

@@ -22,7 +22,7 @@ public/assets
22 22
 .env
23 23
 .env.production
24 24
 node_modules/
25
-neo4j/
25
+build/
26 26
 
27 27
 # Ignore Vagrant files
28 28
 .vagrant/
@@ -43,3 +43,5 @@ redis
43 43
 # Ignore vim files
44 44
 *~
45 45
 *.swp
46
+/public/packs
47
+/node_modules

+ 4
- 0
.postcssrc.yml View File

@@ -0,0 +1,4 @@
1
+plugins:
2
+  postcss-smart-import: {}
3
+  precss: {}
4
+  autoprefixer: {}

+ 3
- 4
.travis.yml View File

@@ -1,9 +1,7 @@
1 1
 language: ruby
2 2
 cache:
3 3
   bundler: true
4
-  yarn: true
5
-  directories:
6
-    - node_modules
4
+  yarn: false
7 5
 dist: trusty
8 6
 sudo: false
9 7
 
@@ -42,7 +40,8 @@ install:
42 40
   - yarn install
43 41
 
44 42
 before_script:
45
-  - bundle exec rails db:create db:migrate
43
+  - bundle exec rails db:create db:schema:load
44
+  - bundle exec rails assets:precompile
46 45
 
47 46
 script:
48 47
   - bundle exec rspec

+ 7
- 8
Dockerfile View File

@@ -10,8 +10,6 @@ EXPOSE 3000 4000
10 10
 
11 11
 WORKDIR /mastodon
12 12
 
13
-COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
14
-
15 13
 RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
16 14
  && BUILD_DEPS=" \
17 15
     postgresql-dev \
@@ -23,6 +21,7 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit
23 21
     $BUILD_DEPS \
24 22
     nodejs@edge \
25 23
     nodejs-npm@edge \
24
+    git \
26 25
     libpq \
27 26
     libxml2 \
28 27
     libxslt \
@@ -31,14 +30,14 @@ RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposit
31 30
     imagemagick@edge \
32 31
     ca-certificates \
33 32
  && npm install -g npm@3 && npm install -g yarn \
34
- && bundle install --deployment --without test development \
35
- && yarn --ignore-optional \
36
- && yarn cache clean \
37
- && npm -g cache clean \
38 33
  && update-ca-certificates \
39
- && apk del $BUILD_DEPS \
40 34
  && rm -rf /tmp/* /var/cache/apk/*
41 35
 
36
+COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
37
+
38
+RUN bundle install --deployment --without test development \
39
+ && yarn --ignore-optional --pure-lockfile
40
+
42 41
 COPY . /mastodon
43 42
 
44
-VOLUME /mastodon/public/system /mastodon/public/assets
43
+VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs

+ 12
- 16
Gemfile View File

@@ -5,22 +5,19 @@ ruby '>= 2.3.0', '< 2.5.0'
5 5
 
6 6
 gem 'pkg-config'
7 7
 
8
+gem 'puma'
8 9
 gem 'rails', '~> 5.0.2'
9
-gem 'sass-rails', '~> 5.0'
10 10
 gem 'uglifier', '>= 1.3.0'
11
-gem 'jquery-rails'
12
-gem 'puma'
13 11
 
14 12
 gem 'hamlit-rails'
15 13
 gem 'pg'
16 14
 gem 'pghero'
17 15
 gem 'dotenv-rails'
18
-gem 'font-awesome-rails'
19 16
 gem 'best_in_place', '~> 3.0.1'
20 17
 
18
+gem 'aws-sdk', '>= 2.0'
21 19
 gem 'paperclip', '~> 5.1'
22 20
 gem 'paperclip-av-transcoder'
23
-gem 'aws-sdk', '>= 2.0'
24 21
 
25 22
 gem 'addressable'
26 23
 gem 'devise'
@@ -58,18 +55,18 @@ gem 'sprockets-rails', require: 'sprockets/railtie'
58 55
 gem 'statsd-instrument'
59 56
 gem 'twitter-text'
60 57
 gem 'tzinfo-data'
58
+gem 'webpacker', '~>1.2'
61 59
 gem 'whatlanguage'
62 60
 
61
+# For some reason the view specs start failing without this
63 62
 gem 'react-rails'
64
-gem 'browserify-rails'
65
-gem 'autoprefixer-rails'
66 63
 
67 64
 group :development, :test do
68
-  gem 'rspec-rails'
69
-  gem 'pry-rails'
70
-  gem 'fuubar'
71 65
   gem 'fabrication'
66
+  gem 'fuubar'
72 67
   gem 'i18n-tasks', '~> 0.9.6'
68
+  gem 'pry-rails'
69
+  gem 'rspec-rails'
73 70
 end
74 71
 
75 72
 group :test do
@@ -83,24 +80,23 @@ group :test do
83 80
 end
84 81
 
85 82
 group :development do
86
-  gem 'rubocop', '0.46.0', require: false
83
+  gem 'active_record_query_trace'
84
+  gem 'annotate'
87 85
   gem 'better_errors'
88 86
   gem 'binding_of_caller'
87
+  gem 'bullet'
89 88
   gem 'letter_opener'
90 89
   gem 'letter_opener_web'
91
-  gem 'bullet'
92
-  gem 'active_record_query_trace'
93
-  gem 'annotate'
90
+  gem 'rubocop', '0.46.0', require: false
94 91
 
95 92
   gem 'capistrano', '3.8.0'
96 93
   gem 'capistrano-rails'
97 94
   gem 'capistrano-rbenv'
98 95
   gem 'capistrano-yarn'
99
-  gem 'capistrano-faster-assets', '~> 1.0'
100 96
 end
101 97
 
102 98
 group :production do
99
+  gem 'lograge'
103 100
   gem 'rails_12factor'
104 101
   gem 'redis-rails'
105
-  gem 'lograge'
106 102
 end

+ 11
- 32
Gemfile.lock View File

@@ -43,15 +43,13 @@ GEM
43 43
       public_suffix (~> 2.0, >= 2.0.2)
44 44
     airbrussh (1.2.0)
45 45
       sshkit (>= 1.6.1, != 1.7.0)
46
-    annotate (2.7.1)
47
-      activerecord (>= 3.2, < 6.0)
48
-      rake (>= 10.4, < 12.0)
46
+    annotate (2.6.5)
47
+      activerecord (>= 2.3.0)
48
+      rake (>= 0.8.7)
49 49
     arel (7.1.4)
50 50
     ast (2.3.0)
51 51
     attr_encrypted (3.0.3)
52 52
       encryptor (~> 3.0.0)
53
-    autoprefixer-rails (6.7.7.2)
54
-      execjs
55 53
     av (0.9.0)
56 54
       cocaine (~> 0.5.3)
57 55
     aws-sdk (2.9.12)
@@ -76,10 +74,6 @@ GEM
76 74
       rack (>= 0.9.0)
77 75
     binding_of_caller (0.7.2)
78 76
       debug_inspector (>= 0.0.1)
79
-    browserify-rails (4.1.0)
80
-      addressable (>= 2.4.0)
81
-      railties (>= 4.0.0, < 5.1)
82
-      sprockets (>= 3.6.0)
83 77
     builder (3.2.3)
84 78
     bullet (5.5.1)
85 79
       activesupport (>= 3.0.0)
@@ -92,8 +86,6 @@ GEM
92 86
     capistrano-bundler (1.2.0)
93 87
       capistrano (~> 3.1)
94 88
       sshkit (~> 1.2)
95
-    capistrano-faster-assets (1.0.2)
96
-      capistrano (>= 3.1)
97 89
     capistrano-rails (1.2.3)
98 90
       capistrano (~> 3.1)
99 91
       capistrano-bundler (~> 1.1)
@@ -161,8 +153,6 @@ GEM
161 153
     faker (1.7.3)
162 154
       i18n (~> 0.5)
163 155
     fast_blank (1.0.0)
164
-    font-awesome-rails (4.7.0.1)
165
-      railties (>= 3.2, < 5.1)
166 156
     fuubar (2.2.0)
167 157
       rspec-core (~> 3.0)
168 158
       ruby-progressbar (~> 1.4)
@@ -210,10 +200,6 @@ GEM
210 200
       rainbow (~> 2.2)
211 201
       terminal-table (>= 1.5.1)
212 202
     jmespath (1.3.1)
213
-    jquery-rails (4.3.1)
214
-      rails-dom-testing (>= 1, < 3)
215
-      railties (>= 4.2.0)
216
-      thor (>= 0.14, < 2.0)
217 203
     json (2.1.0)
218 204
     kaminari (1.0.1)
219 205
       activesupport (>= 4.1.0)
@@ -257,6 +243,7 @@ GEM
257 243
     mimemagic (0.3.2)
258 244
     mini_portile2 (2.1.0)
259 245
     minitest (5.10.1)
246
+    multi_json (1.12.1)
260 247
     net-scp (1.2.1)
261 248
       net-ssh (>= 2.6.5)
262 249
     net-ssh (4.1.0)
@@ -348,8 +335,8 @@ GEM
348 335
       thor (>= 0.18.1, < 2.0)
349 336
     rainbow (2.2.2)
350 337
       rake
351
-    rake (11.3.0)
352
-    react-rails (1.11.0)
338
+    rake (12.0.0)
339
+    react-rails (2.1.0)
353 340
       babel-transpiler (>= 0.7.0)
354 341
       connection_pool
355 342
       execjs
@@ -410,13 +397,6 @@ GEM
410 397
       crass (~> 1.0.2)
411 398
       nokogiri (>= 1.4.4)
412 399
       nokogumbo (~> 1.4.1)
413
-    sass (3.4.23)
414
-    sass-rails (5.0.6)
415
-      railties (>= 4.0.0, < 6)
416
-      sass (~> 3.1)
417
-      sprockets (>= 2.8, < 4.0)
418
-      sprockets-rails (>= 2.0, < 4.0)
419
-      tilt (>= 1.1, < 3)
420 400
     sidekiq (4.2.10)
421 401
       concurrent-ruby (~> 1.0)
422 402
       connection_pool (~> 2.2, >= 2.2.0)
@@ -473,6 +453,10 @@ GEM
473 453
       addressable (>= 2.3.6)
474 454
       crack (>= 0.3.2)
475 455
       hashdiff
456
+    webpacker (1.2)
457
+      activesupport (>= 4.2)
458
+      multi_json (~> 1.2)
459
+      railties (>= 4.2)
476 460
     websocket-driver (0.6.5)
477 461
       websocket-extensions (>= 0.1.0)
478 462
     websocket-extensions (0.1.2)
@@ -487,15 +471,12 @@ DEPENDENCIES
487 471
   active_record_query_trace
488 472
   addressable
489 473
   annotate
490
-  autoprefixer-rails
491 474
   aws-sdk (>= 2.0)
492 475
   best_in_place (~> 3.0.1)
493 476
   better_errors
494 477
   binding_of_caller
495
-  browserify-rails
496 478
   bullet
497 479
   capistrano (= 3.8.0)
498
-  capistrano-faster-assets (~> 1.0)
499 480
   capistrano-rails
500 481
   capistrano-rbenv
501 482
   capistrano-yarn
@@ -507,7 +488,6 @@ DEPENDENCIES
507 488
   fabrication
508 489
   faker
509 490
   fast_blank
510
-  font-awesome-rails
511 491
   fuubar
512 492
   goldfinger
513 493
   hamlit-rails
@@ -517,7 +497,6 @@ DEPENDENCIES
517 497
   http_accept_language
518 498
   httplog
519 499
   i18n-tasks (~> 0.9.6)
520
-  jquery-rails
521 500
   kaminari
522 501
   letter_opener
523 502
   letter_opener_web
@@ -554,7 +533,6 @@ DEPENDENCIES
554 533
   rubocop (= 0.46.0)
555 534
   ruby-oembed
556 535
   sanitize
557
-  sass-rails (~> 5.0)
558 536
   sidekiq
559 537
   sidekiq-unique-jobs
560 538
   simple-navigation
@@ -566,6 +544,7 @@ DEPENDENCIES
566 544
   tzinfo-data
567 545
   uglifier (>= 1.3.0)
568 546
   webmock
547
+  webpacker (~> 1.2)
569 548
   whatlanguage
570 549
 
571 550
 RUBY VERSION

+ 3
- 0
Procfile.dev View File

@@ -0,0 +1,3 @@
1
+web: bundle exec rails s -p 3000
2
+stream: yarn run start
3
+webpack: ./bin/webpack-dev-server

+ 0
- 15
app/assets/javascripts/application.js View File

@@ -1,15 +0,0 @@
1
-// This is a manifest file that'll be compiled into application.js, which will include all the files
2
-// listed below.
3
-//
4
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
-// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
-//
7
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
-// compiled file.
9
-//
10
-// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
-// about supported directives.
12
-//
13
-//= require jquery2
14
-//= require jquery_ujs
15
-//= require components

+ 0
- 9
app/assets/javascripts/application_public.js View File

@@ -1,9 +0,0 @@
1
-//= require jquery2
2
-//= require jquery_ujs
3
-//= require extras
4
-//= require best_in_place
5
-//= require local_time
6
-
7
-$(function () {
8
-  $(".best_in_place").best_in_place();
9
-});

+ 0
- 15
app/assets/javascripts/components.js View File

@@ -1,15 +0,0 @@
1
-//= require_self
2
-//= require react_ujs
3
-
4
-window.React    = require('react');
5
-window.ReactDOM = require('react-dom');
6
-window.Perf     = require('react-addons-perf');
7
-
8
-if (!window.Intl) {
9
-  require('intl');
10
-  require('intl/locale-data/jsonp/en.js');
11
-}
12
-
13
-//= require_tree ./components
14
-
15
-window.Mastodon = require('./components/containers/mastodon');

+ 0
- 16
app/assets/javascripts/components/features/compose/components/autosuggest_account.jsx View File

@@ -1,16 +0,0 @@
1
-import Avatar from '../../../components/avatar';
2
-import DisplayName from '../../../components/display_name';
3
-import ImmutablePropTypes from 'react-immutable-proptypes';
4
-
5
-const AutosuggestAccount = ({ account }) => (
6
-  <div className='autosuggest-account'>
7
-    <div className='autosuggest-account-icon'><Avatar src={account.get('avatar')} staticSrc={account.get('avatar_static')} size={18} /></div>
8
-    <DisplayName account={account} />
9
-  </div>
10
-);
11
-
12
-AutosuggestAccount.propTypes = {
13
-  account: ImmutablePropTypes.map.isRequired
14
-};
15
-
16
-export default AutosuggestAccount;

+ 0
- 15
app/assets/javascripts/components/features/compose/components/autosuggest_status.jsx View File

@@ -1,15 +0,0 @@
1
-import { FormattedMessage } from 'react-intl';
2
-import DisplayName from '../../../components/display_name';
3
-import ImmutablePropTypes from 'react-immutable-proptypes';
4
-
5
-const AutosuggestStatus = ({ status }) => (
6
-  <div className='autosuggest-status'>
7
-    <FormattedMessage id='search.status_by' defaultMessage='Status by {name}' values={{ name: <strong>@{status.getIn(['account', 'acct'])}</strong> }} />
8
-  </div>
9
-);
10
-
11
-AutosuggestStatus.propTypes = {
12
-  status: ImmutablePropTypes.map.isRequired
13
-};
14
-
15
-export default AutosuggestStatus;

+ 0
- 44
app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx View File

@@ -1,44 +0,0 @@
1
-import PropTypes from 'prop-types';
2
-import ImmutablePropTypes from 'react-immutable-proptypes';
3
-import Permalink from '../../../components/permalink';
4
-import Avatar from '../../../components/avatar';
5
-import DisplayName from '../../../components/display_name';
6
-import emojify from '../../../emoji';
7
-import IconButton from '../../../components/icon_button';
8
-import { defineMessages, injectIntl } from 'react-intl';
9
-
10
-const messages = defineMessages({
11
-  authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
12
-  reject: { id: 'follow_request.reject', defaultMessage: 'Reject' }
13
-});
14
-
15
-const AccountAuthorize = ({ intl, account, onAuthorize, onReject }) => {
16
-  const content = { __html: emojify(account.get('note')) };
17
-
18
-  return (
19
-    <div className='account-authorize__wrapper'>
20
-      <div className='account-authorize'>
21
-        <Permalink href={account.get('url')} to={`/accounts/${account.get('id')}`} className='detailed-status__display-name'>
22
-          <div className='account-authorize__avatar'><Avatar src={account.get('avatar')} staticSrc={account.get('avatar_static')} size={48} /></div>
23
-          <DisplayName account={account} />
24
-        </Permalink>
25
-
26
-        <div className='account__header__content' dangerouslySetInnerHTML={content} />
27
-      </div>
28
-
29
-      <div className='account--panel'>
30
-        <div className='account--panel__button'><IconButton title={intl.formatMessage(messages.authorize)} icon='check' onClick={onAuthorize} /></div>
31
-        <div className='account--panel__button'><IconButton title={intl.formatMessage(messages.reject)} icon='times' onClick={onReject} /></div>
32
-      </div>
33
-    </div>
34
-  )
35
-};
36
-
37
-AccountAuthorize.propTypes = {
38
-  account: ImmutablePropTypes.map.isRequired,
39
-  onAuthorize: PropTypes.func.isRequired,
40
-  onReject: PropTypes.func.isRequired,
41
-  intl: PropTypes.object.isRequired
42
-};
43
-
44
-export default injectIntl(AccountAuthorize);

+ 0
- 66
app/assets/javascripts/components/features/getting_started/index.jsx View File

@@ -1,66 +0,0 @@
1
-import Column from '../ui/components/column';
2
-import ColumnLink from '../ui/components/column_link';
3
-import ColumnSubheading from '../ui/components/column_subheading';
4
-import { Link } from 'react-router';
5
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
6
-import { connect } from 'react-redux';
7
-import PropTypes from 'prop-types';
8
-import ImmutablePropTypes from 'react-immutable-proptypes';
9
-
10
-const messages = defineMessages({
11
-  heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
12
-  public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },
13
-  navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation'},
14
-  settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings'},
15
-  community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },
16
-  preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
17
-  follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
18
-  sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
19
-  favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
20
-  blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
21
-  mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
22
-  info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }
23
-});
24
-
25
-const mapStateToProps = state => ({
26
-  me: state.getIn(['accounts', state.getIn(['meta', 'me'])])
27
-});
28
-
29
-const GettingStarted = ({ intl, me }) => {
30
-  let followRequests = '';
31
-
32
-  if (me.get('locked')) {
33
-    followRequests = <ColumnLink icon='users' text={intl.formatMessage(messages.follow_requests)} to='/follow_requests' />;
34
-  }
35
-
36
-  return (
37
-    <Column icon='asterisk' heading={intl.formatMessage(messages.heading)} hideHeadingOnMobile={true}>
38
-      <div className='getting-started__wrapper'>
39
-        <ColumnSubheading text={intl.formatMessage(messages.navigation_subheading)}/>
40
-        <ColumnLink icon='users' hideOnMobile={true} text={intl.formatMessage(messages.community_timeline)} to='/timelines/public/local' />
41
-        <ColumnLink icon='globe' hideOnMobile={true} text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />
42
-        <ColumnLink icon='star' text={intl.formatMessage(messages.favourites)} to='/favourites' />
43
-        {followRequests}
44
-        <ColumnLink icon='volume-off' text={intl.formatMessage(messages.mutes)} to='/mutes' />
45
-        <ColumnLink icon='ban' text={intl.formatMessage(messages.blocks)} to='/blocks' />
46
-        <ColumnSubheading text={intl.formatMessage(messages.settings_subheading)}/>
47
-        <ColumnLink icon='book' text={intl.formatMessage(messages.info)} href='/about/more' />
48
-        <ColumnLink icon='cog' text={intl.formatMessage(messages.preferences)} href='/settings/preferences' />
49
-        <ColumnLink icon='sign-out' text={intl.formatMessage(messages.sign_out)} href='/auth/sign_out' method='delete' />
50
-      </div>
51
-
52
-      <div className='scrollable optionally-scrollable' style={{ display: 'flex', flexDirection: 'column' }}>
53
-        <div className='static-content getting-started'>
54
-          <p><FormattedMessage id='getting_started.open_source_notice' defaultMessage='Mastodon is open source software. You can contribute or report issues on GitHub at {github}. {apps}.' values={{ github: <a href="https://github.com/tootsuite/mastodon" target="_blank">tootsuite/mastodon</a>, apps: <a href="https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md" target="_blank"><FormattedMessage id='getting_started.apps' defaultMessage='Various apps are available' /></a> }} /></p>
55
-        </div>
56
-      </div>
57
-    </Column>
58
-  );
59
-};
60
-
61
-GettingStarted.propTypes = {
62
-  intl: PropTypes.object.isRequired,
63
-  me: ImmutablePropTypes.map.isRequired
64
-};
65
-
66
-export default connect(mapStateToProps)(injectIntl(GettingStarted));

+ 0
- 68
app/assets/javascripts/components/locales/bg.jsx View File

@@ -1,68 +0,0 @@
1
-const bg = {
2
-  "column_back_button.label": "Назад",
3
-  "lightbox.close": "Затвори",
4
-  "loading_indicator.label": "Зареждане...",
5
-  "status.mention": "Споменаване",
6
-  "status.delete": "Изтриване",
7
-  "status.reply": "Отговор",
8
-  "status.reblog": "Споделяне",
9
-  "status.favourite": "Предпочитани",
10
-  "status.reblogged_by": "{name} сподели",
11
-  "status.sensitive_warning": "Деликатно съдържание",
12
-  "status.sensitive_toggle": "Покажи",
13
-  "video_player.toggle_sound": "Звук",
14
-  "account.mention": "Споменаване",
15
-  "account.edit_profile": "Редактирай профила си",
16
-  "account.unblock": "Не блокирай",
17
-  "account.unfollow": "Не следвай",
18
-  "account.block": "Блокирай",
19
-  "account.follow": "Последвай",
20
-  "account.posts": "Публикации",
21
-  "account.follows": "Следвам",
22
-  "account.followers": "Последователи",
23
-  "account.follows_you": "Твой последовател",
24
-  "account.requested": "В очакване на одобрение",
25
-  "getting_started.heading": "Първи стъпки",
26
-  "getting_started.about_addressing": "Можеш да последваш потребител, ако знаеш потребителското му име и домейна, на който се намира, като в полето за търсене ги въведеш по този начин: име@домейн",
27
-  "getting_started.about_shortcuts": "Ако с търсения потребител се намирате на един и същ домейн, достатъчно е да въведеш само името. Същото важи и за споменаване на хора в публикации.",
28
-  "getting_started.about_developer": "Можеш да потърсиш разработчика на този проект като: Gargron@mastodon.social",
29
-  "getting_started.open_source_notice": "Mastodon е софтуер с отворен код. Можеш да помогнеш или да докладваш за проблеми в Github: {github}.",
30
-  "column.home": "Начало",
31
-  "column.mentions": "Споменавания",
32
-  "column.public": "Публичен канал",
33
-  "column.notifications": "Известия",
34
-  "tabs_bar.compose": "Съставяне",
35
-  "tabs_bar.home": "Начало",
36
-  "tabs_bar.mentions": "Споменавания",
37
-  "tabs_bar.public": "Публичен канал",
38
-  "tabs_bar.notifications": "Известия",
39
-  "compose_form.placeholder": "Какво си мислиш?",
40
-  "compose_form.publish": "Раздумай",
41
-  "compose_form.sensitive": "Отбележи съдържанието като деликатно",
42
-  "compose_form.spoiler": "Скрий текста зад предупреждение",
43
-  "compose_form.private": "Отбележи като поверително",
44
-  "compose_form.privacy_disclaimer": "Поверителни публикации ще бъдат изпратени до споменатите потребители на {domains}. Доверяваш ли се на {domainsCount, plural, one {that server} other {those servers}}, че няма да издаде твоята публикация?",
45
-  "compose_form.unlisted": "Не показвай в публичния канал",
46
-  "navigation_bar.edit_profile": "Редактирай профил",
47
-  "navigation_bar.preferences": "Предпочитания",
48
-  "navigation_bar.public_timeline": "Публичен канал",
49
-  "navigation_bar.logout": "Излизане",
50
-  "reply_indicator.cancel": "Отказ",
51
-  "search.placeholder": "Търсене",
52
-  "search.account": "Акаунт",
53
-  "search.hashtag": "Хаштаг",
54
-  "upload_button.label": "Добави медия",
55
-  "upload_form.undo": "Отмяна",
56
-  "notification.follow": "{name} те последва",
57
-  "notification.favourite": "{name} хареса твоята публикация",
58
-  "notification.reblog": "{name} сподели твоята публикация",
59
-  "notification.mention": "{name} те спомена",
60
-  "notifications.column_settings.alert": "Десктоп известия",
61
-  "notifications.column_settings.show": "Покажи в колона",
62
-  "notifications.column_settings.follow": "Нови последователи:",
63
-  "notifications.column_settings.favourite": "Предпочитани:",
64
-  "notifications.column_settings.mention": "Споменавания:",
65
-  "notifications.column_settings.reblog": "Споделяния:",
66
-};
67
-
68
-export default bg;

+ 0
- 68
app/assets/javascripts/components/locales/eo.jsx View File

@@ -1,68 +0,0 @@
1
-const eo = {
2
-  "column_back_button.label": "Reveni",
3
-  "lightbox.close": "Fermi",
4
-  "loading_indicator.label": "Ŝarĝanta...",
5
-  "status.mention": "Mencii @{name}",
6
-  "status.delete": "Forigi",
7
-  "status.reply": "Respondi",
8
-  "status.reblog": "Diskonigi",
9
-  "status.favourite": "Favori",
10
-  "status.reblogged_by": "{name} diskonigita",
11
-  "status.sensitive_warning": "Tikla enhavo",
12
-  "status.sensitive_toggle": "Alklaki por vidi",
13
-  "video_player.toggle_sound": "Aktivigi sonojn",
14
-  "account.mention": "Mencii @{name}",
15
-  "account.edit_profile": "Redakti la profilon",
16
-  "account.unblock": "Malbloki @{name}",
17
-  "account.unfollow": "Malsekvi",
18
-  "account.block": "Bloki @{name}",
19
-  "account.follow": "Sekvi",
20
-  "account.posts": "Mesaĝoj",
21
-  "account.follows": "Sekvatoj",
22
-  "account.followers": "Sekvantoj",
23
-  "account.follows_you": "Sekvas vin",
24
-  "account.requested": "Atendas aprobon",
25
-  "getting_started.heading": "Por komenci",
26
-  "getting_started.about_addressing": "Vi povas sekvi homojn se vi konas la uzantnomon kaj domajnon tajpinte retpoŝtecan adreson en la serĉilon.",
27
-  "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.",
28
-  "getting_started.open_source_notice": "Mastodon estas malfermitkoda programo. Vi povas kontribui aŭ raporti problemojn en github je {github}. {apps}.",
29
-  "column.home": "Hejmo",
30
-  "column.community": "Loka tempolinio",
31
-  "column.public": "Fratara tempolinio",
32
-  "column.notifications": "Sciigoj",
33
-  "tabs_bar.compose": "Ekskribi",
34
-  "tabs_bar.home": "Hejmo",
35
-  "tabs_bar.mentions": "Sciigoj",
36
-  "tabs_bar.public": "Fratara tempolinio",
37
-  "tabs_bar.notifications": "Sciigoj",
38
-  "compose_form.placeholder": "Pri kio vi pensas?",
39
-  "compose_form.publish": "Hup",
40
-  "compose_form.sensitive": "Marki ke la enhavo estas tikla",
41
-  "compose_form.spoiler": "Kaŝi la tekston malantaŭ averto",
42
-  "compose_form.private": "Marki ke la enhavo estas privata",
43
-  "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.",
44
-  "compose_form.unlisted": "Ne afiŝi en publikaj tempolinioj",
45
-  "navigation_bar.edit_profile": "Redakti la profilon",
46
-  "navigation_bar.preferences": "Preferoj",
47
-  "navigation_bar.community_timeline": "Loka tempolinio",
48
-  "navigation_bar.public_timeline": "Fratara tempolinio",
49
-  "navigation_bar.logout": "Elsaluti",
50
-  "reply_indicator.cancel": "Rezigni",
51
-  "search.placeholder": "Serĉi",
52
-  "search.account": "Konto",
53
-  "search.hashtag": "Kradvorto",
54
-  "upload_button.label": "Aldoni enhavaĵon",
55
-  "upload_form.undo": "Malfari",
56
-  "notification.follow": "{name} sekvis vin",
57
-  "notification.favourite": "{name} favoris vian mesaĝon",
58
-  "notification.reblog": "{name} diskonigis vian mesaĝon",
59
-  "notification.mention": "{name} menciis vin",
60
-  "notifications.column_settings.alert": "Retumilaj atentigoj",
61
-  "notifications.column_settings.show": "Montri en kolono",
62
-  "notifications.column_settings.follow": "Novaj sekvantoj:",
63
-  "notifications.column_settings.favourite": "Favoroj:",
64
-  "notifications.column_settings.mention": "Mencioj:",
65
-  "notifications.column_settings.reblog": "Diskonigoj:",
66
-};
67
-
68
-export default eo;

+ 0
- 93
app/assets/javascripts/components/locales/es.jsx View File

@@ -1,93 +0,0 @@
1
-const es = {
2
-  "column_back_button.label": "Atrás",
3
-  "lightbox.close": "Cerrar",
4
-  "loading_indicator.label": "Cargando...",
5
-  "status.mention": "Mencionar",
6
-  "status.delete": "Borrar",
7
-  "status.reply": "Responder",
8
-  "status.reblog": "Retoot",
9
-  "status.favourite": "Favorito",
10
-  "status.reblogged_by": "Retooteado por {name}",
11
-  "status.sensitive_warning": "Contenido sensible",
12
-  "status.sensitive_toggle": "Click para ver",
13
-  "status.show_more": "Mostrar más",
14
-  "status.show_less": "Mostrar menos",
15
-  "status.open": "Expandir estado",
16
-  "status.report": "Reportar",
17
-  "video_player.toggle_sound": "Act/Desac. sonido",
18
-  "account.mention": "Mencionar",
19
-  "account.edit_profile": "Editar perfil",
20
-  "account.unblock": "Desbloquear",
21
-  "account.unfollow": "Dejar de seguir",
22
-  "account.mute": "Silenciar",
23
-  "account.block": "Bloquear",
24
-  "account.follow": "Seguir",
25
-  "account.posts": "Publicaciones",
26
-  "account.follows": "Seguir",
27
-  "account.followers": "Seguidores",
28
-  "account.follows_you": "Te sigue",
29
-  "account.requested": "Esperando aprobación",
30
-  "getting_started.heading": "Primeros pasos",
31
-  "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.",
32
-  "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.",
33
-  "getting_started.open_source_notice": "Mastodon es software libre. Puedes contribuir o reportar errores en {github}. {apps}.",
34
-  "column.home": "Inicio",
35
-  "column.community": "Historia local",
36
-  "column.public": "Historia federada",
37
-  "column.notifications": "Notificaciones",
38
-  "column.blocks": "Usuarios bloqueados",
39
-  "column.favourites": "Favoritos",
40
-  "column.follow_requests": "Solicitudes para seguirte",
41
-  "column.mutes": "Usuarios silenciados",
42
-  "tabs_bar.compose": "Redactar",
43
-  "tabs_bar.home": "Inicio",
44
-  "tabs_bar.mentions": "Menciones",
45
-  "tabs_bar.public": "Público",
46
-  "tabs_bar.notifications": "Notificaciones",
47
-  "compose_form.placeholder": "¿En qué estás pensando?",
48
-  "compose_form.publish": "Tootear",
49
-  "compose_form.sensitive": "Marcar contenido como sensible",
50
-  "compose_form.spoiler": "Ocultar texto tras advertencia",
51
-  "compose_form.spoiler_placeholder": "Advertencia de contenido",
52
-  "composer_form.private": "Marcar como privado",
53
-  "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.",
54
-  "compose_form.unlisted": "No mostrar en la historia federada",
55
-  "navigation_bar.edit_profile": "Editar perfil",
56
-  "navigation_bar.preferences": "Preferencias",
57
-  "navigation_bar.community_timeline": "Historia local",
58
-  "navigation_bar.public_timeline": "Historia federada",
59
-  "navigation_bar.favourites": "Favoritos",
60
-  "navigation_bar.blocks": "Usuarios bloqueados",
61
-  "navigation_bar.info": "Información adicional",
62
-  "navigation_bar.logout": "Cerrar sesión",
63
-  "navigation_bar.follow_requests": "Solicitudes para seguirte",
64
-  "navigation_bar.mutes": "Usuarios silenciados",
65
-  "reply_indicator.cancel": "Cancelar",
66
-  "search.placeholder": "Buscar",
67
-  "search.account": "Cuenta",
68
-  "search.hashtag": "Etiqueta",
69
-  "upload_button.label": "Subir multimedia",
70
-  "upload_form.undo": "Deshacer",
71
-  "notification.follow": "{name} te empezó a seguir",
72
-  "notification.favourite": "{name} marcó tu estado como favorito",
73
-  "notification.reblog": "{name} ha retooteado tu estado",
74
-  "notification.mention": "{name} te ha mencionado",
75
-  "notifications.column_settings.alert": "Notificaciones de escritorio",
76
-  "notifications.column_settings.show": "Mostrar en columna",
77
-  "notifications.column_settings.follow": "Nuevos seguidores:",
78
-  "notifications.column_settings.favourite": "Favoritos:",
79
-  "notifications.column_settings.mention": "Menciones:",
80
-  "notifications.column_settings.reblog": "Retoots:",
81
-  "emoji_button.label": "Insertar emoji",
82
-  "privacy.public.short": "Público",
83
-  "privacy.public.long": "Mostrar en la historia federada",
84
-  "privacy.unlisted.short": "Sin federar",
85
-  "privacy.unlisted.long": "No mostrar en la historia federada",
86
-  "privacy.private.short": "Privado",
87
-  "privacy.private.long": "Sólo mostrar a seguidores",
88
-  "privacy.direct.short": "Directo",
89
-  "privacy.direct.long": "Sólo mostrar a los usuarios mencionados",
90
-  "privacy.change": "Ajustar privacidad"
91
-};
92
-
93
-export default es;

+ 0
- 68
app/assets/javascripts/components/locales/fi.jsx View File

@@ -1,68 +0,0 @@
1
-const fi = {
2
-  "column_back_button.label": "Takaisin",
3
-  "lightbox.close": "Sulje",
4
-  "loading_indicator.label": "Ladataan...",
5
-  "status.mention": "Mainitse @{name}",
6
-  "status.delete": "Poista",
7
-  "status.reply": "Vastaa",
8
-  "status.reblog": "Buustaa",
9
-  "status.favourite": "Tykkää",
10
-  "status.reblogged_by": "{name} buustasi",
11
-  "status.sensitive_warning": "Arkaluontoista sisältöä",
12
-  "status.sensitive_toggle": "Klikkaa nähdäksesi",
13
-  "video_player.toggle_sound": "Äänet päälle/pois",
14
-  "account.mention": "Mainitse @{name}",
15
-  "account.edit_profile": "Muokkaa",
16
-  "account.unblock": "Salli @{name}",
17
-  "account.unfollow": "Lopeta seuraaminen",
18
-  "account.block": "Estä @{name}",
19
-  "account.follow": "Seuraa",
20
-  "account.posts": "Postit",
21
-  "account.follows": "Seuraa",
22
-  "account.followers": "Seuraajia",
23
-  "account.follows_you": "Seuraa sinua",
24
-  "account.requested": "Odottaa hyväksyntää",
25
-  "getting_started.heading": "Aloitus",
26
-  "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.",
27
-  "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",
28
-  "getting_started.open_source_notice": "Mastodon Mastodon on avoimen lähdekoodin ohjelma. Voit avustaa tai raportoida ongelmia GitHub palvelussa {github}. {apps}.",
29
-  "column.home": "Koti",
30
-  "column.community": "Paikallinen aikajana",
31
-  "column.public": "Yleinen aikajana",
32
-  "column.notifications": "Ilmoitukset",
33
-  "tabs_bar.compose": "Luo",
34
-  "tabs_bar.home": "Koti",
35
-  "tabs_bar.mentions": "Maininnat",
36
-  "tabs_bar.public": "Yleinen aikajana",
37
-  "tabs_bar.notifications": "Ilmoitukset",
38
-  "compose_form.placeholder": "Mitä sinulla on mielessä?",
39
-  "compose_form.publish": "Toot",
40
-  "compose_form.sensitive": "Merkitse media herkäksi",
41
-  "compose_form.spoiler": "Piiloita teksti varoituksen taakse",
42
-  "compose_form.private": "Merkitse yksityiseksi",
43
-  "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.",
44
-  "compose_form.unlisted": "Älä näytä yleisillä aikajanoilla",
45
-  "navigation_bar.edit_profile": "Muokkaa profiilia",
46
-  "navigation_bar.preferences": "Ominaisuudet",
47
-  "navigation_bar.community_timeline": "Paikallinen aikajana",
48
-  "navigation_bar.public_timeline": "Yleinen aikajana",
49
-  "navigation_bar.logout": "Kirjaudu ulos",
50
-  "reply_indicator.cancel": "Peruuta",
51
-  "search.placeholder": "Hae",
52
-  "search.account": "Tili",
53
-  "search.hashtag": "Hashtag",
54
-  "upload_button.label": "Lisää mediaa",
55
-  "upload_form.undo": "Peru",
56
-  "notification.follow": "{name} seurasi sinua",
57
-  "notification.favourite": "{name} tykkäsi statuksestasi",
58
-  "notification.reblog": "{name} buustasi statustasi",
59
-  "notification.mention": "{name} mainitsi sinut",
60
-  "notifications.column_settings.alert": "Työpöytä ilmoitukset",
61
-  "notifications.column_settings.show": "Näytä sarakkeessa",
62
-  "notifications.column_settings.follow": "Uusia seuraajia:",
63
-  "notifications.column_settings.favourite": "Tykkäyksiä:",
64
-  "notifications.column_settings.mention": "Mainintoja:",
65
-  "notifications.column_settings.reblog": "Buusteja:",
66
-};
67
-
68
-export default fi;

+ 0
- 57
app/assets/javascripts/components/locales/hu.jsx View File

@@ -1,57 +0,0 @@
1
-const hu = {
2
-  "column_back_button.label": "Vissza",
3
-  "lightbox.close": "Bezárás",
4
-  "loading_indicator.label": "Betöltés...",
5
-  "status.mention": "Említés",
6
-  "status.delete": "Törlés",
7
-  "status.reply": "Válasz",
8
-  "status.reblog": "Reblog",
9
-  "status.favourite": "Kedvenc",
10
-  "status.reblogged_by": "{name} reblogolta",
11
-  "status.sensitive_warning": "Érzékeny tartalom",
12
-  "status.sensitive_toggle": "Katt a megtekintéshez",
13
-  "video_player.toggle_sound": "Hang kapcsolása",
14
-  "account.mention": "Említés",
15
-  "account.edit_profile": "Profil szerkesztése",
16
-  "account.unblock": "Blokkolás levétele",
17
-  "account.unfollow": "Követés abbahagyása",
18
-  "account.block": "Blokkolás",
19
-  "account.follow": "Követés",
20
-  "account.posts": "Posts",
21
-  "account.follows": "Követve",
22
-  "account.followers": "Követők",
23
-  "account.follows_you": "Követnek téged",
24
-  "getting_started.heading": "Első lépések",
25
-  "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.",
26
-  "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.",
27
-  "getting_started.about_developer": "A projekt fejlesztője követhető, mint Gargron@mastodon.social",
28
-  "column.home": "Kezdőlap",
29
-  "column.mentions": "Említések",
30
-  "column.public": "Nyilvános",
31
-  "column.notifications": "Értesítések",
32
-  "tabs_bar.compose": "Összeállítás",
33
-  "tabs_bar.home": "Kezdőlap",
34
-  "tabs_bar.mentions": "Említések",
35
-  "tabs_bar.public": "Nyilvános",
36
-  "tabs_bar.notifications": "Notifications",
37
-  "compose_form.placeholder": "Mire gondolsz?",
38
-  "compose_form.publish": "Tülk!",
39
-  "compose_form.sensitive": "Tartalom érzékenynek jelölése",
40
-  "compose_form.unlisted": "Listázatlan mód",
41
-  "navigation_bar.edit_profile": "Profil szerkesztése",
42
-  "navigation_bar.preferences": "Beállítások",
43
-  "navigation_bar.public_timeline": "Nyilvános időfolyam",
44
-  "navigation_bar.logout": "Kijelentkezés",
45
-  "reply_indicator.cancel": "Mégsem",
46
-  "search.placeholder": "Keresés",
47
-  "search.account": "Fiók",
48
-  "search.hashtag": "Hashtag",
49
-  "upload_button.label": "Média hozzáadása",
50
-  "upload_form.undo": "Mégsem",
51
-  "notification.follow": "{name} követ téged",
52
-  "notification.favourite": "{name} kedvencnek jelölte az állapotod",
53
-  "notification.reblog": "{name} reblogolta az állapotod",
54
-  "notification.mention": "{name} megemlített"
55
-};
56
-
57
-export default hu;

+ 0
- 57
app/assets/javascripts/components/locales/index.jsx View File

@@ -1,57 +0,0 @@
1
-import ar from './ar';
2
-import en from './en';
3
-import de from './de';
4
-import es from './es';
5
-import fa from './fa';
6
-import he from './he';
7
-import hr from './hr';
8
-import hu from './hu';
9
-import io from './io';
10
-import it from './it';
11
-import fr from './fr';
12
-import nl from './nl';
13
-import no from './no';
14
-import oc from './oc';
15
-import pt from './pt';
16
-import pt_br from './pt-br';
17
-import uk from './uk';
18
-import fi from './fi';
19
-import eo from './eo';
20
-import ru from './ru';
21
-import ja from './ja';
22
-import zh_hk from './zh-hk';
23
-import zh_cn from './zh-cn';
24
-import bg from './bg';
25
-import id from './id';
26
-
27
-const locales = {
28
-  ar,
29
-  en,
30
-  de,
31
-  es,
32
-  fa,
33
-  he,
34
-  hr,
35
-  hu,
36
-  io,
37
-  it,
38
-  fr,
39
-  nl,
40
-  no,
41
-  oc,
42
-  pt,
43
-  'pt-BR': pt_br,
44
-  uk,
45
-  fi,
46
-  eo,
47
-  ru,
48
-  ja,
49
-  'zh-HK': zh_hk,
50
-  'zh-CN': zh_cn,
51
-  bg,
52
-  id,
53
-};
54
-
55
-export default function getMessagesForLocale (locale) {
56
-  return locales[locale];
57
-};

+ 0
- 57
app/assets/javascripts/components/locales/uk.jsx View File

@@ -1,57 +0,0 @@
1
-const uk = {
2
-  "column_back_button.label": "Назад",
3
-  "lightbox.close": "Закрити",
4
-  "loading_indicator.label": "Завантаження...",
5
-  "status.mention": "Згадати",
6
-  "status.delete": "Видалити",
7
-  "status.reply": "Відповісти",
8
-  "status.reblog": "Передмухнути",
9
-  "status.favourite": "Подобається",
10
-  "status.reblogged_by": "{name} передмухнув(-ла)",
11
-  "status.sensitive_warning": "Непристойний зміст",
12
-  "status.sensitive_toggle": "Натисніть, щоб подивитися",
13
-  "video_player.toggle_sound": "Увімкнути/вимкнути звук",
14
-  "account.mention": "Згадати",
15
-  "account.edit_profile": "Налаштування профілю",
16
-  "account.unblock": "Розблокувати",
17
-  "account.unfollow": "Відписатися",
18
-  "account.block": "Заблокувати",
19
-  "account.follow": "Підписатися",
20
-  "account.posts": "Пости",
21
-  "account.follows": "Підписки",
22
-  "account.followers": "Підписники",
23
-  "account.follows_you": "Підписаний",
24
-  "getting_started.heading": "Ласкаво просимо",
25
-  "getting_started.about_addressing": "Ви можете підписуватись на людей, якщо ви знаєте їх ім'я користувача чи домен, шляхом введення email-подібної адреси у верхньому рядку бокової панелі.",
26
-  "getting_started.about_shortcuts": "Якщо користувач, якого ви шукаєте, знаходиться на тому ж домені, що й ви, можна просто ввести ім'я користувача. Це правило стосується й згадування людей у статусах.",
27
-  "getting_started.about_developer": "Розробник проекту знаходиться за адресою Gargron@mastodon.social",
28
-  "column.home": "Головна",
29
-  "column.mentions": "Згадування",
30
-  "column.public": "Стіна",
31
-  "column.notifications": "Сповіщення",
32
-  "tabs_bar.compose": "Написати",
33
-  "tabs_bar.home": "Головна",
34
-  "tabs_bar.mentions": "Згадування",
35
-  "tabs_bar.public": "Стіна",
36
-  "tabs_bar.notifications": "Сповіщення",
37
-  "compose_form.placeholder": "Що у Вас на думці?",
38
-  "compose_form.publish": "Дмухнути",
39
-  "compose_form.sensitive": "Непристойний зміст",
40
-  "compose_form.unlisted": "Таємний режим",
41
-  "navigation_bar.edit_profile": "Редагувати профіль",
42
-  "navigation_bar.preferences": "Налаштування",
43
-  "navigation_bar.public_timeline": "Публічна стіна",
44
-  "navigation_bar.logout": "Вийти",
45
-  "reply_indicator.cancel": "Відмінити",
46
-  "search.placeholder": "Пошук",
47
-  "search.account": "Аккаунт",
48
-  "search.hashtag": "Хештеґ",
49
-  "upload_button.label": "Додати медіа",
50
-  "upload_form.undo": "Відмінити",
51
-  "notification.follow": "{name} підписався(-лась) на Вас",
52
-  "notification.favourite": "{name} сподобався ваш допис",
53
-  "notification.reblog": "{name} передмухнув(-ла) Ваш статус",
54
-  "notification.mention": "{name} згадав(-ла) Вас"
55
-};
56
-
57
-export default uk;

app/assets/javascripts/components/.gitkeep → app/assets/stylesheets/.gitkeep View File


+ 0
- 11
app/assets/stylesheets/fonts/montserrat.scss View File

@@ -1,11 +0,0 @@
1
-@font-face {
2
-  font-family: 'Montserrat';
3
-  src: local('Montserrat');
4
-  src: font-url('montserrat/Montserrat-Regular.eot');
5
-  src: font-url('montserrat/Montserrat-Regular.eot?#iefix') format('embedded-opentype'),
6
-  font-url('montserrat/Montserrat-Regular.woff2') format('woff2'),
7
-  font-url('montserrat/Montserrat-Regular.woff') format('woff'),
8
-  font-url('montserrat/Montserrat-Regular.ttf') format('truetype');
9
-  font-weight: 400;
10
-  font-style: normal;
11
-}

+ 0
- 12
app/assets/stylesheets/fonts/roboto-mono.scss View File

@@ -1,12 +0,0 @@
1
-@font-face {
2
-  font-family: 'Roboto Mono';
3
-  src: local('Roboto Mono');
4
-  src: font-url('roboto-mono/robotomono-regular-webfont.eot');
5
-  src: font-url('roboto-mono/robotomono-regular-webfont.eot?#iefix') format('embedded-opentype'),
6
-  font-url('roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
7
-  font-url('roboto-mono/robotomono-regular-webfont.woff') format('woff'),
8
-  font-url('roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
9
-  font-url('roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
10
-  font-weight: 400;
11
-  font-style: normal;
12
-}

+ 0
- 52
app/assets/stylesheets/fonts/roboto.scss View File

@@ -1,52 +0,0 @@
1
-@font-face {
2
-  font-family: 'Roboto';
3
-  src: local('Roboto');
4
-  src: font-url('roboto/roboto-italic-webfont.eot');
5
-  src: font-url('roboto/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'),
6
-    font-url('roboto/roboto-italic-webfont.woff2') format('woff2'),
7
-    font-url('roboto/roboto-italic-webfont.woff') format('woff'),
8
-    font-url('roboto/roboto-italic-webfont.ttf') format('truetype'),
9
-    font-url('roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg');
10
-  font-weight: normal;
11
-  font-style: italic;
12
-}
13
-
14
-@font-face {
15
-  font-family: 'Roboto';
16
-  src: local('Roboto');
17
-  src: font-url('roboto/roboto-bold-webfont.eot');
18
-  src: local('Roboto bold'), local('roboto-bold'),
19
-    font-url('roboto/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'),
20
-    font-url('roboto/roboto-bold-webfont.woff2') format('woff2'),
21
-    font-url('roboto/roboto-bold-webfont.woff') format('woff'),
22
-    font-url('roboto/roboto-bold-webfont.ttf') format('truetype'),
23
-    font-url('roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg');
24
-  font-weight: bold;
25
-  font-style: normal;
26
-}
27
-
28
-@font-face {
29
-  font-family: 'Roboto';
30
-  src: local('Roboto');
31
-  src: font-url('roboto/roboto-medium-webfont.eot');
32
-  src: font-url('roboto/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'),
33
-    font-url('roboto/roboto-medium-webfont.woff2') format('woff2'),
34
-    font-url('roboto/roboto-medium-webfont.woff') format('woff'),
35
-    font-url('roboto/roboto-medium-webfont.ttf') format('truetype'),
36
-    font-url('roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg');
37
-  font-weight: 500;
38
-  font-style: normal;
39
-}
40
-
41
-@font-face {
42
-  font-family: 'Roboto';
43
-  src: local('Roboto');
44
-  src: font-url('roboto/roboto-regular-webfont.eot');
45
-  src: font-url('roboto/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'),
46
-    font-url('roboto/roboto-regular-webfont.woff2') format('woff2'),
47
-    font-url('roboto/roboto-regular-webfont.woff') format('woff'),
48
-    font-url('roboto/roboto-regular-webfont.ttf') format('truetype'),
49
-    font-url('roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg');
50
-  font-weight: normal;
51
-  font-style: normal;
52
-}

+ 5
- 1
app/helpers/application_helper.rb View File

@@ -10,7 +10,7 @@ module ApplicationHelper
10 10
   end
11 11
 
12 12
   def add_rtl_body_class(other_classes)
13
-    other_classes = "#{other_classes} rtl" if [:ar, :fa].include?(I18n.locale)
13
+    other_classes = "#{other_classes} rtl" if [:ar, :fa, :he].include?(I18n.locale)
14 14
     other_classes
15 15
   end
16 16
 
@@ -22,4 +22,8 @@ module ApplicationHelper
22 22
   def title
23 23
     Rails.env.production? ? site_title : "#{site_title} (Dev)"
24 24
   end
25
+
26
+  def fa_icon(icon)
27
+    content_tag(:i, nil, class: 'fa ' + icon.split(' ').map { |cl| "fa-#{cl}" }.join(' '))
28
+  end
25 29
 end

app/assets/fonts/montserrat/Montserrat-Regular.eot → app/javascript/fonts/montserrat/Montserrat-Regular.eot View File


app/assets/fonts/montserrat/Montserrat-Regular.ttf → app/javascript/fonts/montserrat/Montserrat-Regular.ttf View File


app/assets/fonts/montserrat/Montserrat-Regular.woff → app/javascript/fonts/montserrat/Montserrat-Regular.woff View File


app/assets/fonts/montserrat/Montserrat-Regular.woff2 → app/javascript/fonts/montserrat/Montserrat-Regular.woff2 View File


app/assets/fonts/roboto-mono/robotomono-regular-webfont.eot → app/javascript/fonts/roboto-mono/robotomono-regular-webfont.eot View File


app/assets/fonts/roboto-mono/robotomono-regular-webfont.svg → app/javascript/fonts/roboto-mono/robotomono-regular-webfont.svg View File


app/assets/fonts/roboto-mono/robotomono-regular-webfont.ttf → app/javascript/fonts/roboto-mono/robotomono-regular-webfont.ttf View File


app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff → app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff View File


app/assets/fonts/roboto-mono/robotomono-regular-webfont.woff2 → app/javascript/fonts/roboto-mono/robotomono-regular-webfont.woff2 View File


app/assets/fonts/roboto/roboto-bold-webfont.eot → app/javascript/fonts/roboto/roboto-bold-webfont.eot View File


app/assets/fonts/roboto/roboto-bold-webfont.svg → app/javascript/fonts/roboto/roboto-bold-webfont.svg View File


app/assets/fonts/roboto/roboto-bold-webfont.ttf → app/javascript/fonts/roboto/roboto-bold-webfont.ttf View File


app/assets/fonts/roboto/roboto-bold-webfont.woff → app/javascript/fonts/roboto/roboto-bold-webfont.woff View File


app/assets/fonts/roboto/roboto-bold-webfont.woff2 → app/javascript/fonts/roboto/roboto-bold-webfont.woff2 View File


app/assets/fonts/roboto/roboto-italic-webfont.eot → app/javascript/fonts/roboto/roboto-italic-webfont.eot View File


app/assets/fonts/roboto/roboto-italic-webfont.svg → app/javascript/fonts/roboto/roboto-italic-webfont.svg View File


app/assets/fonts/roboto/roboto-italic-webfont.ttf → app/javascript/fonts/roboto/roboto-italic-webfont.ttf View File


app/assets/fonts/roboto/roboto-italic-webfont.woff → app/javascript/fonts/roboto/roboto-italic-webfont.woff View File


app/assets/fonts/roboto/roboto-italic-webfont.woff2 → app/javascript/fonts/roboto/roboto-italic-webfont.woff2 View File


app/assets/fonts/roboto/roboto-medium-webfont.eot → app/javascript/fonts/roboto/roboto-medium-webfont.eot View File


app/assets/fonts/roboto/roboto-medium-webfont.svg → app/javascript/fonts/roboto/roboto-medium-webfont.svg View File


app/assets/fonts/roboto/roboto-medium-webfont.ttf → app/javascript/fonts/roboto/roboto-medium-webfont.ttf View File


app/assets/fonts/roboto/roboto-medium-webfont.woff → app/javascript/fonts/roboto/roboto-medium-webfont.woff View File


app/assets/fonts/roboto/roboto-medium-webfont.woff2 → app/javascript/fonts/roboto/roboto-medium-webfont.woff2 View File


app/assets/fonts/roboto/roboto-regular-webfont.eot → app/javascript/fonts/roboto/roboto-regular-webfont.eot View File


app/assets/fonts/roboto/roboto-regular-webfont.svg → app/javascript/fonts/roboto/roboto-regular-webfont.svg View File


app/assets/fonts/roboto/roboto-regular-webfont.ttf → app/javascript/fonts/roboto/roboto-regular-webfont.ttf View File


app/assets/fonts/roboto/roboto-regular-webfont.woff → app/javascript/fonts/roboto/roboto-regular-webfont.woff View File


app/assets/fonts/roboto/roboto-regular-webfont.woff2 → app/javascript/fonts/roboto/roboto-regular-webfont.woff2 View File


app/assets/images/.keep → app/javascript/images/.keep View File


app/assets/images/background-photo.jpg → app/javascript/images/background-photo.jpg View File


app/assets/images/boost_sprite.png → app/javascript/images/boost_sprite.png View File


app/assets/images/elephant-friend.png → app/javascript/images/elephant-friend.png View File


app/assets/images/fluffy-elephant-friend.png → app/javascript/images/fluffy-elephant-friend.png View File


app/assets/images/logo.png → app/javascript/images/logo.png View File


app/assets/images/logo.svg → app/javascript/images/logo.svg View File


app/assets/images/mastodon-getting-started.png → app/javascript/images/mastodon-getting-started.png View File


app/assets/images/mastodon-not-found.png → app/javascript/images/mastodon-not-found.png View File


app/assets/images/mastodon.jpg → app/javascript/images/mastodon.jpg View File


app/assets/images/mastodon_small.jpg → app/javascript/images/mastodon_small.jpg View File


app/assets/images/screenshot.png → app/javascript/images/screenshot.png View File


app/assets/images/void.png → app/javascript/images/void.png View File


+ 0
- 0
app/javascript/mastodon/.gitkeep View File


app/assets/javascripts/components/actions/accounts.jsx → app/javascript/mastodon/actions/accounts.js View File


app/assets/javascripts/components/actions/alerts.jsx → app/javascript/mastodon/actions/alerts.js View File


app/assets/javascripts/components/actions/blocks.jsx → app/javascript/mastodon/actions/blocks.js View File


app/assets/javascripts/components/actions/cards.jsx → app/javascript/mastodon/actions/cards.js View File


app/assets/javascripts/components/actions/compose.jsx → app/javascript/mastodon/actions/compose.js View File


app/assets/javascripts/components/actions/favourites.jsx → app/javascript/mastodon/actions/favourites.js View File


app/assets/javascripts/components/actions/interactions.jsx → app/javascript/mastodon/actions/interactions.js View File


app/assets/javascripts/components/actions/modal.jsx → app/javascript/mastodon/actions/modal.js View File


app/assets/javascripts/components/actions/mutes.jsx → app/javascript/mastodon/actions/mutes.js View File


app/assets/javascripts/components/actions/notifications.jsx → app/javascript/mastodon/actions/notifications.js View File


app/assets/javascripts/components/actions/onboarding.jsx → app/javascript/mastodon/actions/onboarding.js View File


app/assets/javascripts/components/actions/reports.jsx → app/javascript/mastodon/actions/reports.js View File


app/assets/javascripts/components/actions/search.jsx → app/javascript/mastodon/actions/search.js View File


app/assets/javascripts/components/actions/settings.jsx → app/javascript/mastodon/actions/settings.js View File


app/assets/javascripts/components/actions/statuses.jsx → app/javascript/mastodon/actions/statuses.js View File


app/assets/javascripts/components/actions/store.jsx → app/javascript/mastodon/actions/store.js View File


app/assets/javascripts/components/actions/timelines.jsx → app/javascript/mastodon/actions/timelines.js View File


app/assets/javascripts/components/api.jsx → app/javascript/mastodon/api.js View File


app/assets/javascripts/components/components/account.jsx → app/javascript/mastodon/components/account.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import ImmutablePropTypes from 'react-immutable-proptypes';
2 3
 import PropTypes from 'prop-types';
3 4
 import Avatar from './avatar';
@@ -5,6 +6,7 @@ import DisplayName from './display_name';
5 6
 import Permalink from './permalink';
6 7
 import IconButton from './icon_button';
7 8
 import { defineMessages, injectIntl } from 'react-intl';
9
+import ImmutablePureComponent from 'react-immutable-pure-component';
8 10
 
9 11
 const messages = defineMessages({
10 12
   follow: { id: 'account.follow', defaultMessage: 'Follow' },
@@ -14,7 +16,7 @@ const messages = defineMessages({
14 16
   unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' }
15 17
 });
16 18
 
17
-class Account extends React.PureComponent {
19
+class Account extends ImmutablePureComponent {
18 20
 
19 21
   constructor (props, context) {
20 22
     super(props, context);

app/assets/javascripts/components/components/attachment_list.jsx → app/javascript/mastodon/components/attachment_list.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import ImmutablePropTypes from 'react-immutable-proptypes';
2 3
 
3 4
 const filename = url => url.split('/').pop().split('#')[0].split('?')[0];

app/assets/javascripts/components/components/autosuggest_textarea.jsx → app/javascript/mastodon/components/autosuggest_textarea.js View File

@@ -1,7 +1,9 @@
1
+import React from 'react';
1 2
 import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
2 3
 import ImmutablePropTypes from 'react-immutable-proptypes';
3 4
 import PropTypes from 'prop-types';
4 5
 import { isRtl } from '../rtl';
6
+import ImmutablePureComponent from 'react-immutable-pure-component';
5 7
 
6 8
 const textAtCursorMatchesToken = (str, caretPosition) => {
7 9
   let word;
@@ -28,7 +30,7 @@ const textAtCursorMatchesToken = (str, caretPosition) => {
28 30
   }
29 31
 };
30 32
 
31
-class AutosuggestTextarea extends React.Component {
33
+class AutosuggestTextarea extends ImmutablePureComponent {
32 34
 
33 35
   constructor (props, context) {
34 36
     super(props, context);

app/assets/javascripts/components/components/avatar.jsx → app/javascript/mastodon/components/avatar.js View File

@@ -1,21 +1,26 @@
1
+import React from 'react';
1 2
 import PropTypes from 'prop-types';
2 3
 
3 4
 class Avatar extends React.PureComponent {
4 5
 
5 6
   constructor (props, context) {
6 7
     super(props, context);
8
+
7 9
     this.state = {
8 10
       hovering: false
9 11
     };
12
+
10 13
     this.handleMouseEnter = this.handleMouseEnter.bind(this);
11 14
     this.handleMouseLeave = this.handleMouseLeave.bind(this);
12 15
   }
13 16
 
14 17
   handleMouseEnter () {
18
+    if (this.props.animate) return;
15 19
     this.setState({ hovering: true });
16 20
   }
17 21
 
18 22
   handleMouseLeave () {
23
+    if (this.props.animate) return;
19 24
     this.setState({ hovering: false });
20 25
   }
21 26
 

app/assets/javascripts/components/components/button.jsx → app/javascript/mastodon/components/button.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import PropTypes from 'prop-types';
2 3
 
3 4
 class Button extends React.PureComponent {

app/assets/javascripts/components/components/collapsable.jsx → app/javascript/mastodon/components/collapsable.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import { Motion, spring } from 'react-motion';
2 3
 import PropTypes from 'prop-types';
3 4
 

app/assets/javascripts/components/components/column_back_button.jsx → app/javascript/mastodon/components/column_back_button.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import { FormattedMessage } from 'react-intl';
2 3
 import PropTypes from 'prop-types';
3 4
 

app/assets/javascripts/components/components/column_back_button_slim.jsx → app/javascript/mastodon/components/column_back_button_slim.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import { FormattedMessage } from 'react-intl';
2 3
 import PropTypes from 'prop-types';
3 4
 

app/assets/javascripts/components/components/column_collapsable.jsx → app/javascript/mastodon/components/column_collapsable.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import { Motion, spring } from 'react-motion';
2 3
 import PropTypes from 'prop-types';
3 4
 

app/assets/javascripts/components/components/display_name.jsx → app/javascript/mastodon/components/display_name.js View File

@@ -1,3 +1,4 @@
1
+import React from 'react';
1 2
 import ImmutablePropTypes from 'react-immutable-proptypes';
2 3
 import escapeTextContentForBrowser from 'escape-html';
3 4
 import emojify from '../emoji';

app/assets/javascripts/components/components/dropdown_menu.jsx → app/javascript/mastodon/components/dropdown_menu.js View File


Some files were not shown because too many files changed in this diff