tybo 0.0.1 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +23 -0
  4. data/Rakefile +8 -0
  5. data/app/assets/config/tybo_manifest.js +1 -0
  6. data/app/assets/stylesheets/tybo/application.css +15 -0
  7. data/{lib/app → app}/components/attachment_card_component.html.erb +0 -0
  8. data/{lib/app → app}/components/attachment_card_component.rb +0 -0
  9. data/{lib/app → app}/components/attachments_list_component.html.erb +0 -0
  10. data/{lib/app → app}/components/attachments_list_component.rb +0 -0
  11. data/{lib/app → app}/components/current_user_mini_card_component.html.erb +2 -2
  12. data/{lib/app → app}/components/current_user_mini_card_component.rb +0 -0
  13. data/{lib/app → app}/components/form_component.html.erb +1 -1
  14. data/{lib/app → app}/components/form_component.rb +0 -0
  15. data/{lib/app → app}/components/forms/breadcrumb_component.html.erb +0 -0
  16. data/{lib/app → app}/components/forms/breadcrumb_component.rb +0 -0
  17. data/{lib/app → app}/components/forms/delete_button_component.html.erb +0 -0
  18. data/{lib/app → app}/components/forms/delete_button_component.rb +0 -0
  19. data/{lib/app → app}/components/forms/divider_component.html.erb +0 -0
  20. data/{lib/app → app}/components/forms/divider_component.rb +0 -0
  21. data/{lib/app → app}/components/forms/submit_button_component.html.erb +0 -0
  22. data/{lib/app → app}/components/forms/submit_button_component.rb +0 -0
  23. data/app/components/forms/subtitle_component.html.erb +5 -0
  24. data/{lib/app → app}/components/forms/subtitle_component.rb +0 -0
  25. data/{lib/app → app}/components/forms/title_component.html.erb +0 -0
  26. data/{lib/app → app}/components/forms/title_component.rb +0 -0
  27. data/{lib/app → app}/components/icons/collection_component.html.erb +0 -0
  28. data/{lib/app → app}/components/icons/collection_component.rb +0 -0
  29. data/{lib/app → app}/components/icons/home_component.html.erb +0 -0
  30. data/{lib/app → app}/components/icons/home_component.rb +0 -0
  31. data/{lib/app → app}/components/icons/mic_component.html.erb +0 -0
  32. data/{lib/app → app}/components/icons/mic_component.rb +0 -0
  33. data/{lib/app → app}/components/icons/news_paper_component.html.erb +0 -0
  34. data/{lib/app → app}/components/icons/news_paper_component.rb +0 -0
  35. data/{lib/app → app}/components/icons/office_building_component.html.erb +0 -0
  36. data/{lib/app → app}/components/icons/office_building_component.rb +0 -0
  37. data/{lib/app → app}/components/icons/question_mark_circle_component.html.erb +0 -0
  38. data/{lib/app → app}/components/icons/question_mark_circle_component.rb +0 -0
  39. data/{lib/app → app}/components/icons/trash_component.html.erb +0 -0
  40. data/{lib/app → app}/components/icons/trash_component.rb +0 -0
  41. data/{lib/app → app}/components/icons/users_component.html.erb +0 -0
  42. data/{lib/app → app}/components/icons/users_component.rb +0 -0
  43. data/{lib/app → app}/components/index_component.html.erb +0 -0
  44. data/{lib/app → app}/components/index_component.rb +0 -0
  45. data/app/components/index_header_add_component.html.erb +3 -0
  46. data/{lib/app → app}/components/index_header_add_component.rb +0 -0
  47. data/{lib/app → app}/components/index_header_component.html.erb +0 -0
  48. data/{lib/app → app}/components/index_header_component.rb +0 -0
  49. data/{lib/app → app}/components/input/file_component.html.erb +0 -0
  50. data/{lib/app → app}/components/input/file_component.rb +0 -0
  51. data/{lib/app → app}/components/sidebar_component.html.erb +2 -2
  52. data/{lib/app → app}/components/sidebar_component.rb +0 -0
  53. data/{lib/app → app}/components/sidebar_item_component.html.erb +0 -0
  54. data/{lib/app → app}/components/sidebar_item_component.rb +0 -0
  55. data/{lib/app → app}/components/sign_out_button_component.html.erb +1 -1
  56. data/{lib/app → app}/components/sign_out_button_component.rb +3 -0
  57. data/app/components/tables/active_record_th_component.html.erb +3 -0
  58. data/app/components/tables/active_record_th_component.rb +18 -0
  59. data/{lib/app → app}/components/tables/table_component.html.erb +0 -0
  60. data/{lib/app → app}/components/tables/table_component.rb +0 -0
  61. data/{lib/app → app}/components/tables/tbody_component.html.erb +0 -0
  62. data/{lib/app → app}/components/tables/tbody_component.rb +0 -0
  63. data/{lib/app → app}/components/tables/td_component.html.erb +1 -1
  64. data/{lib/app → app}/components/tables/td_component.rb +0 -0
  65. data/{lib/app → app}/components/tables/th_component.html.erb +0 -0
  66. data/{lib/app → app}/components/tables/th_component.rb +0 -0
  67. data/{lib/app → app}/components/tables/thead_component.html.erb +3 -0
  68. data/{lib/app → app}/components/tables/thead_component.rb +1 -0
  69. data/{lib/app → app}/components/tables/tr_component.html.erb +0 -0
  70. data/{lib/app → app}/components/tables/tr_component.rb +0 -0
  71. data/app/controllers/tybo/application_controller.rb +4 -0
  72. data/app/controllers/tybo/login_controller.rb +8 -0
  73. data/app/helpers/tybo/application_helper.rb +5 -0
  74. data/app/helpers/tybo/flash_helper.rb +12 -0
  75. data/app/jobs/tybo/application_job.rb +4 -0
  76. data/app/mailers/tybo/application_mailer.rb +6 -0
  77. data/app/models/tybo/application_record.rb +5 -0
  78. data/app/views/devise/confirmations/new.html.erb +20 -0
  79. data/app/views/devise/login/home.html.erb +20 -0
  80. data/app/views/devise/mailer/_reset_password_instructions.html.erb +8 -0
  81. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  82. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  83. data/app/views/devise/mailer/password_change.html.erb +3 -0
  84. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  85. data/app/views/devise/passwords/edit.html.erb +36 -0
  86. data/app/views/devise/passwords/new.html.erb +34 -0
  87. data/app/views/devise/registrations/edit.html.erb +35 -0
  88. data/app/views/devise/registrations/new.html.erb +25 -0
  89. data/app/views/devise/sessions/new.html.erb +50 -0
  90. data/app/views/devise/shared/_devise_errors.html.erb +26 -0
  91. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  92. data/app/views/devise/shared/_links.html.erb +65 -0
  93. data/app/views/devise/unlocks/new.html.erb +19 -0
  94. data/app/views/layouts/_errors.html.erb +22 -0
  95. data/app/views/layouts/_flash.html.erb +24 -0
  96. data/app/views/layouts/devise_admin.html.erb +16 -0
  97. data/app/views/layouts/tybo/application.html.erb +14 -0
  98. data/app/views/login/home.html.erb +19 -0
  99. data/app/views/shared/_pagination.html.erb +36 -0
  100. data/config/initializers/devise.rb +311 -0
  101. data/config/initializers/pagy.rb +246 -0
  102. data/config/initializers/ransack.rb +13 -0
  103. data/config/locales/devise.en.yml +65 -0
  104. data/config/routes.rb +3 -0
  105. data/lib/generators/bo/USAGE +12 -0
  106. data/lib/generators/bo/bo_generator.rb +88 -0
  107. data/lib/generators/bo/templates/_form.html.erb +32 -0
  108. data/lib/generators/bo/templates/_search_bar.html.erb +96 -0
  109. data/lib/generators/bo/templates/_table.html.erb +29 -0
  110. data/lib/generators/bo/templates/controller.rb +66 -0
  111. data/lib/generators/bo/templates/index.html.erb +19 -0
  112. data/lib/generators/bo/templates/item.html.erb +17 -0
  113. data/lib/generators/bo/templates/new.html.erb +1 -0
  114. data/lib/generators/bo/templates/show.html.erb +1 -0
  115. data/lib/generators/bo/utils/files/fr.json +19 -0
  116. data/lib/generators/bo/utils/translations.rb +47 -0
  117. data/lib/generators/bo_namespace/USAGE +11 -0
  118. data/lib/generators/bo_namespace/bo_namespace_generator.rb +50 -0
  119. data/lib/generators/bo_namespace/templates/admin.html.erb +27 -0
  120. data/lib/generators/bo_namespace/templates/admin_controller.rb +7 -0
  121. data/lib/generators/bo_namespace/templates/seeds.rb +9 -0
  122. data/lib/generators/bo_namespace/templates/side_bar.html.erb +4 -0
  123. data/lib/generators/tybo_install/templates/application.tailwind.css +112 -0
  124. data/lib/generators/tybo_install/templates/simple_form_tailwind.rb +147 -0
  125. data/lib/generators/tybo_install/templates/tailwind.config.js +40 -0
  126. data/lib/generators/tybo_install/templates/tom-select.css +458 -0
  127. data/lib/generators/tybo_install/tybo_install_generator.rb +44 -0
  128. data/lib/tybo/engine.rb +19 -0
  129. data/lib/tybo/version.rb +3 -0
  130. data/lib/tybo.rb +4 -43
  131. metadata +186 -89
  132. data/lib/app/components/forms/subtitle_component.html.erb +0 -5
  133. data/lib/app/components/index_header_add_component.html.erb +0 -3
  134. data/lib/app/helpers/application_helper.rb +0 -5
  135. data/lib/app/helpers/flash_helper.rb +0 -16
  136. data/lib/app/javascript/controllers/flash_controller.js +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9897851e74a06c11d9a138fd37ce454356f3d7d9df8735e481fafa40a45ecde1
