alchemy-devise 7.2.0 → 7.3.0

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: '0086737ceda4ca6a1f7aaf05ccc575070c68455eb1f97cf1a8468b28a323b84f'
4
- data.tar.gz: 01ad0968182c6ea91a3c628728a842a379329cf13793c01538edb6c091436554
3
+ metadata.gz: 50fb7555da0609c974b6455982abcc8cd18e023ab14bca6c8d925c698edca6a5
4
+ data.tar.gz: b5e00e701e89fbd07b9f63886562e0ada6e0daeba1b7c53787b91d0fb65bc844
5
5
  SHA512:
6
- metadata.gz: 724e52c32b05b1be29cbc1b786c13365836e7aa830c107491f4955742666f2730487a250452a9c84cdcad978323b497baeb674da70ff1141e8f7edde7eb02a48
7
- data.tar.gz: ec816df5fdfc7e8600facafc59d840128e8f56767e9634010433e2c487e2aefb58986b22970abc28d4c382535961e0cd4f2fbb1cf5bfcebde7db22415baba097
6
+ metadata.gz: cf3b05ce4e55d5bcedd941acbb7736a1ffe3b377d52c4084ee0bf61b387c9bc343cf07d3f21e2fa4362693fdddd3a8d7c643b71fe2d83117acfe95c43cfec90c
7
+ data.tar.gz: bea6ab34bc7216a89a835fa916dbe08b03ebb5e66db087e1cd9d38908722971cb909e370581bf0ddab822dbc5434370c1637973822d29c4391890899c3024d15
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.3.0 (2024-09-06)
4
+
5
+ - Use new resource_table component for user list [#213](https://github.com/AlchemyCMS/alchemy-devise/pull/213) ([tvdeyen](https://github.com/tvdeyen))
6
+ - Compile CSS into Gem [#211](https://github.com/AlchemyCMS/alchemy-devise/pull/211) ([tvdeyen](https://github.com/tvdeyen))
7
+
3
8
  ## 7.2.0 (2024-06-07)
4
9
 
5
10
  - 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.3.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,14 @@
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.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-07 00:00:00.000000000 Z
11
+ date: 2024-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -132,10 +132,10 @@ files:
132
132
  - CHANGELOG.md
133
133
  - LICENSE
134
134
  - README.md
135
+ - app/assets/builds/alchemy-devise.css
136
+ - app/assets/builds/alchemy-devise.css.map
135
137
  - app/assets/stylesheets/alchemy-devise.scss
136
138
  - 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
139
  - app/controllers/alchemy/admin/passwords_controller.rb
140
140
  - app/controllers/alchemy/admin/user_sessions_controller.rb
141
141
  - app/controllers/alchemy/admin/users_controller.rb
@@ -146,6 +146,8 @@ files:
146
146
  - app/views/alchemy/admin/passwords/new.html.erb
147
147
  - app/views/alchemy/admin/user_sessions/new.html.erb
148
148
  - app/views/alchemy/admin/users/_fields.html.erb
149
+ - app/views/alchemy/admin/users/_resource_table.html.erb
150
+ - app/views/alchemy/admin/users/_table.html.erb
149
151
  - app/views/alchemy/admin/users/_user.html.erb
150
152
  - app/views/alchemy/admin/users/edit.html.erb
151
153
  - app/views/alchemy/admin/users/index.html.erb
@@ -198,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
200
  - !ruby/object:Gem::Version
199
201
  version: '0'
200
202
  requirements: []
201
- rubygems_version: 3.5.9
203
+ rubygems_version: 3.5.16
202
204
  signing_key:
203
205
  specification_version: 4
204
206
  summary: Devise based user authentication for AlchemyCMS.
@@ -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
- }