solid_litequeen 0.19.3 → 0.20.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.
@@ -1,38 +1,72 @@
1
- <div class="container mx-auto px-4 py-8">
2
-
3
- <h1 class="text-3xl font-bold mb-6">Solid Lite Queen</h1>
1
+ <div class="space-y-8">
2
+ <div class="flex flex-wrap items-end justify-between gap-6">
3
+ <div>
4
+ <h1
5
+ class="
6
+ mt-2 text-3xl font-display font-semibold text-[var(--text)]
7
+ sm:text-4xl
8
+ "
9
+ >
10
+ SQLite Databases
11
+ </h1>
12
+ </div>
13
+
14
+ <div class="surface-panel px-4 py-2 text-sm text-muted">
15
+ <span class="font-semibold text-[var(--text)]">
16
+ <%= available_databases.count %>
17
+ </span>
4
18
 
5
- <div class="mb-6">
6
- <p class="text-base-content/60"><%= pluralize(available_databases.count, "SQLite database") %> found</p>
19
+ <span>
20
+ <%= "database".pluralize(available_databases.count) %> available
21
+ </span>
7
22
  </div>
23
+ </div>
8
24
 
9
- <% if available_databases.any? %>
10
- <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
11
- <% available_databases.each do |db| %>
12
- <a href="<%= database_path(Base64.urlsafe_encode64(db.database)) %>" class="block bg-base-200 border border-base-content/20 rounded-lg shadow-sm hover:shadow-md transition duration-150 overflow-hidden">
13
- <div class="p-5">
14
- <div class="flex items-center justify-between mb-2">
15
- <h2 class="text-lg font-semibold truncate"><%= db.name %></h2>
16
- <span class="badge badge-soft badge-xs badge-info px-2 py-1 text-xs font-medium rounded-full "><%= db.env_name %></span>
17
- </div>
18
- <p class="text-sm text-base-content/60 truncate mb-4"><%= db.database %></p>
19
- <div class="flex justify-end">
20
- <span class="inline-flex items-center text-sm font-medium">
21
- Open
22
- <svg class="w-4 h-4 ml-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
23
- <path fill-rule="evenodd" d="M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd" />
24
- </svg>
25
- </span>
26
- </div>
27
- </div>
28
- </a>
29
- <% end %>
30
- </div>
31
- <% else %>
32
- <div class="bg-gray-50 rounded-lg p-8 text-center">
33
- <p class="text-gray-600">No databases found</p>
34
- </div>
35
- <% end %>
25
+ <% if available_databases.any? %>
26
+ <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
27
+ <% available_databases.each do |db| %>
28
+ <a
29
+ href="<%= database_path(Base64.urlsafe_encode64(db.database)) %>"
30
+ class="
31
+ group surface-card flex h-full flex-col gap-4 p-5 transition
32
+ hover:-translate-y-0.5
33
+ hover:shadow-[0_28px_70px_-45px_var(--shadow-strong)]
34
+ "
35
+ >
36
+ <div class="flex items-start justify-between gap-3">
37
+ <div class="min-w-0">
38
+ <h2 class="text-lg font-semibold text-[var(--text)]">
39
+ <span class="block truncate"><%= db.name %></span>
40
+ </h2>
36
41
 
37
- </div>
42
+ <p class="mt-1 text-sm text-muted">
43
+ <span class="block truncate"><%= db.database %></span>
44
+ </p>
45
+ </div>
46
+
47
+ <span class="slq-chip slq-chip--warm"><%= db.env_name %></span>
48
+ </div>
38
49
 
