avo 3.17.7 → 3.17.8.tw4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -14
- data/README.md +1 -0
- data/app/assets/stylesheets/avo.base.css +101 -101
- data/app/assets/stylesheets/css/fields/progress.css +4 -4
- data/app/assets/stylesheets/css/fields/tiptap.css +4 -4
- data/app/assets/stylesheets/css/pagination.css +2 -2
- data/app/assets/stylesheets/css/search.css +4 -4
- data/app/assets/stylesheets/css/tooltips.css +1 -1
- data/app/components/avo/actions_component.html.erb +3 -3
- data/app/components/avo/alert_component.html.erb +2 -2
- data/app/components/avo/alert_component.rb +1 -1
- data/app/components/avo/backtrace_alert_component.html.erb +3 -3
- data/app/components/avo/button_component.rb +3 -3
- data/app/components/avo/divider_component.html.erb +2 -2
- data/app/components/avo/empty_state_component.html.erb +1 -1
- data/app/components/avo/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.rb +1 -1
- data/app/components/avo/fields/common/files/view_type/list_item_component.html.erb +3 -3
- data/app/components/avo/fields/common/key_value_component.html.erb +3 -3
- data/app/components/avo/fields/common/progress_bar_component.html.erb +1 -1
- data/app/components/avo/fields/common/status_viewer_component.html.erb +1 -7
- data/app/components/avo/fields/date_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/tag_component.html.erb +1 -1
- data/app/components/avo/fields/tiptap_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -1
- data/app/components/avo/filters_component.html.erb +3 -3
- data/app/components/avo/index/grid_item_component.html.erb +2 -2
- data/app/components/avo/index/grid_item_component.rb +1 -1
- data/app/components/avo/index/resource_grid_component.html.erb +1 -1
- data/app/components/avo/index/resource_map_component.html.erb +1 -1
- data/app/components/avo/index/resource_table_component.html.erb +1 -1
- data/app/components/avo/index/table_row_component.html.erb +3 -3
- data/app/components/avo/items/panel_component.html.erb +1 -1
- data/app/components/avo/media_library/item_details_component.html.erb +1 -1
- data/app/components/avo/modal_component.html.erb +1 -1
- data/app/components/avo/paginator_component.html.erb +1 -2
- data/app/components/avo/paginator_component.rb +9 -1
- data/app/components/avo/panel_component.html.erb +2 -2
- data/app/components/avo/profile_item_component.rb +1 -1
- data/app/components/avo/resource_sidebar_component.html.erb +1 -1
- data/app/components/avo/row_selector_component.html.erb +1 -1
- data/app/components/avo/sidebar/link_component.rb +1 -1
- data/app/components/avo/sidebar_component.html.erb +3 -3
- data/app/components/avo/sidebar_profile_component.html.erb +4 -4
- data/app/components/avo/tab_group_component.html.erb +1 -1
- data/app/components/avo/views/resource_index_component.html.erb +2 -2
- data/app/helpers/avo/application_helper.rb +4 -4
- data/app/helpers/avo/url_helpers.rb +4 -1
- data/app/javascript/js/controllers/fields/key_value_controller.js +1 -1
- data/app/javascript/js/controllers/fields/tags_field_helpers.js +1 -1
- data/app/javascript/js/controllers/search_controller.js +2 -2
- data/app/views/avo/base/preview.html.erb +1 -1
- data/app/views/avo/debug/report.html.erb +1 -1
- data/app/views/avo/debug/status.html.erb +19 -14
- data/app/views/avo/home/_actions.html.erb +1 -1
- data/app/views/avo/home/_dashboards.html.erb +1 -1
- data/app/views/avo/home/_filters.html.erb +1 -1
- data/app/views/avo/home/_resources.html.erb +2 -2
- data/app/views/avo/home/failed_to_load.html.erb +1 -1
- data/app/views/avo/partials/_confirm_dialog.html.erb +4 -4
- data/app/views/avo/partials/_custom_tools_alert.html.erb +6 -6
- data/app/views/avo/partials/_navbar.html.erb +3 -3
- data/app/views/avo/partials/_resource_search.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +2 -2
- data/app/views/avo/sidebar/_license_warning.html.erb +1 -1
- data/lib/avo/concerns/row_controls_configuration.rb +16 -15
- data/lib/avo/resources/items/holder.rb +1 -1
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/resource_generator.rb +43 -5
- data/lib/generators/avo/resource_tool_generator.rb +1 -1
- data/lib/generators/avo/templates/cards/partial_card_partial.tt +1 -1
- data/lib/generators/avo/tool_generator.rb +2 -2
- data/lib/tasks/avo_tasks.rake +1 -1
- data/public/avo-assets/avo.base.css +10326 -12266
- data/public/avo-assets/avo.base.js +249 -249
- data/public/avo-assets/avo.base.js.map +3 -3
- data/tailwind.preset.js +0 -20
- metadata +4 -7
- data/app/assets/stylesheets/css/tailwindcss/base.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/components.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/utilities.css +0 -1
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
classes = "inline-block"
|
3
|
-
classes += " text-red-600" if @status == 'failed'
|
4
|
-
classes += " text-green-600" if @status == 'success'
|
5
|
-
classes += " text-gray-600" if @status == 'neutral'
|
6
|
-
%>
|
7
|
-
<div class="flex flex-shrink-0 <%= classes %> items-center">
|
1
|
+
<div class=" <%= class_names("flex shrink-0 items-center", "text-red-600": @status == 'failed', "text-green-600": @status == 'success', "text-gray-600": @status == 'neutral') %>">
|
8
2
|
<% if @status == 'success' %>
|
9
3
|
<%= helpers.svg 'heroicons/solid/check-circle', class: 'h-4' %>
|
10
4
|
<% elsif @status == 'failed' %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
} do %>
|
13
13
|
<%= @form.text_field @field.id,
|
14
14
|
value: @field.edit_formatted_value,
|
15
|
-
class: classes("w-full #{"hidden" unless params[:avo_show_hidden_inputs]}"),
|
15
|
+
class: classes("w-full #{"!hidden" unless params[:avo_show_hidden_inputs]}"),
|
16
16
|
data: {
|
17
17
|
'date-field-target': 'input',
|
18
18
|
placeholder: @field.placeholder,
|
@@ -14,7 +14,7 @@
|
|
14
14
|
} do %>
|
15
15
|
<%= @form.text_field @field.id,
|
16
16
|
value: @field.edit_formatted_value,
|
17
|
-
class: classes("w-full #{"hidden" unless params[:avo_show_hidden_inputs]}"),
|
17
|
+
class: classes("w-full #{"!hidden" unless params[:avo_show_hidden_inputs]}"),
|
18
18
|
data: {
|
19
19
|
date_field_target: :input,
|
20
20
|
placeholder: @field.placeholder,
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%>
|
24
24
|
<%# real field %>
|
25
25
|
<%= @form.text_field @field.id,
|
26
|
-
class: classes("hidden w-full !py-0 min-h-10 items-center border-primary-500 focus-within:border-primary-500"),
|
26
|
+
class: classes("!hidden w-full !py-0 min-h-10 items-center border-primary-500 focus-within:border-primary-500"),
|
27
27
|
data: {
|
28
28
|
tags_field_target: :input,
|
29
29
|
},
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end %>
|
15
15
|
<%= @form.text_area @field.id,
|
16
16
|
value: @field.value.try(:to_trix_html) || @field.value,
|
17
|
-
class: classes("w-full hidden"),
|
17
|
+
class: classes("w-full !hidden"),
|
18
18
|
data: @field.get_html(:data, view: view, element: :input),
|
19
19
|
disabled: disabled?,
|
20
20
|
id: @input_id,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-controller="toggle" data-component-name="<%= self.class.to_s.underscore %>">
|
2
2
|
<div class="relative w-full flex justify-between">
|
3
|
-
<%= a_button class: 'focus:outline-
|
3
|
+
<%= a_button class: 'focus:outline-hidden',
|
4
4
|
color: :primary,
|
5
5
|
size: :sm,
|
6
6
|
icon: "avo/filter",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
<div
|
17
|
-
class="absolute block inset-auto sm:right-0 top-full bg-white min-w-[300px] mt-2 z-40 shadow-modal rounded divide-y divide-gray-300 <%= 'hidden' unless params[:keep_filters_panel_open] == '1' %>"
|
17
|
+
class="absolute block inset-auto sm:right-0 top-full bg-white min-w-[300px] mt-2 z-40 shadow-modal rounded-sm divide-y divide-gray-300 <%= 'hidden' unless params[:keep_filters_panel_open] == '1' %>"
|
18
18
|
data-toggle-target="panel"
|
19
19
|
data-transition-enter="transition ease-out duration-100"
|
20
20
|
data-transition-enter-start="transform opacity-0 -translate-y-1"
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% @filters.each do |filter| %>
|
27
27
|
<%= render partial: filter.class.template, locals: {filter: filter} %>
|
28
28
|
<% end %>
|
29
|
-
<div class="p-4 border-gray-
|
29
|
+
<div class="p-4 border-gray-200 border-t">
|
30
30
|
<% if @applied_filters.present? %>
|
31
31
|
<%= a_link reset_path, data: {turbo_frame: params[:turbo_frame]}, color: :gray, size: :sm, class: 'w-full justify-center' do %>
|
32
32
|
<%= t('avo.reset_filters') %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= content_tag :div,
|
2
|
-
class: "relative bg-white rounded shadow-modal flex flex-col group",
|
2
|
+
class: "relative bg-white rounded-sm shadow-modal flex flex-col group",
|
3
3
|
data: {
|
4
4
|
component_name: self.class.to_s.underscore,
|
5
5
|
resource_name: @resource.class.to_s,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
**(try(:drag_reorder_item_data_attributes) || {}),
|
9
9
|
} do %>
|
10
10
|
<%= content_tag :div,
|
11
|
-
class: class_names("relative w-full pb-3/4 rounded-t overflow-hidden", html(:cover, :classes)),
|
11
|
+
class: class_names("relative w-full pb-3/4 rounded-t-sm overflow-hidden", html(:cover, :classes)),
|
12
12
|
style: html(:cover, :style) do %>
|
13
13
|
<%= render Avo::RowSelectorComponent.new(floating: true, size: :lg) if @resource.record_selector%>
|
14
14
|
<%= render_cover %>
|
@@ -70,7 +70,7 @@ class Avo::Index::GridItemComponent < Avo::BaseComponent
|
|
70
70
|
return if @card[:badge_label].blank?
|
71
71
|
|
72
72
|
content_tag :div,
|
73
|
-
class: class_names("absolute block inset-auto top-0 right-0 mt-2 mr-2 text-sm font-semibold bg-#{badge_color}-50 border border-#{badge_color}-300 text-#{badge_color}-700 rounded shadow-lg px-2 py-px z-10", html(:badge, :classes)),
|
73
|
+
class: class_names("absolute block inset-auto top-0 right-0 mt-2 mr-2 text-sm font-semibold bg-#{badge_color}-50 border border-#{badge_color}-300 text-#{badge_color}-700 rounded-sm shadow-lg px-2 py-px z-10", html(:badge, :classes)),
|
74
74
|
title: @card[:badge_title],
|
75
75
|
style: html(:badge, :style),
|
76
76
|
data: {target: :badge, tippy: :tooltip, **(html(:badge, :data).presence || {})} do
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<% end %>
|
17
17
|
</turbo-frame>
|
18
18
|
<% else %>
|
19
|
-
<div class="bg-white rounded shadow-panel"
|
19
|
+
<div class="bg-white rounded-sm shadow-panel"
|
20
20
|
data-component-name="<%= self.class.to_s.underscore %>">
|
21
21
|
<%= helpers.empty_state by_association: params[:related_name].present?, view_type: :grid %>
|
22
22
|
</div>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<% end %>
|
40
40
|
<table class="w-full px-4 bg-white">
|
41
41
|
<%= render partial: 'avo/partials/table_header', locals: {fields: @header_fields} %>
|
42
|
-
<%= content_tag :tbody, class: "divide-y",
|
42
|
+
<%= content_tag :tbody, class: "divide-y divide-gray-200",
|
43
43
|
data: {
|
44
44
|
**(try(:drag_reorder_data_attributes) || {}),
|
45
45
|
} do %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= content_tag :tr,
|
4
4
|
id: "#{self.class.to_s.underscore}_#{@resource.record.to_param}",
|
5
|
-
class: class_names("group bg-white hover:bg-gray-50 z-21 border-b", {"cursor-pointer": click_row_to_view_record}),
|
5
|
+
class: class_names("group bg-white hover:bg-gray-50 z-21 border-b border-gray-200", {"cursor-pointer": click_row_to_view_record}),
|
6
6
|
data: {
|
7
7
|
index: @index,
|
8
8
|
component_name: self.class.to_s.underscore,
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<% end %>
|
25
25
|
<% if @resource.render_row_controls_on_the_left? %>
|
26
26
|
<td class="<%= @resource.row_controls_classes %>" data-control="resource-controls">
|
27
|
-
<div class="flex items-center justify-end
|
27
|
+
<div class="flex items-center justify-end grow-0 h-full">
|
28
28
|
<%= render resource_controls_component %>
|
29
29
|
</div>
|
30
30
|
</td>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<% end %>
|
47
47
|
<% if @resource.render_row_controls_on_the_right? %>
|
48
48
|
<td class="<%= @resource.row_controls_classes %>" data-control="resource-controls">
|
49
|
-
<div class="flex items-center justify-end
|
49
|
+
<div class="flex items-center justify-end grow-0 h-full">
|
50
50
|
<%= render resource_controls_component %>
|
51
51
|
</div>
|
52
52
|
</td>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|
9
9
|
<% c.with_body do %>
|
10
|
-
<% content_tag :div, class: "divide-y overflow-auto" do %>
|
10
|
+
<% content_tag :div, class: "divide-y divide-gray-200 overflow-auto" do %>
|
11
11
|
<%= render Avo::Items::VisibleItemsComponent.new resource: @resource, item: @item, view: @view, form: @form %>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= link_to "Delete", helpers.avo.media_library_path(@blob), class: "text-red-500", data: {turbo_confirm: "Are you sure you want to destroy this attachment?", turbo_method: :delete} %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
|
-
<div class="flex flex-col w-1/2 @3xl/details:w-1/3 border-l">
|
27
|
+
<div class="flex flex-col w-1/2 @3xl/details:w-1/3 border-l border-gray-200">
|
28
28
|
<%= render partial: "avo/media_library/information", locals: {blob: @blob} %>
|
29
29
|
<%= render partial: "avo/media_library/form", locals: {blob: @blob} %>
|
30
30
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
data-modal-target="modal"
|
4
4
|
data-modal-close-modal-on-backdrop-click-value="<%= close_modal_on_backdrop_click %>"
|
5
5
|
>
|
6
|
-
<div aria-expanded="true" class="modal-overlay absolute w-full h-full bg-
|
6
|
+
<div aria-expanded="true" class="modal-overlay absolute w-full h-full bg-gray-800/25 flex justify-center items-center" data-modal-target="backdrop" data-action="click->modal#close"></div>
|
7
7
|
<div aria-expanded="true" role="dialog" aria-modal="true" class="modal-body rounded-lg inset-auto bg-white flex z-50 relative shadow-modal <%= overflow_classes %> <%= width_classes %> <%= height_classes %>">
|
8
8
|
<div class="flex-1 flex flex-col justify-between">
|
9
9
|
<div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= content_tag :label, name: t('avo.per_page').downcase do %>
|
8
8
|
<%= select_tag 'per_page',
|
9
9
|
options_for_select(per_page_options, @index_params[:per_page]),
|
10
|
-
class: 'appearance-none inline-flex bg-white-100 disabled:bg-white-400 disabled:cursor-not-allowed focus:bg-white text-slate-700 disabled:text-slate-600 rounded-md py-1 px-2 leading-tight border border-slate-300 outline-
|
10
|
+
class: 'appearance-none inline-flex bg-white-100 disabled:bg-white-400 disabled:cursor-not-allowed focus:bg-white text-slate-700 disabled:text-slate-600 rounded-md py-1 px-2 leading-tight border border-slate-300 outline-hidden focus:border-slate-400 w-16 mr-1 text-sm',
|
11
11
|
data: {
|
12
12
|
'turbo-frame': @turbo_frame,
|
13
13
|
'per-page-target': 'selector',
|
@@ -30,7 +30,6 @@
|
|
30
30
|
<% end %>
|
31
31
|
|
32
32
|
<% if @pagy.pages > 1 %>
|
33
|
-
<%# @todo: add first & last page. make the first and last buttons rounded %>
|
34
33
|
<%== helpers.pagy_nav @pagy, anchor_string: "data-turbo-frame=\"#{@turbo_frame}\"" %>
|
35
34
|
<% end %>
|
36
35
|
</div>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
class Avo::PaginatorComponent < Avo::BaseComponent
|
4
4
|
prop :resource
|
5
5
|
prop :parent_record
|
6
|
+
prop :parent_resource
|
6
7
|
prop :pagy
|
7
8
|
prop :turbo_frame do |frame|
|
8
9
|
frame.present? ? CGI.escapeHTML(frame) : :_top
|
@@ -12,7 +13,14 @@ class Avo::PaginatorComponent < Avo::BaseComponent
|
|
12
13
|
|
13
14
|
def change_items_per_page_url(option)
|
14
15
|
if @parent_record.present?
|
15
|
-
helpers.related_resources_path(
|
16
|
+
helpers.related_resources_path(
|
17
|
+
@parent_record,
|
18
|
+
@parent_record,
|
19
|
+
parent_resource: @parent_resource,
|
20
|
+
per_page: option,
|
21
|
+
keep_query_params: true,
|
22
|
+
page: 1
|
23
|
+
)
|
16
24
|
else
|
17
25
|
helpers.resources_path(resource: @resource, per_page: option, keep_query_params: true, page: 1)
|
18
26
|
end
|
@@ -27,12 +27,12 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
<% if sidebar? %>
|
30
|
-
<div class="max-w-full sm:w-1/3
|
30
|
+
<div class="max-w-full sm:w-1/3 shrink-0 h-full">
|
31
31
|
<%= sidebar %>
|
32
32
|
</div>
|
33
33
|
<% end %>
|
34
34
|
<% if bare_sidebar? %>
|
35
|
-
<div class="max-w-full sm:w-1/3
|
35
|
+
<div class="max-w-full sm:w-1/3 shrink-0 h-full">
|
36
36
|
<%= bare_sidebar %>
|
37
37
|
</div>
|
38
38
|
<% end %>
|
@@ -23,6 +23,6 @@ class Avo::ProfileItemComponent < Avo::BaseComponent
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def button_classes
|
26
|
-
"flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-gray-800 font-semibold hover:bg-primary-100 block px-4 py-1 w-full py-3 text-center rounded w-full"
|
26
|
+
"flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-gray-800 font-semibold hover:bg-primary-100 block px-4 py-1 w-full py-3 text-center rounded-sm w-full"
|
27
27
|
end
|
28
28
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
name: t("avo.select_item"),
|
6
6
|
title: t("avo.select_item"),
|
7
7
|
autocomplete: :off,
|
8
|
-
class: class_names("mx-3 rounded checked:bg-primary-400 focus:checked:!bg-primary-400", {
|
8
|
+
class: class_names("mx-3 rounded-sm checked:bg-primary-400 focus:checked:!bg-primary-400", {
|
9
9
|
"absolute inset-auto left-0 mt-3 z-10 hidden group-hover:block checked:block": @floating,
|
10
10
|
"w-5 h-5": @size.to_sym == :lg,
|
11
11
|
"w-4 h-4": @size.to_sym != :lg,
|
@@ -26,6 +26,6 @@ class Avo::Sidebar::LinkComponent < Avo::BaseComponent
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def classes
|
29
|
-
"px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded font-medium hover:bg-gray-100 gap-1"
|
29
|
+
"px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded-sm font-medium hover:bg-gray-100 gap-1"
|
30
30
|
end
|
31
31
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= content_tag :div,
|
2
2
|
class: class_names(
|
3
|
-
"avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r lg:border-none bg-none xh-dvh h-[calc(100dvh-4rem)] bg-application lg:bg-transparent",
|
3
|
+
"avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r border-gray-200 lg:border-none bg-none xh-dvh h-[calc(100dvh-4rem)] bg-application lg:bg-transparent",
|
4
4
|
"print:hidden": Avo.configuration.hide_layout_when_printing,
|
5
5
|
"hidden": !@sidebar_open,
|
6
6
|
),
|
@@ -61,8 +61,8 @@
|
|
61
61
|
</div>
|
62
62
|
</div>
|
63
63
|
<% if Rails.env.development? %>
|
64
|
-
<div class="p-4 border-t group">
|
65
|
-
<%= link_to helpers.avo.avo_private_status_path, class: "block px-4 py-2 border rounded flex justify-between items-center w-full text-black text-sm" do %>
|
64
|
+
<div class="p-4 border-t border-gray-200 group">
|
65
|
+
<%= link_to helpers.avo.avo_private_status_path, class: "block px-4 py-2 border border-gray-200 rounded-sm flex justify-between items-center w-full text-black text-sm" do %>
|
66
66
|
<span>Avo Status</span> <span><div class="rounded-full w-4 h-4 <%= Avo.app_status ? "bg-green-400" : "bg-orange-400" %>"></div></span>
|
67
67
|
<% end %>
|
68
68
|
<div class="absolute text-xs text-gray-700 group-hover:block hidden text-center w-full -ml-4">👆Visible only in development👆</div>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<div class="text-black border-gray-150 p-4 flex border-t">
|
1
|
+
<div class="text-black border-gray-150 p-4 flex border-t border-gray-200">
|
2
2
|
<div class="flex-1 flex space-x-4 w-full">
|
3
3
|
<% if avatar.present? %>
|
4
|
-
<div class="relative aspect-square w-10 h-10 overflow-hidden rounded shrink-0">
|
4
|
+
<div class="relative aspect-square w-10 h-10 overflow-hidden rounded-sm shrink-0">
|
5
5
|
<%= image_tag helpers.main_app.url_for(avatar), class: "object-cover min-w-full min-h-full h-full" %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<%= helpers.svg "avo/three-dots", class: 'h-4' %>
|
22
22
|
</a>
|
23
23
|
<div
|
24
|
-
class="hidden absolute flex flex-col inset-auto right-0 bottom-0 mb-8 bg-white rounded min-w-[200px] shadow-context z-40"
|
24
|
+
class="hidden absolute flex flex-col inset-auto right-0 bottom-0 mb-8 bg-white rounded-sm min-w-[200px] shadow-context z-40"
|
25
25
|
data-toggle-target="panel"
|
26
26
|
data-transition-enter="transition ease-in-out duration-100"
|
27
27
|
data-transition-enter-start="transform opacity-0 translate-y-3"
|
@@ -49,7 +49,7 @@
|
|
49
49
|
action: "submit->sign-out#handle",
|
50
50
|
},
|
51
51
|
class: 'flex-1' do |form| %>
|
52
|
-
<%= form.button turbo_confirm: t('avo.are_you_sure'), class: "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-red-600 font-semibold hover:bg-red-100 block px-4 py-1 w-full py-3 text-center rounded w-full" do %>
|
52
|
+
<%= form.button turbo_confirm: t('avo.are_you_sure'), class: "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-red-600 font-semibold hover:bg-red-100 block px-4 py-1 w-full py-3 text-center rounded-sm w-full" do %>
|
53
53
|
<%= helpers.svg "avo/logout", class: 'h-4 mr-1' %> <%= t('avo.sign_out') %>
|
54
54
|
<% end %>
|
55
55
|
<% end %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% visible_tabs.each_with_index do |tab, index| %>
|
12
12
|
<%= content_tag :div, **args(tab) do %>
|
13
13
|
<%= render Avo::PanelHeaderComponent.new name: group.title, description: group.description %>
|
14
|
-
<div class="border rounded-lg p-2 -mx-2 -my-2 lg:p-4 lg:-mx-4 lg:-my-3 space-y-4">
|
14
|
+
<div class="border border-gray-200 rounded-lg p-2 -mx-2 -my-2 lg:p-4 lg:-mx-4 lg:-my-3 space-y-4">
|
15
15
|
<%= render Avo::TabSwitcherComponent.new resource: resource, current_tab: visible_tabs.first, group: group, active_tab_name: tab.name, view: view %>
|
16
16
|
<% if !tab.is_empty? %>
|
17
17
|
<% if tab.lazy_load && view.display? %>
|
@@ -79,7 +79,7 @@
|
|
79
79
|
<% if view_type.to_sym == :table || view_type.to_sym == :map %>
|
80
80
|
<% if @records.present? %>
|
81
81
|
<div class="mt-4 w-full">
|
82
|
-
<%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame, index_params: @index_params, resource: @resource, parent_record: @parent_record, discreet_pagination: field&.discreet_pagination %>
|
82
|
+
<%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame, index_params: @index_params, resource: @resource, parent_record: @parent_record, parent_resource: @parent_resource, discreet_pagination: field&.discreet_pagination %>
|
83
83
|
</div>
|
84
84
|
<% end %>
|
85
85
|
<% end %>
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<%= render Avo::Index::ResourceGridComponent.new(resources: @resources, resource: @resource, reflection: @reflection, parent_record: @parent_record, parent_resource: @parent_resource, actions: @actions) %>
|
89
89
|
</div>
|
90
90
|
<div class="mt-6">
|
91
|
-
<%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame, index_params: @index_params, resource: @resource, parent_record: @parent_record, discreet_pagination: field&.discreet_pagination %>
|
91
|
+
<%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame, index_params: @index_params, resource: @resource, parent_record: @parent_record, parent_resource: @parent_resource, discreet_pagination: field&.discreet_pagination %>
|
92
92
|
</div>
|
93
93
|
<% end %>
|
94
94
|
<% end %>
|
@@ -28,7 +28,7 @@ module Avo
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def button_classes(extra_classes = nil, color: nil, variant: nil, size: :md, active: false)
|
31
|
-
classes = "inline-flex
|
31
|
+
classes = "inline-flex grow-0 items-center text-sm font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 rounded-sm transform transition duration-100 active:translate-x-px active:translate-y-px cursor-pointer disabled:cursor-not-allowed #{extra_classes}"
|
32
32
|
|
33
33
|
if color.present?
|
34
34
|
if variant.present? && (variant.to_sym == :outlined)
|
@@ -71,7 +71,7 @@ module Avo
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def input_classes(extra_classes = "", has_error: false)
|
74
|
-
classes = "appearance-none inline-flex bg-gray-25 disabled:cursor-not-allowed text-gray-600 disabled:opacity-50 rounded py-2 px-3 leading-tight border focus:border-gray-600 focus-visible:ring-0 focus:text-gray-700 placeholder:text-gray-300"
|
74
|
+
classes = "appearance-none inline-flex bg-gray-25 disabled:cursor-not-allowed text-gray-600 disabled:opacity-50 rounded-sm py-2 px-3 leading-tight border focus:border-gray-600 focus-visible:ring-0 focus:text-gray-700 placeholder:text-gray-300"
|
75
75
|
|
76
76
|
classes += if has_error
|
77
77
|
" border-red-600"
|
@@ -85,11 +85,11 @@ module Avo
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def white_panel_classes
|
88
|
-
"bg-white rounded shadow-md"
|
88
|
+
"bg-white rounded-sm shadow-md"
|
89
89
|
end
|
90
90
|
|
91
91
|
def card_classes
|
92
|
-
"bg-white rounded shadow-panel"
|
92
|
+
"bg-white rounded-sm shadow-panel"
|
93
93
|
end
|
94
94
|
|
95
95
|
def get_model_class(model)
|
@@ -61,6 +61,7 @@ module Avo
|
|
61
61
|
parent_record,
|
62
62
|
record,
|
63
63
|
keep_query_params: false,
|
64
|
+
parent_resource: nil,
|
64
65
|
**args
|
65
66
|
)
|
66
67
|
return if record.nil?
|
@@ -75,7 +76,9 @@ module Avo
|
|
75
76
|
rescue
|
76
77
|
end
|
77
78
|
|
78
|
-
|
79
|
+
route_key = parent_resource&.route_key || parent_record.model_name.route_key
|
80
|
+
|
81
|
+
avo.resources_associations_index_path(route_key, record.to_param, **existing_params, **args)
|
79
82
|
end
|
80
83
|
|
81
84
|
def resource_view_path(**args)
|
@@ -145,7 +145,7 @@ export default class extends Controller {
|
|
145
145
|
const inputValue = id === 'key' ? key : value
|
146
146
|
|
147
147
|
return `<input
|
148
|
-
class="${this.options.inputClasses} focus:bg-gray-100 !rounded-none border-gray-600 border-r border-l-0 border-b-0 border-t-0 focus:border-gray-300 w-1/2 focus:outline-
|
148
|
+
class="${this.options.inputClasses} focus:bg-gray-100 !rounded-none border-gray-600 border-r border-l-0 border-b-0 border-t-0 focus:border-gray-300 w-1/2 focus:outline-hidden outline-hidden key-value-input-${id}"
|
149
149
|
data-action="input->key-value#${id}FieldUpdated"
|
150
150
|
placeholder="${this.options[`${id}_label`]}"
|
151
151
|
data-index="${index}"
|
@@ -36,7 +36,7 @@ export function suggestionItemTemplate(tagData) {
|
|
36
36
|
${
|
37
37
|
tagData.avatar
|
38
38
|
? `
|
39
|
-
<div class='rounded w-8 h-8 block mr-2'>
|
39
|
+
<div class='rounded-sm w-8 h-8 block mr-2'>
|
40
40
|
<img onerror="this.style.visibility='hidden'" class="w-full" src="${tagData.avatar}">
|
41
41
|
</div>`
|
42
42
|
: ''
|
@@ -152,7 +152,7 @@ export default class extends Controller {
|
|
152
152
|
classes = 'rounded-full'
|
153
153
|
break
|
154
154
|
case 'rounded':
|
155
|
-
classes = 'rounded'
|
155
|
+
classes = 'rounded-sm'
|
156
156
|
break
|
157
157
|
case 'square':
|
158
158
|
classes = 'rounded-none'
|
@@ -163,7 +163,7 @@ export default class extends Controller {
|
|
163
163
|
createElement('img', {
|
164
164
|
src: item._avatar,
|
165
165
|
alt: item._label,
|
166
|
-
class: `
|
166
|
+
class: `shrink-0 w-8 h-8 my-[2px] inline mr-2 ${classes}`,
|
167
167
|
}),
|
168
168
|
)
|
169
169
|
}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="sm:col-span-6 mt-4">
|
13
13
|
<label for="about" class="block text-sm font-medium text-gray-700">Details</label>
|
14
14
|
<div class="mt-1">
|
15
|
-
<%= f.text_area :body, rows: 3, class: "block w-full rounded-md border-gray-300 shadow-
|
15
|
+
<%= f.text_area :body, rows: 3, class: "block w-full rounded-md border-gray-300 shadow-xs focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm disabled:bg-gray-100", disabled: !Avo::Current.license.pro? %>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
<%= f.hidden_field :license_key, value: Avo::Services::DebugService.debug_report(request)[:license_response]["license_key"] %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<% end %>
|
20
20
|
<% c.with_bare_content do %>
|
21
21
|
<div class="grid gap-4 grid-cols-2">
|
22
|
-
<div class="relative flex flex-col bg-white rounded shadow-panel p-4 space-y-4 h-full">
|
22
|
+
<div class="relative flex flex-col bg-white rounded-sm shadow-panel p-4 space-y-4 h-full">
|
23
23
|
<div class="flex justify-between w-full">
|
24
24
|
<div class="font-semibold">License info</div>
|
25
25
|
<div class="flex justify-self-end">
|
@@ -52,26 +52,31 @@
|
|
52
52
|
</dl>
|
53
53
|
<% end %>
|
54
54
|
<div class="mt-4">
|
55
|
-
<dl>
|
55
|
+
<dl class="flex flex-col">
|
56
56
|
<% information_items.each do |item| %>
|
57
|
-
<
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<dd><%= license.response['fetched_at'] %> <br>
|
62
|
-
<% if license.response['fetched_at'].present? %>
|
63
|
-
(<%= time_ago_in_words license.response['fetched_at'] %> ago)</dd>
|
57
|
+
<div>
|
58
|
+
<dt class="font-semibold text-sm"><%= item.humanize %></dt>
|
59
|
+
<dd><%= license.response[item] %></dd>
|
60
|
+
</div>
|
64
61
|
<% end %>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
62
|
+
<dt class="font-semibold text-sm">Last fetched at</dt>
|
63
|
+
<dd><%= license.response['fetched_at'] %> <br>
|
64
|
+
<% if license.response['fetched_at'].present? %>
|
65
|
+
(<%= time_ago_in_words license.response['fetched_at'] %> ago)
|
66
|
+
<% end %>
|
67
|
+
</dd>
|
68
|
+
<div>
|
69
|
+
<dt class="font-semibold text-sm">Cache store</dt>
|
70
|
+
<dd>
|
71
|
+
<%= Avo.cache_store.class %>
|
72
|
+
</dd>
|
73
|
+
</div>
|
69
74
|
</dl>
|
70
75
|
</div>
|
71
76
|
</div>
|
72
77
|
</div>
|
73
78
|
</div>
|
74
|
-
<div class="relative flex flex-col bg-white rounded shadow-panel p-4 space-y-4 h-full">
|
79
|
+
<div class="relative flex flex-col bg-white rounded-sm shadow-panel p-4 space-y-4 h-full">
|
75
80
|
<div class="flex justify-between w-full">
|
76
81
|
<div class="font-semibold">Plugins</div>
|
77
82
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="mt-2">
|
8
8
|
<code class="text-lg">Toggle published</code>
|
9
9
|
<div class="mt-1">
|
10
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:action toggle_published</code>
|
10
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:action toggle_published</code>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<div class="mt-2">
|
10
10
|
<div class="mt-1">
|
11
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:dashboard dashy</code>
|
11
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:dashboard dashy</code>
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="mt-2">
|
8
8
|
<code class="text-lg">Published filter</code>
|
9
9
|
<div class="mt-1">
|
10
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:filter published_filter</code>
|
10
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:filter published_filter</code>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<% models.each do |model| %>
|
21
21
|
<code class="text-lg"><%= model.to_s %></code>
|
22
22
|
<div>
|
23
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
|
23
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
</div>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
You may generate a resource using the following command:
|
31
31
|
<br>
|
32
32
|
|
33
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource post</code>
|
33
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource post</code>
|
34
34
|
</div>
|
35
35
|
<% end %>
|
36
36
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="relative block text-gray-300 h-64 w-full">
|
9
9
|
<%= svg "avo/failed_to_load", class: "#{classes} h-52 text-gray-400" %>
|
10
10
|
</div>
|
11
|
-
<div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
|
11
|
+
<div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-gray-200 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
|
12
12
|
<% if Rails.env.development? && src_url %>
|
13
13
|
<div class="text-center text-sm w-full pb-3">
|
14
14
|
This is not an issue with Avo. Use <%= link_to 'this page', src_url, target: :_blank %> to see why this frame failed to load.
|