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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<%
|
|
2
2
|
status = role.permissions_deployment_status
|
|
3
3
|
styles = {
|
|
4
|
-
pending: "bg-
|
|
5
|
-
deployed: "bg-
|
|
6
|
-
never_deployed: "bg-
|
|
4
|
+
pending: "bg-warning-100 text-warning-800 ring-warning-200",
|
|
5
|
+
deployed: "bg-success-100 text-success-700 ring-success-200",
|
|
6
|
+
never_deployed: "bg-neutral-100 text-neutral-600 ring-neutral-200"
|
|
7
7
|
}
|
|
8
8
|
%>
|
|
9
9
|
|
|
@@ -6,12 +6,12 @@ action_key = filtered ? "empty_filtered_action" : "action_create"
|
|
|
6
6
|
action_path = filtered ? roles_path : new_role_path
|
|
7
7
|
%>
|
|
8
8
|
|
|
9
|
-
<section class="rounded-2xl border border-dashed border-
|
|
10
|
-
<span class="material-symbols mx-auto block text-5xl text-
|
|
11
|
-
<h2 class="mt-4 text-lg font-semibold text-
|
|
9
|
+
<section class="rounded-2xl border border-dashed border-neutral-300 bg-white px-6 py-16 text-center shadow-sm">
|
|
10
|
+
<span class="material-symbols mx-auto block text-5xl text-neutral-300" aria-hidden="true">admin_panel_settings</span>
|
|
11
|
+
<h2 class="mt-4 text-lg font-semibold text-neutral-900">
|
|
12
12
|
<%= t("lesli_shield.roles.#{title_key}") %>
|
|
13
13
|
</h2>
|
|
14
|
-
<p class="mx-auto mt-2 max-w-md text-sm leading-6 text-
|
|
14
|
+
<p class="mx-auto mt-2 max-w-md text-sm leading-6 text-neutral-500">
|
|
15
15
|
<%= t("lesli_shield.roles.#{description_key}") %>
|
|
16
16
|
</p>
|
|
17
17
|
<%= render LesliView::Elements::Button.new(t("lesli_shield.roles.#{action_key}"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= form_with url: roles_path,
|
|
2
2
|
method: :get,
|
|
3
3
|
local: true,
|
|
4
|
-
class: "mb-6 rounded-2xl border border-
|
|
4
|
+
class: "mb-6 rounded-2xl border border-neutral-200 bg-white p-4 shadow-sm",
|
|
5
5
|
role: "search",
|
|
6
6
|
data: { turbo_frame: "_top" } do %>
|
|
7
7
|
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
<div>
|
|
14
14
|
<%= label_tag :search,
|
|
15
15
|
t("lesli_shield.roles.filters_search_label"),
|
|
16
|
-
class: "mb-1.5 block text-sm font-medium text-
|
|
16
|
+
class: "mb-1.5 block text-sm font-medium text-neutral-700" %>
|
|
17
17
|
<div class="relative">
|
|
18
|
-
<span class="material-symbols pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-xl text-
|
|
18
|
+
<span class="material-symbols pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-xl text-neutral-400" aria-hidden="true">search</span>
|
|
19
19
|
<%= search_field_tag :search,
|
|
20
20
|
filters[:search],
|
|
21
21
|
placeholder: t("lesli_shield.roles.filters_search_placeholder"),
|
|
22
22
|
autocomplete: "off",
|
|
23
|
-
class: "h-11 w-full rounded-xl border border-
|
|
23
|
+
class: "h-11 w-full rounded-xl border border-neutral-300 bg-white py-2 pl-10 pr-10 text-sm text-neutral-900 outline-none transition placeholder:text-neutral-400 hover:border-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10" %>
|
|
24
24
|
<% if filters[:search].present? %>
|
|
25
25
|
<%= link_to roles_path(request.query_parameters.except("search", "page")),
|
|
26
|
-
class: "absolute right-2 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-lg text-
|
|
26
|
+
class: "absolute right-2 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-lg text-neutral-400 transition hover:bg-neutral-100 hover:text-neutral-700",
|
|
27
27
|
data: { turbo_frame: "_top" },
|
|
28
28
|
aria: { label: t("lesli_shield.roles.filters_clear_search") } do %>
|
|
29
29
|
<span class="material-symbols text-lg" aria-hidden="true">close</span>
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
<div>
|
|
36
36
|
<%= label_tag :status,
|
|
37
37
|
t("lesli_shield.roles.filters_status_label"),
|
|
38
|
-
class: "mb-1.5 block text-sm font-medium text-
|
|
38
|
+
class: "mb-1.5 block text-sm font-medium text-neutral-700" %>
|
|
39
39
|
<%= select_tag :status,
|
|
40
40
|
options_for_select([
|
|
41
41
|
[t("lesli_shield.roles.filters_status_all"), ""],
|
|
42
42
|
[t("lesli_shield.roles.statuses_active"), "active"],
|
|
43
43
|
[t("lesli_shield.roles.statuses_inactive"), "inactive"]
|
|
44
44
|
], filters[:status]),
|
|
45
|
-
class: "h-11 w-full rounded-xl border border-
|
|
45
|
+
class: "h-11 w-full rounded-xl border border-neutral-300 bg-white px-3 text-sm text-neutral-700 outline-none transition hover:border-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10" %>
|
|
46
46
|
</div>
|
|
47
47
|
|
|
48
48
|
<div>
|
|
49
49
|
<%= label_tag :type,
|
|
50
50
|
t("lesli_shield.roles.filters_type_label"),
|
|
51
|
-
class: "mb-1.5 block text-sm font-medium text-
|
|
51
|
+
class: "mb-1.5 block text-sm font-medium text-neutral-700" %>
|
|
52
52
|
<%= select_tag :type,
|
|
53
53
|
options_for_select([
|
|
54
54
|
[t("lesli_shield.roles.filters_type_all"), ""],
|
|
55
55
|
[t("lesli_shield.roles.types_system"), "system"],
|
|
56
56
|
[t("lesli_shield.roles.types_custom"), "custom"]
|
|
57
57
|
], filters[:type]),
|
|
58
|
-
class: "h-11 w-full rounded-xl border border-
|
|
58
|
+
class: "h-11 w-full rounded-xl border border-neutral-300 bg-white px-3 text-sm text-neutral-700 outline-none transition hover:border-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10" %>
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
61
|
<%= render LesliView::Elements::Button.new(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%
|
|
2
2
|
editable = @role.new_record? || @role_editable
|
|
3
|
-
input_classes = "mt-1.5 block w-full rounded-xl border border-
|
|
4
|
-
error_input_classes = "border-
|
|
3
|
+
input_classes = "mt-1.5 block w-full rounded-xl border border-neutral-300 bg-white px-3 py-2.5 text-sm text-neutral-900 shadow-sm outline-none transition placeholder:text-neutral-400 hover:border-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10 disabled:cursor-not-allowed disabled:bg-neutral-50 disabled:text-neutral-500"
|
|
4
|
+
error_input_classes = "border-danger-400 focus:border-danger-500 focus:ring-danger-500/10"
|
|
5
5
|
members_count = @role_summary&.fetch(:members, 0).to_i
|
|
6
6
|
members_plural = members_count == 1 ? "one" : "other"
|
|
7
7
|
%>
|
|
@@ -12,14 +12,14 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
12
12
|
class: "space-y-6",
|
|
13
13
|
data: { turbo: true, turbo_frame: "_top" } do |form| %>
|
|
14
14
|
<% if @role.errors.any? %>
|
|
15
|
-
<div class="rounded-xl border border-
|
|
15
|
+
<div class="rounded-xl border border-danger-200 bg-danger-50 p-4" role="alert">
|
|
16
16
|
<div class="flex gap-3">
|
|
17
|
-
<span class="material-symbols text-
|
|
17
|
+
<span class="material-symbols text-danger-500" aria-hidden="true">error</span>
|
|
18
18
|
<div>
|
|
19
|
-
<h2 class="text-sm font-semibold text-
|
|
19
|
+
<h2 class="text-sm font-semibold text-danger-800">
|
|
20
20
|
<%= t("lesli_shield.roles.form_errors_title") %>
|
|
21
21
|
</h2>
|
|
22
|
-
<ul class="mt-2 list-disc space-y-1 pl-5 text-sm text-
|
|
22
|
+
<ul class="mt-2 list-disc space-y-1 pl-5 text-sm text-danger-700">
|
|
23
23
|
<% @role.errors.full_messages.each do |message| %>
|
|
24
24
|
<li><%= message %></li>
|
|
25
25
|
<% end %>
|
|
@@ -31,7 +31,7 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
31
31
|
|
|
32
32
|
<div class="space-y-5">
|
|
33
33
|
<div>
|
|
34
|
-
<%= form.label :name, t("lesli_shield.roles.fields_name"), class: "block text-sm font-medium text-
|
|
34
|
+
<%= form.label :name, t("lesli_shield.roles.fields_name"), class: "block text-sm font-medium text-neutral-700" %>
|
|
35
35
|
<%= form.text_field :name,
|
|
36
36
|
autofocus: @role.new_record?,
|
|
37
37
|
disabled: !editable,
|
|
@@ -41,12 +41,12 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
43
|
<div>
|
|
44
|
-
<%= form.label :description, t("lesli_shield.roles.fields_description"), class: "block text-sm font-medium text-
|
|
44
|
+
<%= form.label :description, t("lesli_shield.roles.fields_description"), class: "block text-sm font-medium text-neutral-700" %>
|
|
45
45
|
<%= form.text_area :description,
|
|
46
46
|
rows: 4,
|
|
47
47
|
disabled: !editable,
|
|
48
48
|
class: class_names(input_classes, "resize-y", error_input_classes => @role.errors[:description].any?) %>
|
|
49
|
-
<p class="mt-1.5 text-xs leading-5 text-
|
|
49
|
+
<p class="mt-1.5 text-xs leading-5 text-neutral-500">
|
|
50
50
|
<%= t("lesli_shield.roles.form_description_hint") %>
|
|
51
51
|
</p>
|
|
52
52
|
<%= render "field_errors", record: @role, attribute: :description %>
|
|
@@ -54,22 +54,22 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
54
54
|
</div>
|
|
55
55
|
|
|
56
56
|
<% if @role.new_record? %>
|
|
57
|
-
<fieldset class="border-t border-
|
|
58
|
-
<legend class="text-sm font-medium text-
|
|
57
|
+
<fieldset class="border-t border-neutral-200 pt-6">
|
|
58
|
+
<legend class="text-sm font-medium text-neutral-700">
|
|
59
59
|
<%= t("lesli_shield.roles.fields_status") %>
|
|
60
60
|
</legend>
|
|
61
61
|
|
|
62
62
|
<div class="mt-3 grid gap-3 sm:grid-cols-2">
|
|
63
63
|
<% [true, false].each do |active| %>
|
|
64
|
-
<label class="relative flex cursor-pointer gap-3 rounded-xl border border-
|
|
64
|
+
<label class="relative flex cursor-pointer gap-3 rounded-xl border border-neutral-200 bg-white p-4 transition hover:border-primary-muted hover:bg-primary-soft/40 has-[:checked]:border-primary has-[:checked]:ring-4 has-[:checked]:ring-primary/10">
|
|
65
65
|
<%= form.radio_button :active,
|
|
66
66
|
active,
|
|
67
|
-
class: "mt-0.5 h-4 w-4 border-
|
|
67
|
+
class: "mt-0.5 h-4 w-4 border-neutral-300 text-primary focus:ring-primary" %>
|
|
68
68
|
<span>
|
|
69
|
-
<span class="block text-sm font-semibold text-
|
|
69
|
+
<span class="block text-sm font-semibold text-neutral-900">
|
|
70
70
|
<%= t("lesli_shield.roles.statuses_#{active ? 'active' : 'inactive'}") %>
|
|
71
71
|
</span>
|
|
72
|
-
<span class="mt-1 block text-xs leading-5 text-
|
|
72
|
+
<span class="mt-1 block text-xs leading-5 text-neutral-500">
|
|
73
73
|
<%= t("lesli_shield.roles.form_status_#{active ? 'active' : 'inactive'}_hint") %>
|
|
74
74
|
</span>
|
|
75
75
|
</span>
|
|
@@ -80,9 +80,9 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
80
80
|
</fieldset>
|
|
81
81
|
<% end %>
|
|
82
82
|
|
|
83
|
-
<div class="space-y-5 border-t border-
|
|
83
|
+
<div class="space-y-5 border-t border-neutral-200 pt-6">
|
|
84
84
|
<div>
|
|
85
|
-
<%= form.label :permission_level, t("lesli_shield.roles.fields_permission_level"), class: "block text-sm font-medium text-
|
|
85
|
+
<%= form.label :permission_level, t("lesli_shield.roles.fields_permission_level"), class: "block text-sm font-medium text-neutral-700" %>
|
|
86
86
|
<%= form.number_field :permission_level,
|
|
87
87
|
min: 0,
|
|
88
88
|
max: current_user.max_level_permission,
|
|
@@ -91,19 +91,19 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
91
91
|
disabled: !editable,
|
|
92
92
|
inputmode: "numeric",
|
|
93
93
|
class: class_names(input_classes, error_input_classes => @role.errors[:permission_level].any?) %>
|
|
94
|
-
<p class="mt-1.5 text-xs leading-5 text-
|
|
94
|
+
<p class="mt-1.5 text-xs leading-5 text-neutral-500">
|
|
95
95
|
<%= t("lesli_shield.roles.form_permission_level_hint", maximum: current_user.max_level_permission) %>
|
|
96
96
|
</p>
|
|
97
97
|
<%= render "field_errors", record: @role, attribute: :permission_level %>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
100
|
<div>
|
|
101
|
-
<%= form.label :path_default, t("lesli_shield.roles.fields_path_default"), class: "block text-sm font-medium text-
|
|
101
|
+
<%= form.label :path_default, t("lesli_shield.roles.fields_path_default"), class: "block text-sm font-medium text-neutral-700" %>
|
|
102
102
|
<%= form.text_field :path_default,
|
|
103
103
|
disabled: !editable,
|
|
104
104
|
placeholder: "/dashboard",
|
|
105
105
|
class: class_names(input_classes, error_input_classes => @role.errors[:path_default].any?) %>
|
|
106
|
-
<p class="mt-1.5 text-xs leading-5 text-
|
|
106
|
+
<p class="mt-1.5 text-xs leading-5 text-neutral-500">
|
|
107
107
|
<%= t("lesli_shield.roles.form_path_default_hint") %>
|
|
108
108
|
</p>
|
|
109
109
|
<%= render "field_errors", record: @role, attribute: :path_default %>
|
|
@@ -111,7 +111,7 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
113
|
<% if editable %>
|
|
114
|
-
<div class="flex flex-col gap-3 border-t border-
|
|
114
|
+
<div class="flex flex-col gap-3 border-t border-neutral-200 pt-6 sm:flex-row sm:items-center sm:justify-between">
|
|
115
115
|
<div>
|
|
116
116
|
<% if @role.persisted? %>
|
|
117
117
|
<% if @role.active? %>
|
|
@@ -144,7 +144,7 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
144
144
|
</div>
|
|
145
145
|
</div>
|
|
146
146
|
<% else %>
|
|
147
|
-
<div class="rounded-xl border border-
|
|
147
|
+
<div class="rounded-xl border border-warning-200 bg-warning-50 p-4 text-sm leading-6 text-warning-800">
|
|
148
148
|
<%= t("lesli_shield.roles.form_protected_notice") %>
|
|
149
149
|
</div>
|
|
150
150
|
<% end %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<details class="group inline-block text-left">
|
|
2
2
|
<summary
|
|
3
|
-
class="inline-flex h-9 w-9 cursor-pointer list-none items-center justify-center rounded-lg text-
|
|
3
|
+
class="inline-flex h-9 w-9 cursor-pointer list-none items-center justify-center rounded-lg text-neutral-500 transition hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus:ring-4 focus:ring-primary/10 [&::-webkit-details-marker]:hidden"
|
|
4
4
|
aria-label="<%= t("lesli_shield.roles.action_menu", role: role.name) %>">
|
|
5
5
|
<span class="material-symbols" aria-hidden="true">more_vert</span>
|
|
6
6
|
</summary>
|
|
7
7
|
|
|
8
|
-
<div class="absolute right-5 z-20 mt-2 w-52 overflow-hidden rounded-xl border border-
|
|
8
|
+
<div class="absolute right-5 z-20 mt-2 w-52 overflow-hidden rounded-xl border border-neutral-200 bg-white p-1.5 text-left shadow-xl">
|
|
9
9
|
<%= link_to role_path(role),
|
|
10
|
-
class: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium text-
|
|
10
|
+
class: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium text-neutral-700 transition hover:bg-neutral-50 hover:text-neutral-900",
|
|
11
11
|
data: { turbo_frame: "_top" } do %>
|
|
12
12
|
<span class="material-symbols text-lg" aria-hidden="true"><%= role.protected_role? ? "visibility" : "settings" %></span>
|
|
13
13
|
<span><%= role.protected_role? ? t("lesli_shield.roles.action_view") : t("lesli_shield.roles.action_manage") %></span>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<% unless role.protected_role? %>
|
|
17
17
|
<%= link_to role_actions_path(role),
|
|
18
|
-
class: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium text-
|
|
18
|
+
class: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium text-neutral-700 transition hover:bg-neutral-50 hover:text-neutral-900",
|
|
19
19
|
data: { turbo_frame: "_top" } do %>
|
|
20
20
|
<span class="material-symbols text-lg" aria-hidden="true">key</span>
|
|
21
21
|
<span><%= t("lesli_shield.roles.action_permissions") %></span>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<% end %>
|
|
24
24
|
|
|
25
25
|
<% if role.deletable_by?(current_user) %>
|
|
26
|
-
<div class="my-1 border-t border-
|
|
26
|
+
<div class="my-1 border-t border-neutral-100"></div>
|
|
27
27
|
<%= render LesliView::Elements::Button.new(
|
|
28
28
|
t("lesli_shield.roles.action_delete"), url: role_path(role),
|
|
29
29
|
method: :delete, icon: "delete", danger: true, solid: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if pagination[:total].positive? %>
|
|
2
|
-
<nav class="mt-6 flex flex-col gap-3 rounded-2xl border border-
|
|
3
|
-
<p class="text-sm text-
|
|
2
|
+
<nav class="mt-6 flex flex-col gap-3 rounded-2xl border border-neutral-200 bg-white px-4 py-3 shadow-sm sm:flex-row sm:items-center sm:justify-between" aria-label="<%= t("lesli_shield.roles.pagination_label") %>">
|
|
3
|
+
<p class="text-sm text-neutral-600">
|
|
4
4
|
<%= t(
|
|
5
5
|
"lesli_shield.roles.pagination_summary",
|
|
6
6
|
count: pagination[:results],
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
<% if pagination[:page] > 1 %>
|
|
13
13
|
<%= link_to t("lesli_shield.roles.pagination_previous"),
|
|
14
14
|
roles_path(request.query_parameters.merge(page: pagination[:page] - 1)),
|
|
15
|
-
class: "inline-flex h-9 items-center rounded-lg border border-
|
|
15
|
+
class: "inline-flex h-9 items-center rounded-lg border border-neutral-300 bg-white px-3 text-sm font-medium text-neutral-700 transition hover:border-primary-muted hover:bg-primary-soft hover:text-primary-strong",
|
|
16
16
|
data: { turbo_frame: "_top" } %>
|
|
17
17
|
<% else %>
|
|
18
|
-
<span class="inline-flex h-9 cursor-not-allowed items-center rounded-lg border border-
|
|
18
|
+
<span class="inline-flex h-9 cursor-not-allowed items-center rounded-lg border border-neutral-200 bg-neutral-50 px-3 text-sm font-medium text-neutral-400">
|
|
19
19
|
<%= t("lesli_shield.roles.pagination_previous") %>
|
|
20
20
|
</span>
|
|
21
21
|
<% end %>
|
|
22
22
|
|
|
23
|
-
<span class="text-sm font-medium text-
|
|
23
|
+
<span class="text-sm font-medium text-neutral-600">
|
|
24
24
|
<%= t(
|
|
25
25
|
"lesli_shield.roles.pagination_page",
|
|
26
26
|
page: pagination[:page],
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
<% if pagination[:page] < pagination[:pages] %>
|
|
32
32
|
<%= link_to t("lesli_shield.roles.pagination_next"),
|
|
33
33
|
roles_path(request.query_parameters.merge(page: pagination[:page] + 1)),
|
|
34
|
-
class: "inline-flex h-9 items-center rounded-lg border border-
|
|
34
|
+
class: "inline-flex h-9 items-center rounded-lg border border-neutral-300 bg-white px-3 text-sm font-medium text-neutral-700 transition hover:border-primary-muted hover:bg-primary-soft hover:text-primary-strong",
|
|
35
35
|
data: { turbo_frame: "_top" } %>
|
|
36
36
|
<% else %>
|
|
37
|
-
<span class="inline-flex h-9 cursor-not-allowed items-center rounded-lg border border-
|
|
37
|
+
<span class="inline-flex h-9 cursor-not-allowed items-center rounded-lg border border-neutral-200 bg-neutral-50 px-3 text-sm font-medium text-neutral-400">
|
|
38
38
|
<%= t("lesli_shield.roles.pagination_next") %>
|
|
39
39
|
</span>
|
|
40
40
|
<% end %>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<div class="hidden overflow-visible rounded-2xl border border-
|
|
2
|
-
<table class="min-w-full divide-y divide-
|
|
3
|
-
<thead class="bg-
|
|
1
|
+
<div class="hidden overflow-visible rounded-2xl border border-neutral-200 bg-white shadow-sm md:block">
|
|
2
|
+
<table class="min-w-full divide-y divide-neutral-200">
|
|
3
|
+
<thead class="bg-neutral-50">
|
|
4
4
|
<tr>
|
|
5
5
|
<% %w[role status users permissions modified_at deployment actions].each do |column| %>
|
|
6
|
-
<th scope="col" class="px-5 py-3 text-left text-xs font-semibold uppercase tracking-wide text-
|
|
6
|
+
<th scope="col" class="px-5 py-3 text-left text-xs font-semibold uppercase tracking-wide text-neutral-500 <%= 'text-center' if %w[users permissions deployment actions].include?(column) %>">
|
|
7
7
|
<%= t("lesli_shield.roles.columns_#{column}") %>
|
|
8
8
|
</th>
|
|
9
9
|
<% end %>
|
|
10
10
|
</tr>
|
|
11
11
|
</thead>
|
|
12
|
-
<tbody class="divide-y divide-
|
|
12
|
+
<tbody class="divide-y divide-neutral-100">
|
|
13
13
|
<% roles.each do |role| %>
|
|
14
|
-
<tr class="transition hover:bg-
|
|
14
|
+
<tr class="transition hover:bg-neutral-50/80">
|
|
15
15
|
<td class="max-w-md px-5 py-4">
|
|
16
16
|
<div class="flex flex-wrap items-center gap-2">
|
|
17
17
|
<%= link_to role.name,
|
|
18
18
|
role_path(role),
|
|
19
|
-
class: "font-semibold text-
|
|
19
|
+
class: "font-semibold text-neutral-900 transition hover:text-primary-strong",
|
|
20
20
|
data: { turbo_frame: "_top" } %>
|
|
21
21
|
<%= render "type_badge", role: role %>
|
|
22
22
|
</div>
|
|
23
|
-
<p class="mt-1 line-clamp-2 text-sm leading-5 text-
|
|
23
|
+
<p class="mt-1 line-clamp-2 text-sm leading-5 text-neutral-500">
|
|
24
24
|
<%= role.description.presence || t("lesli_shield.roles.description_missing") %>
|
|
25
25
|
</p>
|
|
26
26
|
</td>
|
|
27
27
|
<td class="whitespace-nowrap px-5 py-4">
|
|
28
28
|
<%= render "status_badge", role: role %>
|
|
29
29
|
</td>
|
|
30
|
-
<td class="whitespace-nowrap px-5 py-4 text-center text-sm font-medium text-
|
|
30
|
+
<td class="whitespace-nowrap px-5 py-4 text-center text-sm font-medium text-neutral-700">
|
|
31
31
|
<%= role[:users].to_i %>
|
|
32
32
|
</td>
|
|
33
|
-
<td class="whitespace-nowrap px-5 py-4 text-center text-sm font-medium text-
|
|
33
|
+
<td class="whitespace-nowrap px-5 py-4 text-center text-sm font-medium text-neutral-700">
|
|
34
34
|
<%= role[:actions].to_i %>
|
|
35
35
|
</td>
|
|
36
|
-
<td class="whitespace-nowrap px-5 py-4 text-sm text-
|
|
36
|
+
<td class="whitespace-nowrap px-5 py-4 text-sm text-neutral-600">
|
|
37
37
|
<% modified_at = role.modified_at || role.updated_at %>
|
|
38
38
|
<time datetime="<%= modified_at.iso8601 %>">
|
|
39
39
|
<%= l(modified_at, format: :short) %>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<% if role.deployed_at.present? %>
|
|
45
45
|
<time
|
|
46
46
|
datetime="<%= role.deployed_at.iso8601 %>"
|
|
47
|
-
class="mt-1 block text-xs text-
|
|
47
|
+
class="mt-1 block text-xs text-neutral-500"
|
|
48
48
|
>
|
|
49
49
|
<%= l(role.deployed_at, format: :short) %>
|
|
50
50
|
</time>
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
users_plural = users_count == 1 ? "one" : "other"
|
|
68
68
|
permissions_plural = permissions_count == 1 ? "one" : "other"
|
|
69
69
|
%>
|
|
70
|
-
<article class="rounded-2xl border border-
|
|
70
|
+
<article class="rounded-2xl border border-neutral-200 bg-white p-5 shadow-sm">
|
|
71
71
|
<div class="flex items-start justify-between gap-3">
|
|
72
72
|
<div class="min-w-0">
|
|
73
|
-
<h2 class="truncate text-base font-semibold text-
|
|
74
|
-
<p class="mt-1 line-clamp-2 text-sm leading-5 text-
|
|
73
|
+
<h2 class="truncate text-base font-semibold text-neutral-900"><%= role.name %></h2>
|
|
74
|
+
<p class="mt-1 line-clamp-2 text-sm leading-5 text-neutral-500">
|
|
75
75
|
<%= role.description.presence || t("lesli_shield.roles.description_missing") %>
|
|
76
76
|
</p>
|
|
77
77
|
</div>
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
|
|
81
81
|
<div class="mt-4 flex flex-wrap gap-2">
|
|
82
82
|
<%= render "type_badge", role: role %>
|
|
83
|
-
<span class="inline-flex items-center gap-1 rounded-full bg-
|
|
83
|
+
<span class="inline-flex items-center gap-1 rounded-full bg-neutral-100 px-2.5 py-1 text-xs font-medium text-neutral-600">
|
|
84
84
|
<span class="material-symbols text-base" aria-hidden="true">group</span>
|
|
85
85
|
<%= t("lesli_shield.roles.mobile_users_#{users_plural}", count: users_count) %>
|
|
86
86
|
</span>
|
|
87
|
-
<span class="inline-flex items-center gap-1 rounded-full bg-
|
|
87
|
+
<span class="inline-flex items-center gap-1 rounded-full bg-neutral-100 px-2.5 py-1 text-xs font-medium text-neutral-600">
|
|
88
88
|
<span class="material-symbols text-base" aria-hidden="true">key</span>
|
|
89
89
|
<%= t("lesli_shield.roles.mobile_permissions_#{permissions_plural}", count: permissions_count) %>
|
|
90
90
|
</span>
|
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
94
|
<% modified_at = role.modified_at || role.updated_at %>
|
|
95
|
-
<p class="mt-4 text-xs text-
|
|
95
|
+
<p class="mt-4 text-xs text-neutral-500">
|
|
96
96
|
<%= t(
|
|
97
97
|
"lesli_shield.roles.mobile_modified_at",
|
|
98
98
|
date: l(modified_at, format: :short)
|
|
99
99
|
) %>
|
|
100
100
|
</p>
|
|
101
101
|
<% if role.deployed_at.present? %>
|
|
102
|
-
<p class="mt-1 text-xs text-
|
|
102
|
+
<p class="mt-1 text-xs text-neutral-500">
|
|
103
103
|
<%= t(
|
|
104
104
|
"lesli_shield.roles.mobile_deployed_at",
|
|
105
105
|
date: l(role.deployed_at, format: :short)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<% if role.active? %>
|
|
2
|
-
<span class="inline-flex items-center gap-1.5 rounded-full bg-
|
|
3
|
-
<span class="h-1.5 w-1.5 rounded-full bg-
|
|
2
|
+
<span class="inline-flex items-center gap-1.5 rounded-full bg-success-50 px-2.5 py-1 text-xs font-semibold text-success-700 ring-1 ring-inset ring-success-600/20">
|
|
3
|
+
<span class="h-1.5 w-1.5 rounded-full bg-success-500" aria-hidden="true"></span>
|
|
4
4
|
<%= t("lesli_shield.roles.statuses_active") %>
|
|
5
5
|
</span>
|
|
6
6
|
<% else %>
|
|
7
|
-
<span class="inline-flex items-center gap-1.5 rounded-full bg-
|
|
8
|
-
<span class="h-1.5 w-1.5 rounded-full bg-
|
|
7
|
+
<span class="inline-flex items-center gap-1.5 rounded-full bg-neutral-100 px-2.5 py-1 text-xs font-semibold text-neutral-600 ring-1 ring-inset ring-neutral-500/20">
|
|
8
|
+
<span class="h-1.5 w-1.5 rounded-full bg-neutral-400" aria-hidden="true"></span>
|
|
9
9
|
<%= t("lesli_shield.roles.statuses_inactive") %>
|
|
10
10
|
</span>
|
|
11
11
|
<% end %>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<% if role.system_role? %>
|
|
2
|
-
<span class="inline-flex items-center rounded-full bg-
|
|
2
|
+
<span class="inline-flex items-center rounded-full bg-bugambilia-100 px-2.5 py-1 text-xs font-semibold text-bugambilia-700 ring-1 ring-inset ring-bugambilia-500/20">
|
|
3
3
|
<%= t("lesli_shield.roles.types_system") %>
|
|
4
4
|
</span>
|
|
5
5
|
<% else %>
|
|
6
|
-
<span class="inline-flex items-center rounded-full bg-
|
|
6
|
+
<span class="inline-flex items-center rounded-full bg-neutral-50 px-2.5 py-1 text-xs font-semibold text-neutral-700 ring-1 ring-inset ring-neutral-600/20">
|
|
7
7
|
<%= t("lesli_shield.roles.types_custom") %>
|
|
8
8
|
</span>
|
|
9
9
|
<% end %>
|
|
@@ -34,9 +34,9 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
34
34
|
<div class="flex min-w-0 flex-col gap-6 lg:flex-row lg:items-start">
|
|
35
35
|
<%= render LesliView::Layout::NavigationSidebar.new(items: navigation_items, label: @role.name) %>
|
|
36
36
|
<div id="role-detail-content" class="min-w-0 flex-1 space-y-6">
|
|
37
|
-
<section id="members" class="rounded-2xl border border-
|
|
37
|
+
<section id="members" class="rounded-2xl border border-neutral-200 bg-white p-5 shadow-sm sm:p-6" aria-labelledby="role-summary-title">
|
|
38
38
|
<div class="flex items-center justify-between gap-3">
|
|
39
|
-
<h2 id="role-summary-title" class="text-base font-semibold text-
|
|
39
|
+
<h2 id="role-summary-title" class="text-base font-semibold text-neutral-900">
|
|
40
40
|
<%= t("lesli_shield.roles.detail_summary_title") %>
|
|
41
41
|
</h2>
|
|
42
42
|
<%= render "status_badge", role: @role %>
|
|
@@ -44,28 +44,28 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
44
44
|
|
|
45
45
|
<dl class="mt-3 flex flex-wrap gap-8">
|
|
46
46
|
<div>
|
|
47
|
-
<dt class="text-xs font-medium uppercase tracking-wide text-
|
|
47
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-neutral-500">
|
|
48
48
|
<%= t("lesli_shield.roles.detail_members") %>
|
|
49
49
|
</dt>
|
|
50
|
-
<dd class="mt-1 text-2xl font-semibold text-
|
|
50
|
+
<dd class="mt-1 text-2xl font-semibold text-neutral-900">
|
|
51
51
|
<%= @role_summary.fetch(:members) %>
|
|
52
52
|
</dd>
|
|
53
53
|
</div>
|
|
54
54
|
<div>
|
|
55
|
-
<dt class="text-xs font-medium uppercase tracking-wide text-
|
|
55
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-neutral-500">
|
|
56
56
|
<%= t("lesli_shield.roles.detail_permissions") %>
|
|
57
57
|
</dt>
|
|
58
|
-
<dd class="mt-1 text-2xl font-semibold text-
|
|
58
|
+
<dd class="mt-1 text-2xl font-semibold text-neutral-900">
|
|
59
59
|
<%= @role_summary.fetch(:permissions) %>
|
|
60
60
|
</dd>
|
|
61
61
|
</div>
|
|
62
62
|
</dl>
|
|
63
63
|
|
|
64
|
-
<div class="mt-5 border-t border-
|
|
65
|
-
<h3 id="role-status-title" class="text-sm font-semibold text-
|
|
64
|
+
<div class="mt-5 border-t border-neutral-200 pt-5">
|
|
65
|
+
<h3 id="role-status-title" class="text-sm font-semibold text-neutral-800">
|
|
66
66
|
<%= t("lesli_shield.roles.detail_status_title") %>
|
|
67
67
|
</h3>
|
|
68
|
-
<p class="mt-2 text-sm leading-6 text-
|
|
68
|
+
<p class="mt-2 text-sm leading-6 text-neutral-500">
|
|
69
69
|
<%= @role.active? ?
|
|
70
70
|
t("lesli_shield.roles.detail_active_impact_#{members_plural}", count: members_count) :
|
|
71
71
|
t("lesli_shield.roles.detail_inactive_impact_#{members_plural}", count: members_count) %>
|
|
@@ -73,7 +73,7 @@ members_plural = members_count == 1 ? "one" : "other"
|
|
|
73
73
|
</div>
|
|
74
74
|
</section>
|
|
75
75
|
|
|
76
|
-
<section id="general" class="rounded-2xl border border-
|
|
76
|
+
<section id="general" class="rounded-2xl border border-neutral-200 bg-white p-5 shadow-sm sm:p-8">
|
|
77
77
|
<%= render "form" %>
|
|
78
78
|
</section>
|
|
79
79
|
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div class="min-w-0">
|
|
9
|
-
<h5 class="text-xl font-semibold leading-tight text-
|
|
9
|
+
<h5 class="text-xl font-semibold leading-tight text-neutral-800">
|
|
10
10
|
<%= @user.full_name %>
|
|
11
11
|
</h5>
|
|
12
12
|
|
|
13
|
-
<p class="mb-1 text-
|
|
13
|
+
<p class="mb-1 text-neutral-600"><%= @user.title %></p>
|
|
14
14
|
|
|
15
15
|
<div class="flex flex-wrap items-center justify-center gap-x-4 gap-y-2 md:justify-start">
|
|
16
16
|
<a
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</a>
|
|
31
31
|
|
|
32
32
|
<!-- Show the max role -->
|
|
33
|
-
<p class="inline-flex items-center text-
|
|
33
|
+
<p class="inline-flex items-center text-neutral-600" v-if="storeUser.role_names">
|
|
34
34
|
<span class="material-symbols mr-2 shrink-0 text-xl" aria-hidden="true">security</span>
|
|
35
35
|
<%= @user.role_names %>
|
|
36
36
|
</p>
|
|
@@ -43,7 +43,7 @@ columns = [{
|
|
|
43
43
|
position: relative;
|
|
44
44
|
width: 40px;
|
|
45
45
|
height: 20px;
|
|
46
|
-
background:
|
|
46
|
+
background: var(--lesli-color-neutral-300);
|
|
47
47
|
border-radius: 9999px;
|
|
48
48
|
border: none;
|
|
49
49
|
cursor: pointer;
|
|
@@ -53,7 +53,7 @@ columns = [{
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.mini-toggle.active {
|
|
56
|
-
background:
|
|
56
|
+
background: var(--lesli-color-primary); /* green */
|
|
57
57
|
background: var(--lesli-color-primary)
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -7,27 +7,27 @@ title = I18n.t("lesli_shield.invites.acceptance_title")
|
|
|
7
7
|
title: title,
|
|
8
8
|
back_to_login: true
|
|
9
9
|
) do %>
|
|
10
|
-
<p class="mb-6 text-center text-sm leading-6 text-
|
|
10
|
+
<p class="mb-6 text-center text-sm leading-6 text-neutral-600">
|
|
11
11
|
<%= I18n.t(
|
|
12
12
|
"lesli_shield.invites.acceptance_description",
|
|
13
13
|
account: @invitation.account.account.name
|
|
14
14
|
) %>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
-
<dl class="mb-6 overflow-hidden rounded-lg border border-
|
|
18
|
-
<div class="grid grid-cols-3 gap-4 border-b border-
|
|
19
|
-
<dt class="font-medium text-
|
|
17
|
+
<dl class="mb-6 overflow-hidden rounded-lg border border-neutral-200 bg-neutral-50 text-sm">
|
|
18
|
+
<div class="grid grid-cols-3 gap-4 border-b border-neutral-200 px-4 py-3">
|
|
19
|
+
<dt class="font-medium text-neutral-500">
|
|
20
20
|
<%= I18n.t("lesli_shield.invites.acceptance_organization") %>
|
|
21
21
|
</dt>
|
|
22
|
-
<dd class="col-span-2 font-medium text-
|
|
22
|
+
<dd class="col-span-2 font-medium text-neutral-900">
|
|
23
23
|
<%= @invitation.account.account.name %>
|
|
24
24
|
</dd>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="grid grid-cols-3 gap-4 px-4 py-3">
|
|
27
|
-
<dt class="font-medium text-
|
|
27
|
+
<dt class="font-medium text-neutral-500">
|
|
28
28
|
<%= I18n.t("lesli_shield.invites.acceptance_role") %>
|
|
29
29
|
</dt>
|
|
30
|
-
<dd class="col-span-2 font-medium text-
|
|
30
|
+
<dd class="col-span-2 font-medium text-neutral-900">
|
|
31
31
|
<%= @invitation.role.name %>
|
|
32
32
|
</dd>
|
|
33
33
|
</div>
|
|
@@ -80,11 +80,11 @@ title = I18n.t("lesli_shield.invites.acceptance_title")
|
|
|
80
80
|
autocomplete: "tel"
|
|
81
81
|
) %>
|
|
82
82
|
|
|
83
|
-
<div class="mb-4 rounded-xl border border-
|
|
84
|
-
<p class="text-sm font-semibold text-
|
|
83
|
+
<div class="mb-4 rounded-xl border border-info-100 bg-info-50 px-4 py-3" role="note">
|
|
84
|
+
<p class="text-sm font-semibold text-info-900">
|
|
85
85
|
<%= I18n.t("lesli_shield.invites.acceptance_password_requirements") %>
|
|
86
86
|
</p>
|
|
87
|
-
<p class="mt-1 text-sm leading-5 text-
|
|
87
|
+
<p class="mt-1 text-sm leading-5 text-info-700">
|
|
88
88
|
<%= I18n.t(
|
|
89
89
|
"lesli_shield.invites.acceptance_password_length",
|
|
90
90
|
minimum: @minimum_password_length,
|