spree_backend 4.3.0.rc2 → 4.3.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b552e452716a6965ec77028e7de7ee0ffec1b444fc7b3bbf019f9030754efbda
4
- data.tar.gz: a20695449a9e53981d1291f4b306bb837b1b70b328228cf43f0ef142c1e2a19e
3
+ metadata.gz: 79ca40c018802153b873f59a98ec2707b28121385864e9e6775cf046d89030d2
4
+ data.tar.gz: 11af2a95c3a987495d29c75e7c44377b719df1fb138946e29bda7d911fce45ac
5
5
  SHA512:
6
- metadata.gz: e5d1ba5defe556748572163de7e1492ab6493b7f40beca608d9b8f490c064396335a661783074cef046fba09460a3b7179aca8886bf31ffab8a20478393eac15
7
- data.tar.gz: 43efc1472186e5b332e8733fbacb4a3fee831511c906860704d9b008ecd8e4301ac7ad7be68a8a34d9994c5c208899dcf312d960c0eee77e7b840370cb223ce7
6
+ metadata.gz: 42b3e7abd694167ebe63a3e5c514b74fd81435c8d8f0a2bffa8173ab9fbd279d1970d92617e2e3869e3397112d664eaa82b83467c83c10eb2515b5e1f919c699
7
+ data.tar.gz: 823383c304a701fd5811e07aa6ef4f036659bd778dad0287ddd4c8abf0e9d17a4d8d9b7c4ee50127d48c1973947265b74b444caeb03f2af8c32d13dfc6245a0c
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-image" viewBox="0 0 16 16">
2
+ <path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
3
+ <path d="M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"/>
4
+ </svg>
@@ -29,12 +29,11 @@ document.addEventListener('DOMContentLoaded', function() {
29
29
 
30
30
  function handleMenuItemMove(evt) {
31
31
  const data = {
32
- moved_item_id: parseInt(evt.item.dataset.itemId, 10),
33
32
  new_parent_id: parseInt(evt.to.dataset.parentId, 10) || null,
34
33
  new_position_idx: parseInt(evt.newIndex, 10)
35
34
  }
36
35
 
37
- fetch(Spree.routes.menus_items_api_v2 + '/reposition', {
36
+ fetch(`${Spree.routes.menus_items_api_v2}/${evt.item.dataset.itemId}/reposition`, {
38
37
  method: 'PATCH',
39
38
  headers: {
40
39
  Authorization: 'Bearer ' + OAUTH_TOKEN,
@@ -28,6 +28,54 @@ figure.admin-img-holder {
28
28
  }
29
29
  }
30
30
 
31
+ div.admin-product-image-container {
32
+ border: 1px solid $gray-500;
33
+ background-color: #fefefe;
34
+ border-radius: $border-radius;
35
+ overflow: hidden;
36
+ display: flex;
37
+ justify-content: center;
38
+ margin: auto;
39
+
40
+ img {
41
+ max-width: 100%;
42
+ height: auto;
43
+ align-self: center;
44
+ transform: scale(1.6);
45
+ }
46
+
47
+ svg {
48
+ color: $gray-600;
49
+ align-self: center;
50
+ }
51
+
52
+ &.mini-img {
53
+ border-radius: $border-radius / 2;
54
+ width: 24px;
55
+ height: 24px;
56
+ }
57
+
58
+ &.small-img {
59
+ border-radius: $border-radius;
60
+ width: 50px;
61
+ height: 50px;
62
+ }
63
+
64
+ &.product-img {
65
+ border-width: 2px;
66
+ border-radius: $border-radius * 2;
67
+ width: 100px;
68
+ height: 100px;
69
+ }
70
+
71
+ &.large-img {
72
+ border-width: 3px;
73
+ border-radius: $border-radius * 3;
74
+ width: 300px;
75
+ height: 300px;
76
+ }
77
+ }
78
+
31
79
  .js-remove-promo-rule-option-value {
32
80
  color: $primary !important;
33
81
  &:hover {
@@ -41,7 +41,9 @@
41
41
  <% end %>
42
42
  </td>
43
43
  <td class="image">
44
- <%= link_to image_tag(main_app.url_for(image.url(:mini))), main_app.rails_blob_url(image.attachment) %>
44
+ <div class="admin-product-image-container small-img">
45
+ <%= link_to image_tag(main_app.url_for(image.url(:mini))), main_app.rails_blob_url(image.attachment) %>
46
+ </div>
45
47
  </td>
46
48
  <% if has_variants %>
47
49
  <td><%= options_text_for(image) %></td>
@@ -20,7 +20,7 @@
20
20
  <% order.line_items.each do |item| %>
21
21
  <tr class="line-item" id="line-item-<%= item.id %>">
22
22
  <td class="line-item-image image text-center">
23
- <%= link_to mini_image(item.variant), edit_admin_product_path(item.variant.product) %>
23
+ <%= link_to small_image(item.variant), edit_admin_product_path(item.variant.product) %>
24
24
  </td>
25
25
  <td class="line-item-name text-center">
26
26
  <%= link_to item.name, edit_admin_product_path(item.variant.product) %>
@@ -1,7 +1,7 @@
1
1
  <% shipment.manifest.each do |item| %>
2
2
  <tr class="stock-item" data-item-quantity="<%= item.quantity %>">
3
3
  <td class="item-image image text-center">
4
- <%= link_to mini_image(item.variant), edit_admin_product_path(item.variant.product) %>
4
+ <%= link_to small_image(item.variant), edit_admin_product_path(item.variant.product) %>
5
5
  </td>
6
6
 
7
7
  <td class="item-name">
@@ -17,9 +17,13 @@
17
17
  </nav>
18
18
  <div class='image'>
19
19
  {{#if image }}
20
- <img src='{{image}}' alt='{{ product.attributes.name }}' class='thumbnail rounded border border' />
20
+ <div class="admin-product-image-container small-img">
21
+ <img src='{{image}}' alt='{{ product.attributes.name }}' class='thumbnail rounded border border' />
22
+ </div>
21
23
  {{ else }}
22
- <img src='<%= image_path("noimage/small.png") %>' alt='{{product.name }}' class='thumbnail' />
24
+ <div class="admin-product-image-container small-img">
25
+ <%= inline_svg_tag "noimage/backend-missing-image.svg", class: "noimage", size: "60%*60%" %>
26
+ </div>
23
27
  {{/if}}
24
28
  </div>
25
29
  <div class="p-0 pt-1 text-center product-info">
@@ -68,7 +68,7 @@
68
68
  <tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
69
69
  <td scope="row" class="image">
70
70
  <%= link_to edit_admin_product_path(product) do %>
71
- <%= mini_image product %>
71
+ <%= small_image product %>
72
72
  <% end %>
73
73
  </td>
74
74
  <td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
@@ -27,7 +27,7 @@
27
27
  <tr class="stock-item" data-item-quantity="<%= item.quantity %>">
28
28
  <td class="order-completed-at"><%= order_time(order.completed_at) if order.completed_at %></td>
29
29
  <td class="item-image">
30
- <%= mini_image(item.variant) %>
30
+ <%= small_image(item.variant) %>
31
31
  </td>
32
32
  <td class="item-name">
33
33
  <%= item.name %>
@@ -2,9 +2,13 @@
2
2
  <div class='variant-autocomplete-item media align-items-center'>
3
3
  <figure class='variant-image media-left mb-0 mr-3'>
4
4
  {{#if variant.image }}
5
- <img src='{{variant.image}}' class="thumbnail mb-0" />
5
+ <div class="admin-product-image-container small-img">
6
+ <img src='{{variant.image}}' class="thumbnail mb-0" />
7
+ </div>
6
8
  {{ else }}
7
- <img src='<%= image_path("noimage/mini.png") %>' class="thumbnail mb-0" />
9
+ <div class="admin-product-image-container small-img">
10
+ <%= inline_svg_tag "noimage/backend-missing-image.svg", class: "noimage", size: "60%*60%" %>
11
+ </div>
8
12
  {{/if}}
9
13
  </figure>
10
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0.rc2
4
+ version: 4.3.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-23 00:00:00.000000000 Z
12
+ date: 2021-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_api
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 4.3.0.rc2
20
+ version: 4.3.0.rc3
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 4.3.0.rc2
27
+ version: 4.3.0.rc3
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: spree_core
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 4.3.0.rc2
34
+ version: 4.3.0.rc3
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 4.3.0.rc2
41
+ version: 4.3.0.rc3
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: babel-transpiler
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -298,6 +298,7 @@ files:
298
298
  - app/assets/images/backend-void.svg
299
299
  - app/assets/images/backend-window-sidebar.svg
300
300
  - app/assets/images/credit_cards/credit_card.gif
301
+ - app/assets/images/noimage/backend-missing-image.svg
301
302
  - app/assets/images/noimage/large.png
302
303
  - app/assets/images/noimage/mini.png
303
304
  - app/assets/images/noimage/product.png
@@ -817,9 +818,9 @@ licenses:
817
818
  - BSD-3-Clause
818
819
  metadata:
819
820
  bug_tracker_uri: https://github.com/spree/spree/issues
820
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.0.rc2
821
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.0.rc3
821
822
  documentation_uri: https://dev-docs.spreecommerce.org/
822
- source_code_uri: https://github.com/spree/spree/tree/v4.3.0.rc2
823
+ source_code_uri: https://github.com/spree/spree/tree/v4.3.0.rc3
823
824
  post_install_message:
824
825
  rdoc_options: []
825
826
  require_paths: