solid_litequeen 0.4.1 → 0.4.3

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: e01c50189f072e4218b7110121404d2390a4e32bb27e356e1e6469e2c677f102
4
- data.tar.gz: 9bcc809e2cc9ba85fc465ede0eda358f6b388526f93e9559612136562800911f
3
+ metadata.gz: d1c6bcc2a70af068acb685dab8e79b066d64b01b9f7e54bab03f1795be655d07
4
+ data.tar.gz: d9d685c019cfa91e2e2f588938064c64e4b76024c23f020d03e0f8e17e1c0cd3
5
5
  SHA512:
6
- metadata.gz: f627b89669d8e1716a1edb310f17e4d6ab62437e2f46aaae7169bbba32c1f2df26b8e95f76be3019398d796ad88d4c42ddf13029502be9b98c6a3dd5f5a72c19
7
- data.tar.gz: 16aa7a84df47be755818485e94c2d8f9429310e9099f9fa9e2309b9579174ab8132b7cba677e17fb469d83cb8d38388c94befb2e0558f3652005a8d0bfe36314
6
+ metadata.gz: fd19e4e09f35d7d47c2746827208e35bf63491bf459a3aa53f0505efa3c1053c4645f28db3cb4c668f992b6e77528b624ce30bc9474ec02bba1aebcb642ae48f
7
+ data.tar.gz: 62c69b58509289ba6d2aa9b5634d71338cb24f1ed07abb1381ccc962465cdc7186a137cad159a3a415bcff487fad69c7d9bb7cc13e821daeddcdc0a6c60a0df5
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left"><path d="m15 18-6-6 6-6"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right"><path d="m9 18 6-6-6-6"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg>
@@ -39,7 +39,7 @@ module SolidLitequeen
39
39
  database: @database_location
40
40
  )
41
41
 
42
- @data = DynamicDatabase.connection.select_all("SELECT * FROM #{@table_name} LIMIT 100")
42
+ @data = DynamicDatabase.connection.select_all("SELECT * FROM #{@table_name} LIMIT 50")
43
43
  end
44
44
  end
45
45
  end
@@ -7,7 +7,7 @@
7
7
 
8
8
  <%= yield :head %>
9
9
 
10
- <%= stylesheet_link_tag "solid_litequeen/application", media: "all" %>
10
+ <%= stylesheet_link_tag "solid_litequeen/application", media: "all" %>
11
11
  <script src="https://unpkg.com/@tailwindcss/browser@4"></script>
12
12
  <style type="text/tailwindcss">
13
13
 
@@ -1,5 +1,10 @@
1
1
  <div class="container mx-auto px-4 py-8">
2
- <h1 class="text-3xl font-bold text-gray-900 mb-6">Database: <%= @database_location %></h1>
2
+ <h1 class="text-3xl font-bold text-gray-900 mb-6 flex gap-1 items-center justify-center">
3
+ <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6" %>
4
+ <span>
5
+ <%= @database_location %>
6
+ </span>
7
+ </h1>
3
8
 
4
9
  <div class="mb-6">
5
10
  <h2 class="text-xl font-semibold text-gray-800">Tables</h2>
@@ -1,28 +1,40 @@
1
1
  <div class="container mx-auto px-4 py-8">
2
- <h1 class="text-3xl font-bold text-gray-900 mb-6">Database: <%= @database_location %> - Table: <%= @table_name %></h1>
2
+ <h1 class="text-3xl font-bold text-gray-900 mb-6 flex gap-1 items-center justify-center">
3
+ <%= link_to database_path(params[:database_id]) do %>
4
+ <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6" %>
5
+ <% end %>
6
+
7
+ <%= image_tag "solid_litequeen/icons/chevron-right.svg", class: "size-6" %>
8
+
9
+ <span>
10
+ <%= @table_name %>
11
+ </span>
12
+ </h1>
3
13
 
4
14
  <div class="mb-6">
5
15
  <p class="text-gray-600"><%= pluralize(@data.rows.count, "row") %> found</p>
6
16
  </div>
7
17
 
8
- <div class="bg-white rounded-lg shadow overflow-hidden">
9
- <table class="w-full">
10
- <thead>
11
- <tr class="bg-gray-100 border-b border-gray-200">
12
- <% @data.columns.each do |column| %>
13
- <th class="px-6 py-3 text-left text-sm font-medium text-gray-700"><%= column %></th>
14
- <% end %>
15
- </tr>
16
- </thead>
17
- <tbody class="divide-y divide-gray-200">
18
- <% @data.rows.each do |row| %>
19
- <tr class="hover:bg-gray-50">
20
- <% row.each do |item| %>
21
- <td class="px-6 py-4 text-sm text-gray-800"><%= item %></td>
18
+ <div class="bg-white rounded-lg shadow overflow-x-auto">
19
+ <div class="min-w-full inline-block align-middle">
20
+ <table class="min-w-full">
21
+ <thead>
22
+ <tr class="bg-gray-100 border-b border-gray-200">
23
+ <% @data.columns.each do |column| %>
24
+ <th class="px-6 py-3 text-left text-sm font-medium text-gray-700 whitespace-nowrap"><%= column %></th>
22
25
  <% end %>
23
26
  </tr>
24
- <% end %>
25
- </tbody>
26
- </table>
27
+ </thead>
28
+ <tbody class="divide-y divide-gray-200">
29
+ <% @data.rows.each do |row| %>
30
+ <tr class="hover:bg-gray-50">
31
+ <% row.each do |item| %>
32
+ <td class="px-6 py-4 text-sm text-gray-800 whitespace-nowrap"><%= item %></td>
33
+ <% end %>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
38
+ </div>
27
39
  </div>
28
40
  </div>
data/config/routes.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  SolidLitequeen::Engine.routes.draw do
2
2
  resources :databases, only: [ :index, :show ] do
3
- get ":table", to: "databases#table_rows", as: :table_rows
3
+ get "/tables/:table", to: "databases#table_rows", as: :table_rows
4
4
  end
5
5
  root to: "databases#index"
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module SolidLitequeen
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_litequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vik Borges
@@ -147,6 +147,9 @@ files:
147
147
  - MIT-LICENSE
148
148
  - README.md
149
149
  - Rakefile
150
+ - app/assets/images/solid_litequeen/icons/chevron-left.svg
151
+ - app/assets/images/solid_litequeen/icons/chevron-right.svg
152
+ - app/assets/images/solid_litequeen/icons/database.svg
150
153
  - app/assets/stylesheets/solid_litequeen/application.css
151
154
  - app/controllers/solid_litequeen/application_controller.rb
152
155
  - app/controllers/solid_litequeen/databases_controller.rb