50
+ <div class="mt-auto flex items-center justify-between text-xs text-faint">
51
+ <span>Open database</span>
52
+
53
+ <span class="inline-flex items-center gap-1 text-[var(--accent)]">
54
+ Explore
55
+ <svg class="h-3.5 w-3.5" viewBox="0 0 20 20" fill="currentColor">
56
+ <path
57
+ fill-rule="evenodd"
58
+ d="M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z"
59
+ clip-rule="evenodd"
60
+ />
61
+ </svg>
62
+ </span>
63
+ </div>
64
+ </a>
65
+ <% end %>
66
+ </div>
67
+ <% else %>
68
+ <div class="surface-soft p-10 text-center">
69
+ <p class="text-sm text-muted">No databases found.</p>
70
+ </div>
71
+ <% end %>
72
+ </div>
@@ -1,52 +1,52 @@
1
- <div class="container mx-auto px-4 py-8">
2
- <h1 class="text-3xl font-bold mb-6 flex gap-1 items-center justify-center">
3
- <%= image_tag "solid_litequeen/icons/database.svg", class: "opacity-60 size-6 dark:filter-white" %>
4
- <span>
5
- <%= @database_location %>
6
- </span>
7
- </h1>
8
-
9
- <div class="mb-6">
10
- <h2 class="text-xl font-semibold">
11
- <span>
12
- Tables
13
- </span>
14
- <% if @table_relations[:tables].any? %>
15
-
16
- <%= render "table-relationships-dialog" %>
17
-
18
- <button title="Relationships" onclick="table_relationships.showModal()" class="hover:cursor-pointer outline-none">
19
- <%= image_tag "solid_litequeen/icons/workflow.svg", class: "size-5 -mb-1 opacity-60 dark:filter-white" %>
20
- </button>
21
-
22
- <% end %>
23
- </h2>
24
- <p class="text-base-content/60"><%= pluralize(@tables.count, "table") %> found</p>
1
+ <div class="space-y-6">
2
+ <div class="flex flex-wrap items-start justify-between gap-6">
3
+ <div class="min-w-0">
4
+ <p class="text-xs uppercase tracking-[0.35em] text-faint">Database</p>
5
+ <h1 class="mt-2 flex items-center gap-2 text-2xl font-display font-semibold text-[var(--text)] sm:text-3xl">
6
+ <%= image_tag "solid_litequeen/icons/database.svg", class: "size-5 icon-muted" %>
7
+ <span class="block truncate"><%= @database_location %></span>
8
+ </h1>
9
+ <p class="mt-2 text-sm text-muted"><%= pluralize(@tables.count, "table") %> found</p>
25
10
  </div>
26
11
 
27
- <div class="bg-base-200 border border-base-content/20 rounded-lg shadow overflow-hidden">
28
- <table class="w-full">
29
- <thead>
30
- <tr class="bg-base-300 border-b border-base-content/20">
31
- <th class="px-6 py-3 text-left text-sm font-medium ">Table Name</th>
32
- <th class="px-6 py-3 text-left text-sm font-medium">Row Count</th>
33
- </tr>
34
- </thead>
35
- <tbody class="">
36
- <% @tables.each do |table| %>
37
- <tr class="hover:bg-base-100 border-b last:border-none border-base-content/10">
38
- <td class="px-6 py-4">
39
- <%= link_to database_table_rows_path(@database_id, table[:name]), class: " font-medium" do %>
40
- <%= table.dig(:name) %>
41
- <% end %>
42
- </td>
43
- <td class="px-6 py-4 text-base-content/60">
44
- <%= pluralize(table.dig(:row_count), "Row") %>
45
- </td>
46
- </tr>
47
- <% end %>
48
- </tbody>
49
- </table>
12
+ <div class="flex flex-wrap items-center gap-3">
13
+ <% if @table_relations[:tables].any? %>
14
+ <%= render "table-relationships-dialog" %>
15
+ <button
16
+ title="Relationships"
17
+ onclick="table_relationships.showModal()"
18
+ class="inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-sm font-medium text-[var(--text)] shadow-sm transition hover:-translate-y-0.5 hover:shadow-md"
19
+ >
20
+ <%= image_tag "solid_litequeen/icons/workflow.svg", class: "size-4 icon-muted" %>
21
+ Relationships
22
+ </button>
23
+ <% end %>
24
+ <%= link_to "Download", database_download_path(@database_id), class: "inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-sm font-medium text-[var(--accent)] shadow-sm transition hover:-translate-y-0.5 hover:shadow-md" %>
50
25
  </div>
51
- <%= link_to "Download Database", database_download_path(@database_id), class: "link link-hover link-info text-xs mt-5" %>
52
- </div>
26
+ </div>
27
+
28
+ <div class="surface-card overflow-hidden">
29
+ <table class="w-full text-sm">
30
+ <thead class="bg-[var(--surface-strong)] text-xs uppercase tracking-[0.2em] text-faint">
31
+ <tr>
32
+ <th class="px-6 py-3 text-left">Table Name</th>
33
+ <th class="px-6 py-3 text-left">Row Count</th>
34
+ </tr>
35
+ </thead>
36
+ <tbody class="divide-y divide-[var(--border)]">
37
+ <% @tables.each do |table| %>
38
+ <tr class="transition hover:bg-[var(--surface-muted)]">
39
+ <td class="px-6 py-4">
40
+ <%= link_to database_table_rows_path(@database_id, table[:name]), class: "font-medium text-[var(--text)] hover:text-[var(--accent)]" do %>
41
+ <%= table.dig(:name) %>
42
+ <% end %>
43
+ </td>
44
+ <td class="px-6 py-4 text-muted">
45
+ <%= pluralize(table.dig(:row_count), "row") %>
46
+ </td>
47
+ </tr>
48
+ <% end %>
49
+ </tbody>
50
+ </table>
51
+ </div>
52
+ </div>