easy-admin-rails 0.1.13 → 0.1.14

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: 8d4b94ae313746eb609f463d8619257aac914b00204f9fccb934c8a83cbbba2d
4
- data.tar.gz: 3d5165ff34936522ee840039050fd15b740c47395b45f8b4276473cd24c9d0d9
3
+ metadata.gz: cff58e24500b585a0346cd5da70625a6197c4445fff7c17200d35f9f71c32f95
4
+ data.tar.gz: 48e3480d8a897c2fb5381304de2876b89a1cfa3f9426c2415aa35f7c64aca6e1
5
5
  SHA512:
6
- metadata.gz: 13f097fbf6b65704d148e394c4c36a87192ffb1c163eda942751cefe8808aa3179ab6024ff79e489c9b0dcf5fa41067990501843690c60d16b6a18af6a0b2f73
7
- data.tar.gz: bc610d094b4c1c1aa73ec20b572e49ba1935b46903b4ea25d6608c68f5ee201cb54034101595fb9284252d712eae2ca86cf7f24923c837953fac8d34ea3206bb
6
+ metadata.gz: 0cb57146ae144a8b4292a1ac4de928476e3df92997c230471edea4af021d67d4074900202402e45836e4f4e85540a72caf053c0b1230f113e09898131f60a0f5
7
+ data.tar.gz: 96a1ca2a86f51334744e5b6e980f6c814d8b860e38a5b074505cb3c10eee11cf203320d9324b7619f6d5e8ca04400d7fbfab0097df463c75e966d541fba0dda4
@@ -11,16 +11,11 @@ module EasyAdmin
11
11
  def view_template
12
12
  content = lambda do
13
13
  div(class: "w-full") do
14
- # Timeline container with explicit vertical layout
15
- div(class: "relative w-full") do
16
- # Timeline line - centered with icons (hidden on mobile)
17
- div(class: "absolute left-10 top-0 bottom-0 w-0.5 bg-gray-300 hidden sm:block")
18
-
19
- # Version items - force vertical stacking (newest first)
14
+ # Timeline container
15
+ div(class: "space-y-0") do
16
+ # Version items with connected timeline
20
17
  @versions.each_with_index do |version, index|
21
- div(class: "relative w-full mb-6 sm:mb-8") do
22
- render_timeline_item_content(version, index)
23
- end
18
+ render_timeline_item_content(version, index)
24
19
  end
25
20
  end
26
21
  end
@@ -38,15 +33,21 @@ module EasyAdmin
38
33
  private
39
34
 
40
35
  def render_timeline_item_content(version, index)
41
- div(class: "flex items-start") do
42
- # Timeline dot - matches admin panel styling (hidden on mobile)
43
- div(class: "absolute left-8 w-3 h-3 #{event_bg_color(version.event)} rounded-full z-10 shadow-sm hidden sm:block") do
44
- # Simple dot design to match admin panel
36
+ div(class: "flex") do
37
+ # Timeline dot and connector
38
+ div(class: "flex flex-col items-center mr-4 hidden sm:flex") do
39
+ # Timeline dot
40
+ div(class: "w-3 h-3 bg-blue-500 rounded-full border-2 border-white shadow-md") do
41
+ end
42
+ # Connector line (hidden for last item)
43
+ unless index == @versions.size - 1
44
+ div(class: "w-0.5 bg-gray-300 flex-1 min-h-[2rem]")
45
+ end
45
46
  end
46
47
 
47
- # Content card - responsive margin (no left margin on mobile)
48
- div(class: "sm:ml-16 flex-1") do
49
- div(class: "bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden hover:shadow-md transition-shadow duration-200") do
48
+ # Content - flows horizontally from dot
49
+ div(class: "flex-1 pb-6") do
50
+ div(class: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-4") do
50
51
  render_item_header(version)
51
52
  render_item_content(version)
52
53
  render_item_actions(version)
@@ -56,16 +57,16 @@ module EasyAdmin
56
57
  end
57
58
 
58
59
  def render_item_header(version)
59
- # Match admin panel header style (like in BaseCardComponent) with mobile responsiveness
60
- div(class: "px-4 sm:px-6 py-4 border-b border-gray-100 bg-gray-50/50 flex items-center justify-between") do
61
- div(class: "flex items-center space-x-2 sm:space-x-3") do
62
- # Event badge - using admin panel style
63
- span(class: "inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-600") do
60
+ # Compact header with reduced padding
61
+ div(class: "px-3 py-2 border-b border-gray-100 bg-gray-50/50 flex items-center justify-between") do
62
+ div(class: "flex items-center space-x-2") do
63
+ # Event badge - compact version
64
+ span(class: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-600") do
64
65
  version.event.capitalize
65
66
  end
66
67
 
67
- # Time ago
68
- span(class: "text-sm font-medium text-gray-900") do
68
+ # Time ago - smaller text
69
+ span(class: "text-sm text-gray-900") do
69
70
  time_ago_in_words(version.created_at) + " ago"
70
71
  end
71
72
  end
@@ -92,7 +93,7 @@ module EasyAdmin
92
93
 
93
94
  def render_item_content(version)
94
95
  # Match admin panel body padding (like in BaseCardComponent) - responsive padding
95
- div(class: "p-4 sm:p-6") do
96
+ div(class: "p-3") do
96
97
  if version.object.blank?
97
98
  div(class: "text-sm text-gray-500") { "No change data available" }
98
99
  return
@@ -1,3 +1,3 @@
1
1
  module EasyAdmin
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-admin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slaurmagan