thecore_ui_commons 3.3.1 → 3.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78940621e8f756f9e24c2d4914089a097bb165a8fb81a9f8b850315423e675fa
4
- data.tar.gz: 2e790b0ce89af2359a3ccd0f742613f31e0236105b05ae78c0a67fcec13551d9
3
+ metadata.gz: 6050888f10704413ce0bab1f420b732727d0632c1777c3aa63ae11f8dee0c620
4
+ data.tar.gz: 386ec8108da2d0cbf633b094e0282115735bb1649db8a3db580c96279d364c87
5
5
  SHA512:
6
- metadata.gz: ee4746eb896678e3eb30b8da9b2595fb22bcabd36f742f5abe738e05f8e6f87c194e028affcba2a9e6aec536091b23ab38dc452211c496df447032e14eb76001
7
- data.tar.gz: 76fba2e8c44fd880b0baa7e3a9fb9da5ba2881e6dd019783a73c91537f18d7c2250e5a524e375afdd9ca1a9a2d7f385ca0a3e3e677d081cb1cd8646d7e95e19a
6
+ metadata.gz: 123e0c4bdc03e9309a89d10ab9e3f35d19bed337cd49066ea4443a467224c112824652b976272c625f81fa47e9f840bda7a38b9f9bca84d39d7b6525f9fbf60f
7
+ data.tar.gz: 407d6815f56a18426c9a0d4e4dd617a20c8b52d26924ce6214503d252908eea473c2960ff398fa7769cf154c86551089bc84b4e87092c8c0e469f13c61028458
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <p><%= link_to "Log in", new_session_path(resource_name) %></p>
3
+ <% end %>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <p><%= link_to "Sign up", new_registration_path(resource_name) %></p>
7
+ <% end %>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <p><%= link_to "Forgot your password?", new_password_path(resource_name) %></p>
11
+ <% end %>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <p><%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %></p>
15
+ <% end %>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <p><%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %></p>
19
+ <% end %>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <p><%= button_to t("devise.omniauth.labels.#{provider.to_s}.html", default: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider), data: { turbo: false } %></p>
24
+ <% end %>
25
+ <% end %>
@@ -17,7 +17,9 @@
17
17
  <div class="logos">
18
18
  <%=render partial: 'layouts/logos'%>
19
19
  </div>
20
- <%= yield %>
20
+ <div class="login-methods">
21
+ <%= yield %>
22
+ </div>
21
23
  </div>
22
24
  </div>
23
25
  <%= render 'layouts/footer' %>
@@ -19,6 +19,12 @@ en:
19
19
  current_user: Current User
20
20
  dashboard: Dashboard
21
21
  devise:
22
+ omniauth:
23
+ labels:
24
+ entra_id:
25
+ html: Sign in with Microsoft <i class="fa-brands fa-microsoft"></i>
26
+ google_oauth2:
27
+ html: Sign in with Google <i class="fa-brands fa-google"></i>
22
28
  sessions:
23
29
  new:
24
30
  login: Login
@@ -19,6 +19,12 @@ it:
19
19
  current_user: Utente corrente
20
20
  dashboard: "Pagina Iniziale"
21
21
  devise:
22
+ omniauth:
23
+ labels:
24
+ entra_id:
25
+ html: Sign in con Microsoft <i class="fa fa-microsoft"></i>
26
+ google_oauth2:
27
+ html: Sign in con Google <i class="fa fa-google"></i>
22
28
  sessions:
23
29
  new:
24
30
  login: Login
data/config/routes.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  Rails.application.routes.draw do
2
2
  scope ENV.fetch("RAILS_RELATIVE_URL_ROOT", "/") do
3
- devise_for :users, controllers: { sessions: "users/sessions" }#, skip: [:sessions]
3
+ controllers = {
4
+ sessions: "users/sessions"
5
+ }
6
+ controllers[:omniauth_callbacks] = 'users/omniauth_callbacks' if ThecoreAuthCommons.oauth_vars?
7
+ devise_for :users, controllers: controllers
4
8
  end
5
9
 
6
10
  devise_scope :user do
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiCommons
2
- VERSION = "3.3.1".freeze
2
+ VERSION = "3.3.2".freeze
3
3
  end
@@ -11,6 +11,7 @@ require "echarts/multiple_vectors"
11
11
  require "echarts/binary"
12
12
  require "echarts/binary_series"
13
13
  require "echarts/map"
14
+ require "omniauth/rails_csrf_protection"
14
15
 
15
16
  require "thecore_ui_commons/engine"
16
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '3.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: omniauth-rails_csrf_protection
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: haml
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +118,7 @@ files:
104
118
  - app/controllers/info_controller.rb
105
119
  - app/helpers/thecore_helper.rb
106
120
  - app/views/contact_mailer/contact_message.html.erb
121
+ - app/views/devise/shared/_links.html.erb
107
122
  - app/views/info/swagger.html.erb
108
123
  - app/views/kaminari/_first_page.html.erb
109
124
  - app/views/kaminari/_gap.html.erb