tybo 0.3.26 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/current_user_mini_card_component.html.erb +2 -2
- data/app/components/icons/categories_component.html.erb +1 -1
- data/app/components/icons/collection_component.html.erb +1 -1
- data/app/components/icons/dashboard_component.html.erb +1 -2
- data/app/components/icons/drag_and_drop_component.html.erb +1 -1
- data/app/components/icons/home_component.html.erb +1 -2
- data/app/components/icons/mic_component.html.erb +1 -1
- data/app/components/icons/news_paper_component.html.erb +1 -1
- data/app/components/icons/office_building_component.html.erb +1 -1
- data/app/components/icons/question_mark_circle_component.html.erb +1 -1
- data/app/components/icons/users_component.html.erb +1 -1
- data/app/components/icons/users_two_component.html.erb +1 -1
- data/app/components/sidebar_component.html.erb +68 -18
- data/app/components/sidebar_item_component.html.erb +2 -3
- data/app/components/sign_out_button_component.html.erb +3 -3
- data/app/views/login/home.html.erb +2 -2
- data/config/initializers/ransack.rb +3 -3
- data/lib/generators/bo_namespace/templates/admin.html.erb +5 -6
- data/lib/generators/bo_namespace/templates/admin_controller.rb +19 -4
- data/lib/generators/tybo_install/templates/tailwind.config.js +18 -12
- data/lib/generators/tybo_install/tybo_install_generator.rb +3 -4
- data/lib/tybo/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ce3d25216a414e0297531f8df01f18a84a85fa6524a0afe9870593638bd8a8
|
4
|
+
data.tar.gz: 790ae5fab45c4ebc681f5bcfb098b5f0fcf729792198a8f7d1e24f9f6aefc1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc06cdbe9bd43d986aae83338f864c83f82ebfd6e5b6623ab6d019474119b00ced0e4a93b1d7f0a40da2827293b977cc42db3e7cdc6da2f817fe7b7026e4e0ca
|
7
|
+
data.tar.gz: 396dc2d7a54ae8eb1dd7dd7b881b02d47131b7ec7bf4fc697da18f12c9a8131455fdda83e1a2455c6872f8da74ce3b6a3076d6a69b1a34f0560b5b4ee0e17804
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<div class="flex-shrink-0
|
1
|
+
<div class="flex items-center justify-between flex-shrink-0 p-4 text-white border-t border-tybo-400 ">
|
2
2
|
<div class="flex items-center">
|
3
|
-
<p class="
|
3
|
+
<p class="ml-3">
|
4
4
|
<%= @user.email.truncate(27) %>
|
5
5
|
</p>
|
6
6
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 text-white h-6 w-6 text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
1
|
+
<svg class="mr-3 flex-shrink-0 text-white h-6 w-6 text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
3
3
|
</svg>
|
@@ -1,5 +1,4 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z" />
|
3
3
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z" />
|
4
4
|
</svg>
|
5
|
-
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="w-4 h-4 cursor-grabbing <%= @text_color %>">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 5.25h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5" />
|
3
3
|
</svg>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
1
|
+
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
|
3
3
|
</svg>
|
4
|
-
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="
|
1
|
+
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
1
|
+
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="w-6 h-6">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
1
|
+
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
1
|
+
<svg class="mr-3 flex-shrink-0 h-6 w-6 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="
|
1
|
+
<svg class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/>
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
|
3
3
|
</svg>
|
@@ -1,23 +1,73 @@
|
|
1
|
-
<div
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div data-controller="sidebar">
|
2
|
+
<!-- Barre de navigation mobile avec bouton d'ouverture du menu -->
|
3
|
+
<div class="sticky top-0 z-40 flex items-center h-16 px-4 border-b border-gray-200 shadow-sm bg-tybo lg:hidden shrink-0 gap-x-4 sm:gap-x-6 sm:px-6 lg:px-8">
|
4
|
+
<button type="button" class="-m-2.5 p-2.5 text-white lg:hidden" data-action="click->sidebar#toggle">
|
5
|
+
<span class="sr-only">Open sidebar</span>
|
6
|
+
<svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
7
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
|
8
|
+
</svg>
|
9
|
+
</button>
|
10
|
+
</div>
|
11
|
+
<!-- Sidebar mobile avec bouton de fermeture -->
|
12
|
+
<div class="fixed inset-0 z-50 transition-transform duration-300 ease-in-out transform -translate-x-full" data-sidebar-target="sidebar">
|
13
|
+
<div class="fixed inset-0 bg-gray-900/80 " aria-hidden="true" data-sidebar-target="bg"></div>
|
14
|
+
<div class="fixed inset-0 flex">
|
15
|
+
<div class="relative flex flex-1 w-full max-w-xs mr-16">
|
16
|
+
<div class="absolute top-0 flex justify-center w-16 pt-5 left-full">
|
17
|
+
<button type="button" class="-m-2.5 p-2.5" data-action="click->sidebar#close">
|
18
|
+
<span class="sr-only">Close sidebar</span>
|
19
|
+
<svg class="w-6 h-6 text-white" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" aria-hidden="true">
|
20
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
21
|
+
</svg>
|
22
|
+
</button>
|
23
|
+
</div>
|
24
|
+
<!-- Contenu de la sidebar -->
|
25
|
+
<div class="flex flex-col px-6 pb-4 overflow-y-auto bg-tybo-600 grow gap-y-5">
|
26
|
+
<div class="flex items-center h-16 shrink-0">
|
27
|
+
<%= image_tag(Tybo.configuration.nav_logo_url, alt: "logo", class: 'w-auto h-15 mt-5') %>
|
28
|
+
</div>
|
29
|
+
<nav class="flex flex-col flex-1">
|
30
|
+
<ul role="list" class="flex flex-col flex-1 gap-y-7">
|
31
|
+
<li>
|
32
|
+
<ul role="list" class="-mx-2 space-y-1">
|
33
|
+
<% items.each do |item| %>
|
34
|
+
<%= item %>
|
35
|
+
<% end %>
|
36
|
+
</ul>
|
37
|
+
</li>
|
38
|
+
<li class="mt-auto">
|
39
|
+
<% if current_user_card? %>
|
40
|
+
<%= current_user_card %>
|
41
|
+
<% end %>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
</nav>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<!-- Static sidebar pour desktop -->
|
50
|
+
<div class="sm:hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
|
51
|
+
<div class="flex flex-col px-6 pb-4 overflow-y-auto bg-tybo-600 grow gap-y-5">
|
52
|
+
<div class="flex items-center h-16 shrink-0">
|
53
|
+
<%= image_tag(Tybo.configuration.nav_logo_url, alt: "logo", class: 'w-auto h-15 mt-5') %>
|
6
54
|
</div>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
55
|
+
<nav class="flex flex-col flex-1">
|
56
|
+
<ul role="list" class="flex flex-col flex-1 gap-y-7">
|
57
|
+
<li>
|
58
|
+
<ul role="list" class="-mx-2 space-y-1">
|
59
|
+
<% items.each do |item| %>
|
60
|
+
<%= item %>
|
61
|
+
<% end %>
|
62
|
+
</ul>
|
63
|
+
</li>
|
64
|
+
<li class="mt-auto">
|
65
|
+
<% if current_user_card? %>
|
66
|
+
<%= current_user_card %>
|
67
|
+
<% end %>
|
68
|
+
</li>
|
69
|
+
</ul>
|
14
70
|
</nav>
|
15
|
-
|
16
71
|
</div>
|
17
|
-
|
18
|
-
<% if current_user_card? %>
|
19
|
-
<%= current_user_card %>
|
20
|
-
<% end %>
|
21
|
-
|
22
72
|
</div>
|
23
73
|
</div>
|
@@ -1,7 +1,6 @@
|
|
1
|
-
<%= link_to @path, class: "#{current_page?(@path) ? 'bg-tybo-800 text-white hover:bg-tybo-800' : ''}
|
1
|
+
<%= link_to @path, class: "#{current_page?(@path) ? 'bg-tybo-800 text-white hover:bg-tybo-800 font-semibold' : ''} flex p-2 my-1 text-sm leading-6 rounded-md group gap-x-3 hover:bg-tybo-700 hover:text-white text-indigo-200" do %>
|
2
2
|
<%= render(@icon.new) %>
|
3
|
-
|
4
|
-
<span class="flex-1 text-white">
|
3
|
+
<span class="flex-1">
|
5
4
|
<%= @label %>
|
6
5
|
</span>
|
7
6
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%= button_to send("destroy_#{@resource}_session_path"), class:"flex items-center", method: :delete do %>
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
3
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="
|
1
|
+
<%= button_to send("destroy_#{@resource}_session_path"), class:"flex items-center ", method: :delete do %>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="white" class="flex-shrink-0 w-6 h-6 mr-3 font-bold text-gray-200 hover:stroke-white">
|
3
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M5.636 5.636a9 9 0 1 0 12.728 0M12 3v9" />
|
4
4
|
</svg>
|
5
5
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
|
-
<div class="flex flex-
|
3
|
-
<div class="
|
2
|
+
<div class="flex flex-col justify-center flex-1 px-4 py-12 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
3
|
+
<div class="w-full max-w-sm mx-auto lg:w-96">
|
4
4
|
<div>
|
5
5
|
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto' %>
|
6
6
|
</div>
|
@@ -12,13 +12,13 @@ Ransack.configure do |config|
|
|
12
12
|
type: :date
|
13
13
|
|
14
14
|
config.custom_arrows = {
|
15
|
-
default_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
15
|
+
default_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="inline-block w-4 h-4 align-middle">
|
16
16
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" />
|
17
17
|
</svg>',
|
18
|
-
up_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
18
|
+
up_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="inline-block w-4 h-4 align-middle">
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" />
|
20
20
|
</svg>',
|
21
|
-
down_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1
|
21
|
+
down_arrow: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="inline-block w-4 h-4 align-middle">
|
22
22
|
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
|
23
23
|
</svg>'
|
24
24
|
}
|
@@ -10,15 +10,14 @@
|
|
10
10
|
<%%= javascript_importmap_tags %>
|
11
11
|
<%%= hotwire_livereload_tags if Rails.env.development? %>
|
12
12
|
</head>
|
13
|
-
|
14
13
|
<body class="h-full bg-home">
|
15
14
|
<%% if <%= class_name.underscore %>_signed_in? %>
|
16
|
-
|
15
|
+
<%%= render('<%= class_name.underscore.pluralize %>/layouts/side_bar') %>
|
17
16
|
<%% end %>
|
18
|
-
<div class="
|
19
|
-
<main>
|
20
|
-
<div class="
|
21
|
-
|
17
|
+
<div class="lg:pl-72">
|
18
|
+
<main class="py-10">
|
19
|
+
<div class="px-4 sm:px-6 lg:px-8">
|
20
|
+
<%%= render('layouts/flash') %>
|
22
21
|
<%%= yield %>
|
23
22
|
</div>
|
24
23
|
</main>
|
@@ -3,13 +3,28 @@ require 'csv'
|
|
3
3
|
|
4
4
|
class <%= class_name %>Controller < ApplicationController
|
5
5
|
include Pagy::Backend
|
6
|
-
layout '
|
7
|
-
before_action :
|
8
|
-
authorize :user, through: :
|
6
|
+
layout 'administrator'
|
7
|
+
before_action :authenticate_administrator!, :set_default_locale
|
8
|
+
authorize :user, through: :current_administrator
|
9
9
|
|
10
10
|
private
|
11
11
|
|
12
12
|
def namespace
|
13
|
-
@namespace ||= Bo
|
13
|
+
@namespace ||= Bo::Administrators
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_default_locale
|
17
|
+
I18n.default_locale = :fr
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
# Devise routing overwrite for multiples resources
|
23
|
+
def after_sign_in_path_for(resource)
|
24
|
+
send(:"#{resource.class.name.underscore.pluralize}_root_path")
|
25
|
+
end
|
26
|
+
|
27
|
+
def after_sign_out_path_for(resource)
|
28
|
+
send(:"new_#{resource}_session_path")
|
14
29
|
end
|
15
30
|
end
|
@@ -16,20 +16,26 @@ module.exports = {
|
|
16
16
|
fontFamily: {
|
17
17
|
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
18
18
|
},
|
19
|
+
screens: {
|
20
|
+
sm: '0px',
|
21
|
+
md: '768px',
|
22
|
+
lg: '976px',
|
23
|
+
xl: '1440px',
|
24
|
+
},
|
19
25
|
colors: {
|
20
26
|
tybo: {
|
21
|
-
DEFAULT: '#
|
22
|
-
'50': '#
|
23
|
-
'100': '#
|
24
|
-
'200': '#
|
25
|
-
'300': '#
|
26
|
-
'400': '#
|
27
|
-
'500': '#
|
28
|
-
'600': '#
|
29
|
-
'700': '#
|
30
|
-
'800': '#
|
31
|
-
'900': '#
|
32
|
-
'950': '#
|
27
|
+
DEFAULT: '#581c87',
|
28
|
+
'50': '#fbf5ff',
|
29
|
+
'100': '#f5e8ff',
|
30
|
+
'200': '#edd5ff',
|
31
|
+
'300': '#ddb4fe',
|
32
|
+
'400': '#c784fc',
|
33
|
+
'500': '#b055f7',
|
34
|
+
'600': '#9a33ea',
|
35
|
+
'700': '#8222ce',
|
36
|
+
'800': '#6d21a8',
|
37
|
+
'900': '#581c87',
|
38
|
+
'950': '#3b0764',
|
33
39
|
},
|
34
40
|
'red-alert': {
|
35
41
|
DEFAULT: '#d0342c',
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class TyboInstallGenerator < Rails::Generators::Base
|
4
4
|
source_root File.expand_path("templates", __dir__)
|
5
5
|
require_relative "./utils/translations.rb"
|
6
|
-
|
6
|
+
|
7
7
|
def install_dependencies
|
8
8
|
run './bin/bundle add tailwindcss-rails' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'tailwindcss-rails' }
|
9
9
|
gem 'simple_form' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'simple_form' }
|
@@ -37,11 +37,11 @@ class TyboInstallGenerator < Rails::Generators::Base
|
|
37
37
|
|
38
38
|
def add_javascript_controllers
|
39
39
|
inject_into_file 'app/javascript/controllers/application.js', after: "const application = Application.start()\n" do
|
40
|
-
"import { Dropdown, Flash, SearchForm, TsSearch, TsSelect } from \"@tymate/tybo_js\"\n"
|
40
|
+
"import { Dropdown, Flash, SearchForm, TsSearch, TsSelect, Sidebar } from \"@tymate/tybo_js\"\n"
|
41
41
|
end
|
42
42
|
|
43
43
|
inject_into_file 'app/javascript/controllers/application.js', before: "export { application }" do
|
44
|
-
"application.register('dropdown', Dropdown)\napplication.register('flash', Flash)\napplication.register('search-form', SearchForm)\napplication.register('ts--search', TsSearch)\napplication.register('ts--select', TsSelect)\n"
|
44
|
+
"application.register('dropdown', Dropdown)\napplication.register('flash', Flash)\napplication.register('search-form', SearchForm)\napplication.register('ts--search', TsSearch)\napplication.register('ts--select', TsSelect)\napplication.register('sidebar', Sidebar)\n"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -55,4 +55,3 @@ class TyboInstallGenerator < Rails::Generators::Base
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
58
|
-
|
data/lib/tybo/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Delpierre
|
8
8
|
- Julien Camblan
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: 4.9.3
|
110
110
|
description: Custom admin engine for Ruby on Rails working with generators
|
111
111
|
email:
|
112
|
-
-
|
112
|
+
- michel@tymate.com
|
113
113
|
executables: []
|
114
114
|
extensions: []
|
115
115
|
extra_rdoc_files: []
|
@@ -285,7 +285,7 @@ licenses:
|
|
285
285
|
- MIT
|
286
286
|
metadata:
|
287
287
|
homepage_uri: https://rubygems.org/gems/tybo
|
288
|
-
post_install_message:
|
288
|
+
post_install_message:
|
289
289
|
rdoc_options: []
|
290
290
|
require_paths:
|
291
291
|
- lib
|
@@ -300,8 +300,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
300
|
- !ruby/object:Gem::Version
|
301
301
|
version: '0'
|
302
302
|
requirements: []
|
303
|
-
rubygems_version: 3.
|
304
|
-
signing_key:
|
303
|
+
rubygems_version: 3.0.3.1
|
304
|
+
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: A tailwind custom admin engine for Ruby on Rails
|
307
307
|
test_files: []
|