tybo 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -0
- data/README.md +23 -0
- data/Rakefile +8 -0
- data/app/assets/config/tybo_manifest.js +1 -0
- data/app/assets/stylesheets/tybo/application.css +15 -0
- data/{lib/app → app}/components/attachment_card_component.html.erb +0 -0
- data/{lib/app → app}/components/attachment_card_component.rb +0 -0
- data/{lib/app → app}/components/attachments_list_component.html.erb +0 -0
- data/{lib/app → app}/components/attachments_list_component.rb +0 -0
- data/{lib/app → app}/components/current_user_mini_card_component.html.erb +2 -2
- data/{lib/app → app}/components/current_user_mini_card_component.rb +0 -0
- data/{lib/app → app}/components/form_component.html.erb +0 -0
- data/{lib/app → app}/components/form_component.rb +0 -0
- data/{lib/app → app}/components/forms/breadcrumb_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/breadcrumb_component.rb +0 -0
- data/{lib/app → app}/components/forms/delete_button_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/delete_button_component.rb +0 -0
- data/{lib/app → app}/components/forms/divider_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/divider_component.rb +0 -0
- data/{lib/app → app}/components/forms/submit_button_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/submit_button_component.rb +0 -0
- data/{lib/app → app}/components/forms/subtitle_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/subtitle_component.rb +0 -0
- data/{lib/app → app}/components/forms/title_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/title_component.rb +0 -0
- data/{lib/app → app}/components/icons/collection_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/collection_component.rb +0 -0
- data/{lib/app → app}/components/icons/home_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/home_component.rb +0 -0
- data/{lib/app → app}/components/icons/mic_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/mic_component.rb +0 -0
- data/{lib/app → app}/components/icons/news_paper_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/news_paper_component.rb +0 -0
- data/{lib/app → app}/components/icons/office_building_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/office_building_component.rb +0 -0
- data/{lib/app → app}/components/icons/question_mark_circle_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/question_mark_circle_component.rb +0 -0
- data/{lib/app → app}/components/icons/trash_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/trash_component.rb +0 -0
- data/{lib/app → app}/components/icons/users_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/users_component.rb +0 -0
- data/{lib/app → app}/components/index_component.html.erb +0 -0
- data/{lib/app → app}/components/index_component.rb +0 -0
- data/{lib/app → app}/components/index_header_add_component.html.erb +0 -0
- data/{lib/app → app}/components/index_header_add_component.rb +0 -0
- data/{lib/app → app}/components/index_header_component.html.erb +0 -0
- data/{lib/app → app}/components/index_header_component.rb +0 -0
- data/{lib/app → app}/components/input/file_component.html.erb +0 -0
- data/{lib/app → app}/components/input/file_component.rb +0 -0
- data/{lib/app → app}/components/sidebar_component.html.erb +0 -0
- data/{lib/app → app}/components/sidebar_component.rb +0 -0
- data/{lib/app → app}/components/sidebar_item_component.html.erb +0 -0
- data/{lib/app → app}/components/sidebar_item_component.rb +0 -0
- data/{lib/app → app}/components/sign_out_button_component.html.erb +1 -1
- data/{lib/app → app}/components/sign_out_button_component.rb +3 -0
- data/{lib/app → app}/components/tables/active_record_th_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/active_record_th_component.rb +1 -0
- data/{lib/app → app}/components/tables/table_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/table_component.rb +0 -0
- data/{lib/app → app}/components/tables/tbody_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/tbody_component.rb +0 -0
- data/{lib/app → app}/components/tables/td_component.html.erb +1 -1
- data/{lib/app → app}/components/tables/td_component.rb +0 -0
- data/{lib/app → app}/components/tables/th_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/th_component.rb +0 -0
- data/{lib/app → app}/components/tables/thead_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/thead_component.rb +0 -0
- data/{lib/app → app}/components/tables/tr_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/tr_component.rb +0 -0
- data/app/controllers/tybo/application_controller.rb +4 -0
- data/app/controllers/tybo/login_controller.rb +8 -0
- data/app/helpers/tybo/application_helper.rb +5 -0
- data/app/helpers/tybo/flash_helper.rb +12 -0
- data/app/jobs/tybo/application_job.rb +4 -0
- data/app/mailers/tybo/application_mailer.rb +6 -0
- data/app/models/tybo/application_record.rb +5 -0
- data/app/views/devise/confirmations/new.html.erb +20 -0
- data/app/views/devise/login/home.html.erb +20 -0
- data/app/views/devise/mailer/_reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +36 -0
- data/app/views/devise/passwords/new.html.erb +34 -0
- data/app/views/devise/registrations/edit.html.erb +35 -0
- data/app/views/devise/registrations/new.html.erb +25 -0
- data/app/views/devise/sessions/new.html.erb +50 -0
- data/app/views/devise/shared/_devise_errors.html.erb +26 -0
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +65 -0
- data/app/views/devise/unlocks/new.html.erb +19 -0
- data/app/views/layouts/_errors.html.erb +22 -0
- data/app/views/layouts/_flash.html.erb +24 -0
- data/app/views/layouts/devise_admin.html.erb +16 -0
- data/app/views/layouts/tybo/application.html.erb +14 -0
- data/app/views/login/home.html.erb +19 -0
- data/app/views/shared/_pagination.html.erb +36 -0
- data/config/initializers/devise.rb +311 -0
- data/config/initializers/pagy.rb +246 -0
- data/config/initializers/ransack.rb +13 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/routes.rb +3 -0
- data/lib/generators/bo/USAGE +12 -0
- data/lib/generators/bo/bo_generator.rb +88 -0
- data/lib/generators/bo/templates/_form.html.erb +32 -0
- data/lib/generators/bo/templates/_search_bar.html.erb +96 -0
- data/lib/generators/bo/templates/_table.html.erb +29 -0
- data/lib/generators/bo/templates/controller.rb +66 -0
- data/lib/generators/bo/templates/index.html.erb +19 -0
- data/lib/generators/bo/templates/item.html.erb +17 -0
- data/lib/generators/bo/templates/new.html.erb +1 -0
- data/lib/generators/bo/templates/show.html.erb +1 -0
- data/lib/generators/bo/utils/files/fr.json +19 -0
- data/lib/generators/bo/utils/translations.rb +47 -0
- data/lib/generators/bo_namespace/USAGE +11 -0
- data/lib/generators/bo_namespace/bo_namespace_generator.rb +50 -0
- data/lib/generators/bo_namespace/templates/admin.html.erb +27 -0
- data/lib/generators/bo_namespace/templates/admin_controller.rb +7 -0
- data/lib/generators/bo_namespace/templates/seeds.rb +9 -0
- data/lib/generators/bo_namespace/templates/side_bar.html.erb +4 -0
- data/lib/generators/tybo_install/templates/application.tailwind.css +112 -0
- data/lib/generators/tybo_install/templates/simple_form_tailwind.rb +147 -0
- data/lib/generators/tybo_install/templates/tailwind.config.js +40 -0
- data/lib/generators/tybo_install/templates/tom-select.css +458 -0
- data/lib/generators/tybo_install/tybo_install_generator.rb +44 -0
- data/lib/tybo/engine.rb +19 -0
- data/lib/tybo/version.rb +3 -0
- data/lib/tybo.rb +4 -43
- metadata +186 -98
- data/lib/app/helpers/application_helper.rb +0 -5
- data/lib/app/helpers/flash_helper.rb +0 -16
- data/lib/app/javascript/controllers/attachments_controller.js +0 -14
- data/lib/app/javascript/controllers/dropdown_controller.js +0 -15
- data/lib/app/javascript/controllers/flash_controller.js +0 -7
- data/lib/app/javascript/controllers/index.js +0 -6
- data/lib/app/javascript/controllers/questions_controller.js +0 -61
- data/lib/app/javascript/controllers/search_form_controller.js +0 -20
- data/lib/app/javascript/controllers/ts/search_controller.js +0 -35
- data/lib/app/javascript/controllers/ts/select_controller.js +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7dda7057de9c78f6a0cb5690b4266a81c0fcfafb31b2198832a6d66ee8ed685f
|
|
4
|
+
data.tar.gz: 13f91f07c1602ee7c91103d1722034a4ba3217644b91041297d59ee20b4273fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 @@
|
|
|
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
|
+
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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
|
-
<%=
|
|
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>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= button_to
|
|
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>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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,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,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" %>
|
|
@@ -0,0 +1,50 @@
|
|
|
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 'devise/shared/devise_errors' %>
|
|
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-8">
|
|
10
|
+
<div class="mt-6">
|
|
11
|
+
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: 'space-y-6'}) do |f| %>
|
|
12
|
+
<div>
|
|
13
|
+
<%= f.input :email,
|
|
14
|
+
required: false,
|
|
15
|
+
autofocus: true,
|
|
16
|
+
input_html: { autocomplete: "email" },
|
|
17
|
+
class: 'block text-sm font-medium text-gray-700' %>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="space-y-1">
|
|
21
|
+
<%= f.input :password,
|
|
22
|
+
required: false,
|
|
23
|
+
input_html: { autocomplete: "current-password" },
|
|
24
|
+
class: 'block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm' %>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="flex items-center justify-between">
|
|
29
|
+
<div class="flex items-center">
|
|
30
|
+
<input id="remember_me" name="remember_me" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500">
|
|
31
|
+
<label for="remember_me" class="ml-2 block text-sm text-gray-900">Remember me</label>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="text-sm">
|
|
35
|
+
<a href="<%= new_password_path(Administrator)%>" class="font-medium text-indigo-600 hover:text-indigo-500">Forgot your password?</a>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="mt-5">
|
|
40
|
+
<%= f.button :submit, "Sign in", 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" %>
|
|
41
|
+
</div>
|
|
42
|
+
<% end %>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="relative hidden w-0 flex-1 lg:block">
|
|
48
|
+
<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="">
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|