lesli_shield 1.1.8 → 1.1.9
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 +4 -4
- data/app/assets/stylesheets/lesli_shield/application.css +330 -408
- data/app/assets/stylesheets/lesli_shield/confirmations.css +89 -557
- data/app/assets/stylesheets/lesli_shield/invitations.css +115 -579
- data/app/assets/stylesheets/lesli_shield/passwords.css +76 -542
- data/app/assets/stylesheets/lesli_shield/registrations.css +66 -539
- data/app/assets/stylesheets/lesli_shield/sessions.css +98 -564
- data/app/views/devise/confirmations/new.html.erb +1 -1
- data/app/views/devise/confirmations/show.html.erb +3 -3
- data/app/views/devise/passwords/edit.html.erb +1 -1
- data/app/views/devise/passwords/new.html.erb +2 -2
- data/app/views/devise/registrations/new.html.erb +3 -3
- data/app/views/devise/sessions/new.html.erb +1 -1
- data/app/views/devise/shared/_application-devise-simple.erb +1 -1
- data/app/views/devise/shared/_application-devise.html.erb +4 -4
- data/app/views/devise/shared/_demo.html.erb +2 -2
- data/app/views/devise/shared/_error_messages.html.erb +5 -5
- data/app/views/devise/shared/_links.html.erb +4 -4
- data/app/views/lesli_shield/invites/_invite.html.erb +9 -9
- data/app/views/lesli_shield/invites/_invite_actions.html.erb +3 -3
- data/app/views/lesli_shield/invites/_status_badge.html.erb +4 -4
- data/app/views/lesli_shield/invites/index.html.erb +20 -20
- data/app/views/lesli_shield/profiles/_password-form.html.erb +1 -1
- data/app/views/lesli_shield/role/actions/_custom_actions.html.erb +7 -7
- data/app/views/lesli_shield/role/actions/_deployment_status.html.erb +2 -2
- data/app/views/lesli_shield/role/actions/_matrix.html.erb +13 -13
- data/app/views/lesli_shield/role/actions/_permissions.html.erb +9 -9
- data/app/views/lesli_shield/role/actions/_toggle.html.erb +3 -3
- data/app/views/lesli_shield/role/actions/index.html.erb +0 -1
- data/app/views/lesli_shield/roles/_deployment_badge.html.erb +3 -3
- data/app/views/lesli_shield/roles/_empty_state.html.erb +4 -4
- data/app/views/lesli_shield/roles/_field_errors.html.erb +1 -1
- data/app/views/lesli_shield/roles/_filters.html.erb +9 -9
- data/app/views/lesli_shield/roles/_form.html.erb +22 -22
- data/app/views/lesli_shield/roles/_management_menu.html.erb +5 -5
- data/app/views/lesli_shield/roles/_pagination.html.erb +7 -7
- data/app/views/lesli_shield/roles/_role_list.html.erb +19 -19
- data/app/views/lesli_shield/roles/_status_badge.html.erb +4 -4
- data/app/views/lesli_shield/roles/_type_badge.html.erb +2 -2
- data/app/views/lesli_shield/roles/new.html.erb +1 -1
- data/app/views/lesli_shield/roles/show.html.erb +10 -10
- data/app/views/lesli_shield/users/_information-card.html.erb +3 -3
- data/app/views/lesli_shield/users/_management-privileges.html.erb +2 -2
- data/app/views/users/invitations/show.html.erb +10 -10
- data/app/views/users/invitations/unavailable.html.erb +4 -4
- data/lib/lesli_shield/version.rb +2 -2
- metadata +2 -8
- data/app/assets/stylesheets/lesli_shield/confirmations.tailwind.css +0 -918
- data/app/assets/stylesheets/lesli_shield/devise/oauth.css +0 -33
- data/app/assets/stylesheets/lesli_shield/passwords.tailwind.css +0 -873
- data/app/assets/stylesheets/lesli_shield/registrations.tailwind.css +0 -908
- data/app/assets/stylesheets/lesli_shield/sessions.tailwind.css +0 -984
- data/app/assets/stylesheets/lesli_shield/users.css +0 -31
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
builder: LesliView::Forms::Builder
|
|
12
12
|
) do |form| %>
|
|
13
13
|
|
|
14
|
-
<p class="mb-6 text-center text-sm leading-6 text-
|
|
14
|
+
<p class="mb-6 text-center text-sm leading-6 text-neutral-600">
|
|
15
15
|
<%= I18n.t(
|
|
16
16
|
"lesli_shield.devise_confirmations.view_description"
|
|
17
17
|
) %>
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
title: I18n.t("lesli_shield.devise_confirmations.view_success_title")
|
|
4
4
|
) do %>
|
|
5
5
|
<section
|
|
6
|
-
class="my-8 w-full max-w-lg rounded-xl border border-
|
|
6
|
+
class="my-8 w-full max-w-lg rounded-xl border border-success-200 bg-white p-8 text-center shadow-sm"
|
|
7
7
|
role="status"
|
|
8
8
|
>
|
|
9
9
|
<span
|
|
10
|
-
class="material-symbols-outlined text-5xl text-
|
|
10
|
+
class="material-symbols-outlined text-5xl text-success-600"
|
|
11
11
|
aria-hidden="true"
|
|
12
12
|
>
|
|
13
13
|
verified
|
|
14
14
|
</span>
|
|
15
15
|
|
|
16
|
-
<p class="mt-4 text-sm leading-6 text-
|
|
16
|
+
<p class="mt-4 text-sm leading-6 text-neutral-600">
|
|
17
17
|
<%= I18n.t(
|
|
18
18
|
"lesli_shield.devise_confirmations.view_success_description"
|
|
19
19
|
) %>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
builder: LesliView::Forms::Builder
|
|
12
12
|
) do |form| %>
|
|
13
13
|
|
|
14
|
-
<p class="mb-6 text-center text-sm leading-6 text-
|
|
14
|
+
<p class="mb-6 text-center text-sm leading-6 text-neutral-600">
|
|
15
15
|
<%= I18n.t("lesli_shield.devise_passwords.view_update_description") %>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
builder: LesliView::Forms::Builder
|
|
13
13
|
) do |form| %>
|
|
14
14
|
|
|
15
|
-
<p class="mb-6 text-center text-sm leading-6 text-
|
|
15
|
+
<p class="mb-6 text-center text-sm leading-6 text-neutral-600">
|
|
16
16
|
<%= I18n.t("lesli_shield.devise_passwords.view_request_description") %>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
) %>
|
|
44
44
|
|
|
45
45
|
<% if Lesli.config.security.dig(:allow_registration) %>
|
|
46
|
-
<p class="mt-6 text-center text-sm text-
|
|
46
|
+
<p class="mt-6 text-center text-sm text-neutral-600">
|
|
47
47
|
<%= I18n.t(
|
|
48
48
|
"lesli_shield.devise_sessions.view_still_not_registered"
|
|
49
49
|
) %>
|
|
@@ -45,7 +45,7 @@ title = I18n.t("overrides.lesli_shield.devise_registrations.view_title",
|
|
|
45
45
|
builder: LesliView::Forms::Builder
|
|
46
46
|
) do |form| %>
|
|
47
47
|
|
|
48
|
-
<p class="mb-6 text-center text-sm leading-6 text-
|
|
48
|
+
<p class="mb-6 text-center text-sm leading-6 text-neutral-600">
|
|
49
49
|
<%= I18n.t("lesli_shield.devise_registrations.view_description") %>
|
|
50
50
|
</p>
|
|
51
51
|
|
|
@@ -98,7 +98,7 @@ title = I18n.t("overrides.lesli_shield.devise_registrations.view_title",
|
|
|
98
98
|
) %>
|
|
99
99
|
|
|
100
100
|
<div class="mb-4">
|
|
101
|
-
<p class="text-left text-xs leading-5 text-
|
|
101
|
+
<p class="text-left text-xs leading-5 text-neutral-500">
|
|
102
102
|
<%= I18n.t("lesli_shield.devise_registrations.view_legal_notice") %>
|
|
103
103
|
</p>
|
|
104
104
|
</div>
|
|
@@ -119,7 +119,7 @@ title = I18n.t("overrides.lesli_shield.devise_registrations.view_title",
|
|
|
119
119
|
icon: "person_add"
|
|
120
120
|
) %>
|
|
121
121
|
|
|
122
|
-
<p class="mt-1 text-center text-sm text-
|
|
122
|
+
<p class="mt-1 text-center text-sm text-neutral-600">
|
|
123
123
|
<%= I18n.t("lesli_shield.devise_registrations.view_already_have_an_account") %>
|
|
124
124
|
<%= link_to(
|
|
125
125
|
I18n.t("lesli_shield.devise_registrations.button_login"),
|
|
@@ -106,7 +106,7 @@ end
|
|
|
106
106
|
) %>
|
|
107
107
|
|
|
108
108
|
<% if Lesli.config.security.dig(:allow_registration) %>
|
|
109
|
-
<p class="mt-1 text-center text-sm text-
|
|
109
|
+
<p class="mt-1 text-center text-sm text-neutral-600">
|
|
110
110
|
<%= I18n.t("lesli_shield.devise_sessions.view_still_not_registered") %>
|
|
111
111
|
<%= link_to I18n.t("lesli_shield.devise_sessions.button_create_account"),
|
|
112
112
|
new_user_registration_path %>
|
|
@@ -51,7 +51,7 @@ Building a better future, one line of code at a time.
|
|
|
51
51
|
</div>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
|
-
<div class="flex flex-1 flex-col items-center border-t border-
|
|
54
|
+
<div class="flex flex-1 flex-col items-center border-t border-neutral-200 bg-neutral-50 px-4 py-8 sm:px-6 [&>form]:my-6 [&>form]:w-full [&>form]:max-w-lg [&>form]:rounded-xl [&>form]:border [&>form]:border-neutral-200 [&>form]:bg-white [&>form]:p-6 [&>form]:shadow-sm sm:[&>form]:my-8 sm:[&>form]:p-10">
|
|
55
55
|
<%= yield %>
|
|
56
56
|
</div>
|
|
57
57
|
</section>
|
|
@@ -33,12 +33,12 @@ Building a better future, one line of code at a time.
|
|
|
33
33
|
<% title = local_assigns.fetch(:title, "") %>
|
|
34
34
|
<% back_to_login = local_assigns.fetch(:back_to_login, false) %>
|
|
35
35
|
|
|
36
|
-
<main id="lesli-application" class="min-h-screen bg-
|
|
36
|
+
<main id="lesli-application" class="min-h-screen bg-neutral-50 lg:grid lg:grid-cols-3">
|
|
37
37
|
<section class="flex min-h-screen flex-col bg-white">
|
|
38
38
|
<% if back_to_login %>
|
|
39
39
|
<div class="px-6 pt-6 sm:px-10 sm:pt-8">
|
|
40
40
|
<%= link_to new_user_session_path,
|
|
41
|
-
class: "inline-flex items-center gap-2 rounded-lg text-sm font-medium text-
|
|
41
|
+
class: "inline-flex items-center gap-2 rounded-lg text-sm font-medium text-primary-strong transition hover:text-primary-strong focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-4" do %>
|
|
42
42
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
|
43
43
|
<path d="m12.5 15-5-5 5-5" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
44
44
|
</svg>
|
|
@@ -57,7 +57,7 @@ Building a better future, one line of code at a time.
|
|
|
57
57
|
) %>
|
|
58
58
|
|
|
59
59
|
<% if title.present? %>
|
|
60
|
-
<h1 class="text-3xl font-semibold tracking-tight text-
|
|
60
|
+
<h1 class="text-3xl font-semibold tracking-tight text-neutral-900"><%= title %></h1>
|
|
61
61
|
<% end %>
|
|
62
62
|
</div>
|
|
63
63
|
|
|
@@ -67,7 +67,7 @@ Building a better future, one line of code at a time.
|
|
|
67
67
|
</section>
|
|
68
68
|
|
|
69
69
|
<aside class="lesli-auth-visual relative hidden min-h-screen overflow-hidden lg:col-span-2 lg:block" aria-hidden="true">
|
|
70
|
-
<div class="absolute inset-0 bg-gradient-to-t from-
|
|
70
|
+
<div class="absolute inset-0 bg-gradient-to-t from-neutral-900/70 via-neutral-900/10 to-transparent"></div>
|
|
71
71
|
<div class="absolute inset-x-0 bottom-0 p-12 text-white">
|
|
72
72
|
<p class="max-w-lg text-3xl font-semibold leading-tight">
|
|
73
73
|
<%= I18n.t("lesli_shield.authentication.tagline", default: "A better way to manage your work.") %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
<fieldset data-demo-credentials class="mb-8 rounded-xl border border-
|
|
3
|
-
<legend class="px-2 font-semibold text-
|
|
2
|
+
<fieldset data-demo-credentials class="mb-8 rounded-xl border border-info-200 bg-info-50 px-4 pb-4 text-sm text-info-900">
|
|
3
|
+
<legend class="px-2 font-semibold text-info-800">
|
|
4
4
|
<%= I18n.t("lesli_shield.devise_sessions.demo_title") %>
|
|
5
5
|
</legend>
|
|
6
6
|
<dl class="mt-1 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if flash[:notice] %>
|
|
2
2
|
<div
|
|
3
|
-
class="mb-6 rounded-lg border border-
|
|
3
|
+
class="mb-6 rounded-lg border border-success-200 bg-success-50 px-4 py-3 text-left text-sm text-success-900"
|
|
4
4
|
role="status"
|
|
5
5
|
aria-live="polite"
|
|
6
6
|
data-turbo-cache="false"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<% if flash[:success] %>
|
|
13
13
|
<div
|
|
14
|
-
class="mb-6 rounded-lg border border-
|
|
14
|
+
class="mb-6 rounded-lg border border-success-200 bg-success-50 px-4 py-3 text-left text-sm text-success-900"
|
|
15
15
|
role="status"
|
|
16
16
|
aria-live="polite"
|
|
17
17
|
data-turbo-cache="false"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<% if flash[:alert] %>
|
|
24
24
|
<div
|
|
25
|
-
class="mb-6 rounded-lg border border-
|
|
25
|
+
class="mb-6 rounded-lg border border-danger-200 bg-danger-50 px-4 py-3 text-left text-sm text-danger-900"
|
|
26
26
|
role="alert"
|
|
27
27
|
data-turbo-cache="false"
|
|
28
28
|
>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
<% if flash[:danger] %>
|
|
34
34
|
<div
|
|
35
|
-
class="mb-6 rounded-lg border border-
|
|
35
|
+
class="mb-6 rounded-lg border border-danger-200 bg-danger-50 px-4 py-3 text-left text-sm text-danger-900"
|
|
36
36
|
role="alert"
|
|
37
37
|
data-turbo-cache="false"
|
|
38
38
|
>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<% if resource.errors.any? %>
|
|
44
44
|
<div
|
|
45
45
|
id="error_explanation"
|
|
46
|
-
class="mb-6 rounded-lg border border-
|
|
46
|
+
class="mb-6 rounded-lg border border-danger-200 bg-danger-50 px-4 py-3 text-left text-danger-900"
|
|
47
47
|
role="alert"
|
|
48
48
|
tabindex="-1"
|
|
49
49
|
autofocus
|
|
@@ -61,8 +61,8 @@ Building a better future, one line of code at a time.
|
|
|
61
61
|
<%= link_to(pass_path) do %>
|
|
62
62
|
<span class="icon mr-1">
|
|
63
63
|
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
-
<path d="M17.5 7.25005H15.25C14.6748 7.25005 14.0996 7.34967 13.5498 7.52545C14.1748 8.00005 14.7002 8.57525 15.0996 9.25005H15.25H17.5C19.2998 9.25005 20.75 10.7003 20.75 12.5001C20.75 14.2999 19.2998 15.7501 17.5 15.7501H15.25C15.0996 15.7501 14.9248 15.7247 14.7754 15.7003H14.75C13.2002 15.4503 12 14.125 12 12.5C12 11.5 11.3496 10.6504 10.4502 10.375C10.1504 11.0254 10 11.75 10 12.5C10 15.4005 12.3496 17.75 15.25 17.75H17.5C20.4005 17.75 22.75 15.4004 22.75 12.5C22.75 9.5996 20.4004 7.25 17.5 7.25V7.25005Z" fill="
|
|
65
|
-
<path d="M9.9248 15.7502H7.5C5.7002 15.7502 4.25 14.3 4.25 12.5002C4.25 10.7004 5.7002 9.25024 7.5 9.25024H9.75C11.5498 9.25024 13 10.7004 13 12.5002C13 13.5002 13.6504 14.3498 14.5498 14.6252C14.8496 13.9748 15 13.2502 15 12.5002C15 9.59974 12.6504 7.25024 9.75 7.25024H7.5C4.5995 7.25024 2.25 9.59984 2.25 12.5002C2.25 15.4006 4.5996 17.7502 7.5 17.7502H9.75C10.3252 17.7502 10.9004 17.6506 11.4502 17.4504C10.8496 17.0002 10.3252 16.4006 9.9248 15.7502Z" fill="
|
|
64
|
+
<path d="M17.5 7.25005H15.25C14.6748 7.25005 14.0996 7.34967 13.5498 7.52545C14.1748 8.00005 14.7002 8.57525 15.0996 9.25005H15.25H17.5C19.2998 9.25005 20.75 10.7003 20.75 12.5001C20.75 14.2999 19.2998 15.7501 17.5 15.7501H15.25C15.0996 15.7501 14.9248 15.7247 14.7754 15.7003H14.75C13.2002 15.4503 12 14.125 12 12.5C12 11.5 11.3496 10.6504 10.4502 10.375C10.1504 11.0254 10 11.75 10 12.5C10 15.4005 12.3496 17.75 15.25 17.75H17.5C20.4005 17.75 22.75 15.4004 22.75 12.5C22.75 9.5996 20.4004 7.25 17.5 7.25V7.25005Z" fill="currentColor"/>
|
|
65
|
+
<path d="M9.9248 15.7502H7.5C5.7002 15.7502 4.25 14.3 4.25 12.5002C4.25 10.7004 5.7002 9.25024 7.5 9.25024H9.75C11.5498 9.25024 13 10.7004 13 12.5002C13 13.5002 13.6504 14.3498 14.5498 14.6252C14.8496 13.9748 15 13.2502 15 12.5002C15 9.59974 12.6504 7.25024 9.75 7.25024H7.5C4.5995 7.25024 2.25 9.59984 2.25 12.5002C2.25 15.4006 4.5996 17.7502 7.5 17.7502H9.75C10.3252 17.7502 10.9004 17.6506 11.4502 17.4504C10.8496 17.0002 10.3252 16.4006 9.9248 15.7502Z" fill="currentColor"/>
|
|
66
66
|
</svg>
|
|
67
67
|
</span>
|
|
68
68
|
<span><%= I18n.t("lesli_shield.devise_shared.button_magic_link") %></span>
|
|
@@ -76,8 +76,8 @@ Building a better future, one line of code at a time.
|
|
|
76
76
|
<%= link_to("otp_path") do %>
|
|
77
77
|
<span class="icon mr-1">
|
|
78
78
|
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="17" fill="none" viewBox="0 0 23.441 17.473">
|
|
79
|
-
<path fill="
|
|
80
|
-
<path fill="
|
|
79
|
+
<path fill="currentColor" d="M6.253 2.41A6.253 6.253 0 0 0 .035 7.997a6.251 6.251 0 0 0 9.323 6.086 6.252 6.252 0 0 0 2.829-3.47h1.097v-.781h-.894a6.104 6.104 0 0 0 0-2.344h9.293l.879 1.172-.88 1.172h-.425l-1.055-1.059a.389.389 0 0 0-.554 0l-1.055 1.059h-.41l-.668-.997a.39.39 0 0 0-.649 0l-.668.997h-.57v.78h.781c.131 0 .252-.066.324-.175l.457-.684.457.684c.073.11.194.175.325.176h.78a.389.389 0 0 0 .278-.113l.895-.899.894.899a.388.388 0 0 0 .278.113h.78a.39.39 0 0 0 .313-.156l1.172-1.563a.39.39 0 0 0 0-.469L22.19 6.863a.39.39 0 0 0-.312-.156h-9.692A6.254 6.254 0 0 0 6.253 2.41Zm0 11.718c-.133 0-.261 0-.39-.02v-.76h.78v.76c-.128.02-.257.02-.39.02zM2.738 6.706h-.782v-.78h.782zm7.031-.78h.781v.78H9.77Zm-1.563 6.25h.782v.78h-.782zm-3.906.78H3.52v-.78H4.3zm6.25-1.562H9.77v-.781h.781ZM6.644 9.761v2.024h-.781V9.76a1.17 1.17 0 0 1-.711-.71H3.128v-.782h2.024a1.172 1.172 0 1 1 1.492 1.492zm-3.906 1.633h-.782v-.781h.782zm5.468-6.25v-.781h.782v.781zm-3.906 0H3.52v-.781H4.3zM1.566 8.269v.781H.804V8.27zm9.375.781V8.27h.781c0 .129.02.258.02.39 0 .133 0 .262-.02.391zM6.644 3.972h-.782v-.781h.781z"/>
|
|
80
|
+
<path fill="currentColor" d="m.134 2.09.492.61a8.595 8.595 0 0 1 10.973.125l.508-.594a9.372 9.372 0 0 0-11.973-.14ZM.69 14.774l-.492.609a9.38 9.38 0 0 0 11.973-.14l-.508-.594a8.596 8.596 0 0 1-10.972.125zM9.767 11.786v-.781h.782v.781z"/>
|
|
81
81
|
</svg>
|
|
82
82
|
</span>
|
|
83
83
|
<span><%= I18n.t("lesli_shield.devise_shared.button_one_time_password") %></span>
|
|
@@ -24,13 +24,13 @@ details = [
|
|
|
24
24
|
]
|
|
25
25
|
%>
|
|
26
26
|
|
|
27
|
-
<article id="<%= dom_id invite %>" class="overflow-hidden rounded-2xl border border-
|
|
28
|
-
<div class="flex flex-col gap-3 border-b border-
|
|
27
|
+
<article id="<%= dom_id invite %>" class="overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-sm">
|
|
28
|
+
<div class="flex flex-col gap-3 border-b border-neutral-200 bg-neutral-50 px-6 py-5 sm:flex-row sm:items-center sm:justify-between">
|
|
29
29
|
<div>
|
|
30
|
-
<p class="text-sm font-medium text-
|
|
30
|
+
<p class="text-sm font-medium text-neutral-500">
|
|
31
31
|
<%= I18n.t("lesli_shield.invites.detail_recipient") %>
|
|
32
32
|
</p>
|
|
33
|
-
<p class="mt-1 text-lg font-semibold text-
|
|
33
|
+
<p class="mt-1 text-lg font-semibold text-neutral-900">
|
|
34
34
|
<%= invite.full_name.presence || invite.email %>
|
|
35
35
|
</p>
|
|
36
36
|
</div>
|
|
@@ -39,17 +39,17 @@ details = [
|
|
|
39
39
|
|
|
40
40
|
<dl class="grid grid-cols-1 sm:grid-cols-2">
|
|
41
41
|
<% details.each do |label, value| %>
|
|
42
|
-
<div class="border-b border-
|
|
43
|
-
<dt class="text-sm font-medium text-
|
|
44
|
-
<dd class="mt-1 break-words text-sm font-semibold text-
|
|
42
|
+
<div class="border-b border-neutral-100 px-6 py-5 sm:odd:border-r">
|
|
43
|
+
<dt class="text-sm font-medium text-neutral-500"><%= label %></dt>
|
|
44
|
+
<dd class="mt-1 break-words text-sm font-semibold text-neutral-900"><%= value %></dd>
|
|
45
45
|
</div>
|
|
46
46
|
<% end %>
|
|
47
47
|
</dl>
|
|
48
48
|
|
|
49
49
|
<div class="px-6 py-5">
|
|
50
|
-
<h2 class="text-sm font-medium text-
|
|
50
|
+
<h2 class="text-sm font-medium text-neutral-500">
|
|
51
51
|
<%= I18n.t("lesli_shield.invites.detail_message") %>
|
|
52
52
|
</h2>
|
|
53
|
-
<p class="mt-2 whitespace-pre-wrap text-sm leading-6 text-
|
|
53
|
+
<p class="mt-2 whitespace-pre-wrap text-sm leading-6 text-neutral-700"><%= invite.notes.presence || "—" %></p>
|
|
54
54
|
</div>
|
|
55
55
|
</article>
|
|
@@ -7,7 +7,7 @@ action_classes = "inline-flex h-9 items-center justify-center rounded-lg border
|
|
|
7
7
|
<% if show_view %>
|
|
8
8
|
<%= link_to I18n.t("lesli_shield.invites.action_view"),
|
|
9
9
|
invite_path(invite),
|
|
10
|
-
class: "#{action_classes} border-
|
|
10
|
+
class: "#{action_classes} border-neutral-200 bg-white text-neutral-700 hover:bg-neutral-50 focus:ring-neutral-500/10" %>
|
|
11
11
|
<% end %>
|
|
12
12
|
|
|
13
13
|
<% if invite.resend_available? %>
|
|
@@ -15,7 +15,7 @@ action_classes = "inline-flex h-9 items-center justify-center rounded-lg border
|
|
|
15
15
|
resend_invite_path(invite),
|
|
16
16
|
method: :post,
|
|
17
17
|
form: { class: "inline" },
|
|
18
|
-
class: "#{action_classes} border-
|
|
18
|
+
class: "#{action_classes} border-primary-muted bg-primary-soft text-primary-strong hover:border-primary focus:ring-primary/20",
|
|
19
19
|
data: {
|
|
20
20
|
turbo_confirm: I18n.t("lesli_shield.invites.confirm_resend")
|
|
21
21
|
} %>
|
|
@@ -26,7 +26,7 @@ action_classes = "inline-flex h-9 items-center justify-center rounded-lg border
|
|
|
26
26
|
cancel_invite_path(invite),
|
|
27
27
|
method: :patch,
|
|
28
28
|
form: { class: "inline" },
|
|
29
|
-
class: "#{action_classes} border-
|
|
29
|
+
class: "#{action_classes} border-danger-200 bg-danger-50 text-danger-700 hover:bg-danger-100 focus:ring-danger-500/10",
|
|
30
30
|
data: {
|
|
31
31
|
turbo_confirm: I18n.t("lesli_shield.invites.confirm_cancel")
|
|
32
32
|
} %>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<%
|
|
2
2
|
status = invite.lifecycle_status
|
|
3
3
|
status_classes = {
|
|
4
|
-
"pending" => "bg-
|
|
5
|
-
"accepted" => "bg-
|
|
6
|
-
"cancelled" => "bg-
|
|
7
|
-
"expired" => "bg-
|
|
4
|
+
"pending" => "bg-warning-50 text-warning-700 ring-warning-600/20",
|
|
5
|
+
"accepted" => "bg-success-50 text-success-700 ring-success-600/20",
|
|
6
|
+
"cancelled" => "bg-neutral-100 text-neutral-600 ring-neutral-500/20",
|
|
7
|
+
"expired" => "bg-danger-50 text-danger-700 ring-danger-600/20"
|
|
8
8
|
}
|
|
9
9
|
%>
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ status_filters = [
|
|
|
14
14
|
I18n.t("lesli_shield.invites.subtitle")
|
|
15
15
|
) do %>
|
|
16
16
|
<%= link_to new_invite_path,
|
|
17
|
-
class: "inline-flex h-10 items-center justify-center gap-2 rounded-xl bg-
|
|
17
|
+
class: "inline-flex h-10 items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-semibold text-white shadow-sm transition hover:bg-primary-strong focus:outline-none focus:ring-4 focus:ring-primary/20" do %>
|
|
18
18
|
<span class="material-symbols" aria-hidden="true">person_add</span>
|
|
19
19
|
<span><%= I18n.t("lesli_shield.invites.action_create") %></span>
|
|
20
20
|
<% end %>
|
|
@@ -27,10 +27,10 @@ status_filters = [
|
|
|
27
27
|
<%
|
|
28
28
|
active = @status_filter == status
|
|
29
29
|
filter_classes = class_names(
|
|
30
|
-
"inline-flex items-center rounded-full border px-3 py-1.5 text-sm font-medium transition focus:outline-none focus:ring-4 focus:ring-
|
|
30
|
+
"inline-flex items-center rounded-full border px-3 py-1.5 text-sm font-medium transition focus:outline-none focus:ring-4 focus:ring-primary/10",
|
|
31
31
|
active ?
|
|
32
|
-
"border-
|
|
33
|
-
"border-
|
|
32
|
+
"border-primary bg-primary text-white" :
|
|
33
|
+
"border-neutral-200 bg-white text-neutral-600 hover:border-neutral-300 hover:text-neutral-900"
|
|
34
34
|
)
|
|
35
35
|
%>
|
|
36
36
|
<%= link_to label,
|
|
@@ -41,41 +41,41 @@ status_filters = [
|
|
|
41
41
|
</nav>
|
|
42
42
|
|
|
43
43
|
<% if records.any? %>
|
|
44
|
-
<div class="overflow-hidden rounded-2xl border border-
|
|
44
|
+
<div class="overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-sm">
|
|
45
45
|
<div class="overflow-x-auto">
|
|
46
|
-
<table class="min-w-full divide-y divide-
|
|
47
|
-
<thead class="bg-
|
|
46
|
+
<table class="min-w-full divide-y divide-neutral-200">
|
|
47
|
+
<thead class="bg-neutral-50">
|
|
48
48
|
<tr>
|
|
49
49
|
<% %w[recipient role status sent_at expires_at actions].each do |column| %>
|
|
50
|
-
<th scope="col" class="px-5 py-3 text-left text-xs font-semibold uppercase tracking-wide text-
|
|
50
|
+
<th scope="col" class="px-5 py-3 text-left text-xs font-semibold uppercase tracking-wide text-neutral-500">
|
|
51
51
|
<%= I18n.t("lesli_shield.invites.column_#{column}") %>
|
|
52
52
|
</th>
|
|
53
53
|
<% end %>
|
|
54
54
|
</tr>
|
|
55
55
|
</thead>
|
|
56
|
-
<tbody class="divide-y divide-
|
|
56
|
+
<tbody class="divide-y divide-neutral-100 bg-white">
|
|
57
57
|
<% records.each do |invite| %>
|
|
58
|
-
<tr class="transition hover:bg-
|
|
58
|
+
<tr class="transition hover:bg-neutral-50/80">
|
|
59
59
|
<td class="whitespace-nowrap px-5 py-4">
|
|
60
60
|
<%= link_to invite_path(invite), class: "block focus:outline-none" do %>
|
|
61
|
-
<span class="block text-sm font-semibold text-
|
|
61
|
+
<span class="block text-sm font-semibold text-neutral-900">
|
|
62
62
|
<%= invite.full_name.presence || invite.email %>
|
|
63
63
|
</span>
|
|
64
64
|
<% if invite.full_name.present? %>
|
|
65
|
-
<span class="mt-0.5 block text-sm text-
|
|
65
|
+
<span class="mt-0.5 block text-sm text-neutral-500"><%= invite.email %></span>
|
|
66
66
|
<% end %>
|
|
67
67
|
<% end %>
|
|
68
68
|
</td>
|
|
69
|
-
<td class="whitespace-nowrap px-5 py-4 text-sm text-
|
|
69
|
+
<td class="whitespace-nowrap px-5 py-4 text-sm text-neutral-600">
|
|
70
70
|
<%= invite.role&.name || I18n.t("lesli_shield.invites.value_not_available") %>
|
|
71
71
|
</td>
|
|
72
72
|
<td class="whitespace-nowrap px-5 py-4">
|
|
73
73
|
<%= render "status_badge", invite: invite %>
|
|
74
74
|
</td>
|
|
75
|
-
<td class="whitespace-nowrap px-5 py-4 text-sm text-
|
|
75
|
+
<td class="whitespace-nowrap px-5 py-4 text-sm text-neutral-600">
|
|
76
76
|
<%= invite.sent_at.present? ? I18n.l(invite.sent_at, format: :short) : "—" %>
|
|
77
77
|
</td>
|
|
78
|
-
<td class="whitespace-nowrap px-5 py-4 text-sm text-
|
|
78
|
+
<td class="whitespace-nowrap px-5 py-4 text-sm text-neutral-600">
|
|
79
79
|
<%= invite.expires_at.present? ? I18n.l(invite.expires_at, format: :short) : "—" %>
|
|
80
80
|
</td>
|
|
81
81
|
<td class="whitespace-nowrap px-5 py-4">
|
|
@@ -107,17 +107,17 @@ status_filters = [
|
|
|
107
107
|
empty_action_path = new_invite_path
|
|
108
108
|
end
|
|
109
109
|
%>
|
|
110
|
-
<section class="rounded-2xl border border-dashed border-
|
|
111
|
-
<span class="material-symbols mx-auto mb-4 block text-5xl text-
|
|
112
|
-
<h2 class="text-lg font-semibold text-
|
|
110
|
+
<section class="rounded-2xl border border-dashed border-neutral-300 bg-white px-6 py-16 text-center shadow-sm">
|
|
111
|
+
<span class="material-symbols mx-auto mb-4 block text-5xl text-neutral-300" aria-hidden="true">person_add</span>
|
|
112
|
+
<h2 class="text-lg font-semibold text-neutral-900">
|
|
113
113
|
<%= empty_title %>
|
|
114
114
|
</h2>
|
|
115
|
-
<p class="mx-auto mt-2 max-w-md text-sm leading-6 text-
|
|
115
|
+
<p class="mx-auto mt-2 max-w-md text-sm leading-6 text-neutral-500">
|
|
116
116
|
<%= empty_description %>
|
|
117
117
|
</p>
|
|
118
118
|
<%= link_to empty_action,
|
|
119
119
|
empty_action_path,
|
|
120
|
-
class: "mt-6 inline-flex h-10 items-center justify-center rounded-xl bg-
|
|
120
|
+
class: "mt-6 inline-flex h-10 items-center justify-center rounded-xl bg-primary px-4 text-sm font-semibold text-white shadow-sm transition hover:bg-primary-strong focus:outline-none focus:ring-4 focus:ring-primary/20" %>
|
|
121
121
|
</section>
|
|
122
122
|
<% end %>
|
|
123
123
|
<% end %>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<div class="divide-y divide-
|
|
2
|
-
<h3 class="px-4 py-3 text-sm font-semibold text-
|
|
1
|
+
<div class="divide-y divide-neutral-200 border-t border-neutral-200" data-custom-actions>
|
|
2
|
+
<h3 class="px-4 py-3 text-sm font-semibold text-neutral-900 sm:px-5">
|
|
3
3
|
<%= t("lesli_shield.roles.permissions_custom_actions") %>
|
|
4
4
|
</h3>
|
|
5
5
|
<% resources.each do |resource| %>
|
|
6
6
|
<fieldset class="px-4 py-5 sm:px-5">
|
|
7
7
|
<legend class="w-full">
|
|
8
|
-
<span class="block text-sm font-semibold text-
|
|
9
|
-
<span class="mt-0.5 block break-all font-mono text-xs text-
|
|
8
|
+
<span class="block text-sm font-semibold text-neutral-900"><%= resource[:label] %></span>
|
|
9
|
+
<span class="mt-0.5 block break-all font-mono text-xs text-neutral-500"><%= resource[:route] %></span>
|
|
10
10
|
</legend>
|
|
11
11
|
<div class="mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
|
|
12
12
|
<% resource[:actions].reject { |action| action[:standard] }.each do |action| %>
|
|
13
|
-
<div class="flex min-h-14 items-start gap-3 rounded-xl border border-
|
|
13
|
+
<div class="flex min-h-14 items-start gap-3 rounded-xl border border-neutral-200 bg-white p-3">
|
|
14
14
|
<%= render "toggle", action: action %>
|
|
15
15
|
<span class="min-w-0 flex-1">
|
|
16
|
-
<span class="block text-sm font-semibold text-
|
|
17
|
-
<span class="mt-0.5 block break-all font-mono text-xs text-
|
|
16
|
+
<span class="block text-sm font-semibold text-neutral-900"><%= action[:display_label] %></span>
|
|
17
|
+
<span class="mt-0.5 block break-all font-mono text-xs text-neutral-500"><%= action[:action] %></span>
|
|
18
18
|
</span>
|
|
19
19
|
</div>
|
|
20
20
|
<% end %>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div
|
|
2
2
|
id="role-permission-deployment-status"
|
|
3
|
-
class="flex min-h-10 items-center gap-2 rounded-xl border border-
|
|
3
|
+
class="flex min-h-10 items-center gap-2 rounded-xl border border-neutral-200 bg-white px-3 shadow-sm"
|
|
4
4
|
>
|
|
5
5
|
<%= render "lesli_shield/roles/deployment_badge", role: @role %>
|
|
6
6
|
<% if @role.deployed_at.present? %>
|
|
7
7
|
<time
|
|
8
8
|
datetime="<%= @role.deployed_at.iso8601 %>"
|
|
9
|
-
class="hidden text-xs text-
|
|
9
|
+
class="hidden text-xs text-neutral-500 sm:inline"
|
|
10
10
|
>
|
|
11
11
|
<%= l(@role.deployed_at, format: :short) %>
|
|
12
12
|
</time>
|
|
@@ -10,11 +10,11 @@ standard_action_names = LesliShield::RolePermissionService::STANDARD_ACTION_ORDE
|
|
|
10
10
|
%>
|
|
11
11
|
<section
|
|
12
12
|
id="permission-engine-<%= engine[:engine].parameterize %>"
|
|
13
|
-
class="scroll-mt-4 overflow-hidden rounded-xl border border-
|
|
13
|
+
class="scroll-mt-4 overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm"
|
|
14
14
|
>
|
|
15
|
-
<header class="flex items-center justify-between gap-4 border-b border-
|
|
16
|
-
<h2 class="font-semibold text-
|
|
17
|
-
<p class="text-right text-xs text-
|
|
15
|
+
<header class="flex items-center justify-between gap-4 border-b border-neutral-200 bg-neutral-50 px-4 py-4 sm:px-5">
|
|
16
|
+
<h2 class="font-semibold text-neutral-900"><%= engine[:label] %></h2>
|
|
17
|
+
<p class="text-right text-xs text-neutral-600">
|
|
18
18
|
<%= t(
|
|
19
19
|
"lesli_shield.roles.permissions_module_summary",
|
|
20
20
|
selected: engine_actions.count { |action| action[:assigned] },
|
|
@@ -25,35 +25,35 @@ standard_action_names = LesliShield::RolePermissionService::STANDARD_ACTION_ORDE
|
|
|
25
25
|
|
|
26
26
|
<% if standard_resources.any? %>
|
|
27
27
|
<table class="block w-full xl:table">
|
|
28
|
-
<thead class="hidden bg-
|
|
28
|
+
<thead class="hidden bg-neutral-50 xl:table-header-group">
|
|
29
29
|
<tr>
|
|
30
|
-
<th scope="col" class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-
|
|
30
|
+
<th scope="col" class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-neutral-500 sm:px-5">
|
|
31
31
|
<%= t("lesli_shield.roles.permissions_resource") %>
|
|
32
32
|
</th>
|
|
33
33
|
<% standard_action_names.each do |action_name| %>
|
|
34
|
-
<th scope="col" class="px-2 py-3 text-center text-xs font-semibold uppercase tracking-wide text-
|
|
34
|
+
<th scope="col" class="px-2 py-3 text-center text-xs font-semibold uppercase tracking-wide text-neutral-500">
|
|
35
35
|
<%= t("lesli_shield.roles.permissions_standard_actions_#{action_name}") %>
|
|
36
36
|
</th>
|
|
37
37
|
<% end %>
|
|
38
38
|
</tr>
|
|
39
39
|
</thead>
|
|
40
|
-
<tbody class="block divide-y divide-
|
|
40
|
+
<tbody class="block divide-y divide-neutral-200 xl:table-row-group">
|
|
41
41
|
<% standard_resources.each do |resource| %>
|
|
42
42
|
<tr class="block p-4 xl:table-row xl:p-0">
|
|
43
43
|
<th scope="row" class="block pb-3 text-left xl:table-cell xl:px-5 xl:py-4 xl:align-middle">
|
|
44
|
-
<span class="block text-sm font-semibold text-
|
|
45
|
-
<span class="mt-0.5 block break-all font-mono text-xs font-normal text-
|
|
44
|
+
<span class="block text-sm font-semibold text-neutral-900"><%= resource[:label] %></span>
|
|
45
|
+
<span class="mt-0.5 block break-all font-mono text-xs font-normal text-neutral-500"><%= resource[:route] %></span>
|
|
46
46
|
</th>
|
|
47
47
|
<% standard_action_names.each do |action_name| %>
|
|
48
48
|
<% action = resource[:actions].find { |candidate| candidate[:action] == action_name } %>
|
|
49
49
|
<td class="block py-1 xl:table-cell xl:px-2 xl:py-4 xl:text-center xl:align-middle">
|
|
50
50
|
<% if action %>
|
|
51
|
-
<div class="flex min-h-11 items-center justify-between gap-3 rounded-lg px-2 py-2 transition hover:bg-
|
|
52
|
-
<span class="text-sm font-medium text-
|
|
51
|
+
<div class="flex min-h-11 items-center justify-between gap-3 rounded-lg px-2 py-2 transition hover:bg-primary-soft xl:flex-col xl:justify-center">
|
|
52
|
+
<span class="text-sm font-medium text-neutral-700 xl:sr-only"><%= action[:display_label] %></span>
|
|
53
53
|
<%= render "toggle", action: action %>
|
|
54
54
|
</div>
|
|
55
55
|
<% else %>
|
|
56
|
-
<span class="hidden text-
|
|
56
|
+
<span class="hidden text-neutral-300 xl:inline" aria-label="<%= t("lesli_shield.roles.permissions_not_available") %>">—</span>
|
|
57
57
|
<% end %>
|
|
58
58
|
</td>
|
|
59
59
|
<% end %>
|
|
@@ -39,7 +39,7 @@ end
|
|
|
39
39
|
label: t("lesli_shield.roles.permissions_engine_navigation")
|
|
40
40
|
) %>
|
|
41
41
|
<div class="min-w-0 flex-1 space-y-6">
|
|
42
|
-
<section class="rounded-xl border border-
|
|
42
|
+
<section class="rounded-xl border border-neutral-200 bg-white p-4 shadow-sm sm:p-5" aria-labelledby="permission-tools-title">
|
|
43
43
|
<h2 id="permission-tools-title" class="sr-only">
|
|
44
44
|
<%= t("lesli_shield.roles.permissions_tools") %>
|
|
45
45
|
</h2>
|
|
@@ -53,15 +53,15 @@ end
|
|
|
53
53
|
<div class="min-w-0 flex-1">
|
|
54
54
|
<%= form.label :search,
|
|
55
55
|
t("lesli_shield.roles.permissions_search_label"),
|
|
56
|
-
class: "block text-sm font-medium text-
|
|
56
|
+
class: "block text-sm font-medium text-neutral-700" %>
|
|
57
57
|
<div class="relative mt-1.5">
|
|
58
|
-
<span class="pointer-events-none absolute inset-y-0 left-3 flex items-center text-
|
|
58
|
+
<span class="pointer-events-none absolute inset-y-0 left-3 flex items-center text-neutral-400" aria-hidden="true">
|
|
59
59
|
<span class="material-symbols">search</span>
|
|
60
60
|
</span>
|
|
61
61
|
<%= form.search_field :search,
|
|
62
62
|
value: @search,
|
|
63
63
|
autocomplete: "off",
|
|
64
|
-
class: "block min-h-11 w-full rounded-xl border border-
|
|
64
|
+
class: "block min-h-11 w-full rounded-xl border border-neutral-300 bg-white py-2.5 pl-10 pr-3 text-sm text-neutral-900 shadow-sm outline-none transition placeholder:text-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10",
|
|
65
65
|
placeholder: t("lesli_shield.roles.permissions_search_placeholder") %>
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
@@ -71,7 +71,7 @@ end
|
|
|
71
71
|
<%= link_to t("lesli_shield.roles.permissions_clear_search"),
|
|
72
72
|
index_path,
|
|
73
73
|
data: { turbo_frame: "_top" },
|
|
74
|
-
class: "inline-flex min-h-11 items-center justify-center rounded-xl border border-
|
|
74
|
+
class: "inline-flex min-h-11 items-center justify-center rounded-xl border border-neutral-300 bg-white px-4 py-2 text-sm font-semibold text-neutral-700 transition hover:bg-neutral-50 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20" %>
|
|
75
75
|
<% end %>
|
|
76
76
|
</div>
|
|
77
77
|
<% end %>
|
|
@@ -81,12 +81,12 @@ end
|
|
|
81
81
|
<% if @permission_matrix.any? %>
|
|
82
82
|
<%= render "matrix" %>
|
|
83
83
|
<% else %>
|
|
84
|
-
<div class="rounded-xl border border-dashed border-
|
|
84
|
+
<div class="rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center">
|
|
85
85
|
<% if @search.present? %>
|
|
86
|
-
<p class="text-sm font-semibold text-
|
|
87
|
-
<p class="mt-1 text-sm text-
|
|
86
|
+
<p class="text-sm font-semibold text-neutral-800"><%= t("lesli_shield.roles.permissions_no_matches") %></p>
|
|
87
|
+
<p class="mt-1 text-sm text-neutral-500"><%= t("lesli_shield.roles.permissions_no_matches_hint") %></p>
|
|
88
88
|
<% else %>
|
|
89
|
-
<p class="text-sm font-medium text-
|
|
89
|
+
<p class="text-sm font-medium text-neutral-700"><%= t("lesli_shield.roles.permissions_empty") %></p>
|
|
90
90
|
<% end %>
|
|
91
91
|
</div>
|
|
92
92
|
<% end %>
|
|
@@ -22,9 +22,9 @@ label = t(
|
|
|
22
22
|
params: request_params,
|
|
23
23
|
form: { class: "shrink-0" },
|
|
24
24
|
class: class_names(
|
|
25
|
-
"inline-flex size-6 items-center justify-center rounded-md border transition focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-
|
|
26
|
-
"border-
|
|
27
|
-
"border-
|
|
25
|
+
"inline-flex size-6 items-center justify-center rounded-md border transition focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20",
|
|
26
|
+
"border-primary bg-primary text-white hover:bg-primary-strong" => enabled,
|
|
27
|
+
"border-neutral-300 bg-white text-transparent hover:border-primary" => !enabled
|
|
28
28
|
),
|
|
29
29
|
role: "switch",
|
|
30
30
|
aria: { checked: enabled, label: label },
|