thredded 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.mkdn +26 -0
  3. data/README.mkdn +52 -7
  4. data/app/assets/images/thredded/moderation.svg +4 -0
  5. data/app/assets/images/thredded/private-messages.svg +1 -1
  6. data/app/assets/images/thredded/settings.svg +1 -1
  7. data/app/assets/stylesheets/thredded/_base.scss +1 -1
  8. data/app/assets/stylesheets/thredded/_thredded.scss +1 -0
  9. data/app/assets/stylesheets/thredded/base/_buttons.scss +16 -0
  10. data/app/assets/stylesheets/thredded/base/_grid.scss +12 -0
  11. data/app/assets/stylesheets/thredded/components/_base.scss +4 -0
  12. data/app/assets/stylesheets/thredded/components/_messageboard.scss +1 -13
  13. data/app/assets/stylesheets/thredded/components/_topic-header.scss +27 -0
  14. data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +1 -1
  15. data/app/assets/stylesheets/thredded/layout/_moderation.scss +45 -0
  16. data/app/assets/stylesheets/thredded/layout/_navigation.scss +20 -6
  17. data/app/assets/stylesheets/thredded/layout/_search-navigation.scss +2 -2
  18. data/app/assets/stylesheets/thredded/layout/_user-navigation.scss +5 -3
  19. data/app/commands/thredded/autofollow_mentioned_users.rb +32 -0
  20. data/app/commands/thredded/moderate_post.rb +35 -0
  21. data/app/commands/thredded/notify_following_users.rb +18 -0
  22. data/app/commands/thredded/notify_private_topic_users.rb +4 -4
  23. data/app/controllers/thredded/application_controller.rb +6 -25
  24. data/app/controllers/thredded/messageboards_controller.rb +5 -3
  25. data/app/controllers/thredded/moderation_controller.rb +56 -0
  26. data/app/controllers/thredded/post_permalinks_controller.rb +1 -1
  27. data/app/controllers/thredded/posts_controller.rb +4 -2
  28. data/app/controllers/thredded/private_post_permalinks_controller.rb +1 -1
  29. data/app/controllers/thredded/private_topics_controller.rb +2 -3
  30. data/app/controllers/thredded/theme_previews_controller.rb +3 -3
  31. data/app/controllers/thredded/topics_controller.rb +32 -11
  32. data/app/forms/thredded/topic_form.rb +1 -0
  33. data/app/helpers/thredded/application_helper.rb +26 -1
  34. data/app/helpers/thredded/urls_helper.rb +7 -5
  35. data/app/jobs/thredded/auto_follow_and_notify_job.rb +13 -0
  36. data/app/jobs/thredded/notify_private_topic_users_job.rb +3 -4
  37. data/app/mailer_previews/thredded/post_mailer_preview.rb +2 -2
  38. data/app/mailers/thredded/post_mailer.rb +2 -2
  39. data/app/models/concerns/thredded/content_moderation_state.rb +53 -0
  40. data/app/models/concerns/thredded/moderation_state.rb +13 -0
  41. data/app/models/concerns/thredded/post_common.rb +6 -71
  42. data/app/models/concerns/thredded/topic_common.rb +26 -11
  43. data/app/models/concerns/thredded/user_topic_read_state_common.rb +4 -0
  44. data/app/models/thredded/messageboard.rb +2 -0
  45. data/app/models/thredded/post.rb +24 -0
  46. data/app/models/thredded/post_moderation_record.rb +45 -0
  47. data/app/models/thredded/private_post.rb +15 -0
  48. data/app/models/thredded/private_topic.rb +8 -0
  49. data/app/models/thredded/topic.rb +39 -0
  50. data/app/models/thredded/user_detail.rb +11 -0
  51. data/app/models/thredded/user_extender.rb +14 -0
  52. data/app/models/thredded/user_topic_follow.rb +20 -0
  53. data/app/policies/thredded/messageboard_policy.rb +15 -0
  54. data/app/policies/thredded/post_policy.rb +17 -1
  55. data/app/policies/thredded/private_post_policy.rb +1 -1
  56. data/app/policies/thredded/private_topic_policy.rb +1 -1
  57. data/app/policies/thredded/topic_policy.rb +18 -1
  58. data/app/view_models/thredded/base_topic_view.rb +0 -13
  59. data/app/view_models/thredded/post_view.rb +8 -1
  60. data/app/view_models/thredded/posts_page_view.rb +6 -8
  61. data/app/view_models/thredded/private_topic_view.rb +8 -0
  62. data/app/view_models/thredded/private_topics_page_view.rb +24 -0
  63. data/app/view_models/thredded/topic_posts_page_view.rb +17 -0
  64. data/app/view_models/thredded/topic_view.rb +27 -1
  65. data/app/view_models/thredded/topics_page_view.rb +2 -4
  66. data/app/views/thredded/moderation/_post.html.erb +7 -0
  67. data/app/views/thredded/moderation/_post_moderation_actions.html.erb +12 -0
  68. data/app/views/thredded/moderation/_post_moderation_record.html.erb +43 -0
  69. data/app/views/thredded/moderation/history.html.erb +19 -0
  70. data/app/views/thredded/moderation/pending.html.erb +29 -0
  71. data/app/views/thredded/post_mailer/{at_notification.html.erb → post_notification.html.erb} +1 -1
  72. data/app/views/thredded/post_mailer/{at_notification.text.erb → post_notification.text.erb} +1 -1
  73. data/app/views/thredded/posts/_post.html.erb +8 -1
  74. data/app/views/thredded/posts_common/_actions.html.erb +11 -0
  75. data/app/views/thredded/posts_common/_content.html.erb +5 -0
  76. data/app/views/thredded/posts_common/_header.html.erb +5 -0
  77. data/app/views/thredded/private_posts/_private_post.html.erb +5 -1
  78. data/app/views/thredded/shared/_nav.html.erb +1 -0
  79. data/app/views/thredded/shared/_page.html.erb +1 -1
  80. data/app/views/thredded/shared/nav/_moderation.html.erb +13 -0
  81. data/app/views/thredded/shared/nav/_private_topics.html.erb +1 -2
  82. data/app/views/thredded/topics/_header.html.erb +15 -0
  83. data/app/views/thredded/topics/index.html.erb +2 -2
  84. data/app/views/thredded/topics/new.html.erb +1 -1
  85. data/config/locales/en.yml +26 -5
  86. data/config/locales/pt-BR.yml +23 -0
  87. data/config/routes.rb +7 -0
  88. data/db/migrate/20160329231848_create_thredded.rb +40 -5
  89. data/db/seeds.rb +5 -5
  90. data/db/upgrade_migrations/20160429222452_upgrade_v0_3_to_v0_4.rb +1 -2
  91. data/db/upgrade_migrations/20160501151908_upgrade_v0_4_to_v0_5.rb +56 -0
  92. data/heroku.gemfile.lock +20 -18
  93. data/lib/generators/thredded/install/templates/initializer.rb +15 -0
  94. data/lib/html/pipeline/at_mention_filter.rb +5 -2
  95. data/lib/thredded.rb +4 -0
  96. data/lib/thredded/at_users.rb +3 -2
  97. data/lib/thredded/content_formatter.rb +81 -0
  98. data/lib/thredded/version.rb +1 -1
  99. metadata +28 -10
  100. data/app/commands/thredded/notify_mentioned_users.rb +0 -55
  101. data/app/jobs/thredded/at_notifier_job.rb +0 -12
  102. data/app/mailer_previews/thredded/private_post_mailer_preview.rb +0 -12
  103. data/app/mailers/thredded/private_post_mailer.rb +0 -17
  104. data/app/views/thredded/posts_common/_post.html.erb +0 -26
  105. data/app/views/thredded/private_post_mailer/at_notification.html.erb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8023f4374b36ef9c88f7619b9768b5be2c4bca46
