kaui 4.0.0 → 4.0.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: '084a507ed535ba0e0842c207d1d833625b9a52feec94aad728b7c881122d8bc4'
4
- data.tar.gz: 27e06bf3e19f4584ad9d3df00a218b4999055df1f1602a95ce10229c9b9dd23b
3
+ metadata.gz: 7f596d33c9101a5c1f95ea8be507f07056b62dda7ed5c37b1a58579bd90cdab4
4
+ data.tar.gz: '0826f3da7e895c972c87c415512e185780930625e07fedfd06319d52f560838a'
5
5
  SHA512:
6
- metadata.gz: e840715b2a2fbbff3a27714a1864d707c731ddd59f1970eb9eca0bd70b4aed7fa5488a155d3a64d6c499431996a356ea8a98d43b15a6e24ba309e39c57679432
7
- data.tar.gz: 18bb3c79694d475e2100b7e8c574280403186c3b06d2386df905a6b3f77ad088ae433fef037574572c00b4c0459814ca6eee18b5b6eff1f3d05a1ddfcc782c82
6
+ metadata.gz: cbaceb6310f761f868dc51ea0580eb1c30ba33076c9effc3ec15b59f8fe4e5e64c686920e8befe95d9d89bdc2288b51d1affbc86f67c203ec124f79b3fd525dd
7
+ data.tar.gz: 38416e084810d239bf4295d0b6289e07747687b33ef0902d44b506fe23eab758a8a47c5b13bdd1e28b5ad3b3f897fe99a1b1038735bf250a73a0511acd5aaf82
@@ -273,7 +273,7 @@ jQuery(document).ready(function ($) {
273
273
  return;
274
274
  }
275
275
 
276
- var message = 'Request error: ' + getMessageFromResponse(jqxhr);
276
+ var message = getMessageFromResponse(jqxhr);
277
277
 
278
278
  if (jqxhr.status == 200) {
279
279
  message = thrownError.message == undefined ? thrownError : thrownError.message;
@@ -24,3 +24,34 @@
24
24
  height: 2.5rem;
25
25
  width: 2.5rem;
26
26
  }
27
+
28
+ /* Disabled setting card styles */
29
+ .disabled-setting-card {
30
+ cursor: not-allowed !important;
31
+ opacity: 0.6 !important;
32
+ position: relative;
33
+ }
34
+
35
+ .disabled-setting-card .tooltip-text {
36
+ visibility: hidden !important;
37
+ position: absolute;
38
+ background-color: #333;
39
+ color: white;
40
+ text-align: center;
41
+ padding: 5px 10px;
42
+ border-radius: 4px;
43
+ bottom: 100%;
44
+ left: 50%;
45
+ transform: translateX(-50%);
46
+ white-space: nowrap;
47
+ font-size: 12px;
48
+ z-index: 1000;
49
+ margin-bottom: 5px;
50
+ opacity: 0 !important;
51
+ transition: opacity 0.2s, visibility 0.2s;
52
+ }
53
+
54
+ .disabled-setting-card:hover .tooltip-text {
55
+ visibility: visible !important;
56
+ opacity: 1 !important;
57
+ }
@@ -11,6 +11,11 @@ module Kaui
11
11
 
12
12
  # The sign-in flow eventually calls authenticate! from config/initializers/killbill_authenticatable.rb
13
13
 
14
+ def new
15
+ flash.delete(:alert) if flash[:alert] == I18n.t('devise.failure.unauthenticated') && (stored_location_for(:user).nil? || flash[:notice].present?)
16
+ super
17
+ end
18
+
14
19
  rescue_from(StandardError) do |exception|
15
20
  Rails.logger.error(exception.message)
16
21
  Rails.logger.error(exception.backtrace.join("\n")) if exception.backtrace
@@ -29,7 +34,7 @@ module Kaui
29
34
 
30
35
  def after_sign_out_path_for(_resource)
31
36
  cookies.delete(:jwt_token)
32
- kaui_path
37
+ new_user_session_path
33
38
  end
34
39
 
35
40
  def require_no_authentication
@@ -1,15 +1,37 @@
1
+ <% disabled ||= false %>
2
+ <% tooltip_message ||= nil %>
3
+
1
4
  <div class="col mb-3">
2
- <%= link_to path, class: "text-decoration-none text-reset custom-hover" do %>
3
- <div class="d-flex gap-3">
4
- <div class="flex-shrink-0">
5
- <div class="flex items-center justify-content-center setting-card-icon border rounded-3">
6
- <%= image_tag "#{icon}", height: 20 %>
5
+ <% if disabled %>
6
+ <div class="text-decoration-none text-reset disabled-setting-card">
7
+ <div class="d-flex gap-3">
8
+ <div class="flex-shrink-0">
9
+ <div class="flex items-center justify-content-center setting-card-icon border rounded-3">
10
+ <%= image_tag "#{icon}", height: 20 %>
11
+ </div>
12
+ </div>
13
+ <div>
14
+ <h6 class="mb-0 fw-600 text-black-900"><%= title %></h6>
15
+ <p class="text-muted fw-normal text-tertiary small mb-0 mt-1"><%= desc %></p>
7
16
  </div>
8
17
  </div>
9
- <div>
10
- <h6 class="mb-0 fw-600 text-black-900"><%= title %></h6>
11
- <p class="text-muted fw-normal text-tertiary small mb-0 mt-1"><%= desc %></p>
12
- </div>
18
+ <% if tooltip_message.present? %>
19
+ <span class="tooltip-text"><%= tooltip_message %></span>
20
+ <% end %>
13
21
  </div>
22
+ <% else %>
23
+ <%= link_to path, class: "text-decoration-none text-reset custom-hover" do %>
24
+ <div class="d-flex gap-3">
25
+ <div class="flex-shrink-0">
26
+ <div class="flex items-center justify-content-center setting-card-icon border rounded-3">
27
+ <%= image_tag "#{icon}", height: 20 %>
28
+ </div>
29
+ </div>
30
+ <div>
31
+ <h6 class="mb-0 fw-600 text-black-900"><%= title %></h6>
32
+ <p class="text-muted fw-normal text-tertiary small mb-0 mt-1"><%= desc %></p>
33
+ </div>
34
+ </div>
35
+ <% end %>
14
36
  <% end %>
15
- </div>
37
+ </div>
@@ -1,4 +1,6 @@
1
+ <% value ||= nil %>
2
+
1
3
  <div class="mb-3">
2
4
  <%= f.label field, label, class: "form-label text-gray-700 fs-7" %>
3
- <%= f.text_field field, class: "form-control text-gray-700 fs-7", placeholder: placeholder %>
4
- </div>
5
+ <%= f.text_field field, class: "form-control text-gray-700 fs-7", placeholder: placeholder, value: value %>
6
+ </div>
@@ -1,6 +1,8 @@
1
+ <% value ||= nil %>
2
+
1
3
  <div class="mb-3">
2
4
  <div class="d-flex justify-content-between align-items-center">
3
5
  <%= f.label field, label, class: "form-label text-gray-700 fs-7" %>
4
6
  </div>
5
- <%= f.password_field field, class: "form-control text-gray-700 fs-7", placeholder: placeholder %>
6
- </div>
7
+ <%= f.password_field field, class: "form-control text-gray-700 fs-7", placeholder: placeholder, value: value %>
8
+ </div>
@@ -38,48 +38,4 @@
38
38
  </div>
39
39
  </div>
40
40
  </div>
41
-
42
-
43
- <%
44
- =begin%>
45
- <div class="home">
46
- <div class="row">
47
- <div class="col-md-6 col-md-offset-3 text-center">
48
-
49
- <%= form_tag search_path, :id => 'home_searchform', :method => 'get' do %>
50
- <%= text_field_tag :q, @search_query, :id => 'search', :placeholder => 'What are you looking for?' %>
51
- <%= submit_tag 'Search' %>
52
-
53
- <div id="advanced">
54
- <%= link_to('Advanced search','#advancedSearchModal', data: { toggle: 'modal', target: '#advancedSearchModal' }) %>
55
- </div>
56
- <% end %>
57
-
58
- </div>
59
- <div class="col-md-6 col-md-offset-3 legend">
60
- <p class="text-center">
61
- <%= link_to 'Latest accounts', kaui_engine.accounts_path %> /
62
- <%= link_to 'Latest invoices', kaui_engine.invoices_path %> /
63
- <%= link_to 'Latest payments', kaui_engine.payments_path %>
64
- </p>
65
- </div>
66
- </div>
67
- <span class="duck_help">Accounts are searched by default. For complex searches, use <b>Advanced Search</b>.</span>
68
-
69
- </div>
70
-
71
- <%= render :partial => 'advanced_search_modal' %>
72
-
73
- <script language="javascript">
74
- $(document).ready(function() {
75
- function alignToSearch() {
76
- var leftPosition = $('#search').position().left + 25;
77
- $('#advanced').css('padding-left', leftPosition);
78
- }
79
-
80
- alignToSearch();
81
- });
82
- </script>
83
- <%
84
- =end%>
85
- </div>
41
+ </div>
@@ -1,35 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <%= render :template => 'kaui/layouts/kaui_header' %>
4
-
5
- <body>
6
-
7
- <% if user_signed_in? -%>
8
- <%= render :template => 'kaui/layouts/kaui_navbar' %>
9
- <% end %>
10
-
11
- <%
12
- =begin%>
13
- <% if params[:account_id].present? %>
14
- <%= render :template => 'kaui/layouts/kaui_account_navbar' %>
15
- <% end %>
16
- <%
17
- =end%>
18
-
19
-
20
- <%
21
- =begin%>
22
- <% if params[:account_id].present? %>
23
- <%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
24
- <% end %>
25
- <%
26
- =end%>
27
-
28
- <div class="container-fluid auth-container">
29
- <%= render :template => 'kaui/layouts/kaui_flash' %>
30
- <%= yield %>
31
- </div>
32
- <%= render :template => 'kaui/layouts/kaui_footer' %>
33
- </body>
34
-
35
- </html>
4
+ <body>
5
+ <% if user_signed_in? -%>
6
+ <%= render :template => 'kaui/layouts/kaui_navbar' %>
7
+ <% end %>
8
+
9
+ <div class="container-fluid auth-container">
10
+ <%= render :template => 'kaui/layouts/kaui_flash' %>
11
+ <%= yield %>
12
+ </div>
13
+ <%= render :template => 'kaui/layouts/kaui_footer' %>
14
+ </body>
15
+ </html>
@@ -1,9 +1,9 @@
1
1
  <%= form_for resource, as: resource_name, url: session_path(resource_name), html: { class: "" } do |f| %>
2
2
 
3
- <%= render "kaui/components/form_input/form_input", f: f, field: :kb_username, label: "Admin Username", placeholder: "Enter your admin username" %>
4
- <%= render "kaui/components/form_password/form_password", f: f, field: :password, label: "Admin Password", placeholder: "*****" %>
3
+ <%= render "kaui/components/form_input/form_input", f: f, field: :kb_username, label: t("devise.sessions.new.username"), placeholder: t("devise.sessions.new.enter_username") %>
4
+ <%= render "kaui/components/form_password/form_password", f: f, field: :password, label: t("devise.sessions.new.password"), placeholder: "*****" %>
5
5
 
6
6
  <div class="d-grid mt-4">
7
- <%= render "kaui/components/button/button", label: "Sign in", variant: "btn-primary custom-hover", type: "submit", html_class: "w-100" %>
7
+ <%= render "kaui/components/button/button", label: t("devise.sessions.new.sign_in"), variant: "btn-primary custom-hover", type: "submit", html_class: "w-100" %>
8
8
  </div>
9
- <% end %>
9
+ <% end %>
@@ -44,6 +44,11 @@ en:
44
44
  sessions:
45
45
  signed_in: "Signed in successfully."
46
46
  signed_out: "Signed out successfully."
47
+ new:
48
+ username: "Username"
49
+ password: "Password"
50
+ enter_username: "Enter your username"
51
+ sign_in: "Sign in"
47
52
  unlocks:
48
53
  send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
49
54
  send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
data/lib/kaui/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kaui
4
- VERSION = '4.0.0'
4
+ VERSION = '4.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-13 00:00:00.000000000 Z
11
+ date: 2025-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack