activeadmin-oidc 2.2.0 → 2.2.1

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: 9047da541972355d3eca04483c7b57d51b2fcc931dda10e188cb4cf0e3ba0723
4
- data.tar.gz: b5422c866ff24c4dc3a11ae11d5c70e229494fce603af8a2d1351b6f2565ecab
3
+ metadata.gz: 7c594b010c852e97fc78daab9679704e733ed49341d26cc6763942e3aa081e47
4
+ data.tar.gz: 66c0b9c1f7557dfb9edac28392547070641c2164df4d9963018e8c8c9d3e116d
5
5
  SHA512:
6
- metadata.gz: f7ef072f775050bbb777a855180e7bfe0736919c08b5eec238368be1bccae360fd16df88fc12f3f18ea87bf5ee332b48db6db5458dfc52421366dd8722f58931
7
- data.tar.gz: e2497c94cff51a8f6451ab92b8a8ae0969b152bcef9a46d657e59258bf7e5ac6e5faee4e852c992eb22593b50581dd39bae1ad0dd76d5452ff9de87db6a36324
6
+ metadata.gz: 15fde3a273751c975c14f9bbbc43b6984796049e86649a25d6b257075834e249fb48bbafa67f9b3da0e2c12c780c0b8ba9097ba469d596742ec44a18114febcf
7
+ data.tar.gz: a8a9449b8a4b8871af049b1e55071820045f307cec42fda3850db0e999894bd14996f3c1a5d60737326fe95cad726ef6cb04c21e1ac37d1c54e93713b04c8a2a
@@ -1,13 +1,29 @@
1
1
  <% if ActiveAdmin::Oidc.aa_v4? %>
2
2
  <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
3
- <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white flex gap-2 items-center">
4
- <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
5
- </h2>
3
+ <div class="flex gap-2 items-center">
4
+ <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white flex gap-2 items-center">
5
+ <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
6
+ </h2>
7
+
8
+ <%# Active Admin's own dark mode toggle. The logged out layout renders
9
+ active_admin/html_head, which loads the JS that delegates clicks on
10
+ .dark-mode-toggle, so the button needs no script of its own. %>
11
+ <button type="button"
12
+ class="dark-mode-toggle ms-auto flex items-center w-9 h-9 justify-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm"
13
+ aria-label="<%= t('active_admin.toggle_dark_mode', default: 'Toggle dark mode') %>">
14
+ <svg class="hidden dark:block w-5 h-5 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.509 5.75c0-1.493.394-2.96 1.144-4.25h-.081a8.5 8.5 0 1 0 7.356 12.746A8.5 8.5 0 0 1 8.509 5.75Z"></path></svg>
15
+ <svg class="dark:hidden w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 3V1m0 18v-2M5.05 5.05 3.636 3.636m12.728 12.728L14.95 14.95M3 10H1m18 0h-2M5.05 14.95l-1.414 1.414M16.364 3.636 14.95 5.05M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"></path></svg>
16
+ </button>
17
+ </div>
6
18
 
7
19
  <% if ActiveAdmin::Oidc.config.stub_dev_env_login_enabled? %>
8
- <p class="activeadmin-oidc-stub-login text-sm font-semibold border border-red-400 bg-red-50 text-red-900 rounded-md p-3 dark:bg-red-900/30 dark:border-red-700 dark:text-red-100">
20
+ <%# Classes copied from Active Admin's own error flash. The gem's views are
21
+ outside the host's Tailwind content path, so only utilities Active Admin
22
+ itself already emits are compiled. %>
23
+ <div class="activeadmin-oidc-stub-login flex items-center gap-3 p-4 rounded-lg bg-red-50 text-red-800 dark:bg-red-800 dark:text-red-300">
24
+ <svg class="w-5 h-5 shrink-0 text-red-400 dark:text-red-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
9
25
  Stub login is enabled: the button below signs in without contacting the identity provider.
10
- </p>
26
+ </div>
11
27
  <% end %>
12
28
 
13
29
  <%= button_to ActiveAdmin::Oidc.config.login_button_label,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module Oidc
5
- VERSION = "2.2.0"
5
+ VERSION = "2.2.1"
6
6
  end
7
7
  end
@@ -2,14 +2,30 @@
2
2
  route while ActiveAdmin::Oidc.config.stub_dev_env_login! is on,
3
3
  which only ever happens in the development environment. %>
4
4
  <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
5
- <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white flex gap-2 items-center">
6
- <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
7
- </h2>
5
+ <div class="flex gap-2 items-center">
6
+ <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white flex gap-2 items-center">
7
+ <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
8
+ </h2>
9
+
10
+ <%# Active Admin's own dark mode toggle. The logged out layout renders
11
+ active_admin/html_head, which loads the JS that delegates clicks on
12
+ .dark-mode-toggle, so the button needs no script of its own. %>
13
+ <button type="button"
14
+ class="dark-mode-toggle ms-auto flex items-center w-9 h-9 justify-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm"
15
+ aria-label="<%= t('active_admin.toggle_dark_mode', default: 'Toggle dark mode') %>">
16
+ <svg class="hidden dark:block w-5 h-5 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.509 5.75c0-1.493.394-2.96 1.144-4.25h-.081a8.5 8.5 0 1 0 7.356 12.746A8.5 8.5 0 0 1 8.509 5.75Z"></path></svg>
17
+ <svg class="dark:hidden w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 3V1m0 18v-2M5.05 5.05 3.636 3.636m12.728 12.728L14.95 14.95M3 10H1m18 0h-2M5.05 14.95l-1.414 1.414M16.364 3.636 14.95 5.05M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"></path></svg>
18
+ </button>
19
+ </div>
8
20
 
9
21
  <% if ActiveAdmin::Oidc.config.stub_dev_env_login_enabled? %>
10
- <p class="activeadmin-oidc-stub-login text-sm font-semibold border border-red-400 bg-red-50 text-red-900 rounded-md p-3 dark:bg-red-900/30 dark:border-red-700 dark:text-red-100">
22
+ <%# Classes copied from Active Admin's own error flash. The gem's views are
23
+ outside the host's Tailwind content path, so only utilities Active Admin
24
+ itself already emits are compiled. %>
25
+ <div class="activeadmin-oidc-stub-login flex items-center gap-3 p-4 rounded-lg bg-red-50 text-red-800 dark:bg-red-800 dark:text-red-300">
26
+ <svg class="w-5 h-5 shrink-0 text-red-400 dark:text-red-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
11
27
  Stub login is enabled: the button below signs in without contacting the identity provider.
12
- </p>
28
+ </div>
13
29
  <% end %>
14
30
 
15
31
  <%= button_to ActiveAdmin::Oidc.config.login_button_label,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-oidc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Fedoronchuk