4
- data.tar.gz: 9d18f2e394e2bbf3e4469735cd48ca5f0003bfd2
3
+ metadata.gz: 0404295457d213a2f5fdb46e8cff204fb08dc55b
4
+ data.tar.gz: 11dd30fc6953380143931bb1ebd52b7dd6ec1f57
5
5
  SHA512:
6
- metadata.gz: 8144322f3774be32136e270fdf52733062d53917882e2759a1b122280332904df9fd558085d17a4b565dea5a4f5c17dc8019a81b16b022cd471518a64b3880d1
7
- data.tar.gz: 41d7acb3dfbe5a619cb6abb47ee313ab04e6697867ec2c09566f7a6fadf85c32547b99729c844d57a9b2248738e9d455edcaf38588693f1e9d77bb24631c1f46
6
+ metadata.gz: 1d66513bb8d504e9f1f6762b709f857c435a8fd6729f9e10ec08fcc0cae746e792132f3bbc64cf366c62603a6bc6fbae1fa1d6b3df9587bff8c618615a84383b
7
+ data.tar.gz: 58ea29e130f147a419b27f75312411c4e6786af2320a20563ae6ee895733cbaac787168beacbb7943480690cb34622f05a119866d87f2f56978af68b48f501b9
data/CHANGELOG.mkdn CHANGED
@@ -1,3 +1,29 @@
1
+ # 0.5.0
2
+
3
+ **NB:** If updating to this version from 0.4.x, you will need to copy and run [this migration](https://github.com/thredded/thredded/blob/5e203c8eec05919d97f4d26fa2a1fc3081e992a7/db/upgrade_migrations/20160501151908_upgrade_v0_4_to_v0_5.rb).
4
+
5
+ ## Added
6
+
7
+ This release includes two major features:
8
+
9
+ * Topic subscriptions and an improved notifications system. [#310](https://github.com/thredded/thredded/pull/310)
10
+ * A basic [moderation system](https://github.com/thredded/thredded#moderation). [#45](https://github.com/thredded/thredded/issues/45)
11
+
12
+ Additionally, content formatting is now easier to configure. [#321](https://github.com/thredded/thredded/pull/321)
13
+
14
+ ## Changed
15
+
16
+ * `<figure>` and `<figcaption>` are now allowed in formatted post content.
17
+
18
+ ## Fixed
19
+
20
+ * YouTube embeds. [#314](https://github.com/thredded/thredded/issues/314)
21
+ * Creating a topic now marks it as read. [#322](https://github.com/thredded/thredded/issues/322)
22
+ * Dates older than a year now display the year. [#309](https://github.com/thredded/thredded/issues/309)
23
+ * `<a>` tags without `href` in posts no longer cause an exception. [#313](https://github.com/thredded/thredded/issues/313)
24
+
25
+ See the full list of changes here: https://github.com/thredded/thredded/compare/v0.4.0...v0.5.0.
26
+
1
27
  # 0.4.0 - 2016-05-21
2
28
 
3
29
  **NB:** If updating to this version from 0.3.x, you will need to copy and run [this migration](https://github.com/thredded/thredded/blob/559fc205b9ee405abfe3968b981254f01f928027/db/upgrade_migrations/20160429222452_upgrade_v0_3_to_v0_4.rb).
data/README.mkdn CHANGED
@@ -4,20 +4,17 @@ _Thredded_ is a Rails 4.2+ forum/messageboard engine. Its goal is to be as simpl
4
4
 
5
5
  Some of the features currently in Thredded:
6
6
 
7
- * Markdown post formatting (by default).
7
+ * Markdown post formatting with some BBCode support (by default).
8
8
  * (Un)read posts tracking.
9
- * Email notifications, @-mentions, per-messageboard notification settings.
9
+ * Email notifications, topic subscriptions, @-mentions, per-messageboard notification settings.
10
10
  * Private group messaging.
11
11
  * Full-text search using the database.
12
12
  * Pinned and locked topics.
13
13
  * List of currently online users, for all forums and per-messageboard.
14
14
  * Flexible permissions system.
15
+ * Basic moderation.
15
16
  * Lightweight default theme configurable via Sass.
16
17
 
17
- Planned features:
18
-
19
- * Flexible moderation system with per-messageboard settings. #45
20
-
21
18
  <a href='https://pledgie.com/campaigns/27480'><img alt='Click here to lend your support to: Thredded and make a donation at pledgie.com !' src='https://pledgie.com/campaigns/27480.png?skin_name=chrome' border='0' ></a>
22
19
 
23
20
  <img src="http://emoji.fileformat.info/gemoji/point_up.png" width="24"> If you are so inclined, donating to the project will help aid in its development
@@ -47,7 +44,7 @@ application and not an engine like Thredded.
47
44
  Add the gem to your Gemfile:
48
45
 
49
46
  ```ruby
50
- gem 'thredded', '~> 0.4.0'
47
+ gem 'thredded', '~> 0.5.0'
51
48
  ```
52
49
 
53
50
  Add the Thredded [initializer] to your parent app by running the install generator.
@@ -86,6 +83,25 @@ DbTextSearch::CaseInsensitive.add_index(
86
83
  connection, Thredded.user_class.table_name, Thredded.user_name_column, unique: true)
87
84
  ```
88
85
 
86
+ ### Upgrading an existing install
87
+
88
+ 1) To upgrade the initializer:
89
+
90
+ ```console
91
+ rails g thredded:install
92
+ ```
93
+
94
+ But then compare this with the previous version to decide what to keep.
95
+
96
+ 2) To upgrade the database (in this example from v0.4 to the v0.5):
97
+
98
+ ```console
99
+ cp `bundle show thredded`/db/upgrade_migrations/20160501151908_upgrade_v0_4_to_v0_5.rb db/migrate
100
+ rake db:migrate
101
+ ```
102
+
103
+ Note that for guaranteed best results you will want to run this with the gem checked out with v0.5.0
104
+
89
105
  ### Migrating from Forem
90
106
 
91
107
  Are you currently using [Forem]? Thredded provides [a migration][forem-to-thredded] to copy all of your existing data from Forem over
@@ -358,6 +374,35 @@ Currently, the default behaviour is to render an error message with an appropria
358
374
  layout. You may want to override the handling for `Thredded::Errors::LoginRequired` to render a login form instead.
359
375
  For an example of how to do this, see the initializer.
360
376
 
377
+ ## Moderation
378
+
379
+ Thredded comes with two options for the moderation system:
380
+
381
+ 1. Reactive moderation, where posts from first-time users are published immediately but enter the moderation queue
382
+ (default).
383
+ 2. Pre-emptive moderation, where posts from first-time users are not published until they have been approved.
384
+
385
+ This is controlled by the `Thredded.content_visible_while_pending_moderation` setting.
386
+
387
+ Users, topics, and posts can be in one of three moderation states: `pending_moderation`, `approved`, and `blocked`.
388
+ By default, new users are `pending_moderation`, and new posts and topics inherit their default moderation_state from
389
+ the user's.
390
+
391
+ When you approve a new user's post, all of their later posts will be approved automatically.
392
+
393
+ Additionally, users always see their own posts regardless of the moderation state. For blocked users, this means
394
+ they might not realize they have been blocked right away.
395
+
396
+ Blocked users cannot send private messages.
397
+
398
+ ### Disabling moderation
399
+
400
+ To disable moderation, e.g. if you run internal forums that do not need moderation, run the following migration:
401
+
402
+ ```ruby
403
+ change_column_default :thredded_user_details, :moderation_state, 1 # approved
404
+ ```
405
+
361
406
  ## Development
362
407
 
363
408
  To be more clear - this is the for when you are working on *this* gem.
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"/>
3
+ <path d="M0 0h24v24H0z" fill="none"/>
4
+ </svg>
@@ -1,4 +1,4 @@
1
- <svg height="32" viewBox="0 0 24 24" width="32" xmlns="http://www.w3.org/2000/svg">
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M0 0h24v24H0z" fill="none"/>
3
3
  <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"/>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
- <svg height="48" viewBox="0 0 24 24" width="32" xmlns="http://www.w3.org/2000/svg">
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M0 0h24v24H0z" fill="none"/>
3
3
  <path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/>
4
4
  </svg>
@@ -1,11 +1,11 @@
1
1
  // This Sass package defines Thredded variables, mixins, and placeholders.
2
2
 
3
3
  @import "base/variables";
4
+ @import "base/grid";
4
5
 
5
6
  @import "base/alerts";
6
7
  @import "base/buttons";
7
8
  @import "base/forms";
8
- @import "base/grid";
9
9
  @import "base/lists";
10
10
  @import "base/nav";
11
11
  @import "base/tables";
@@ -9,6 +9,7 @@
9
9
  @import "layout/search-navigation";
10
10
  @import "layout/user-navigation";
11
11
  @import "layout/navigation";
12
+ @import "layout/moderation";
12
13
 
13
14
  @import "components/base";
14
15
  @import "components/alerts";
@@ -38,3 +38,19 @@
38
38
  }
39
39
  }
40
40
  }
41
+
42
+ %thredded--buttons-list {
43
+ text-align: center;
44
+ a, .button_to {
45
+ display: block;
46
+ margin-top: $thredded-small-spacing;
47
+ }
48
+ @include thredded-media-tablet-and-up {
49
+ a, .button_to {
50
+ display: inline-block;
51
+ }
52
+ a + a, .button_to + .button_to {
53
+ margin-left: $thredded-small-spacing;
54
+ }
55
+ }
56
+ }
@@ -4,12 +4,24 @@
4
4
  }
5
5
  }
6
6
 
7
+ @mixin thredded-media-tablet-and-down {
8
+ @media screen and (max-width: map-get($thredded-grid-breakpoint-max-widths, tablet)) {
9
+ @content;
10
+ }
11
+ }
12
+
7
13
  @mixin thredded-media-tablet-and-up {
8
14
  @media screen and (min-width: map-get($thredded-grid-breakpoint-max-widths, mobile) + 0.00001rem) {
9
15
  @content;
10
16
  }
11
17
  }
12
18
 
19
+ @mixin thredded-media-desktop-and-up {
20
+ @media screen and (min-width: map-get($thredded-grid-breakpoint-max-widths, tablet) + 0.00001rem) {
21
+ @content;
22
+ }
23
+ }
24
+
13
25
  @mixin thredded--clearfix {
14
26
  &::after {
15
27
  clear: both;
@@ -11,3 +11,7 @@
11
11
  &--link {
12
12
  @extend %thredded--link;
13
13
  }
14
+
15
+ &--blockquote {
16
+ @extend %thredded--blockquote;
17
+ }
@@ -51,17 +51,5 @@
51
51
  }
52
52
 
53
53
  &--messageboards--actions {
54
- text-align: center;
55
- a {
56
- display: block;
57
- margin-top: $thredded-small-spacing;
58
- }
59
- @include thredded-media-tablet-and-up {
60
- a {
61
- display: inline-block;
62
- }
63
- a + a {
64
- margin-left: $thredded-small-spacing;
65
- }
66
- }
54
+ @extend %thredded--buttons-list;
67
55
  }
@@ -28,3 +28,30 @@
28
28
  font-size: $thredded-font-size-small;
29
29
  margin-left: 0.4rem;
30
30
  }
31
+ &--topic-follow-info {
32
+ float: right;
33
+ color: $thredded-secondary-text-color;
34
+ &.thredded--following {
35
+ font-size: 0.65rem;
36
+ }
37
+ &.thredded--notfollowing {
38
+ font-size: $thredded-font-size-small;
39
+ }
40
+ font-style: normal;
41
+ max-width: 60%;
42
+ text-align: right;
43
+ p {
44
+ margin: 0;
45
+ }
46
+ form {
47
+ display: inline-block;
48
+ input[type=submit] {
49
+ background:none;
50
+ border:none;
51
+ padding:0;
52
+ font: inherit;
53
+ cursor: pointer;
54
+ @extend %thredded--link;
55
+ }
56
+ }
57
+ }
@@ -2,7 +2,7 @@
2
2
  @extend %thredded--list-unstyled;
3
3
  @include thredded--clearfix;
4
4
  display: block;
5
- @include thredded-media-tablet-and-up {
5
+ @include thredded-media-desktop-and-up {
6
6
  margin-top: $thredded-small-spacing;
7
7
  }
8
8
  }
@@ -0,0 +1,45 @@
1
+ &--post-moderation-actions {
2
+ @extend %thredded--buttons-list;
3
+ }
4
+
5
+ &--moderation--history-link {
6
+ float: right;
7
+ margin: 0.4rem 0.6rem $thredded-small-spacing 0;
8
+ position: relative;
9
+ z-index: 1;
10
+ }
11
+
12
+ &--moderated-notice {
13
+ margin-bottom: $thredded-base-spacing;
14
+ padding: $thredded-small-spacing $thredded-base-spacing;
15
+ background: $thredded-light-gray;
16
+ }
17
+
18
+ &--post-moderation-record {
19
+ .thredded--post {
20
+ margin-bottom: 0;
21
+ margin-left: 4rem;
22
+ }
23
+ &--moderation-state-notice {
24
+ margin-bottom: 1rem;
25
+ a {
26
+ @extend %thredded--link;
27
+ }
28
+ .thredded--post-moderation-record-approved & {
29
+ color: $thredded-alert-success-color;
30
+ }
31
+ .thredded--post-moderation-record-blocked & {
32
+ color: $thredded-alert-danger-color;
33
+ }
34
+ }
35
+ &--content-changed-notice {
36
+ font-style: italic;
37
+ a {
38
+ @extend %thredded--link;
39
+ }
40
+ }
41
+ }
42
+
43
+ &--post-moderation-record + &--post-moderation-record {
44
+ margin-top: $thredded-large-spacing;
45
+ }
@@ -6,7 +6,8 @@
6
6
  }
7
7
  }
8
8
 
9
- @include thredded-media-mobile {
9
+ @include thredded-media-tablet-and-down {
10
+ $icon-nav-item-width: 2.625rem;
10
11
  &--navigation {
11
12
  display: table;
12
13
  position: relative;
@@ -18,7 +19,10 @@
18
19
  }
19
20
  &--navigation-breadcrumbs {
20
21
  font-size: $thredded-font-size-small;
21
- padding-right: 5rem;
22
+ padding-right: $icon-nav-item-width * 2;
23
+ .thredded--is-moderator & {
24
+ padding-right: $icon-nav-item-width * 3;
25
+ }
22
26
  }
23
27
  &--navigation--search {
24
28
  display: none;
@@ -50,12 +54,17 @@
50
54
  height: 2rem;
51
55
  }
52
56
  }
57
+ %icon-counter {
58
+ bottom: 0.3rem;
59
+ position: absolute;
60
+ right: -0.2rem;
61
+ }
53
62
  .thredded--nav-text {
54
63
  display: none;
55
64
  }
56
65
  &--settings {
57
66
  @extend %icon-nav-item;
58
- right: 2.6rem;
67
+ right: $icon-nav-item-width;
59
68
  }
60
69
  &--private-topics {
61
70
  @extend %icon-nav-item;
@@ -65,9 +74,14 @@
65
74
  position: relative;
66
75
  }
67
76
  &--unread {
68
- bottom: 0.3rem;
69
- position: absolute;
70
- right: -0.2rem;
77
+ @extend %icon-counter;
78
+ }
79
+ }
80
+ &--moderation {
81
+ @extend %icon-nav-item;
82
+ right: $icon-nav-item-width * 2;
83
+ &--pending-count {
84
+ @extend %icon-counter
71
85
  }
72
86
  }
73
87
  }
@@ -5,7 +5,7 @@
5
5
  top: 0;
6
6
  right: 0;
7
7
 
8
- @include thredded-media-mobile {
8
+ @include thredded-media-tablet-and-down {
9
9
  position: initial;
10
10
  }
11
11
 
@@ -17,7 +17,7 @@
17
17
  box-shadow: none;
18
18
  width: 100%;
19
19
 
20
- @include thredded-media-tablet-and-up {
20
+ @include thredded-media-desktop-and-up {
21
21
  $padding-x: 0.75rem;
22
22
  background: transparent;
23
23
  border-color: transparent;
@@ -8,7 +8,6 @@
8
8
  @include thredded-media-tablet-and-up {
9
9
  font-size: $thredded-font-size-small;
10
10
  margin-bottom: 0;
11
- margin-top: $thredded-large-spacing;
12
11
  }
13
12
 
14
13
  a {
@@ -41,7 +40,9 @@
41
40
  .thredded--preferences &--user-navigation--settings,
42
41
  .thredded--new-private-topic &--user-navigation--private-topics,
43
42
  .thredded--private-topics-index &--user-navigation--private-topics,
44
- .thredded--private-topic-show &--user-navigation--private-topics {
43
+ .thredded--private-topic-show &--user-navigation--private-topics,
44
+ .thredded--pending-moderation &--user-navigation--moderation,
45
+ .thredded--moderation-history &--user-navigation--moderation {
45
46
  border-bottom: 1px solid $thredded-action-color;
46
47
  margin-bottom: -1px;
47
48
 
@@ -50,7 +51,8 @@
50
51
  }
51
52
  }
52
53
 
53
- &--user-navigation--private-topics--unread {
54
+ &--user-navigation--private-topics--unread,
55
+ &--user-navigation--moderation--pending-count {
54
56
  background: $thredded-badge-active-background;
55
57
  border-radius: 10px;
56
58
  color: $thredded-badge-active-color;