tybo 0.0.29 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/devise/form_component.html.erb +13 -0
- data/app/components/devise/form_component.rb +8 -0
- data/app/views/devise/passwords/edit.html.erb +17 -33
- data/app/views/devise/passwords/new.html.erb +13 -30
- data/app/views/devise/sessions/new.html.erb +30 -44
- data/lib/generators/bo/bo_generator.rb +2 -2
- data/lib/generators/bo/templates/_table.html.erb +1 -1
- data/lib/generators/bo/templates/namespace_policy.rb +2 -0
- data/lib/generators/bo/templates/policy.rb +2 -0
- data/lib/tybo/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ac439377b1ab67c01d268ccf0f990c2a14346ec8ff76d6bdc5edd0aab15f60c
|
4
|
+
data.tar.gz: f64462c5493126d3eec82f0b3644d1ffa7462d29fdc30ef56098df2622976749
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dbddf0cf8650483c3d19e1dcd0259545b8fc3e265455c440ad5f02be4649db7a74e6e51df6007e40c0376aed1ed01aa2d2cbdd834c84d7b88931538a3f578f8
|
7
|
+
data.tar.gz: fae3b6eaf3afd0e1fd56fa55f83c905f7e18ea458ade1892ba8f351426fc2d2de61bb6267ca1d847e0ac905ed114a14aa5108ec1883177e36f2a368b4708b3bf
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="flex flex-1 flex-col justify-center py-12 px-4 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
2
|
+
<div class="mx-auto w-full max-w-sm lg:w-96">
|
3
|
+
<%= render('layouts/flash') %>
|
4
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
|
5
|
+
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900"><%= @title %></h2>
|
6
|
+
<div class="mt-8">
|
7
|
+
<div class="mt-6">
|
8
|
+
<%= content %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<%= render(CoverComponent.new) %>
|
@@ -1,34 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
required: true,
|
17
|
-
autofocus: true,
|
18
|
-
hint: ("#{@minimum_password_length} caractères minimum" if @minimum_password_length),
|
19
|
-
class: 'block text-sm font-medium text-gray-700' %>
|
20
|
-
<%= f.input :password_confirmation,
|
21
|
-
label: 'Confirmez votre mot de passe',
|
22
|
-
required: true,
|
23
|
-
class: 'block text-sm font-medium text-gray-700' %>
|
24
|
-
</div>
|
25
|
-
<div class="mt-5">
|
26
|
-
<%= f.button :submit, "Sauvegarder", class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2", data: { turbo: false } %>
|
27
|
-
</div>
|
28
|
-
<% end %>
|
29
|
-
</div>
|
30
|
-
</div>
|
1
|
+
<%= render(Devise::FormComponent.new(title: I18n.t("bo.devise.password.new") )) do %>
|
2
|
+
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
3
|
+
<%= f.input :reset_password_token, as: :hidden %>
|
4
|
+
<%= f.input :password,
|
5
|
+
label: 'Mot de passe',
|
6
|
+
required: true,
|
7
|
+
autofocus: true,
|
8
|
+
hint: ("#{@minimum_password_length} caractères minimum" if @minimum_password_length),
|
9
|
+
class: 'block text-sm font-medium text-gray-700' %>
|
10
|
+
<%= f.input :password_confirmation,
|
11
|
+
label: 'Confirmez votre mot de passe',
|
12
|
+
required: true,
|
13
|
+
class: 'block text-sm font-medium text-gray-700' %>
|
14
|
+
<div class="mt-5">
|
15
|
+
<%= f.button :submit, "Sauvegarder", class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2", data: { turbo: false } %>
|
31
16
|
</div>
|
32
|
-
|
33
|
-
|
34
|
-
</div>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
@@ -1,32 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<div
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<div class="mt-8">
|
11
|
-
<div class="mt-6">
|
12
|
-
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
13
|
-
<div>
|
14
|
-
<%= f.input :email,
|
15
|
-
required: false,
|
16
|
-
autofocus: true,
|
17
|
-
input_html: { autocomplete: "email" },
|
18
|
-
class: 'block text-sm font-medium text-gray-700' %>
|
19
|
-
</div>
|
1
|
+
<%= render(Devise::FormComponent.new(title: I18n.t("bo.devise.forgot_password") )) do %>
|
2
|
+
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
3
|
+
<div>
|
4
|
+
<%= f.input :email,
|
5
|
+
required: false,
|
6
|
+
autofocus: true,
|
7
|
+
input_html: { autocomplete: "email" },
|
8
|
+
class: 'block text-sm font-medium text-gray-700' %>
|
9
|
+
</div>
|
20
10
|
|
21
|
-
|
22
|
-
|
23
|
-
<%= f.button :submit, I18n.t("devise.passwords.new.send_me_reset_password_instructions"), class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2", data: { turbo: false } %>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
<%= render "devise/shared/links" %>
|
11
|
+
<div class="mt-5">
|
12
|
+
<%= f.button :submit, I18n.t("devise.passwords.new.send_me_reset_password_instructions"), class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2", data: { turbo: false } %>
|
29
13
|
</div>
|
30
|
-
|
31
|
-
|
32
|
-
</div>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
@@ -1,49 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<div
|
4
|
-
<%=
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: 'space-y-6'}) do |f| %>
|
11
|
-
<div>
|
12
|
-
<%= f.input :email,
|
13
|
-
required: false,
|
14
|
-
autofocus: true,
|
15
|
-
input_html: { autocomplete: "email" },
|
16
|
-
class: 'block text-sm font-medium text-gray-700' %>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="space-y-1">
|
20
|
-
<%= f.input :password,
|
21
|
-
required: false,
|
22
|
-
input_html: { autocomplete: "current-password" },
|
23
|
-
class: 'block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-tybo-500 focus:outline-none focus:ring-tybo-500 sm:text-sm' %>
|
24
|
-
</div>
|
25
|
-
</div>
|
1
|
+
<%= render(Devise::FormComponent.new(title: I18n.t("bo.devise.sign_in_as.#{resource_name}") )) do %>
|
2
|
+
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: 'space-y-6'}) do |f| %>
|
3
|
+
<div>
|
4
|
+
<%= f.input :email,
|
5
|
+
required: false,
|
6
|
+
autofocus: true,
|
7
|
+
input_html: { autocomplete: "email" },
|
8
|
+
class: 'block text-sm font-medium text-gray-700' %>
|
9
|
+
</div>
|
26
10
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
11
|
+
<div class="space-y-1">
|
12
|
+
<%= f.input :password,
|
13
|
+
required: false,
|
14
|
+
input_html: { autocomplete: "current-password" },
|
15
|
+
class: 'block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-tybo-500 focus:outline-none focus:ring-tybo-500 sm:text-sm' %>
|
16
|
+
</div>
|
32
17
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</div>
|
18
|
+
<div class="flex items-center justify-between">
|
19
|
+
<div class="flex items-center">
|
20
|
+
<input id="remember_me" name="remember_me" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-tybo-600 focus:ring-tybo-500">
|
21
|
+
<label for="remember_me" class="ml-2 block text-sm text-gray-900"><%=I18n.t("activerecord.attributes.user.remember_me")%></label>
|
22
|
+
</div>
|
39
23
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
</div>
|
24
|
+
<div class="text-sm">
|
25
|
+
<a href="<%= new_password_path(resource)%>" class="font-medium text-tybo-600 hover:text-tybo-500", data-turbo='false' >
|
26
|
+
<%=I18n.t("devise.passwords.new.forgot_your_password")%>
|
27
|
+
</a>
|
45
28
|
</div>
|
46
29
|
</div>
|
47
|
-
|
48
|
-
|
49
|
-
|
30
|
+
|
31
|
+
<div class="mt-5">
|
32
|
+
<%= f.button :submit, I18n.t("devise.sessions.new.sign_in"), class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2", data: { turbo: false } %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
@@ -20,7 +20,7 @@ class BoGenerator < Rails::Generators::NamedBase
|
|
20
20
|
template 'show.html.erb', File.join("app/views/#{options[:namespace]}", "#{plural_name}/show.html.erb")
|
21
21
|
template 'controller.rb', File.join("app/controllers/#{options[:namespace]}", "#{plural_name}_controller.rb")
|
22
22
|
template 'policy.rb', File.join("app/policies/bo/#{options[:namespace]}", "#{file_name.underscore}_policy.rb")
|
23
|
-
unless File.exists?("app/policies/bo/#{options[:namespace]}.rb")
|
23
|
+
unless File.exists?("app/policies/bo/#{options[:namespace]}_policy.rb")
|
24
24
|
template 'namespace_policy.rb', "app/policies/bo/#{options[:namespace]}_policy.rb"
|
25
25
|
end
|
26
26
|
create_translations
|
@@ -64,7 +64,7 @@ class BoGenerator < Rails::Generators::NamedBase
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def excluded_columns
|
67
|
-
%i[id created_at updated_at]
|
67
|
+
%i[id created_at updated_at encrypted_password]
|
68
68
|
end
|
69
69
|
|
70
70
|
def permited_params
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%%= tr.with_td do %>
|
20
20
|
<%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>,
|
21
21
|
class: "text-tybo-600 hover:text-tybo-900",
|
22
|
-
data: {turbo_method: :delete, turbo_confirm: "êtes
|
22
|
+
data: {turbo_method: :delete, turbo_confirm: "êtes-vous sûr ?"} do %>
|
23
23
|
<%%= render(Icons::TrashComponent.new) %>
|
24
24
|
<%% end %>
|
25
25
|
<%% end %>
|
data/lib/tybo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Delpierre
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -139,6 +139,8 @@ files:
|
|
139
139
|
- app/components/cover_component.rb
|
140
140
|
- app/components/current_user_mini_card_component.html.erb
|
141
141
|
- app/components/current_user_mini_card_component.rb
|
142
|
+
- app/components/devise/form_component.html.erb
|
143
|
+
- app/components/devise/form_component.rb
|
142
144
|
- app/components/form_component.html.erb
|
143
145
|
- app/components/form_component.rb
|
144
146
|
- app/components/forms/breadcrumb_component.html.erb
|