4
- data.tar.gz: fbd99b2a4e4ffae5ee374e8a2bf69623ca80dcc20512e717d8cfb68d360f4710
3
+ metadata.gz: 7dda7057de9c78f6a0cb5690b4266a81c0fcfafb31b2198832a6d66ee8ed685f
4
+ data.tar.gz: 13f91f07c1602ee7c91103d1722034a4ba3217644b91041297d59ee20b4273fb
5
5
  SHA512:
6
- metadata.gz: 2c029d94231d4e20fe1b5498e3aac4f9f16c3d4c70b16316c0de63e55f3be79767e3ca174e1e90563d98b61d96ba505809440d95ca6bbda23cb69c4b68b63214
7
- data.tar.gz: dcec0696f8fa822cc8898e761836eda344d030f1156eb31034f88d2127b6edd679516bb663302075575d0939acef606eda66b92d2f1b2997dec8b02d69a60c94
6
+ metadata.gz: 134eb8ec6fd95f88c5dcc4776e2dab51e218a48af855b9d563ca596119f0ec049980ef62daed8e134c565a7298ee124da9fec6b8220c57e0b38d48d5290bbb92
7
+ data.tar.gz: 3821bab4fe455063833559ae562f459ab6686868b6ad7785d09ae6c7f0876cbe20c265f55bd421f3bc9368c923457cbaf7958bc0605c9fec8842df84a39a086f
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2023 dlp-m
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # Tybo
2
+ A custom admin engine for Ruby on Rails
3
+
4
+ ## Installation
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'tybo'
9
+ ```
10
+
11
+ And
12
+ ```bash
13
+ $ bundle install
14
+ ```
15
+ Then execute the generator
16
+ ```bash
17
+ $ bundle exec rails g tybo_install
18
+ ```
19
+ ## Contributing
20
+ Contribution directions go here.
21
+
22
+ ## License
23
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ //= link_tree ../builds/ .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -1,8 +1,8 @@
1
1
  <div class="flex-shrink-0 flex justify-between items-center border-t border-sidebar-200 p-4">
2
2
  <div class="flex items-center">
3
3
  <p class="text-sm ml-3 font-medium text-white">
4
- <%= "#{@user.first_name} #{@user.last_name}" %>
4
+ <%= @user.email %>
5
5
  </p>
6
6
  </div>
7
- <%= render(SignOutButtonComponent.new) %>
7
+ <%= render(SignOutButtonComponent.new(resource: @user.class.name.underscore)) %>
8
8
  </div>
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
  <% end %>
31
31
 
32
- <div class="px-4 py-5 bg-white space-y-6 sm:p-6 shadow sm:rounded-md sm:overflow-hidden">
32
+ <div class="px-4 py-5 bg-white space-y-6 sm:p-6 shadow sm:rounded-md">
33
33
  <%= content %>
34
34
  </div>
35
35
  </div>
File without changes
@@ -0,0 +1,5 @@
1
+ <div class="my-5">
2
+ <h3 class="text-lg leading-6 bgfont-medium text-gray-900">
3
+ <%= @subtitle %>
4
+ </h3>
5
+ </div>
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ <div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
2
+ <%= link_to '+', @path, class: "inline-flex items-center justify-center rounded-md border border-transparent bg-custom px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-custom-700 focus:outline-none focus:ring-2 focus:ring-custom-500 focus:ring-offset-2 sm:w-auto" %>
3
+ </div>
File without changes
@@ -1,8 +1,8 @@
1
1
  <div class=" md:flex md:w-64 md:flex-col md:fixed md:inset-y-0">
2
- <div class="flex-1 flex flex-col min-h-0 bg-sidebar">
2
+ <div class="flex-1 flex flex-col min-h-0 bg-custom">
3
3
  <div class="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
4
4
  <div class="flex items-center flex-shrink-0 px-4">
5
- <%= image_tag("https://tymate.com/assets/logos/logo-full-tymate-white-44c399f36de12ec8b69a86ec02ab13fc5c80842dd2333117658ead762ff15f93.svg", alt: "logo rif", class: 'mx-auto h-15 w-auto') %>
5
+ <%= image_tag("https://www.datocms-assets.com/33962/1667496758-logo-white.svg", alt: "logo rif", class: 'mx-auto h-15 w-auto') %>
6
6
  </div>
7
7
 
8
8
  <nav class="mt-5 flex-1 px-2 space-y-1" aria-label="Sidebar">
File without changes
@@ -1,4 +1,4 @@
1
- <%= button_to sign_out_path, class:"flex items-center", method: :delete do %>
1
+ <%= button_to send("destroy_#{@resource}_session_path"), class:"flex items-center", method: :delete do %>
2
2
  <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2">
3
3
  <path stroke-linecap="round" stroke-linejoin="round" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
4
4
  </svg>
@@ -1,4 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class SignOutButtonComponent < ViewComponent::Base
4
+ def initialize(resource:)
5
+ @resource = resource
6
+ end
4
7
  end
@@ -0,0 +1,3 @@
1
+ <th class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 hover:cursor-pointer">
2
+ <%= sort_link(@q, @column_name, @label, default_order: :asc) %>
3
+ </th>
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ require 'ransack/helpers/form_helper'
3
+
4
+ module Tables
5
+ class ActiveRecordThComponent < ViewComponent::Base
6
+ include Ransack::Helpers::FormHelper
7
+
8
+ def initialize(column_name:, ransack_object: )
9
+ @column_name = column_name
10
+ @q = ransack_object
11
+ @label = label
12
+ end
13
+
14
+ def label
15
+ I18n.t("bo.#{@q.object.klass.to_s.underscore}.attributes.#{@column_name}")
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900">
2
- <%= content %>
2
+ <%= strip_tags(content) == content ? content.truncate(30) : content %>
3
3
  </td>
File without changes
File without changes
@@ -3,5 +3,8 @@
3
3
  <% ths.each do |th| %>
4
4
  <%= th %>
5
5
  <% end %>
6
+ <% active_record_ths.each do |th| %>
7
+ <%= th %>
8
+ <% end %>
6
9
  </tr>
7
10
  </thead>
@@ -3,5 +3,6 @@
3
3
  module Tables
4
4
  class TheadComponent < ViewComponent::Base
5
5
  renders_many :ths, Tables::ThComponent
6
+ renders_many :active_record_ths, Tables::ActiveRecordThComponent
6
7
  end
7
8
  end
File without changes
@@ -0,0 +1,4 @@
1
+ module Tybo
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ class Tybo::LoginController < ::ApplicationController
3
+ layout 'devise_admin'
4
+ def home
5
+ @resources = Devise.mappings.sort.map(&:first)
6
+ render template: 'login/home'
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module Tybo
2
+ module ApplicationHelper
3
+ include Pagy::Frontend
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ module Tybo
3
+ module FlashHelper
4
+ def classes_for_flash(key)
5
+ if %w[error alert].include?(key)
6
+ 'bg-red-100 text-red-700'
7
+ else
8
+ 'bg-green-50 text-green-700'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ module Tybo
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module Tybo
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: "from@example.com"
4
+ layout "mailer"
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Tybo
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+ <%= f.full_error :confirmation_token %>
6
+
7
+ <div class="form-inputs">
8
+ <%= f.input :email,
9
+ required: true,
10
+ autofocus: true,
11
+ value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
12
+ input_html: { autocomplete: "email" } %>
13
+ </div>
14
+
15
+ <div class="form-actions">
16
+ <%= f.button :submit, "Resend confirmation instructions" %>
17
+ </div>
18
+ <% end %>
19
+
20
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,20 @@
1
+
2
+
3
+ <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">
4
+ <div class="mx-auto w-full max-w-sm lg:w-96">
5
+ <div>
6
+ <img class="h-12 w-auto" src="https://www.datocms-assets.com/33962/1667497145-logo-colored.svg" alt="Your Company">
7
+ <h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Sign in to your account</h2>
8
+ </div>
9
+ <div class="mt-4">
10
+ <% @resources.each do |resource| %>
11
+ <a href="<%=send("new_#{resource.to_s}_session_path")%>" class="mt-2 flex w-full justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
12
+ Sign in as <%= I18n.t("bo.#{resource.to_s}.one")%>
13
+ </a>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ <div class="relative hidden w-0 flex-1 lg:block">
19
+ <img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
20
+ </div>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(resource, reset_password_token: token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,36 @@
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
+ <%= render 'devise/shared/devise_errors' %>
4
+ <div class="mx-auto w-full max-w-sm lg:w-96">
5
+ <div>
6
+ <img class="h-12 w-auto" src="https://www.datocms-assets.com/33962/1667497145-logo-colored.svg" alt="Your Company">
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-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" %>
27
+ </div>
28
+ <% end %>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <div class="relative hidden w-0 flex-1 lg:block">
34
+ <img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
35
+ </div>
36
+ </div>
@@ -0,0 +1,34 @@
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
+ <%= render 'devise/shared/devise_errors' %>
4
+ <div class="mx-auto w-full max-w-sm lg:w-96">
5
+ <div>
6
+ <img class="h-12 w-auto" src="https://www.datocms-assets.com/33962/1667497145-logo-colored.svg" alt="Your Company">
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>
20
+
21
+ </div>
22
+ <div class="mt-5">
23
+ <%= f.button :submit, "Send me reset password instructions", class: "flex w-full justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" %>
24
+ </div>
25
+ <% end %>
26
+ </div>
27
+ </div>
28
+ <%= render "devise/shared/links" %>
29
+ </div>
30
+ </div>
31
+ <div class="relative hidden w-0 flex-1 lg:block">
32
+ <img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
33
+ </div>
34
+ </div>
@@ -0,0 +1,35 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :email, required: true, autofocus: true %>
8
+
9
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
+ <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
11
+ <% end %>
12
+
13
+ <%= f.input :password,
14
+ hint: "leave it blank if you don't want to change it",
15
+ required: false,
16
+ input_html: { autocomplete: "new-password" } %>
17
+ <%= f.input :password_confirmation,
18
+ required: false,
19
+ input_html: { autocomplete: "new-password" } %>
20
+ <%= f.input :current_password,
21
+ hint: "we need your current password to confirm your changes",
22
+ required: true,
23
+ input_html: { autocomplete: "current-password" } %>
24
+ </div>
25
+
26
+ <div class="form-actions">
27
+ <%= f.button :submit, "Update" %>
28
+ </div>
29
+ <% end %>
30
+
31
+ <h3>Cancel my account</h3>
32
+
33
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
34
+
35
+ <%= link_to "Back", :back %>
@@ -0,0 +1,25 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :email,
8
+ required: true,
9
+ autofocus: true,
10
+ input_html: { autocomplete: "email" }%>
11
+ <%= f.input :password,
12
+ required: true,
13
+ hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
14
+ input_html: { autocomplete: "new-password" } %>
15
+ <%= f.input :password_confirmation,
16
+ required: true,
17
+ input_html: { autocomplete: "new-password" } %>
18
+ </div>
19
+
20
+ <div class="form-actions">
21
+ <%= f.button :submit, "Sign up" %>
22
+ </div>
23
+ <% end %>
24
+
25
+ <%= render "devise/shared/links" %>