alchemy-devise 7.2.0 → 7.4.0

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: '0086737ceda4ca6a1f7aaf05ccc575070c68455eb1f97cf1a8468b28a323b84f'
4
- data.tar.gz: 01ad0968182c6ea91a3c628728a842a379329cf13793c01538edb6c091436554
3
+ metadata.gz: 93e0135131b62f7e5b0fecc4ba83b6481ec0f6b3c8776388d4a426fea921d7c8
4
+ data.tar.gz: 03a97f12630ed5aa441570be97921d119205bcf09616781dc2d3e5c1ce686d7c
5
5
  SHA512:
6
- metadata.gz: 724e52c32b05b1be29cbc1b786c13365836e7aa830c107491f4955742666f2730487a250452a9c84cdcad978323b497baeb674da70ff1141e8f7edde7eb02a48
7
- data.tar.gz: ec816df5fdfc7e8600facafc59d840128e8f56767e9634010433e2c487e2aefb58986b22970abc28d4c382535961e0cd4f2fbb1cf5bfcebde7db22415baba097
6
+ metadata.gz: 94ee8333097960b712d5d1b903840aa68d2efa3e7a75b5f40343f4c200bbaa8d6db090334ecfca0f7fff5f81ad530f83e54fee9aefd3c2a75c9bc678ab20192c
7
+ data.tar.gz: ac94adb705ec48fdd2cdf94a2f92d39b2836faaf173b953f9ecf883d326acdf5a940f7c3a783046ca110441a7fc9db40f7d71d4ee0d87aacd530b8ae9d90c47b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.4.0 (2025-01-21)
4
+
5
+ - Extend test matrix [#219](https://github.com/AlchemyCMS/alchemy-devise/pull/219) ([mamhoff](https://github.com/mamhoff))
6
+ - Allow Alchemy 8.x [#218](https://github.com/AlchemyCMS/alchemy-devise/pull/218) ([mamhoff](https://github.com/mamhoff))
7
+ - test: Fix admin users feature spec [#217](https://github.com/AlchemyCMS/alchemy-devise/pull/217) ([tvdeyen](https://github.com/tvdeyen))
8
+
9
+ ## 7.3.0 (2024-09-06)
10
+
11
+ - Use new resource_table component for user list [#213](https://github.com/AlchemyCMS/alchemy-devise/pull/213) ([tvdeyen](https://github.com/tvdeyen))
12
+ - Compile CSS into Gem [#211](https://github.com/AlchemyCMS/alchemy-devise/pull/211) ([tvdeyen](https://github.com/tvdeyen))
13
+
3
14
  ## 7.2.0 (2024-06-07)
4
15
 
5
16
  - Update Devise config for Turbo [#209](https://github.com/AlchemyCMS/alchemy-devise/pull/209) ([tvdeyen](https://github.com/tvdeyen))
@@ -0,0 +1 @@
1
+ body.user_sessions,body.passwords{background-color:var(--color-blue_dark);color:var(--color-white)}body.user_sessions a,body.passwords a{color:var(--color-white)}body.user_sessions #errors,body.user_sessions .message.info,body.passwords #errors,body.passwords .message.info{border-color:rgba(0,0,0,0)}body.user_sessions #errors,body.passwords #errors{margin-left:157px}#logo{width:275px;height:auto;margin:0 0 1em 164px}.login_signup_box{position:absolute;width:450px;top:50%;left:50%;transform:translate(-60%, -50%)}.no-js .login_signup_box{display:none}.login_signup_box .message{margin-left:157px}.login_signup_box .link{text-align:right}.login_signup_box button.secondary{color:var(--color-white);border-color:var(--color-white)}form.user_roles .checkbox{display:inline-block;width:50%}/*# sourceMappingURL=alchemy-devise.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../stylesheets/alchemy-devise/login.scss","../stylesheets/alchemy-devise/users.scss"],"names":[],"mappings":"AAAA,kCAEE,wCACA,yBAEA,sCACE,yBAGF,gHAEE,2BAGF,kDACE,kBAIJ,MACE,YACA,YACA,qBAGF,kBACE,kBACA,YACA,QACA,SACA,gCAEA,yBACE,aAGF,2BACE,kBAGF,wBACE,iBAGF,mCACE,yBACA,gCC5CF,0BACE,qBACA","file":"alchemy-devise.css"}
@@ -1,10 +1,10 @@
1
1
  body.user_sessions,
2
2
  body.passwords {
3
- background-color: $main-menu-bg-color;
4
- color: $white;
3
+ background-color: var(--color-blue_dark);
4
+ color: var(--color-white);
5
5
 
6
6
  a {
7
- color: $white;
7
+ color: var(--color-white);
8
8
  }
9
9
 
10
10
  #errors,
@@ -43,7 +43,7 @@ body.passwords {
43
43
  }
44
44
 
45
45
  button.secondary {
46
- color: $white;
47
- border-color: $white;
46
+ color: var(--color-white);
47
+ border-color: var(--color-white);
48
48
  }
49
49
  }
@@ -1,2 +1 @@
1
- @import "alchemy/defaults";
2
- @import "alchemy-devise/*";
1
+ @import "alchemy-devise/login";
@@ -47,6 +47,10 @@ module Alchemy
47
47
  ]
48
48
  end
49
49
 
50
+ def ransortable_attributes(_auth_object = nil)
51
+ %w[last_sign_in_at]
52
+ end
53
+
50
54
  alias_method :searchable_alchemy_resource_attributes, :ransackable_attributes
51
55
 
52
56
  def ransackable_associations(_auth_object = nil)
@@ -1,3 +1,7 @@
1
+ <%= content_for :stylesheets do %>
2
+ <%= stylesheet_link_tag "alchemy-devise" %>
3
+ <% end %>
4
+
1
5
  <div class="login_signup_box">
2
6
  <%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %>
3
7
  <% if @user.errors.blank? %>
@@ -1,3 +1,7 @@
1
+ <%= content_for :stylesheets do %>
2
+ <%= stylesheet_link_tag "alchemy-devise" %>
3
+ <% end %>
4
+
1
5
  <div class="login_signup_box">
2
6
  <%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %>
3
7
  <% if @user.errors.blank? %>
@@ -1,3 +1,7 @@
1
+ <%= content_for :stylesheets do %>
2
+ <%= stylesheet_link_tag "alchemy-devise" %>
3
+ <% end %>
4
+
1
5
  <div class="login_signup_box">
2
6
  <%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %>
3
7
  <%= alchemy_form_for :user, url: {action: 'create'}, id: 'login', data: { turbo: false } do |f| %>
@@ -13,11 +17,3 @@
13
17
  </div>
14
18
  <% end %>
15
19
  </div>
16
-
17
- <%- content_for :javascripts do -%>
18
- <script type="text/javascript" charset="utf-8">
19
- jQuery(function($) {
20
- $('#user_login').focus();
21
- });
22
- </script>
23
- <%- end -%>
@@ -0,0 +1,34 @@
1
+ <%= render Alchemy::Admin::Resource::Table.new(@users, query: @query) do |table| %>
2
+ <% table.icon_column do |user| %>
3
+ <%= render_icon(:user, style: user.logged_in? ? "solid" : "regular") %>
4
+ <% end %>
5
+ <% table.column :login, sortable: true do |user| %>
6
+ <% if can?(:edit, user) %>
7
+ <%= link_to_dialog user.login,
8
+ alchemy.edit_admin_user_path(user), {
9
+ title: Alchemy.t(:edit_user),
10
+ overflow: true,
11
+ size: "430x560"
12
+ },
13
+ title: Alchemy.t(:edit_user) %>
14
+ <% else %>
15
+ <%= user.login %>
16
+ <% end %>
17
+ <% end %>
18
+ <% table.column :firstname, class_name: "name", sortable: true %>
19
+ <% table.column :lastname, sortable: true %>
20
+ <% table.column :email, sortable: true %>
21
+ <% table.column :language do |user| %>
22
+ <%= Alchemy.t(user.language, scope: :translations, default: Alchemy.t(:unknown)) %>
23
+ <% end %>
24
+ <% table.column :last_sign_in_at, sortable: true do |user| %>
25
+ <%= user.last_sign_in_at.present? ? l(user.last_sign_in_at, format: :"alchemy.default") : Alchemy.t(:unknown) %>
26
+ <% end %>
27
+ <% table.column :role, header: Alchemy::User.human_attribute_name(:alchemy_roles) do |user| %>
28
+ <%= user.human_roles_string %>
29
+ <% end %>
30
+ <% table.delete_button tooltip: Alchemy.t(:delete_user), confirm_message: Alchemy.t(:confirm_to_delete_user) %>
31
+ <% table.edit_button tooltip: Alchemy.t(:edit_user), dialog_size: "430x560" %>
32
+ <% end %>
33
+
34
+ <%= paginate @users, theme: "alchemy" %>
@@ -0,0 +1,28 @@
1
+ <table class="list" id="user_list">
2
+ <thead>
3
+ <tr>
4
+ <th class="icon"></th>
5
+ <th class="login">
6
+ <%= sort_link @query, :login, hide_indicator: true %>
7
+ </th>
8
+ <th class="name">
9
+ <%= sort_link @query, :firstname, hide_indicator: true %>
10
+ </th>
11
+ <th>
12
+ <%= sort_link @query, :lastname, hide_indicator: true %>
13
+ </th>
14
+ <th class="email">
15
+ <%= sort_link @query, :email, hide_indicator: true %>
16
+ </th>
17
+ <th><%= Alchemy::User.human_attribute_name('language') %></th>
18
+ <th>
19
+ <%= sort_link @query, :last_sign_in_at, hide_indicator: true %>
20
+ </th>
21
+ <th class="role"><%= Alchemy::User.human_attribute_name('roles') %></th>
22
+ <th class="tools"></th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <%= render partial: "user", collection: @users %>
27
+ </tbody>
28
+ </table>
@@ -1,3 +1,7 @@
1
+ <%= content_for :stylesheets do %>
2
+ <%= stylesheet_link_tag "alchemy-devise" %>
3
+ <% end %>
4
+
1
5
  <%= content_for :toolbar do %>
2
6
  <%= toolbar_button(
3
7
  icon: :plus,
@@ -16,37 +20,14 @@
16
20
  <% end %>
17
21
 
18
22
  <div id="archive_all" class="resources-table-wrapper">
19
- <%= render "alchemy/admin/resources/table_header" %>
20
23
  <% if @users.any? %>
24
+ <%= render "alchemy/admin/resources/table_header" %>
21
25
 
22
- <table class="list" id="user_list">
23
- <thead>
24
- <tr>
25
- <th class="icon"></th>
26
- <th class="login">
27
- <%= sort_link @query, :login, hide_indicator: true %>
28
- </th>
29
- <th class="name">
30
- <%= sort_link @query, :firstname, hide_indicator: true %>
31
- </th>
32
- <th>
33
- <%= sort_link @query, :lastname, hide_indicator: true %>
34
- </th>
35
- <th class="email">
36
- <%= sort_link @query, :email, hide_indicator: true %>
37
- </th>
38
- <th><%= Alchemy::User.human_attribute_name('language') %></th>
39
- <th>
40
- <%= sort_link @query, :last_sign_in_at, hide_indicator: true %>
41
- </th>
42
- <th class="role"><%= Alchemy::User.human_attribute_name('roles') %></th>
43
- <th class="tools"></th>
44
- </tr>
45
- </thead>
46
- <tbody>
47
- <%= render partial: 'alchemy/admin/users/user', collection: @users %>
48
- </tbody>
49
- </table>
26
+ <% if Alchemy::Admin.const_defined?(:Resource) %>
27
+ <%= render "resource_table" %>
28
+ <% else %>
29
+ <%= render "table" %>
30
+ <% end %>
50
31
 
51
32
  <%= paginate @users, theme: 'alchemy' %>
52
33
 
@@ -1,3 +1,7 @@
1
+ <%= content_for :stylesheets do %>
2
+ <%= stylesheet_link_tag "alchemy-devise" %>
3
+ <% end %>
4
+
1
5
  <div class="login_signup_box">
2
6
  <%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %>
3
7
  <%= render_message do %>
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Devise
3
- VERSION = "7.2.0"
3
+ VERSION = "7.4.0"
4
4
  end
5
5
  end
@@ -16,12 +16,6 @@ module Alchemy
16
16
  def run_migrations
17
17
  run "bundle exec rake db:migrate"
18
18
  end
19
-
20
- def append_assets
21
- insert_into_file "vendor/assets/stylesheets/alchemy/admin/all.css",
22
- "\n *= require alchemy/admin/alchemy-devise",
23
- after: " *= require alchemy/admin"
24
- end
25
19
  end
26
20
  end
27
21
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 7.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-07 00:00:00.000000000 Z
10
+ date: 2025-01-21 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: alchemy_cms
@@ -132,10 +131,10 @@ files:
132
131
  - CHANGELOG.md
133
132
  - LICENSE
134
133
  - README.md
134
+ - app/assets/builds/alchemy-devise.css
135
+ - app/assets/builds/alchemy-devise.css.map
135
136
  - app/assets/stylesheets/alchemy-devise.scss
136
137
  - app/assets/stylesheets/alchemy-devise/login.scss
137
- - app/assets/stylesheets/alchemy-devise/users.scss
138
- - app/assets/stylesheets/alchemy/admin/alchemy-devise.css
139
138
  - app/controllers/alchemy/admin/passwords_controller.rb
140
139
  - app/controllers/alchemy/admin/user_sessions_controller.rb
141
140
  - app/controllers/alchemy/admin/users_controller.rb
@@ -146,6 +145,8 @@ files:
146
145
  - app/views/alchemy/admin/passwords/new.html.erb
147
146
  - app/views/alchemy/admin/user_sessions/new.html.erb
148
147
  - app/views/alchemy/admin/users/_fields.html.erb
148
+ - app/views/alchemy/admin/users/_resource_table.html.erb
149
+ - app/views/alchemy/admin/users/_table.html.erb
149
150
  - app/views/alchemy/admin/users/_user.html.erb
150
151
  - app/views/alchemy/admin/users/edit.html.erb
151
152
  - app/views/alchemy/admin/users/index.html.erb
@@ -198,8 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
199
  - !ruby/object:Gem::Version
199
200
  version: '0'
200
201
  requirements: []
201
- rubygems_version: 3.5.9
202
- signing_key:
202
+ rubygems_version: 3.6.2
203
203
  specification_version: 4
204
204
  summary: Devise based user authentication for AlchemyCMS.
205
205
  test_files: []
@@ -1,3 +0,0 @@
1
- /*
2
- *= require alchemy-devise
3
- */
@@ -1,7 +0,0 @@
1
- form {
2
-
3
- &.user_roles .checkbox {
4
- display: inline-block;
5
- width: 50%;
6
- }
7
- }