Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Improve Admin UI (dropdowns, upload form, navigation and more) (#12577)
Damian Legawiecaefd1ef2cd86
diff --git a/admin/app/assets/stylesheets/spree/admin/application.scss b/admin/app/assets/stylesheets/spree/admin/application.scssindex a39def2a41..bc5d68b23c 100644--- a/admin/app/assets/stylesheets/spree/admin/application.scss+++ b/admin/app/assets/stylesheets/spree/admin/application.scss@@ -34,6 +34,8 @@@import url('https://esm.sh/[email protected]/animate.min.css');@import url('https://esm.sh/@simonwep/[email protected]/dist/themes/classic.min.css');+@import 'plugins/uppy_fixes';+@import 'shared/base';@import 'shared/forms';diff --git a/admin/app/assets/stylesheets/spree/admin/components/_alerts.scss b/admin/app/assets/stylesheets/spree/admin/components/_alerts.scssindex 57bd302aef..f6980ab98b 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_alerts.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_alerts.scss@@ -1,14 +1,5 @@.alert {display: inline-block;-- .btn-link {- color: $link-color !important;- background: transparent !important;-- &:hover {- background: transparent !important;- }- }}.alert {diff --git a/admin/app/assets/stylesheets/spree/admin/components/_buttons.scss b/admin/app/assets/stylesheets/spree/admin/components/_buttons.scssindex 5ebc142833..fce2dd140e 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_buttons.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_buttons.scss@@ -98,21 +98,6 @@ button[disabled] .show-when-enabled { display: none; }text-decoration: none !important;}}-.focus-border-primary {- &:focus, &:focus-within {- border-color: theme-color('black') !important;- }-}-.focus-border-blue {- &:focus, &:focus-within {- border-color: theme-color('blue') !important;- }-}-.focus-bg-white {- &:focus, &:focus-within {- background-color: white !important;- }-}.btn-link {color: theme-color('primary') !important;@@ -150,7 +135,7 @@ button[disabled] .show-when-enabled { display: none; }height: 0.85em;opacity: 0.5;padding: 12px;- border-radius: 100%;+ border-radius: $border-radius;&:hover {opacity: 0.8 !important;diff --git a/admin/app/assets/stylesheets/spree/admin/components/_dropdowns.scss b/admin/app/assets/stylesheets/spree/admin/components/_dropdowns.scssindex 0716897534..72bf80a578 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_dropdowns.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_dropdowns.scss@@ -39,13 +39,12 @@align-items: center;justify-content: flex-start;background: transparent;- transition: background 0.15s, color 0.1s;- will-change: background, color;color: $gray-700;&:hover {- background-color: $gray-50;+ background-color: $blue;+ color: $white;}i {@@ -60,12 +59,22 @@font-weight: $font-weight-base !important;}}- .dropdown-item.active, .dropdown-item:active, .dropdown-item:focus {+ .dropdown-item.active {color: theme-color('black') !important;i {color: theme-color('black') !important;}++ &::after {+ content: '';+ display: inline-block;+ position: absolute;+ right: 0.5rem;+ width: 1rem;+ height: 1rem;+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-check text-primary"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10"/></svg>') no-repeat center center;+ }}.dropdown-item.active {font-weight: 600 !important;diff --git a/admin/app/assets/stylesheets/spree/admin/components/_main.scss b/admin/app/assets/stylesheets/spree/admin/components/_main.scssindex 8fc8a48c25..0c368adc12 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_main.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_main.scss@@ -57,8 +57,6 @@ turbo-frame[loading] .spinner-border, turbo-frame[busy] .spinner-border {padding-right: 0.5rem;padding-top: 0.35rem;padding-bottom: 0.35rem;- font-weight: 400;- color: $gray-700;.ti {font-size: 1rem;diff --git a/admin/app/assets/stylesheets/spree/admin/components/_media_form.scss b/admin/app/assets/stylesheets/spree/admin/components/_media_form.scssindex 7be3392054..da2681c663 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_media_form.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_media_form.scss@@ -1,3 +1,24 @@+.upload-area {+ display: flex;+ flex-direction: column;+ gap: 0.5rem;+ justify-content: center;+ align-items: center;+ overflow: hidden;+ border-radius: 0.5rem;+ border: 1px dashed $gray-50;+ background-color: rgba($gray-25, 0.5);+ padding: 0.5rem;+ cursor: pointer;+ color: $gray-500;++ &:hover {+ background-color: $gray-25;+ border-color: $gray-100;+ color: $gray-700;+ }+}+.media-form {display: grid;grid-template-columns: repeat(6, 1fr);@@ -8,16 +29,13 @@&__add-button {aspect-ratio: 1/1;- display: flex;- flex-direction: column;- gap: 0.5rem;- justify-content: center;- align-items: center;&:only-child {grid-column: 1 / span 6;grid-row: 1 / span 1;aspect-ratio: 12/1;+ max-width: 200px;+ height: 200px;}&:not(:only-child) {diff --git a/admin/app/assets/stylesheets/spree/admin/components/_navigation.scss b/admin/app/assets/stylesheets/spree/admin/components/_navigation.scssindex 591df5d811..a300befb6d 100644--- a/admin/app/assets/stylesheets/spree/admin/components/_navigation.scss+++ b/admin/app/assets/stylesheets/spree/admin/components/_navigation.scss@@ -12,6 +12,12 @@position: relative;transition: background 0.15s, color 0.1s;will-change: background, color;+ font-weight: 400;+ color: $gray-700;++ &:hover {+ color: theme-color('primary');+ }}#header {@@ -34,8 +40,6 @@}.nav-link {- font-weight: 500;-&:hover {color: theme-color('primary') !important;background-color: theme-color('active');diff --git a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss b/admin/app/assets/stylesheets/spree/admin/global/_variables.scssindex b3d1d97c57..1e21c27adf 100644--- a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss+++ b/admin/app/assets/stylesheets/spree/admin/global/_variables.scss@@ -71,23 +71,17 @@ $thumbnail-border-color: $gray-100 !default;$hr-border-color: $border-color !default;$table-border-color: $gray-50 !default;$card-border-color: $border-color !default;+$input-btn-focus-width: 0.15rem !default;$card-spacer-y: .75rem !default;$card-spacer-x: 1rem !default;-$custom-control-indicator-checked-bg: $primary !default;-$custom-control-indicator-checked-disabled-bg: rgba($primary, .5) !default;-$custom-control-indicator-checked-border-color: $primary !default;--$input-focus-border-color: $primary !default;-$input-btn-focus-color: $primary !default;-$input-btn-focus-box-shadow: 0 0 0 1px $primary !default;+$component-active-bg: $blue !default;$input-placeholder-color: $gray-500;$input-padding-y: .5rem !default;$input-disabled-bg: $gray-50 !default;$custom-select-disabled-bg: $gray-50 !default;-$custom-select-focus-width: 1px !default;$text-muted: $gray-400 !default;@@ -95,7 +89,6 @@ $link-color: $primary !default;$link-hover-decoration: underline !default;$btn-active-box-shadow: inset 0 3px 5px rgba($black, .025) !default;-$btn-font-weight: 500 !default;$btn-disabled-opacity: 0.3 !default;$nav-link-padding-y: .5rem !default;@@ -108,6 +101,12 @@ $box-shadow-lg: rgba(0, 5, 13, 0.5) 0px 4px 8px 2px;$tooltip-border-radius: $border-radius-sm !default;$tooltip-opacity: 1 !default;$tooltip-margin: 0.25rem 0 !default;+$tooltip-padding-y: .5rem !default;+$tooltip-padding-x: .75rem !default;+$tooltip-bg: $white !default;+$tooltip-color: $body-color !default;+$tooltip-arrow-color: transparent !default;+$tooltip-max-width: 210px !default;$transition-base: all .1s ease-in-out !default;$transition-fade: opacity .15s linear !default;@@ -144,7 +143,8 @@ $display4-weight: 400 !default;$dropdown-border-width: 0px !default;$dropdown-border-radius: $border-radius-lg !default;-$dropdown-link-hover-bg: $gray-50 !default;+$dropdown-link-hover-bg: $blue !default;+$dropdown-link-hover-color: $white !default;$dropdown-box-shadow: rgba(209, 217, 224, 0.8) 0px 0px 0px 1px, rgba(37, 41, 46, 0.04) 0px 6px 12px -3px, rgba(37, 41, 46, 0.12) 0px 6px 18px 0px !default;$dropdown-padding-x: 0.25rem !default;$dropdown-padding-y: 0.25rem !default;@@ -171,10 +171,6 @@ $alert-padding-y: 0.5rem !default;$alert-padding-x: 1rem !default;$alert-border-radius: $border-radius-lg;-.border.border-2 {- border-width: 2px !important;-}-$embed-responsive-aspect-ratios: ((21 9),(16 9),@@ -183,7 +179,6 @@ $embed-responsive-aspect-ratios: ((1 1)) !default;-// tables$table-cell-padding: .75rem .50rem !default;diff --git a/admin/app/assets/stylesheets/spree/admin/plugins/uppy_fixes.scss b/admin/app/assets/stylesheets/spree/admin/plugins/uppy_fixes.scssnew file mode 100644index 0000000000..a70b48746f--- /dev/null+++ b/admin/app/assets/stylesheets/spree/admin/plugins/uppy_fixes.scss@@ -0,0 +1,25 @@+.uppy-Dashboard--modal .uppy-Dashboard-overlay {+ background-color: $modal-backdrop-bg !important;+ opacity: $modal-backdrop-opacity !important;+}++.uppy-Dashboard--modal .uppy-Dashboard-inner {+ box-shadow: $modal-content-box-shadow-xs !important;+ border-color: $modal-content-border-color !important;+}++.uppy-Dashboard-browse {+ color: $blue !important;+ text-decoration: none !important;+ border-bottom: 0 !important;+}++.uppy-Dashboard-close {+ @extend .btn-close;+ background-color: $white !important;++ span {+ display: none;+ }+}+diff --git a/admin/app/assets/stylesheets/spree/admin/shared/_base.scss b/admin/app/assets/stylesheets/spree/admin/shared/_base.scssindex ae40a504c7..92e6c1bfbb 100644--- a/admin/app/assets/stylesheets/spree/admin/shared/_base.scss+++ b/admin/app/assets/stylesheets/spree/admin/shared/_base.scss@@ -156,17 +156,14 @@ strong {.shadow-xs {box-shadow: $box-shadow-xs;}-.shadow-blue {- box-shadow: $input-btn-focus-box-shadow;-}-.focus-shadow-primary {+.focus-shadow {&:focus, &:focus-within, &:active {box-shadow: $input-btn-focus-box-shadow;}}-.focus-border-primary {- &:focus, &:focus-within, &:active {- border-color: $input-focus-border-color;+.focus-border {+ &:focus, &:focus-within {+ border-color: theme-color('blue') !important;}}@@ -670,4 +667,8 @@ div.uppy-Root {.turbo-progress-bar {background-color: theme-color('blue');+}++.tooltip-inner {+ box-shadow: $dropdown-box-shadow;}\ No newline at end of filediff --git a/admin/app/assets/stylesheets/spree/admin/shared/_forms.scss b/admin/app/assets/stylesheets/spree/admin/shared/_forms.scssindex 008721b198..139d7a933f 100644--- a/admin/app/assets/stylesheets/spree/admin/shared/_forms.scss+++ b/admin/app/assets/stylesheets/spree/admin/shared/_forms.scss@@ -64,11 +64,13 @@ input[type="file"] {background-repeat: no-repeat !important;border-radius: $input-border-radius;padding-right: 2.5rem;-- &:hover:not(:focus) {- border: 1px solid theme-color('primary') !important;+}+.custom-select, .form-control, .ts-control {+ &:hover:not(:focus):not(:active):not(.active):not(:focus-visible):not(:focus-within) {+ border: 1px solid $gray-200;}}+.ts-control>input {min-width: auto !important;}@@ -161,15 +163,6 @@ input[type="file"] {}}-.form-control-dark {- @extend .text-white;- @extend .border-gray-700;-- &:hover, &:active, &:focus {- @extend .border-white;- }-}-.form-check-input {margin-top: 0.2rem;}diff --git a/admin/app/assets/stylesheets/spree/admin/views/_page_builder.scss b/admin/app/assets/stylesheets/spree/admin/views/_page_builder.scssindex 7d48daf038..c263bc9422 100644--- a/admin/app/assets/stylesheets/spree/admin/views/_page_builder.scss+++ b/admin/app/assets/stylesheets/spree/admin/views/_page_builder.scss@@ -1,56 +1,92 @@-.page-builder {+#page-builder {+ background-color: $gray-100;++ #content {+ margin-left: 0;+ }+#main-part {padding-bottom: 0;+ padding-left: 2rem;+ padding-right: 2rem;.embed-responsive {min-height: 100vh;}}-}-#page-builder-header {- nav {- > * {- display: flex;- align-items: center;- height: 42px !important;- vertical-align: middle !important;- border-radius: 0 !important;++ .nav-pills {+ border: 1px solid $gray-100;+ border-radius: $border-radius;+ background-color: $gray-50;+ padding: 0.1rem;++ .nav-link {+ background-color: transparent;+ padding: 0.25rem 0.5rem;+ border-radius: $border-radius-sm;+ border: 1px solid transparent;&.active {- background-color: $gray-100 !important;+ background-color: $white;+ border: 1px solid $gray-100;}}}+}+#page-builder-sidebar, #page-builder-header {+ background-color: $body-bg;+}- .nav-pills {- .nav-item {- @extend .h-100;- @extend .m-0;- .nav-link {- @extend .text-black;- @extend .h-100;- @extend .m-0;- @extend .border-right;-- &.active, &:hover, &:focus {- background-color: $gray-200 !important;- }-- &:focus {- outline: none !important;- }- }- }- }+#page-builder-header {+ z-index: 1031;+ border-bottom: 1px solid $gray-150;- .btn:focus {- outline: none !important;+ nav {+ width: 100%;+ display: flex;+ align-items: center;+ gap: 0.5rem;+ padding: 0.25rem 0.5rem;}}#page-builder-sidebar {width: 345px;top: 43px;left: 0px;+ background-color: $body-bg;+ border-right: 1px solid $gray-150;++ .sidebar-header {+ height: 48px;+ padding: 0.5rem 1rem;+ background-color: $gray-25;+ border-bottom: 1px solid $gray-50;+ display: flex;+ align-items: center;+ margin-bottom: 0.5rem;+ gap: 0.5rem;+ position: sticky;+ top: 0;+ z-index: 1031;+ }++ .sidebar-footer {+ position: fixed;+ bottom: 0;+ left: 0;+ width: 345px;+ padding: 0.5rem 1rem;+ background-color: $gray-25;+ border-top: 1px solid $gray-50;+ z-index: 1031;+ }}+#page-builder-preview {+ border-radius: $border-radius;+ border: 1px solid $gray-300;+ margin-top: 60px;+}+.sidebar-section-title,.sidebar-block-title {@@ -92,7 +128,7 @@}.mobileLiveView {- #pageLivePreview {+ #page-builder-preview {width: 100%;height: 100vh;inset: 0 50%;@@ -121,7 +157,7 @@ main#content {}@media (max-width: 768px) {- #pageLivePreview {+ #page-builder-preview {border: 0px none !important;}@@ -146,21 +182,6 @@ main#content {opacity: 0;pointer-events: none;}-- #main-part {- padding-top: 0 !important;- .embed-responsive {- position: static;- }- .col {- padding: 0;- }- .embed-responsive-item {- min-width: 100%;- border-radius: 0 !important;- box-shadow: none !important;- }- }}@media (min-width: 768px) {@@ -169,7 +190,7 @@ main#content {}.mobileLiveView {- #pageLivePreview {+ #page-builder-preview {width: 392px; // 375px + 17px scrollbarmax-width: 429px; // 412px + 17px scrollbarheight: calc(100vh - 100px);diff --git a/admin/app/helpers/spree/admin/navigation_helper.rb b/admin/app/helpers/spree/admin/navigation_helper.rbindex 6fa60acf16..e02136e7bd 100644--- a/admin/app/helpers/spree/admin/navigation_helper.rb+++ b/admin/app/helpers/spree/admin/navigation_helper.rb@@ -175,7 +175,7 @@ module Spreedef external_link_to(label, url, opts = {}, &block)opts[:target] ||= :blankopts[:rel] ||= :nofollow- opts[:class] = "d-inline-flex align-items-center #{opts[:class]}"+ opts[:class] ||= "d-inline-flex align-items-center text-blue"if block_given?link_to url, opts, &block@@ -187,8 +187,8 @@ module Spreeenddef help_bubble(text = '', placement = 'bottom', css: nil)- css ||= 'text-muted font-size-base'- content_tag :small, icon('help', class: css), data: { placement: placement }, class: "with-tip #{css}", title: text+ css ||= 'text-muted'+ content_tag :small, icon('info-square-rounded', class: css), data: { placement: placement }, class: "with-tip #{css}", title: textendendenddiff --git a/admin/app/helpers/spree/admin/page_builder_helper.rb b/admin/app/helpers/spree/admin/page_builder_helper.rbindex 4bc636bd73..1329f0f5f8 100644--- a/admin/app/helpers/spree/admin/page_builder_helper.rb+++ b/admin/app/helpers/spree/admin/page_builder_helper.rb@@ -109,7 +109,7 @@ module Spreeturbo_frame_tag :iframe_preview_scripts dojavascript_tag doraw <<~JS- document.getElementById('pageLivePreview').contentWindow.window.Turbo.visit(+ document.getElementById('page-builder-preview').contentWindow.window.Turbo.visit(document.getElementById('page-builder').dataset.pageBuilderPreviewUrlValue + '&editor_id=#{editor_id}',#{reload_params})diff --git a/admin/app/views/active_storage/_upload_form.html.erb b/admin/app/views/active_storage/_upload_form.html.erbindex c3352cf805..14fffeaca3 100644--- a/admin/app/views/active_storage/_upload_form.html.erb+++ b/admin/app/views/active_storage/_upload_form.html.erb@@ -14,7 +14,7 @@data-active-storage-upload-field-name-value="<%= form.object_name %>[<%= field_name %>]"data-active-storage-upload-allowed-file-types-value="<%= Rails.application.config.active_storage.web_image_content_types %>"class="d-flex flex-column justify-content-center w-100 position-relative">- <div class="mb-3 rounded-lg overflow-hidden thumb-preview cursor-pointer border border-dashed bg-gray-25 hover-gray-50 p-2 d-flex align-items-center justify-content-center"+ <div class="upload-area"data-action="click->active-storage-upload#open"><% if form.object.send(field_name).attached? && form.object.send(field_name).variable? %>@@ -34,7 +34,7 @@<img data-active-storage-upload-target="thumb" class="img-fluid rounded-lg" style="display: none" /><% end %>- <div class="d-flex flex-column justify-content-center align-items-center h-100 p-5 text-muted rounded-lg <%= css %>" data-active-storage-upload-target="placeholder" <% if form.object.send(field_name).attached? && form.object.send(field_name).variable? %>style="display: none !important"<% end %>>+ <div class="d-flex flex-column justify-content-center align-items-center h-100 p-5 rounded-lg <%= css %>" data-active-storage-upload-target="placeholder" <% if form.object.send(field_name).attached? && form.object.send(field_name).variable? %>style="display: none !important"<% end %>><%= icon('upload', class: 'mr-0 mb-3', style: 'font-size: 2rem;') %><%= Spree.t('admin.upload_new_asset') %>@@ -46,7 +46,7 @@</div></div>- <div class="d-flex align-items-center pb-3" data-active-storage-upload-target="toolbar" <% unless form.object.send(field_name).attached? && form.object.send(field_name).variable? %>style="display: none !important"<% end %>>+ <div class="d-flex align-items-center my-2" data-active-storage-upload-target="toolbar" <% unless form.object.send(field_name).attached? && form.object.send(field_name).variable? %>style="display: none !important"<% end %>><button type="button" class="btn btn-light" data-action="active-storage-upload#open"><%= icon('upload') %><%= Spree.t('actions.select_file') %>diff --git a/admin/app/views/layouts/spree/admin.html.erb b/admin/app/views/layouts/spree/admin.html.erbindex 952b942b95..b2e6481967 100644--- a/admin/app/views/layouts/spree/admin.html.erb+++ b/admin/app/views/layouts/spree/admin.html.erb@@ -9,8 +9,8 @@<%= render "spree/admin/shared/header" %><%= render "spree/admin/shared/sidebar" %><main id="content">+ <%= render "spree/admin/shared/content_header" %><div class="container">- <%= render "spree/admin/shared/content_header" %><%= yield %></div><%= render "spree/admin/shared/footer" %>diff --git a/admin/app/views/layouts/spree/page_builder.html.erb b/admin/app/views/layouts/spree/page_builder.html.erbindex d3ffd0e5d9..5b85127cb8 100644--- a/admin/app/views/layouts/spree/page_builder.html.erb+++ b/admin/app/views/layouts/spree/page_builder.html.erb@@ -5,56 +5,39 @@<%= render "spree/admin/shared/custom_head" %></head>- <body class="admin bg-light theme_editor page-builder"+ <body class="admin page-builder"id="page-builder"data-controller="page-builder"data-page-builder-preview-url-value="<%= page_preview_url %>">- <%= form_for @theme, as: :theme,url: spree.update_with_page_admin_theme_path(@theme), method: :put do |f| %>- <%= hidden_field_tag :page_id, @page.id %>- <%= hidden_field_tag :theme_preview_id, @theme_preview.id %>- <%= hidden_field_tag :page_preview_id, @page_preview.id %>- <%= render 'spree/admin/page_builder/header' %>- <% end %>+ <%= form_for @theme, as: :theme,url: spree.update_with_page_admin_theme_path(@theme), method: :put do |f| %>+ <%= hidden_field_tag :page_id, @page.id %>+ <%= hidden_field_tag :theme_preview_id, @theme_preview.id %>+ <%= hidden_field_tag :page_preview_id, @page_preview.id %>+ <%= render 'spree/admin/page_builder/header' %>+ <% end %>- <%#-------------------------------------------------%>- <%# Main content %>- <%#-------------------------------------------------%>- <main id="content" style="margin-top: 53px">- <%#-------------------------------------------------%>- <%# Sidebar %>- <%#-------------------------------------------------%>- <div class="sidebar">- <%= render 'spree/admin/page_builder/sidebar' %>- </div>-- <%#-------------------------------------------------%>- <%# Content %>- <%#-------------------------------------------------%>- <main id="main-part" class="flex-grow-1 pt-2">- <%#-------------------------------------------------%>- <%# Main content %>- <%#-------------------------------------------------%>- <div class="col bg-transparent">- <div id="liveViewCont" class="desktopLiveView" data-page-builder-target="previewContainer">- <div class="embed-responsive embed-responsive-4by3 bg-transparent">- <iframe class="embed-responsive-item border border-gray-300 p-1 bg-white rounded"- data-page-builder-target="iframe"- data-action="load->page-builder#initializeVisualEditor"- id="pageLivePreview"- sandbox="allow-same-origin allow-forms allow-popups allow-scripts allow-modals">- </iframe>- <button class="editor-add-section btn btn-mint shadow" data-action="click->page-builder#addSection">- <%= icon("add", height: 22, class: "mr-2") %> Add Section- </button>- </div>+ <main id="content">+ <%= render 'spree/admin/page_builder/sidebar' %>+ <main id="main-part">+ <div class="desktopLiveView" data-page-builder-target="previewContainer">+ <div class="embed-responsive embed-responsive-4by3">+ <iframe class="embed-responsive-item"+ data-page-builder-target="iframe"+ data-action="load->page-builder#initializeVisualEditor"+ id="page-builder-preview"+ sandbox="allow-same-origin allow-forms allow-popups allow-scripts allow-modals">+ </iframe>+ <button class="editor-add-section btn btn-mint shadow" data-action="click->page-builder#addSection">+ <%= icon("add", height: 22, class: "mr-2") %> Add Section+ </button></div></div><%= turbo_frame_tag :iframe_preview_scripts %></main>- </div>+ </main><%= render 'spree/admin/shared/modal' %><%= render 'spree/admin/shared/alerts' %>diff --git a/admin/app/views/spree/admin/custom_domains/_form.html.erb b/admin/app/views/spree/admin/custom_domains/_form.html.erbindex af719fde20..6bd150a36d 100644--- a/admin/app/views/spree/admin/custom_domains/_form.html.erb+++ b/admin/app/views/spree/admin/custom_domains/_form.html.erb@@ -2,7 +2,7 @@<div class="card-body"><div class="form-group"><%= f.label :url, Spree.t(:domain) %>- <div class="form-control d-flex align-items-center py-0 focus-shadow-primary focus-border-primary">+ <div class="form-control d-flex align-items-center py-0 focus-shadow focus-border"><span class="text-muted">https://</span><%= f.text_field :url, class: 'form-control-plaintext pr-0 pl-1', autofocus: f.object.new_record?, required: true %></div>diff --git a/admin/app/views/spree/admin/custom_domains/index.html.erb b/admin/app/views/spree/admin/custom_domains/index.html.erbindex 0b7bf9f8ff..6d34bcb53c 100644--- a/admin/app/views/spree/admin/custom_domains/index.html.erb+++ b/admin/app/views/spree/admin/custom_domains/index.html.erb@@ -15,7 +15,7 @@</div><div class="col-lg-7 offset-lg-1"><%= form_for current_store, url: spree.admin_store_path(current_store), data: { turbo: false, controller: 'enable-button', 'enable-button-disable-when-not-changed-value': true } do |f| %>- <div class="form-control d-flex align-items-center py-0 focus-shadow-primary focus-border-primary mb-3 <% if current_store.custom_domains.any? %>disabled<% end %>">+ <div class="form-control d-flex align-items-center py-0 focus-shadow focus-border mb-3 <% if current_store.custom_domains.any? %>disabled<% end %>"><%= f.text_field :code, class: 'form-control-plaintext pl-0', data: { enable_button_target: 'input' }, required: true, disabled: current_store.custom_domains.any? %><span>.<%= Spree.root_domain %></span></div>diff --git a/admin/app/views/spree/admin/oauth_applications/_form.html.erb b/admin/app/views/spree/admin/oauth_applications/_form.html.erbindex 4d8751fbff..b25e13030c 100644--- a/admin/app/views/spree/admin/oauth_applications/_form.html.erb+++ b/admin/app/views/spree/admin/oauth_applications/_form.html.erb@@ -1,6 +1,6 @@<div class="form-group"><%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>- <%= f.text_field :name, class: 'form-control', required: true %>+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: f.object.new_record? %><%= f.error_message_on :name %></div>diff --git a/admin/app/views/spree/admin/orders/_table_filter_dropdown.html.erb b/admin/app/views/spree/admin/orders/_table_filter_dropdown.html.erbindex dcffe2532a..a57794bac5 100644--- a/admin/app/views/spree/admin/orders/_table_filter_dropdown.html.erb+++ b/admin/app/views/spree/admin/orders/_table_filter_dropdown.html.erb@@ -12,7 +12,7 @@class: "dropdown-item d-flex align-items-center justify-content-between #{'active' if params[:q][:shipment_state_not_in] == ['shipped', 'canceled']}" do %><%= Spree.t('admin.orders.unfulfilled') %><% if ready_to_ship_orders_count&.positive? %>- <span class="badge badge-primary ml-2">+ <span class="badge badge-light ml-2"><%= ready_to_ship_orders_count %></span><% end %>diff --git a/admin/app/views/spree/admin/page_blocks/edit.html.erb b/admin/app/views/spree/admin/page_blocks/edit.html.erbindex c24b8d3931..75961df39e 100644--- a/admin/app/views/spree/admin/page_blocks/edit.html.erb+++ b/admin/app/views/spree/admin/page_blocks/edit.html.erb@@ -1,8 +1,8 @@<%= turbo_frame_tag :page_sidebar do %><% tab_selected ||= :content %>- <h6 class="p-2 bg-light border-bottom sticky-top d-flex align-items-center mb-3">- <%= link_to spree.edit_admin_theme_path(@theme, page_id: @page&.id), data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray mr-3 text-center back d-flex align-items-center shadow-none px-2' do %>- <%= icon 'chevron-left.svg', class: 'mr-0' %>+ <h6 class="sidebar-header">+ <%= link_to spree.edit_admin_theme_path(@theme, page_id: @page&.id), data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray px-2' do %>+ <%= icon 'chevron-left', class: 'mr-0' %><% end %><%= @page_block.display_name %></h6>diff --git a/admin/app/views/spree/admin/page_builder/_header.html.erb b/admin/app/views/spree/admin/page_builder/_header.html.erbindex 506110e7a0..946dc6b3e0 100644--- a/admin/app/views/spree/admin/page_builder/_header.html.erb+++ b/admin/app/views/spree/admin/page_builder/_header.html.erb@@ -1,10 +1,10 @@-<header id="page-builder-header" class="fixed-top p-0 bg-light border-bottom" style="z-index: 1031">- <nav class="navbar navbar-expand-lg w-100 p-0">- <%= link_to spree.admin_themes_path, class: 'btn hover-gray rounded-0 border-left-0 border-top-0 border-bottom-0 d-none d-lg-flex px-3 border-right', title: 'Go back to dashboard' do %>- <%= icon('x', class: 'mr-0 text-muted font-size-lg') %>+<header id="page-builder-header" class="fixed-top">+ <nav class="navbar navbar-expand-lg">+ <%= link_to spree.admin_themes_path, class: 'btn btn-light with-tip px-2', title: 'Go back to dashboard' do %>+ <%= icon('x', class: 'mr-0') %><% end %><div class="px-3">- <span class="text-muted mr-1">Theme:</span>+ <span class="text-muted mr-1"><%= Spree.t(:theme) %>:</span><strong class="mr-1"><%= @theme.name %></strong> <% if @theme.default? %>@@ -18,14 +18,14 @@</div><%= render 'spree/admin/page_builder/pages_dropdown' %>- <ul class="nav nav-pills p-0 m-0" role="tablist">+ <ul class="nav nav-pills" role="tablist"><% if @page.custom? %>- <li class="nav-item h-100 border-right" role="presentation" data-toggle="modal" data-target="#modal">- <%= link_to_with_icon 'settings', Spree.t(:page_settings), spree.edit_admin_page_path(@page.id), class: 'h-100 btn hover-gray with-tip rounded-0 border-0 shadow-none px-3', data: { turbo_frame: 'dialog_modal' } %>+ <li class="nav-item" role="presentation" data-toggle="modal" data-target="#modal">+ <%= link_to_with_icon 'settings', Spree.t(:page_settings), spree.edit_admin_page_path(@page.id), class: 'btn btn-light', data: { turbo_frame: 'dialog_modal' } %></li><% else %>- <li class="nav-item h-100 border-right" role="presentation">- <button class="h-100 btn hover-gray active with-tip rounded-0 border-0 shadow-none px-3"+ <li class="nav-item" role="presentation">+ <button class="nav-link active"title="Page sections"data-toggle="tab"data-target="#sections"@@ -38,8 +38,8 @@<%= icon 'section', class: 'mr-0' %></button></li>- <li class="nav-item h-100 border-right" role="presentation">- <button class="h-100 btn hover-gray with-tip rounded-0 border-0 shadow-none px-3"+ <li class="nav-item" role="presentation">+ <button class="nav-link"title="Theme"data-toggle="tab"data-target="#colors"@@ -52,8 +52,8 @@<%= icon 'palette', class: 'mr-0' %></button></li>- <li class="nav-item h-100 border-right" role="presentation">- <button class="h-100 btn hover-gray with-tip rounded-0 border-0 shadow-none px-3"+ <li class="nav-item" role="presentation">+ <button class="nav-link"title="Fonts"type="button"data-toggle="tab"@@ -69,33 +69,31 @@</li><% end %></ul>- <button class="btn with-tip ml-auto border-left px-3 text-black" type="button"- title="Mobile"- data-trigger="hover"- data-action="click->page-builder#setResponsiveBreakpoint"- data-page-builder-target="mobileButton"- data-page-builder-breakpoint-param="mobile">- <%= icon 'device-mobile', class: 'mr-0' %>- </button>- <button class="btn active with-tip border-right px-3 text-black" type="button" title="Desktop"- data-action="click->page-builder#setResponsiveBreakpoint"- data-page-builder-breakpoint-param="desktop"- data-trigger="hover"- data-page-builder-target="desktopButton">- <%= icon 'device-laptop', class: 'mr-0' %>- </button>- <%= link_to_with_icon 'eye.svg', Spree.t(:preview), @page.preview_url(@theme_preview, @page_preview), class: 'btn hover-gray d-none d-lg-flex align-items-center border-left', target: '_blank' %>+ <ul class="nav nav-pills ml-auto" role="tablist">+ <li class="nav-item" role="presentation">+ <button class="nav-link with-tip" type="button"+ title="Mobile"+ data-trigger="hover"+ data-action="click->page-builder#setResponsiveBreakpoint"+ data-page-builder-target="mobileButton"+ data-page-builder-breakpoint-param="mobile">+ <%= icon 'device-mobile', class: 'mr-0' %>+ </button>+ </li>+ <li class="nav-item" role="presentation">+ <button class="nav-link active with-tip" type="button"+ title="Desktop"+ data-action="click->page-builder#setResponsiveBreakpoint"+ data-page-builder-breakpoint-param="desktop"+ data-trigger="hover"+ data-page-builder-target="desktopButton">+ <%= icon 'device-laptop', class: 'mr-0' %>+ </button>+ </li>+ </ul>- <%= button_tag class: 'btn btn-primary px-3 d-flex justify-content-center shadow-none' do %>- <span class="show-when-enabled">- <%= @theme.default? ? Spree.t('actions.publish') : Spree.t('actions.save') %>- </span>- <span class="show-when-disabled">- <div class="spinner-border" role="status" style="width: 18px; height: 18px">- <span class="sr-only"><%= Spree.t(:loading) %>...</span>- </div>- </span>- <% end %>+ <%= link_to_with_icon 'eye', Spree.t(:preview), @page.preview_url(@theme_preview, @page_preview), class: 'btn btn-light ml-auto', target: '_blank' %>+ <%= turbo_save_button_tag(@theme.default? ? Spree.t('actions.publish') : Spree.t('actions.save')) %></nav></header>diff --git a/admin/app/views/spree/admin/page_builder/_pages_dropdown.html.erb b/admin/app/views/spree/admin/page_builder/_pages_dropdown.html.erbindex 68533de5ce..294fa2132c 100644--- a/admin/app/views/spree/admin/page_builder/_pages_dropdown.html.erb+++ b/admin/app/views/spree/admin/page_builder/_pages_dropdown.html.erb@@ -4,7 +4,7 @@</div><% else %><div class="dropdown h-100" id="pages_dropdown">- <button class="btn hover-gray border-bottom-0 border-top-0 rounded-0 border-left border-right d-flex align-items-center justify-content-between h-100" type="button" data-toggle="dropdown" aria-expanded="false">+ <button class="btn btn-light" type="button" data-toggle="dropdown" aria-expanded="false"><span class="d-flex align-items-center pr-5"><%= icon @page.icon_name, class: 'mr-2' %><%= @page.display_name %>diff --git a/admin/app/views/spree/admin/page_builder/_sidebar.html.erb b/admin/app/views/spree/admin/page_builder/_sidebar.html.erbindex 6e550bc24c..e867a691f2 100644--- a/admin/app/views/spree/admin/page_builder/_sidebar.html.erb+++ b/admin/app/views/spree/admin/page_builder/_sidebar.html.erb@@ -1,4 +1,4 @@-<aside id="page-builder-sidebar" class="border-right fixed-top h-100 overflow-auto pb-5 right-sidebar">+<aside id="page-builder-sidebar" class="fixed-top h-100 overflow-auto pb-5"><div class="tab-content mb5"><div class="tab-pane fade show active" id="sections" role="tabpanel" aria-labelledby="sidebar-icon-page"><%= render 'spree/admin/page_builder/sidebar_sections' %>diff --git a/admin/app/views/spree/admin/page_builder/_sidebar_colors.html.erb b/admin/app/views/spree/admin/page_builder/_sidebar_colors.html.erbindex caf965485e..77791d6302 100644--- a/admin/app/views/spree/admin/page_builder/_sidebar_colors.html.erb+++ b/admin/app/views/spree/admin/page_builder/_sidebar_colors.html.erb@@ -1,16 +1,10 @@<div id="sidebar-colors">- <h6 class="p-3 border-bottom sticky-top d-flex align-items-center text-uppercase bg-light">- <span- class='btn btn-sm btn-light shadow-none reounded-sm mr-3 text-center bg-transparent d-md-none back'- data-action="click->page-builder#hideSidebarMobile"- >- <%= icon 'chevron-left.svg', class: 'mr-0' %>- </span>- Theme+ <h6 class="sidebar-header">+ <%= Spree.t(:theme) %></h6><%= form_for @theme_preview, as: :theme, url: spree.admin_theme_path(@theme_preview), method: :put, data: { 'page-builder-target': 'form' } do |f| %>- <ul class="nav nav-pills nav-fill mb-3 mx-3 mt-3 px-0" id="pills-tab" role="tablist">+ <ul class="nav nav-pills nav-fill m-3" id="pills-tab" role="tablist"><li class="nav-item" role="presentation"><button class="btn nav-link w-100 active" id="pills-home-tab" data-toggle="pill" data-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Color scheme</button></li>diff --git a/admin/app/views/spree/admin/page_builder/_sidebar_fonts.html.erb b/admin/app/views/spree/admin/page_builder/_sidebar_fonts.html.erbindex cb305b7139..4458970f2e 100644--- a/admin/app/views/spree/admin/page_builder/_sidebar_fonts.html.erb+++ b/admin/app/views/spree/admin/page_builder/_sidebar_fonts.html.erb@@ -1,15 +1,9 @@-<h6 class="p-3 border-bottom sticky-top d-flex align-items-center text-uppercase bg-light">- <span- class='btn btn-sm btn-light shadow-none reounded-sm mr-3 text-center bg-transparent d-md-none back'- data-action="click->page-builder#hideSidebarMobile"- >- <%= icon 'chevron-left.svg', class: 'mr-0' %>- </span>+<h6 class="sidebar-header"><%= Spree.t(:fonts) %></h6><%= form_for @theme_preview, as: :theme, url: spree.admin_theme_path(@theme_preview), method: :put, data: { 'page-builder-target': 'fontForm' } do |f| %>- <ul class="nav nav-pills nav-fill mb-3 mx-3 mt-3 px-0" id="pills-tab" role="tablist">+ <ul class="nav nav-pills nav-fill m-3" id="pills-tab" role="tablist"><li class="nav-item" role="presentation"><button class="btn nav-link w-100 active" id="pills-standard" data-toggle="pill" data-target="#pills-standard-tab" type="button" role="tab" aria-controls="pills-standard" aria-selected="true">Standarddiff --git a/admin/app/views/spree/admin/page_builder/_sidebar_sections.html.erb b/admin/app/views/spree/admin/page_builder/_sidebar_sections.html.erbindex 69d2054bf8..e142aa938c 100644--- a/admin/app/views/spree/admin/page_builder/_sidebar_sections.html.erb+++ b/admin/app/views/spree/admin/page_builder/_sidebar_sections.html.erb@@ -1,6 +1,6 @@<%= turbo_frame_tag :page_sidebar do %><div class="d-none d-md-block">- <h6 class="p-3 bg-light border-bottom sticky-top border-bottom text-uppercase text-muted">Page sections</h6>+ <h6 class="sidebar-header">Page sections</h6><% if @page_preview.layout_sections? %><div class="list-group-flush border-bottom mb-1 pb-2"><%= render collection: @theme_preview.sections.find_all { |s| s.role == 'header' }, partial: 'spree/admin/page_builder/sidebar_section', as: :section %>diff --git a/admin/app/views/spree/admin/page_links/_list.html.erb b/admin/app/views/spree/admin/page_links/_list.html.erbindex 8ac61cdf24..9e7b3708f7 100644--- a/admin/app/views/spree/admin/page_links/_list.html.erb+++ b/admin/app/views/spree/admin/page_links/_list.html.erb@@ -2,14 +2,14 @@<h5 class="font-weight-bold">Links</h5><% if parent.links.any? %>- <ul class="list-group mb-2 px-1 pt-1 pb-0 border border-gray-200 bg-white rounded-lg"+ <ul class="list-group mb-3"data-controller="sortable"data-sortable-handle-value=".handle"data-sortable-resource-name-value="page_link"data-sortable-response-kind-value="turbo-stream"><% parent.links.each do |link| %>- <li class="list-group-item list-group-item-action p-0 d-flex align-items-center mb-1 hover-gray"- data-sortable-update-url="<%= admin_page_link_path(link, sorting_only: true, format: :turbo_stream) %>"+ <li class="list-group-item p-0 d-flex align-items-center hover-gray"+ data-sortable-update-url="<%= spree.admin_page_link_path(link, sorting_only: true, format: :turbo_stream) %>"><%= link_to link.label, spree.edit_admin_page_link_path(link), class: 'd-block py-2 px-3 text-dark flex-fill' %><button class="btn btn-sm pr-0 handle hover-gray-200 h-100 mr-1 px-1">@@ -20,7 +20,7 @@</ul><% else %><p class="text-muted text-center p-5">- No links yet.+ <%= Spree.t(:no_resource_found, resource: Spree::PageLink.model_name.human) %></p><% end %>@@ -31,6 +31,6 @@<% add_url = admin_page_section_block_links_path(parent.section, parent) %><% end %>- <%= link_to_with_icon 'plus', 'Add link', add_url, class: 'btn btn-primary w-100', data: { turbo_method: :post } if add_url %>+ <%= link_to_with_icon 'plus', 'Add link', add_url, class: 'btn btn-primary w-100', data: { turbo_method: :post } if add_url && can?(:create, Spree::PageLink.new(parent: parent)) %><% end %></div>\ No newline at end of filediff --git a/admin/app/views/spree/admin/page_links/edit.html.erb b/admin/app/views/spree/admin/page_links/edit.html.erbindex df506be457..9530ec5c06 100644--- a/admin/app/views/spree/admin/page_links/edit.html.erb+++ b/admin/app/views/spree/admin/page_links/edit.html.erb@@ -1,7 +1,7 @@<%= turbo_frame_tag :page_sidebar do %>- <h6 class="p-2 bg-light border-bottom sticky-top d-flex align-items-center mb-3">- <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray mr-3 text-center back d-flex align-items-center shadow-none px-2' do %>- <%= icon 'chevron-left.svg', class: 'mr-0' %>+ <h6 class="sidebar-header">+ <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray px-2' do %>+ <%= icon 'chevron-left', class: 'mr-0' %><% end %><%= @page_link.label %></h6>diff --git a/admin/app/views/spree/admin/page_sections/_form_tab_buttons.html.erb b/admin/app/views/spree/admin/page_sections/_form_tab_buttons.html.erbindex a6afb9b12a..e421851fd5 100644--- a/admin/app/views/spree/admin/page_sections/_form_tab_buttons.html.erb+++ b/admin/app/views/spree/admin/page_sections/_form_tab_buttons.html.erb@@ -1,4 +1,4 @@-<div class="position-fixed border-top px-3 py-2 d-flex bg-light bottom-bar" style="bottom: 0px; left: 0px; width: 344px; z-index: 9999">+<div class="sidebar-footer"><div class="d-flex align-items-center justify-content-end w-100"><% if tab == :design %><%= link_to_with_icon "restore", Spree.t(:restore_defaults), spree.restore_design_settings_to_defaults_admin_page_section_path(@page_section), {data: {turbo_confirm: Spree.t(:are_you_sure), turbo_method: :patch }, class: 'btn btn-light'} %>diff --git a/admin/app/views/spree/admin/page_sections/destroy.turbo_stream.erb b/admin/app/views/spree/admin/page_sections/destroy.turbo_stream.erbindex 900995ac12..18ee059569 100644--- a/admin/app/views/spree/admin/page_sections/destroy.turbo_stream.erb+++ b/admin/app/views/spree/admin/page_sections/destroy.turbo_stream.erb@@ -9,7 +9,7 @@<%= turbo_stream.replace :iframe_preview_scripts do %>%<%= turbo_frame_tag :iframe_preview_scripts do %><script>- document.getElementById('pageLivePreview').contentDocument.body.querySelector('turbo-frame[id="section-<%= @page_section.id %>"]').remove()+ document.getElementById('page-builder-preview').contentDocument.body.querySelector('turbo-frame[id="section-<%= @page_section.id %>"]').remove()document.getElementById('delete-callback').click()</script><% end %>diff --git a/admin/app/views/spree/admin/page_sections/edit.html.erb b/admin/app/views/spree/admin/page_sections/edit.html.erbindex a95ee6b19f..c4ce7743c4 100644--- a/admin/app/views/spree/admin/page_sections/edit.html.erb+++ b/admin/app/views/spree/admin/page_sections/edit.html.erb@@ -1,8 +1,8 @@<%= turbo_frame_tag :page_sidebar do %><% tab_selected ||= :content %>- <h6 class="p-2 bg-light border-bottom sticky-top d-flex align-items-center mb-3">- <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray mr-3 text-center back d-flex align-items-center shadow-none px-2' do %>- <%= icon 'chevron-left.svg', class: 'mr-0 back' %>+ <h6 class="sidebar-header">+ <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray px-2' do %>+ <%= icon 'chevron-left', class: 'mr-0 back' %><% end %><%= @page_section.display_name %></h6>@@ -10,7 +10,7 @@<%= form_for @page_section, url: spree.admin_page_section_path(@page_section), data: { controller: 'auto-submit' }, as: :page_section do |f| %><div data-controller="bootstrap-tabs"><%= hidden_field_tag :tab_selected, tab_selected, data: { bootstrap_tabs_target: "input" } %>- <ul class="nav nav-pills nav-fill mb-3 px-0" id="pills-tab" role="tablist">+ <ul class="nav nav-pills nav-fill mb-3" id="pills-tab" role="tablist"><li class="nav-item" role="presentation"><button class="btn nav-link w-100 <%= tab_selected == :content ? 'active' : '' %>" id="pills-home-tab" data-toggle="pill" data-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="<%= tab_selected == :content %>" data-action="bootstrap-tabs#change" data-bootstrap-tabs-tab-param="content">Content</button></li>diff --git a/admin/app/views/spree/admin/page_sections/new.html.erb b/admin/app/views/spree/admin/page_sections/new.html.erbindex 2810cf644d..e818b2eb1c 100644--- a/admin/app/views/spree/admin/page_sections/new.html.erb+++ b/admin/app/views/spree/admin/page_sections/new.html.erb@@ -1,7 +1,7 @@<%= turbo_frame_tag :page_sidebar do %>- <h6 class="p-2 bg-light border-bottom sticky-top d-flex align-items-center mb-1">- <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray mr-3 text-center back d-flex align-items-center shadow-none px-2' do %>- <%= icon 'chevron-left.svg', class: 'mr-0 back' %>+ <h6 class="sidebar-header">+ <%= link_to collection_url, data: { action: 'click->page-builder#clearActiveOverlays' }, class: 'btn hover-gray px-2' do %>+ <%= icon 'chevron-left', class: 'mr-0 back' %><% end %><%= Spree.t(:add_section) %></h6>@@ -13,7 +13,7 @@<% cache spree_base_cache_scope.call('new-section-list'), expires_in: 1.hour do %><ul class="list-group list-group-flush m-2 mx-3"><% @theme.available_page_sections.each do |section_class| %>- <li class="list-group-item p-2 list-group-item-action cursor-pointer d-flex align-items-center hover-gray"+ <li class="list-group-item p-2 list-group-item-action cursor-pointer d-flex align-items-center hover-action text-primary"data-action="click->section-form#addSection"data-section-form-type-param="<%= section_class %>">diff --git a/admin/app/views/spree/admin/pages/index.html.erb b/admin/app/views/spree/admin/pages/index.html.erbindex 206d58d247..18dd7bc99e 100644--- a/admin/app/views/spree/admin/pages/index.html.erb+++ b/admin/app/views/spree/admin/pages/index.html.erb@@ -2,7 +2,7 @@<%= Spree.t(:pages) %><% end %><% content_for :page_actions do %>- <%= link_to Spree.t(:add_new_page), spree.new_admin_page_path, class: "btn btn-primary" if can?(:create, Spree::Page.new) %>+ <%= link_to_with_icon 'plus', Spree.t(:add_new_page), spree.new_admin_page_path, class: "btn btn-primary" if can?(:create, Spree::Page.new) %><% end %><div class="card-lg p-0">@@ -23,8 +23,6 @@<%= render partial: "spree/admin/shared/index_table_options", locals: { collection: @pages } %></div><% else %>- <div class="text-muted p-5 d-flex align-items-center w-100 justify-content-center">- No pages found- </div>+ <%= render 'spree/admin/shared/no_resource_found' %><% end %></div>diff --git a/admin/app/views/spree/admin/payments/_payment.html.erb b/admin/app/views/spree/admin/payments/_payment.html.erbindex 449b404055..bbe179a75c 100644--- a/admin/app/views/spree/admin/payments/_payment.html.erb+++ b/admin/app/views/spree/admin/payments/_payment.html.erb@@ -47,6 +47,14 @@<div class="w-50"><p class="mb-2"><%= Spree.t(:payment_method) %>:</p><strong><%= link_to payment.payment_method.name, spree.admin_payment_method_path(payment.payment_method) %></strong>++ <% if payment.transaction_id.present? %>+ <p class="mb-2 mt-3">+ <%= Spree.t(:transaction_id) %>+ <%= help_bubble(Spree.t(:transaction_id_help)) %>+ </p>+ <strong><%= payment.transaction_id %></strong>+ <% end %></div><% if payment.source.present? %><div class="w-50">diff --git a/admin/app/views/spree/admin/posts/_form.html.erb b/admin/app/views/spree/admin/posts/_form.html.erbindex adb29b2af4..b3bfaeec05 100644--- a/admin/app/views/spree/admin/posts/_form.html.erb+++ b/admin/app/views/spree/admin/posts/_form.html.erb@@ -36,7 +36,7 @@<div class="col-lg-4"><div class="card mb-4">- <div class="card-body pb-0">+ <div class="card-body"><div class="form-group"><%= f.label :image, Spree.t(:featured_image) %><%= render 'active_storage/upload_form', form: f, field_name: :image, width: 1200, height: 600, crop: true, css: 'flex-col' %>diff --git a/admin/app/views/spree/admin/products/_bulk_operations.html.erb b/admin/app/views/spree/admin/products/_bulk_operations.html.erbindex 89067b7d60..836e19eade 100644--- a/admin/app/views/spree/admin/products/_bulk_operations.html.erb+++ b/admin/app/views/spree/admin/products/_bulk_operations.html.erb@@ -9,7 +9,7 @@<ahref="<%= spree.bulk_modal_admin_products_path(kind: :set_status, status: :active) %>"data-turbo-frame="bulk_modal"- class="btn btn-primary mr-2 d-vendor"+ class="btn btn-light mr-2 d-vendor"data-action="click->bulk-operation#setBulkAction"data-url="<%= spree.bulk_status_update_admin_products_path(status: :active) %>">diff --git a/admin/app/views/spree/admin/products/edit.html.erb b/admin/app/views/spree/admin/products/edit.html.erbindex c555acb940..cd4ea63e4f 100644--- a/admin/app/views/spree/admin/products/edit.html.erb+++ b/admin/app/views/spree/admin/products/edit.html.erb@@ -6,6 +6,8 @@spree.admin_product_digital_assets_path(@product),class: "dropdown-item",) if can?(:manage, Spree::Digital) %>+ <div class="dropdown-divider"></div>+<%= external_page_preview_link(@product) %><% if can?(:clone, @product) %>diff --git a/admin/app/views/spree/admin/products/form/variants/_variant_template.html.erb b/admin/app/views/spree/admin/products/form/variants/_variant_template.html.erbindex b638f6748b..1ee0ae82af 100644--- a/admin/app/views/spree/admin/products/form/variants/_variant_template.html.erb+++ b/admin/app/views/spree/admin/products/form/variants/_variant_template.html.erb@@ -17,7 +17,7 @@</div><div class="variants-table__body__cell column-price"><% supported_currencies.each_with_index do |currency, i| %>- <div class="form-control align-items-center py-0 focus-shadow-primary focus-border-primary mr-2 price-input-container <%= current_currency != currency ? 'd-none' : 'd-flex' %>" <%= !can_manage_prices ? 'readonly' : '' %>>+ <div class="form-control align-items-center py-0 focus-shadow focus-border mr-2 price-input-container <%= current_currency != currency ? 'd-none' : 'd-flex' %>" <%= !can_manage_prices ? 'readonly' : '' %>><%= text_field_tag "product[variants_attributes][prices_attributes][#{i}][amount]", '', class: 'form-control-plaintext px-0', data: { slot: "[prices_attributes][#{currency}][amount]_input", action: 'variants-form#updatePrice', currency: currency.to_s }, readonly: !can_manage_prices %><span><%= currency_symbol(currency) %></span></div>diff --git a/admin/app/views/spree/admin/products/index.html.erb b/admin/app/views/spree/admin/products/index.html.erbindex 2b733f2889..4e3c5e5ebf 100644--- a/admin/app/views/spree/admin/products/index.html.erb+++ b/admin/app/views/spree/admin/products/index.html.erb@@ -12,7 +12,7 @@<% end %></div>-<p class="text-muted small text-center py-2 px-3 mt-3 rounded-pill mx-auto d-flex-inline">+<p class="text-muted small text-center py-2 px-3 mt-4 rounded-pill mx-auto d-flex-inline">Learn more about<%= external_link_to 'managing products', 'https://spreecommerce.org/docs/user/manage-products', class: 'text-decoration-none' %></p>\ No newline at end of filediff --git a/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb b/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erbindex 1a33a5d5da..cd719f6684 100644--- a/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb+++ b/admin/app/views/spree/admin/promotion_actions/_promotion_action.html.erb@@ -10,7 +10,7 @@</button><div class="dropdown-menu"><%= link_to_with_icon 'pencil', Spree.t('actions.edit'), spree.edit_admin_promotion_action_path(promotion_action.promotion, promotion_action), class: 'dropdown-item' if can?(:update, promotion_action) %>- <%= link_to_with_icon 'trash', Spree.t('actions.destroy'), spree.admin_promotion_action_path(promotion_action.promotion, promotion_action), class: 'dropdown-item text-danger', data: { turbo_method: :delete, turbo_confirm: Spree.t(:are_you_sure), turbo_frame: '_top' } if can?(:destroy, promotion_action) %>+ <%= link_to_with_icon 'trash', Spree.t('actions.destroy'), spree.admin_promotion_action_path(promotion_action.promotion, promotion_action), class: 'dropdown-item btn-danger', data: { turbo_method: :delete, turbo_confirm: Spree.t(:are_you_sure), turbo_frame: '_top' } if can?(:destroy, promotion_action) %></div></div><% end %>diff --git a/admin/app/views/spree/admin/promotion_actions/new.html.erb b/admin/app/views/spree/admin/promotion_actions/new.html.erbindex db48b5cfd6..581a6f71b7 100644--- a/admin/app/views/spree/admin/promotion_actions/new.html.erb+++ b/admin/app/views/spree/admin/promotion_actions/new.html.erb@@ -19,7 +19,7 @@<% options_for_promotion_action_types(@promotion).each do |action_type| %><% key = action_type.to_s.demodulize.underscore %><li class="list-group-item p-0 overflow-hidden">- <%= link_to spree.new_admin_promotion_action_path(@promotion, promotion_action: { type: action_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-light', data: { turbo_prefetch: false } do %>+ <%= link_to spree.new_admin_promotion_action_path(@promotion, promotion_action: { type: action_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-light text-primary', data: { turbo_prefetch: false } do %><%= radio_button_tag :type, action_type, checked: @promotion_action.type == action_type %><div class="ml-3"><h6><%= Spree.t("promotion_action_types.#{key}.name") %></h6>diff --git a/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb b/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erbindex fd9a109a4c..d72802c7dc 100644--- a/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb+++ b/admin/app/views/spree/admin/promotion_rules/_promotion_rule.html.erb@@ -10,7 +10,7 @@</button><div class="dropdown-menu"><%= link_to_with_icon 'pencil', Spree.t('actions.edit'), spree.edit_admin_promotion_rule_path(promotion_rule.promotion, promotion_rule), class: 'dropdown-item' if can?(:update, promotion_rule) %>- <%= link_to_with_icon 'trash', Spree.t('actions.destroy'), spree.admin_promotion_rule_path(promotion_rule.promotion, promotion_rule), class: 'dropdown-item text-danger', data: { turbo_method: :delete, turbo_confirm: Spree.t(:are_you_sure), turbo_frame: '_top' } if can?(:destroy, promotion_rule) %>+ <%= link_to_with_icon 'trash', Spree.t('actions.destroy'), spree.admin_promotion_rule_path(promotion_rule.promotion, promotion_rule), class: 'dropdown-item btn-danger', data: { turbo_method: :delete, turbo_confirm: Spree.t(:are_you_sure), turbo_frame: '_top' } if can?(:destroy, promotion_rule) %></div></div><% end %>diff --git a/admin/app/views/spree/admin/promotion_rules/new.html.erb b/admin/app/views/spree/admin/promotion_rules/new.html.erbindex d84b4c8d00..3ab2563f5d 100644--- a/admin/app/views/spree/admin/promotion_rules/new.html.erb+++ b/admin/app/views/spree/admin/promotion_rules/new.html.erb@@ -19,7 +19,7 @@<% options_for_promotion_rule_types(@promotion).each do |rule_type| %><% key = rule_type.demodulize.underscore %><li class="list-group-item p-0 overflow-hidden">- <%= link_to spree.new_admin_promotion_rule_path(@promotion, promotion_rule: { type: rule_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-light', data: { turbo_prefetch: false } do %>+ <%= link_to spree.new_admin_promotion_rule_path(@promotion, promotion_rule: { type: rule_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-light text-primary', data: { turbo_prefetch: false } do %><%= radio_button_tag :type, rule_type %><div class="ml-3"><h6><%= Spree.t("promotion_rule_types.#{key}.name") %></h6>diff --git a/admin/app/views/spree/admin/reimbursement_types/_form.html.erb b/admin/app/views/spree/admin/reimbursement_types/_form.html.erbindex 4cd23e7d4c..540333daf0 100644--- a/admin/app/views/spree/admin/reimbursement_types/_form.html.erb+++ b/admin/app/views/spree/admin/reimbursement_types/_form.html.erb@@ -2,7 +2,7 @@<div class="card-body"><div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: "form-control" %>+ <%= f.text_field :name, class: "form-control", autofocus: f.object.new_record?, required: true %><%= f.error_message_on :name %></div><%- if @reimbursement_type.new_record? %>diff --git a/admin/app/views/spree/admin/shared/_content_header.html.erb b/admin/app/views/spree/admin/shared/_content_header.html.erbindex 5288071897..835d0073d1 100644--- a/admin/app/views/spree/admin/shared/_content_header.html.erb+++ b/admin/app/views/spree/admin/shared/_content_header.html.erb@@ -1,4 +1,4 @@-<% record = @customer_return || @order || @product || @vendor || @user || @taxon || @category || @parent || @object || @marketplace %>+<% record = @customer_return || @order || @product || @vendor || @user || @taxon || @object %><% record = nil if @user&.is_a?(Spree.admin_user_class) %><% show_record_subtitle = record && record.persisted? && record.has_attribute?(:updated_at) %>@@ -7,7 +7,7 @@<% end if show_record_subtitle && !content_for(:page_subtitle) %><% if content_for?(:page_title) %>- <header id="page-header">+ <header id="page-header" class="container"><h3 class="page-header-title mb-0 d-flex align-items-center gap-3"><%= yield :page_title %></h3>@@ -22,12 +22,15 @@<% end %><%= yield :page_actions if content_for?(:page_actions) %>++ <% if action_name == 'edit' && @object %>+ <%= turbo_save_button_tag Spree.t('actions.update'), class: 'btn btn-primary', form: "edit_#{@object.class.name.demodulize.underscore}_#{@object.id}" %>+ <% end %>+<% if show_record_subtitle || content_for(:page_actions_dropdown) %>- <div class="dropdown ml-2 h-100" id="page_actions_dropdown">- <%= link_to '#', class: 'btn btn-light bg-transparent h-100 dropdown-toggle btn-sm', data: { toggle: 'dropdown' }, id: 'more-actions-link' do %>- <span class="d-none d-lg-inline mr-2">- <%= Spree.t(:more_actions) %>- </span>+ <div class="dropdown h-100" id="page_actions_dropdown">+ <%= link_to '#', class: 'btn btn-light bg-transparent h-100 p-2', data: { toggle: 'dropdown' }, id: 'more-actions-link' do %>+ <%= icon 'dots', class: 'mr-0' %><% end %><div class="dropdown-menu dropdown-menu-right"><%= yield :page_actions_dropdown if content_for(:page_actions_dropdown) %>@@ -63,12 +66,16 @@<% end %><% if content_for?(:page_tabs) %>- <ul class="nav nav-pills flex-nowrap overflow-auto w-100 mb-3">- <%= yield :page_tabs %>- </ul>+ <div class="container">+ <ul class="nav nav-pills flex-nowrap overflow-auto w-100 mb-3">+ <%= yield :page_tabs %>+ </ul>+ </div><% end %><% if content_for(:page_alerts) %>- <div class="page-alerts">- <%= yield(:page_alerts) %>+ <div class="container">+ <div class="page-alerts">+ <%= yield(:page_alerts) %>+ </div></div><% end %>diff --git a/admin/app/views/spree/admin/shared/_filters_search_bar.html.erb b/admin/app/views/spree/admin/shared/_filters_search_bar.html.erbindex c11ba4dd51..6629870ade 100644--- a/admin/app/views/spree/admin/shared/_filters_search_bar.html.erb+++ b/admin/app/views/spree/admin/shared/_filters_search_bar.html.erb@@ -2,7 +2,7 @@<% badge_name ||= label %><% placeholder ||= [Spree.t(:search), controller_name.humanize.downcase].join(' ') %>-<div class="form-control d-flex align-items-center py-0 focus-shadow-primary focus-border-primary flex-grow-1 mb-3 mb-lg-0 w-auto">+<div class="form-control d-flex align-items-center py-0 focus-shadow focus-border flex-grow-1 mb-3 mb-lg-0 w-auto"><%= icon "search", class: "mr-3 text-muted" %><%= search_field_tag "q[#{param}]",params.dig(:q, param),diff --git a/admin/app/views/spree/admin/shared/_sidebar.html.erb b/admin/app/views/spree/admin/shared/_sidebar.html.erbindex ec1fa0d65a..04e3ee3bd3 100644--- a/admin/app/views/spree/admin/shared/_sidebar.html.erb+++ b/admin/app/views/spree/admin/shared/_sidebar.html.erb@@ -7,7 +7,7 @@<% end %><% unless settings_active? %>- <section class="position-sticky d-none d-lg-block w-100 z-index-1000 mt-auto py-2 bottom-0">+ <section class="position-sticky d-none d-lg-block w-100 z-index-1000 mt-auto bottom-0"><%= render 'spree/admin/shared/sidebar/enterprise_edition_notice' %><%= render 'spree/admin/shared/user_dropdown' %></section>diff --git a/admin/app/views/spree/admin/shared/_user_dropdown.html.erb b/admin/app/views/spree/admin/shared/_user_dropdown.html.erbindex e63ad52845..8888f0d915 100644--- a/admin/app/views/spree/admin/shared/_user_dropdown.html.erb+++ b/admin/app/views/spree/admin/shared/_user_dropdown.html.erb@@ -1,5 +1,5 @@<% if try_spree_current_user.present? %>- <div class="dropdown pt-2 bg-gray-25 border-top" id="<%= dom_id(try_spree_current_user, 'account-dropdown') %>" data-turbo-permanent>+ <div class="dropdown py-2 bg-gray-25 border-top" id="<%= dom_id(try_spree_current_user, 'account-dropdown') %>" data-turbo-permanent><button type="button"class="btn d-flex align-items-center justify-content-between text-left w-100"data-toggle="dropdown" aria-expanded="false" id="accountNav">@@ -10,7 +10,6 @@<span class="text-muted small"><%= try_spree_current_user.email.truncate(22) %></span></span></div>- <%= icon 'dots-vertical', class: 'mr-0 ml-2 mb-0 d-none d-lg-block' %></button><div class="dropdown-menu dropdown-menu-right w-100 mb-1 mt-1 mt-lg-0"><% if can?(:update, try_spree_current_user) %>diff --git a/admin/app/views/spree/admin/shared/named_types/_form.html.erb b/admin/app/views/spree/admin/shared/named_types/_form.html.erbindex 7b4702c3ab..1c7544da88 100644--- a/admin/app/views/spree/admin/shared/named_types/_form.html.erb+++ b/admin/app/views/spree/admin/shared/named_types/_form.html.erb@@ -2,7 +2,7 @@<div class="card-body"><div class="form-group"><%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>- <%= f.text_field :name, class: 'form-control' %>+ <%= f.text_field :name, class: 'form-control', autofocus: f.object.new_record?, required: true %><%= f.error_message_on :name %></div><div class="custom-control custom-checkbox">diff --git a/admin/app/views/spree/admin/shipments/edit.html.erb b/admin/app/views/spree/admin/shipments/edit.html.erbindex 36d595635b..ad03fddbc1 100644--- a/admin/app/views/spree/admin/shipments/edit.html.erb+++ b/admin/app/views/spree/admin/shipments/edit.html.erb@@ -2,7 +2,7 @@<%= form_with model: @shipment, url: spree.admin_order_shipment_path(@order, @shipment), class: "w-100 d-flex justify-content-between align-items-center" do |f| %><div><%= f.select :selected_shipping_rate_id, options_for_select(@shipment.shipping_rates.map {|sr| ["#{sr.name} #{sr.display_price}", sr.id] }, @shipment.selected_shipping_rate_id),- {}, class: 'custom-select' %>+ {}, class: 'custom-select', autofocus: true %></div><div class="d-flex h-100 align-items-center"><% if can? :update, @shipment %>diff --git a/admin/app/views/spree/admin/shipping_categories/_form.html.erb b/admin/app/views/spree/admin/shipping_categories/_form.html.erbindex f2e8591e26..2450a1732a 100644--- a/admin/app/views/spree/admin/shipping_categories/_form.html.erb+++ b/admin/app/views/spree/admin/shipping_categories/_form.html.erb@@ -2,7 +2,7 @@<div class="card-body"><div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: 'form-control' %>+ <%= f.text_field :name, class: 'form-control', autofocus: f.object.new_record?, required: true %><%= f.error_message_on :name %></div></div>diff --git a/admin/app/views/spree/admin/shipping_methods/_form.html.erb b/admin/app/views/spree/admin/shipping_methods/_form.html.erbindex 2ec272b1a0..574223073c 100644--- a/admin/app/views/spree/admin/shipping_methods/_form.html.erb+++ b/admin/app/views/spree/admin/shipping_methods/_form.html.erb@@ -6,7 +6,7 @@<div class="col-lg-6"><div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: 'form-control', required: true %>+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: f.object.new_record? %><%= f.error_message_on :name %></div>diff --git a/admin/app/views/spree/admin/stock_locations/_form.html.erb b/admin/app/views/spree/admin/stock_locations/_form.html.erbindex 8c16a2dc77..b4996c90ca 100644--- a/admin/app/views/spree/admin/stock_locations/_form.html.erb+++ b/admin/app/views/spree/admin/stock_locations/_form.html.erb@@ -11,7 +11,7 @@<div class="col-12 col-lg-6"><div class="form-group"><%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>- <%= f.text_field :name, class: 'form-control', required: true %>+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: f.object.new_record? %><%= f.error_message_on :name %></div></div>diff --git a/admin/app/views/spree/admin/stock_transfers/_filters.html.erb b/admin/app/views/spree/admin/stock_transfers/_filters.html.erbindex eb572a6e36..fe13b6854c 100644--- a/admin/app/views/spree/admin/stock_transfers/_filters.html.erb+++ b/admin/app/views/spree/admin/stock_transfers/_filters.html.erb@@ -17,9 +17,9 @@<%= f.select :source_location_id_eq,available_stock_locations_list,{ include_blank: true },- class: "custom-select",data: {filters_target: :input,+ controller: 'autocomplete-select'} %></div></div>@@ -29,9 +29,9 @@<%= f.select :destination_location_id_eq,available_stock_locations_list,{ include_blank: true },- class: "custom-select",data: {filters_target: :input,+ controller: 'autocomplete-select'} %></div></div>diff --git a/admin/app/views/spree/admin/storefront/edit.html.erb b/admin/app/views/spree/admin/storefront/edit.html.erbindex 6270f71720..97f44b3811 100644--- a/admin/app/views/spree/admin/storefront/edit.html.erb+++ b/admin/app/views/spree/admin/storefront/edit.html.erb@@ -96,7 +96,7 @@<%= Spree.t(:images) %></h5></div>- <div class="card-body pb-0">+ <div class="card-body"><div class="form-group"><%= f.label :favicon_image do %>Favicon imagediff --git a/admin/app/views/spree/admin/stores/form/_basic.html.erb b/admin/app/views/spree/admin/stores/form/_basic.html.erbindex decf59158c..fb9131746d 100644--- a/admin/app/views/spree/admin/stores/form/_basic.html.erb+++ b/admin/app/views/spree/admin/stores/form/_basic.html.erb@@ -12,23 +12,22 @@<div class="card-header"><h5 class="card-title"><%= Spree.t(:name) %> & <%= Spree.t(:logo) %></h5></div>- <div class="card-body pb-0">+ <div class="card-body"><p class="text-muted">This is the name of your store. It will be displayed in the header and in the footer.</p><div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: 'form-control', required: true %>+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: f.object.new_record? %><%= f.error_message_on :name %></div>-- <div class="form-group mb-0">- <%= f.label :logo do %>- <%= Spree.t(:logo) %>- <%= help_bubble("Used in the admin dashboard") %>- <% end %>- <%= render 'active_storage/upload_form', form: f, field_name: :logo, width: 240, height: 240, crop: true %>- </div>+ <div class="form-group mb-0">+ <%= f.label :logo do %>+ <%= Spree.t(:logo) %>+ <%= help_bubble("Used in the admin dashboard") %>+ <% end %>+ <%= render 'active_storage/upload_form', form: f, field_name: :logo, width: 240, height: 240, crop: true %>+ </div></div></div>diff --git a/admin/app/views/spree/admin/stores/form/_emails.html.erb b/admin/app/views/spree/admin/stores/form/_emails.html.erbindex f744d84e0c..527cd946b9 100644--- a/admin/app/views/spree/admin/stores/form/_emails.html.erb+++ b/admin/app/views/spree/admin/stores/form/_emails.html.erb@@ -11,7 +11,7 @@<div class="card-body"><p class="text-muted">This logo is included in all email notifications such as order confirmation</p><%= render 'active_storage/upload_form', form: f, field_name: :mailer_logo, width: 204, height: 104 %>- <p class="text-muted mb-0">+ <p class="form-text text-muted mb-0 mt-2">We recommend images with a transparent background.<br />Only JPEG and PNG formats are supported.diff --git a/admin/app/views/spree/admin/tax_categories/_form.html.erb b/admin/app/views/spree/admin/tax_categories/_form.html.erbindex 736bf99820..51f2b29ad8 100644--- a/admin/app/views/spree/admin/tax_categories/_form.html.erb+++ b/admin/app/views/spree/admin/tax_categories/_form.html.erb@@ -3,7 +3,7 @@<div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: 'form-control' %>+ <%= f.text_field :name, class: 'form-control', autofocus: f.object.new_record?, required: true %><%= f.error_message_on :name %></div>diff --git a/admin/app/views/spree/admin/tax_rates/_form.html.erb b/admin/app/views/spree/admin/tax_rates/_form.html.erbindex fbf226e3ed..233d566807 100644--- a/admin/app/views/spree/admin/tax_rates/_form.html.erb+++ b/admin/app/views/spree/admin/tax_rates/_form.html.erb@@ -10,7 +10,7 @@<div class="col-12 col-lg-6"><div class="form-group"><%= f.label :name, Spree.t(:name) %>- <%= f.text_field :name, class: 'form-control', required: true %>+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: f.object.new_record? %><%= f.error_message_on :name %></div><div class="form-group">diff --git a/admin/app/views/spree/admin/taxons/_form.html.erb b/admin/app/views/spree/admin/taxons/_form.html.erbindex 029ca3aed9..42e42121da 100644--- a/admin/app/views/spree/admin/taxons/_form.html.erb+++ b/admin/app/views/spree/admin/taxons/_form.html.erb@@ -100,12 +100,12 @@<div class="card-header"><h5 class="card-title"><%= Spree.t(:images) %></h5></div>- <div class="card-body pb-0">+ <div class="card-body"><%= f.label :image, Spree.t(:image) %><%= render 'active_storage/upload_form', form: f, field_name: :image, width: 1920, height: 1080 %><%= f.error_message_on :image %></div>- <div class="card-body pb-0">+ <div class="card-body"><%= f.label :square_image, Spree.t(:square_image) %><p class="text-muted form-text">Used for the featured image on the homepage.diff --git a/admin/app/views/spree/admin/taxons/edit.html.erb b/admin/app/views/spree/admin/taxons/edit.html.erbindex 2b8ff36e5e..b8db317ffb 100644--- a/admin/app/views/spree/admin/taxons/edit.html.erb+++ b/admin/app/views/spree/admin/taxons/edit.html.erb@@ -13,7 +13,7 @@<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @taxon } %>-<%= form_for @taxon, as: :taxon, method: :put, url: form_url, html: { multipart: true }, data: { controller: 'auto-submit' } do |f| %>+<%= form_for [:admin, @taxon], method: :put, url: form_url, html: { multipart: true }, data: { controller: 'auto-submit' } do |f| %><%= render 'form', f: f %><%= render 'spree/admin/shared/edit_resource_links', f: f %><% end %>diff --git a/admin/app/views/spree/admin/themes/edit.html.erb b/admin/app/views/spree/admin/themes/edit.html.erbindex fb0ac9f301..fa2fa5a3dd 100644--- a/admin/app/views/spree/admin/themes/edit.html.erb+++ b/admin/app/views/spree/admin/themes/edit.html.erb@@ -1,10 +1,10 @@-<div class="d-none d-md-block col bg-transparent">- <div id="liveViewCont" class="desktopLiveView" data-page-builder-target="previewContainer">+<div class="d-none d-md-block">+ <div class="desktopLiveView" data-page-builder-target="previewContainer"><div class="embed-responsive embed-responsive-4by3 bg-transparent"><iframe class="embed-responsive-item border border-gray bg-transparent rounded"data-page-builder-target="iframe"data-action="load->page-builder#initializeVisualEditor"- id="pageLivePreview"+ id="page-builder-preview"sandbox="allow-same-origin allow-forms allow-popups allow-scripts allow-modals"></iframe></div>diff --git a/admin/app/views/spree/admin/themes/index.html.erb b/admin/app/views/spree/admin/themes/index.html.erbindex f381808f98..3a9c8a76fd 100644--- a/admin/app/views/spree/admin/themes/index.html.erb+++ b/admin/app/views/spree/admin/themes/index.html.erb@@ -20,7 +20,7 @@<span>You don't have domain connected to your store</span>- <%= link_to 'Connect your own domain', spree.admin_custom_domains_path, class: 'btn btn-primary ml-3' %>+ <%= link_to 'Connect your own domain', spree.admin_custom_domains_path, class: 'btn btn-link ml-3' %></div></div><% end %>diff --git a/admin/app/views/spree/admin/users/index.html.erb b/admin/app/views/spree/admin/users/index.html.erbindex ff49a8c364..1b7293196f 100644--- a/admin/app/views/spree/admin/users/index.html.erb+++ b/admin/app/views/spree/admin/users/index.html.erb@@ -29,7 +29,7 @@<ahref="<%= spree.bulk_modal_admin_users_path(kind: :add_tags) %>"data-turbo-frame="bulk_modal"- class="btn btn-primary mr-2"+ class="btn btn-light mr-2"data-action="click->bulk-operation#setBulkAction"data-url="<%= spree.bulk_add_tags_admin_users_path %>">diff --git a/admin/app/views/spree/admin/variants/form/_dimensions.html.erb b/admin/app/views/spree/admin/variants/form/_dimensions.html.erbindex 06de4f01cc..8ab53c197b 100644--- a/admin/app/views/spree/admin/variants/form/_dimensions.html.erb+++ b/admin/app/views/spree/admin/variants/form/_dimensions.html.erb@@ -26,7 +26,7 @@<div class="form-group"><%= f.label :weight %>- <div class="form-control d-flex align-items-center py-0 focus-border-primary focus-shadow-primary">+ <div class="form-control d-flex align-items-center py-0 focus-border focus-shadow"><%= f.text_field :weight, value: number_with_precision(f.object.weight, precision: 2), class: 'form-control-plaintext pl-0' %><%= f.select :weight_unit, options_for_select(weight_units(current_store), f.object.weight_unit), { include_blank: false }, { class: 'form-control-plaintext w-auto border-left' } %></div>diff --git a/admin/app/views/spree/admin/variants/form/_media.html.erb b/admin/app/views/spree/admin/variants/form/_media.html.erbindex 8b33703d99..6dcce38700 100644--- a/admin/app/views/spree/admin/variants/form/_media.html.erb+++ b/admin/app/views/spree/admin/variants/form/_media.html.erb@@ -13,7 +13,7 @@data-sortable-resource-name-value="asset"data-sortable-response-kind-value="json"><%= render partial: 'spree/admin/variants/form/media_asset', collection: media_form_assets(viewable), as: :asset, cached: spree_base_cache_scope %>- <%= button_tag class: 'text-muted border border-dashed bg-gray-25 hover-gray-50 rounded-lg media-form__add-button', data: {+ <%= button_tag class: 'upload-area media-form__add-button', data: {controller: 'asset-uploader',asset_uploader_multiple_value: true,asset_uploader_viewable_id_value: viewable&.id,@@ -23,7 +23,7 @@media_form_target: 'addButton'} do %><%= icon('upload', class: 'mt-5', style: 'font-size: 2rem;') %>- <p class="text-muted form-text mt-2 mb-5">+ <p class="form-text mt-2 mb-5"><%= Spree.t('admin.upload_new_asset') %></p><% end %>diff --git a/admin/app/views/spree/admin/variants/form/_pricing.html.erb b/admin/app/views/spree/admin/variants/form/_pricing.html.erbindex 4a5a9f4cc5..81e8474280 100644--- a/admin/app/views/spree/admin/variants/form/_pricing.html.erb+++ b/admin/app/views/spree/admin/variants/form/_pricing.html.erb@@ -29,13 +29,13 @@<tr><td><%= price_form.object.currency %></td><td>- <div class="form-control align-items-center py-0 focus-shadow-primary focus-border-primary mr-2 price-input-container d-flex">+ <div class="form-control align-items-center py-0 focus-shadow focus-border mr-2 price-input-container d-flex"><%= price_form.text_field :amount, class: 'form-control-plaintext px-0', disabled: !can?(:manage, price_form.object) %><span><%= currency_symbol(price_form.object.currency) %></span></div></td><td>- <div class="form-control align-items-center py-0 focus-shadow-primary focus-border-primary mr-2 price-input-container d-flex">+ <div class="form-control align-items-center py-0 focus-shadow focus-border mr-2 price-input-container d-flex"><%= price_form.text_field :compare_at_amount, class: 'form-control-plaintext px-0', disabled: !can?(:manage, price_form.object) %><span><%= currency_symbol(price_form.object.currency) %></span></div>diff --git a/admin/config/initializers/chartkick.rb b/admin/config/initializers/chartkick.rbnew file mode 100644index 0000000000..8c5b3b5373--- /dev/null+++ b/admin/config/initializers/chartkick.rb@@ -0,0 +1,5 @@+Chartkick.options = {+ colors: ["#007bff"],+ zeros: true,+ points: false+}diff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex a9ccf3c9fd..2fc6071658 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -2094,6 +2094,7 @@ en:tracking_url: Tracking URLtracking_url_placeholder: e.g. http://quickship.com/package?num=:trackingtransaction_id: Transaction ID+ transaction_id_help: This is the ID of the transaction that was created in the 3rd party payment gateway.transfer_from_location: Transfer Fromtransfer_stock: Transfer Stocktransfer_to_location: Transfer To