tybo 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba87b228afc0fbf8d86b0e7a131014e3b3ea48dc2371b1683370a84abfc325b0
4
- data.tar.gz: e74cb37337e05ec1cb5ab8b2c58b68aa481c351c639c5ef2bcb547e5308fafd8
3
+ metadata.gz: 6ac439377b1ab67c01d268ccf0f990c2a14346ec8ff76d6bdc5edd0aab15f60c
4
+ data.tar.gz: f64462c5493126d3eec82f0b3644d1ffa7462d29fdc30ef56098df2622976749
5
5
  SHA512:
6
- metadata.gz: ebe56be83770dc24bc3a86df204b1706b8c877f35b9c75730400976381dc57d92e84d2c39080076099db1b06f3cc90c5cb6c896b7d243e7bed9d89b5f9d4b347
7
- data.tar.gz: 5deda09e96c218454755eb4b9bfa0b8cb151fdf32b4f54dcf39f1a961d2e7700d2564ee57ef20aa4e389f2eadcfc5e385aab61e2252b3fba37c810b83a91f592
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) %>
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ module Devise
3
+ class FormComponent < ViewComponent::Base
4
+ def initialize(title:)
5
+ @title = title
6
+ end
7
+ end
8
+ end
@@ -1,34 +1,18 @@
1
- <div class="flex min-h-full">
2
- <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">
3
- <div class="mx-auto w-full max-w-sm lg:w-96">
4
- <div>
5
- <%= render('layouts/flash') %>
6
- <%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
7
- <h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Créer un nouveau mot de passe</h2>
8
- </div>
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: :put }) do |f| %>
13
- <%= f.input :reset_password_token, as: :hidden %>
14
- <%= f.input :password,
15
- label: 'Mot de passe',
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
- </div>
33
- <%= render(CoverComponent.new) %>
34
- </div>
17
+ <% end %>
18
+ <% end %>
@@ -1,32 +1,15 @@
1
- <div class="flex min-h-full">
2
- <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">
3
- <div class="mx-auto w-full max-w-sm lg:w-96">
4
- <div>
5
- <%= render('layouts/flash') %>
6
- <%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
7
- <h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Forgot your password?</h2>
8
- </div>
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
- </div>
22
- <div class="mt-5">
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
- </div>
31
- <%= render(CoverComponent.new) %>
32
- </div>
14
+ <% end %>
15
+ <% end %>
@@ -1,49 +1,35 @@
1
- <div class="flex min-h-full">
2
- <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">
3
- <div class="mx-auto w-full max-w-sm lg:w-96">
4
- <%= render('layouts/flash') %>
5
- <%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
6
- <h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900"><%=I18n.t("bo.devise.sign_in_as.#{resource_name}")%></h2>
7
- </div>
8
- <div class="mt-8">
9
- <div class="mt-6">
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
- <div class="flex items-center justify-between">
28
- <div class="flex items-center">
29
- <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">
30
- <label for="remember_me" class="ml-2 block text-sm text-gray-900"><%=I18n.t("activerecord.attributes.user.remember_me")%></label>
31
- </div>
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
- <div class="text-sm">
34
- <a href="<%= new_password_path(resource)%>" class="font-medium text-tybo-600 hover:text-tybo-500", data-turbo='false' >
35
- <%=I18n.t("devise.passwords.new.forgot_your_password")%>
36
- </a>
37
- </div>
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
- <div class="mt-5">
41
- <%= 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 } %>
42
- </div>
43
- <% end %>
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
- </div>
48
- <%= render(CoverComponent.new) %>
49
- </div>
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 %>
data/lib/tybo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tybo
2
- VERSION = '0.0.30'
2
+ VERSION = '0.0.31'
3
3
  end
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.30
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-16 00:00:00.000000000 Z
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