strongmind-auth 1.1.58 → 1.1.63

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: 9d339f7f3de97bf9d66d4016e9c6df2b5f42c690c64e951907789ff2ae2d785b
4
- data.tar.gz: 5a428449da9ca208c4946c4f377a942b6b4374847489cc5124131b04c217d965
3
+ metadata.gz: 3e76213cdfcc9edec5c34b3d71920f847444f33bbb4b5999bc9699e49d8350ab
4
+ data.tar.gz: 9b10b41b6ca05f2ef7caa71113bc3702578dc5e2cd7adb377f4f27ac196182ee
5
5
  SHA512:
6
- metadata.gz: fea2b8e89c58d9efd34ec21b908ae3e026ec2cafa7d4ccb53621337a8e3d8539561e1c0cfffcdeff0290f92ab9cb1f858a2a7ab1a8db74a0e0be697b55d578d9
7
- data.tar.gz: 483a18db083fc299359338e1035853aab594a1beabf2473bfa0b1a84c8846a7d13ec716dc0e0f8257b83374e82285214e88f9eb226651cd444c4c251060488d7
6
+ metadata.gz: 9e99ec4b5c8ee816862b78beb662ca40fe29e795b23e6d59baa83602d23d9a6b0894b07ee4c247c2835fad760ab3d32e8783d513edda669c5020fd74f15a2645
7
+ data.tar.gz: c737bd54e6201dfca2bfaa5f4060dd2db3d5464c8393b307fae325c77595ab9ce6561a378a6993c866352ef3de4175cf34b9aa29ca4302009789dc50bf711413
@@ -3,6 +3,6 @@ class LoginsController < ApplicationController
3
3
  skip_before_action :fetch_common_nav
4
4
 
5
5
  def index
6
- flash[:alert] = nil
6
+
7
7
  end
8
8
  end
@@ -3,6 +3,11 @@
3
3
  top: 30vh;
4
4
  margin-left: auto;
5
5
  margin-right: auto;
6
+ height: 80%;
7
+ width: 100%;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
6
11
  }
7
12
 
8
13
  #loading .sm-loader {
@@ -28,6 +33,7 @@
28
33
 
29
34
 
30
35
  </script>
36
+
31
37
  <div id="loading">
32
38
  <% flash.each do |type, message| %>
33
39
  <div class="alert alert-<%= type %>"><%= message %></div>
@@ -38,5 +44,4 @@
38
44
  <img src="https://prod-backpack-ui.strongmind.com/assets/images/strongmind-loader.svg">
39
45
  <% end %>
40
46
  </div>
41
-
42
47
  </div>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- return if defined? Rails::Generators
3
+ # return if defined? Rails::Generators # This line needs to be commented out to allow tailwindcss watch to run linked ticket: https://strongmind.atlassian.net/browse/BEL-2645
4
4
 
5
5
  # if Devise is not present in Gemfile
6
6
  unless File.read('Gemfile').include?('devise')
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.1.58"
3
+ VERSION = "1.1.63"
4
4
  end
5
5
  end
@@ -35,7 +35,16 @@ module Strongmind
35
35
  private
36
36
 
37
37
  def current_page?(url)
38
- request.fullpath == URI.parse(url).path
38
+ request.fullpath == URI.parse(url).path || path_in_request?(url)
39
+ end
40
+
41
+ def path_in_request?(path)
42
+ sanitized_path = path.gsub('/', '')
43
+
44
+ path_to_compare = request.fullpath.split('?').first
45
+
46
+ return path_to_compare == '/' if sanitized_path.empty?
47
+ path_to_compare.include?(sanitized_path) || path_to_compare.include?(sanitized_path.pluralize)
39
48
  end
40
49
 
41
50
  def fetch_navbar_data(nav_items)
@@ -91,7 +100,9 @@ module Strongmind
91
100
  end
92
101
 
93
102
  def build_nav_items(menu_items)
94
- { nav_items: menu_items.map { |item| nav_item_data(item) } }
103
+ items = { nav_items: menu_items.map { |item| nav_item_data(item) } }
104
+ items[:nav_items].first[:is_active] = true unless items[:nav_items].any? { |item| item[:is_active] }
105
+ items
95
106
  end
96
107
 
97
108
  def nav_item_data(item)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.58
4
+ version: 1.1.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-22 00:00:00.000000000 Z
11
+ date: 2024-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails