five-two-nw-olivander 0.1.2.37 → 0.1.2.38

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd2984fed303415434608a19eadfc7da16727e43434b67119ca9732797ad24c7
4
- data.tar.gz: b3c3ad917a5069422bef3b3ee6de9fd7654c5b6b6687af5edce67c49daee2866
3
+ metadata.gz: b894aa3a01736ad773b5a52f08c0acdaab74520595221d899d9ce20ef5b34a1b
4
+ data.tar.gz: 5bbc393744805eea7ed61a69008a6364e18c4bffa5c2eaa6b81186d1b05c15de
5
5
  SHA512:
6
- metadata.gz: f07b08a5271fd1d723a615718a85199e490c0c20e81ed8d6fcd34005730256b5f0e5a2983424c01443c306b5a9bbec70c951e2dc43930ff31ee564eee24ff6e3
7
- data.tar.gz: bafbc5827b23d23748b8ef259cff09b7febf0e8b5d6c7920bace1ca8315c150bddd821468355252b29fa3b87faa6c1f720617ea2a08b388d9fc6461e0651151e
6
+ metadata.gz: aac18d221352178ceba27048d7066bbdfcc2830302dab609673470f55bbd971dbdc7dd7674e2458c2aab933d6d52260bdbcf903b4483bfc4bfb0fa7ac64d045b
7
+ data.tar.gz: 7f9dae501b17eb02c2ab4362396b7f58221046440221191a821f12ad680b23b6b6cf7bce3de4e2ef2c604f66593fe1f04440100967903b95a1ed966c39621f5d
@@ -0,0 +1,25 @@
1
+ .post{ id: @id }
2
+ - note = @note
3
+ .user-block
4
+ %img.img-circle.img-bordered-sm{ alt: "Avatar", src: image_path(user_image_path(@avatar_url)), title: @poster }
5
+ - if tools?
6
+ .float-right
7
+ = tools
8
+  
9
+ %span.username
10
+ - if @poster.is_a?(String)
11
+ = @poster
12
+ - else
13
+ = link_to @poster, @poster
14
+ %span.description
15
+ %i.fas.fa-clock
16
+ posted #{@posted.to_fs}
17
+ - if @updated.present? && @updated != @posted
18
+ , updated #{time_ago_in_words(@updated)} ago
19
+ %p
20
+ - if content?
21
+ = content
22
+ - elsif @text
23
+ = simple_format(@text)
24
+ - else
25
+ %i No text entered
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Olivander
4
+ module Components
5
+ class PostComponent < ViewComponent::Base
6
+ renders_one :tools
7
+ delegate :user_image_path, to: :helpers
8
+
9
+ def initialize(poster, posted, updated, text: nil, id: nil, avatar_url: nil)
10
+ super
11
+ @poster = poster
12
+ @posted = posted
13
+ @updated = updated
14
+ @text = text
15
+ @id = id
16
+ @avatar_url = avatar_url
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Olivander
2
- VERSION = '0.1.2.37'.freeze
2
+ VERSION = '0.1.2.38'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: five-two-nw-olivander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.37
4
+ version: 0.1.2.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -186,6 +186,8 @@ files:
186
186
  - app/components/olivander/components/menu_item_component.rb
187
187
  - app/components/olivander/components/portlet_component.html.haml
188
188
  - app/components/olivander/components/portlet_component.rb
189
+ - app/components/olivander/components/post_component.html.haml
190
+ - app/components/olivander/components/post_component.rb
189
191
  - app/components/olivander/components/resource_form_component.html.haml
190
192
  - app/components/olivander/components/resource_form_component.rb
191
193
  - app/components/olivander/components/resource_show_component.html.haml