spree_backend 4.7.2 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +36 -129
- data/.github/CONTRIBUTING.md +1 -1
- data/.ruby-version +1 -0
- data/Gemfile +4 -3
- data/README.md +5 -38
- data/SECURITY.md +1 -1
- data/app/assets/config/spree_backend_manifest.js +4 -1
- data/app/assets/images/favicon.png +0 -0
- data/app/assets/images/favicon_dark_bg.png +0 -0
- data/app/assets/images/logo_dark.png +0 -0
- data/app/assets/images/logo_light.png +0 -0
- data/app/assets/images/spark_solutions_logo.png +0 -0
- data/app/assets/images/vendo_logo.png +0 -0
- data/app/assets/javascripts/spree/backend/global/_index.js +1 -0
- data/app/assets/javascripts/spree/backend/global/tooltips.es6 +21 -0
- data/app/assets/javascripts/spree/backend.js +3 -0
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +0 -4
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +4 -7
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +0 -1
- data/app/assets/stylesheets/spree/backend/global/_variables.scss +16 -2
- data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +0 -2
- data/app/helpers/spree/admin/base_helper.rb +8 -0
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/helpers/spree/admin/stores_helper.rb +3 -3
- data/app/javascript/spree/backend/application.js +5 -0
- data/app/javascript/spree/{dashboard → backend}/controllers/clipboard_controller.js +0 -1
- data/app/javascript/spree/backend/controllers/index.js +11 -0
- data/app/javascript/spree/{dashboard → backend}/controllers/sortable_tree_controller.js +1 -1
- data/app/javascript/spree/backend/helpers/index.js +1 -0
- data/app/javascript/spree/{dashboard/utilities → backend/helpers}/request_utility.js +1 -1
- data/app/models/spree/admin/actions/action.rb +1 -1
- data/app/models/spree/admin/updater.rb +35 -0
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
- data/app/views/spree/admin/cms_pages/_form.html.erb +3 -3
- data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +1 -1
- data/app/views/spree/admin/cms_pages/index.html.erb +1 -1
- data/app/views/spree/admin/countries/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/dashboard/_getting_started.html.erb +18 -18
- data/app/views/spree/admin/data_feeds/index.html.erb +1 -1
- data/app/views/spree/admin/images/index.html.erb +1 -1
- data/app/views/spree/admin/menus/edit.html.erb +1 -1
- data/app/views/spree/admin/menus/index.html.erb +1 -1
- data/app/views/spree/admin/oauth_applications/index.html.erb +3 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/spree/admin/option_types/edit.html.erb +1 -1
- data/app/views/spree/admin/option_types/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_line_items.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment.html.erb +14 -12
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/_form.html.erb +15 -2
- data/app/views/spree/admin/payment_methods/index.html.erb +2 -2
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +3 -3
- data/app/views/spree/admin/products/_autocomplete.js.erb +1 -1
- data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/index.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +1 -1
- data/app/views/spree/admin/properties/index.html.erb +1 -1
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/prototypes/index.html.erb +1 -1
- data/app/views/spree/admin/reimbursement_types/index.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/roles/index.html.erb +1 -1
- data/app/views/spree/admin/shared/_account_nav.html.erb +31 -17
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +7 -1
- data/app/views/spree/admin/shared/_header.html.erb +27 -19
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -11
- data/app/views/spree/admin/shared/_product_tabs.html.erb +1 -11
- data/app/views/spree/admin/shared/_store_switcher.html.erb +5 -5
- data/app/views/spree/admin/shared/_tabs.html.erb +11 -0
- data/app/views/spree/admin/shared/_version.html.erb +20 -7
- data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/show.html.erb +1 -1
- data/app/views/spree/admin/store_credit_categories/index.html.erb +1 -1
- data/app/views/spree/admin/stores/edit.html.erb +1 -1
- data/app/views/spree/admin/stores/index.html.erb +1 -1
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/_list.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/users/_tabs.html.erb +1 -11
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_split.js.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +2 -2
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/app/views/spree/layouts/admin.html.erb +1 -1
- data/config/importmap.rb +9 -0
- data/config/locales/en.yml +4 -1
- data/lib/generators/spree/backend/install/install_generator.rb +0 -2
- data/lib/spree/backend/configuration.rb +0 -2
- data/lib/spree/backend/engine.rb +13 -0
- data/lib/spree/backend/runtime_configuration.rb +8 -0
- data/lib/spree/backend/version.rb +1 -1
- data/lib/spree/backend.rb +4 -2
- data/lib/spree_backend.rb +2 -2
- data/license.md +8 -3
- data/spree_backend.gemspec +6 -4
- metadata +70 -28
- data/app/assets/images/admin/logo.png +0 -0
- data/app/javascript/spree/dashboard/index.js +0 -54
- data/app/javascript/spree/dashboard/utilities/bootstrap.js +0 -17
- data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +0 -6
- data/package.json +0 -46
- data/rollup.config.js +0 -43
- data/yarn.lock +0 -1012
- /data/app/javascript/spree/{dashboard → backend}/controllers/password_toggle_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/product_edit_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/spree_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/upload_button_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/webhooks_subscriber_events_controller.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3300d2767c8c33fab939d5c7c30dd41db56d9c422469820f8eaeef2bcf71ba6e
|
4
|
+
data.tar.gz: 745fb617eed98c7268c185eddc32eab136e6067624b712fbd85f9c777b520bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e291674023a82d06681356deeffcfe747da3450e835f6fbbd7ca81be1782bc54be59471a9bf1040ea2ee0b685a30f7a2a2e20cda76d1c6a7b5c8b1016f797f0c
|
7
|
+
data.tar.gz: 27ca5a00563290b6523fa8ff3bcc73f00c8e4a250c319942e15f556c129021603f0555003603ac68f93e196b04cbb45b8dfb11f1ed619d5f3b814cc3c0edaaf7
|
data/.circleci/config.yml
CHANGED
@@ -10,24 +10,17 @@ defaults: &defaults
|
|
10
10
|
RAILS_VERSION: '~> 7.1.0'
|
11
11
|
working_directory: ~/spree
|
12
12
|
docker:
|
13
|
-
- image: &
|
14
|
-
- image: &redis_image circleci/redis:6.2-alpine
|
13
|
+
- image: &ruby_image cimg/ruby:3.3.0-browsers
|
15
14
|
|
16
|
-
|
17
|
-
<<: *defaults
|
18
|
-
docker:
|
19
|
-
- image: &ruby_3_2_image cimg/ruby:3.2.0-browsers
|
20
|
-
- image: *redis_image
|
21
|
-
|
22
|
-
run_tests_3_0: &run_tests_3_0
|
15
|
+
run_tests: &run_tests
|
23
16
|
<<: *defaults
|
24
17
|
parallelism: 8
|
25
18
|
steps:
|
26
19
|
- checkout
|
27
20
|
- restore_cache:
|
28
21
|
keys:
|
29
|
-
- spree-
|
30
|
-
- spree-
|
22
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
23
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}
|
31
24
|
- run:
|
32
25
|
name: Add keyserver
|
33
26
|
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
@@ -35,20 +28,16 @@ run_tests_3_0: &run_tests_3_0
|
|
35
28
|
name: Install libvips
|
36
29
|
command: sudo apt-get update && sudo apt-get install libvips
|
37
30
|
- run:
|
38
|
-
|
39
|
-
|
31
|
+
name: Set bundle path
|
32
|
+
command: bundle config --local path vendor/bundle
|
40
33
|
- run:
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
name: Ensure Bundle Install
|
35
|
+
command: |
|
36
|
+
bundle check || bundle install
|
44
37
|
- run:
|
45
38
|
name: Create test app
|
46
39
|
command: |
|
47
40
|
bundle exec rake test_app
|
48
|
-
- run:
|
49
|
-
name: Unlink NPM package
|
50
|
-
command: |
|
51
|
-
cd spec/dummy && yarn unlink @spree/dashboard
|
52
41
|
- run:
|
53
42
|
name: Run Rspec
|
54
43
|
command: |
|
@@ -60,57 +49,17 @@ run_tests_3_0: &run_tests_3_0
|
|
60
49
|
- store_test_results:
|
61
50
|
path: ~/rspec
|
62
51
|
- store_artifacts:
|
63
|
-
path:
|
64
|
-
|
65
|
-
run_tests_3_2: &run_tests_3_2
|
66
|
-
<<: *defaults_3_2
|
67
|
-
parallelism: 8
|
68
|
-
steps:
|
69
|
-
- checkout
|
70
|
-
- restore_cache:
|
71
|
-
keys:
|
72
|
-
- spree-dashboard-bundle-v10-ruby-3-2-{{ .Branch }}
|
73
|
-
- spree-dashboard-bundle-v10-ruby-3-2
|
74
|
-
- run:
|
75
|
-
name: Install libvips
|
76
|
-
command: sudo apt-get update && sudo apt-get install libvips42
|
77
|
-
- run:
|
78
|
-
name: Set bundle path
|
79
|
-
command: bundle config --local path vendor/bundle
|
80
|
-
- run:
|
81
|
-
name: Ensure bundle Install
|
82
|
-
command: |
|
83
|
-
bundle check || bundle install
|
84
|
-
- run:
|
85
|
-
name: Create test app
|
86
|
-
command: |
|
87
|
-
bundle exec rake test_app
|
88
|
-
- run:
|
89
|
-
name: Unlink NPM package
|
90
|
-
command: |
|
91
|
-
cd spec/dummy && yarn unlink @spree/dashboard
|
92
|
-
- run:
|
93
|
-
name: Run Rspec
|
94
|
-
command: |
|
95
|
-
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
96
|
-
bundle exec rspec --format documentation \
|
97
|
-
--format RspecJunitFormatter \
|
98
|
-
-o ~/rspec/rspec.xml \
|
99
|
-
-- ${TESTFILES}
|
100
|
-
- store_test_results:
|
101
|
-
path: ~/rspec
|
102
|
-
- store_artifacts:
|
103
|
-
path: /tmp/test-artifacts
|
52
|
+
path: tmp/capybara
|
104
53
|
|
105
54
|
jobs:
|
106
|
-
|
55
|
+
bundle:
|
107
56
|
<<: *defaults
|
108
57
|
steps:
|
109
58
|
- checkout
|
110
59
|
- restore_cache:
|
111
60
|
keys:
|
112
|
-
- spree-
|
113
|
-
- spree-
|
61
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
62
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}
|
114
63
|
- run:
|
115
64
|
name: Add keyserver
|
116
65
|
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
@@ -127,84 +76,42 @@ jobs:
|
|
127
76
|
- save_cache:
|
128
77
|
paths:
|
129
78
|
- vendor/bundle
|
130
|
-
key: spree-
|
79
|
+
key: spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
131
80
|
|
132
|
-
|
133
|
-
<<: *
|
134
|
-
|
135
|
-
- checkout
|
136
|
-
- restore_cache:
|
137
|
-
keys:
|
138
|
-
- spree-dashboard-bundle-v10-ruby-3-2-{{ .Branch }}
|
139
|
-
- spree-dashboard-bundle-v10-ruby-3-2
|
140
|
-
- run:
|
141
|
-
name: Install libvips
|
142
|
-
command: sudo apt-get update && sudo apt-get install libvips42
|
143
|
-
- run:
|
144
|
-
name: Set bundle path
|
145
|
-
command: bundle config --local path vendor/bundle
|
146
|
-
- run:
|
147
|
-
name: Bundle Install
|
148
|
-
command: |
|
149
|
-
bundle check || bundle install
|
150
|
-
- save_cache:
|
151
|
-
paths:
|
152
|
-
- vendor/bundle
|
153
|
-
key: spree-dashboard-bundle-v10-ruby-3-2-{{ checksum "Gemfile.lock" }}
|
154
|
-
|
155
|
-
tests_ruby_3_0_rails_7_0_postgres:
|
156
|
-
<<: *run_tests_3_0
|
157
|
-
environment:
|
81
|
+
tests_mysql:
|
82
|
+
<<: *run_tests
|
83
|
+
environment: &mysql_environment
|
158
84
|
<<: *environment
|
159
|
-
DB:
|
160
|
-
DB_HOST:
|
161
|
-
DB_USERNAME:
|
162
|
-
|
85
|
+
DB: mysql
|
86
|
+
DB_HOST: 127.0.0.1
|
87
|
+
DB_USERNAME: root
|
88
|
+
COVERAGE: true
|
89
|
+
COVERAGE_DIR: /tmp/workspace/simplecov
|
163
90
|
docker:
|
164
|
-
- image: *
|
165
|
-
- image:
|
166
|
-
environment:
|
167
|
-
POSTGRES_USER: postgres
|
168
|
-
- image: *redis_image
|
91
|
+
- image: *ruby_image
|
92
|
+
- image: cimg/mysql:8.0
|
169
93
|
|
170
|
-
|
171
|
-
<<: *
|
172
|
-
environment:
|
94
|
+
tests_postgres:
|
95
|
+
<<: *run_tests
|
96
|
+
environment: &postgres_environment
|
173
97
|
<<: *environment
|
174
98
|
DB: postgres
|
175
99
|
DB_HOST: localhost
|
176
100
|
DB_USERNAME: postgres
|
177
101
|
docker:
|
178
|
-
- image: *
|
179
|
-
- image:
|
180
|
-
|
181
|
-
|
182
|
-
tests_ruby_3_2_rails_7_1_mysql:
|
183
|
-
<<: *run_tests_3_2
|
184
|
-
environment:
|
185
|
-
<<: *environment
|
186
|
-
DB: mysql
|
187
|
-
DB_HOST: 127.0.0.1
|
188
|
-
DB_USERNAME: root
|
189
|
-
COVERAGE: true
|
190
|
-
COVERAGE_DIR: /tmp/workspace/simplecov
|
191
|
-
docker:
|
192
|
-
- image: *ruby_3_2_image
|
193
|
-
- image: *redis_image
|
194
|
-
- image: &mysql_image circleci/mysql:8-ram
|
102
|
+
- image: *ruby_image
|
103
|
+
- image: cimg/postgres:16.2
|
104
|
+
environment:
|
105
|
+
POSTGRES_USER: postgres
|
195
106
|
|
196
107
|
workflows:
|
197
108
|
version: 2
|
198
109
|
main:
|
199
110
|
jobs:
|
200
|
-
-
|
201
|
-
-
|
202
|
-
- tests_ruby_3_2_rails_7_1_postgres:
|
203
|
-
requires:
|
204
|
-
- bundle_ruby_3_2
|
205
|
-
- tests_ruby_3_0_rails_7_0_postgres:
|
111
|
+
- bundle
|
112
|
+
- tests_postgres:
|
206
113
|
requires:
|
207
|
-
-
|
208
|
-
-
|
114
|
+
- bundle
|
115
|
+
- tests_mysql:
|
209
116
|
requires:
|
210
|
-
-
|
117
|
+
- bundle
|
data/.github/CONTRIBUTING.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Please visit [Contributing section](https://
|
1
|
+
Please visit [Contributing section](https://docs.spreecommerce.org/developer/contributing/quickstart) of Spree Guides. Thank you!
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
data/Gemfile
CHANGED
@@ -16,8 +16,10 @@ end
|
|
16
16
|
platforms :ruby do
|
17
17
|
if ENV['DB'] == 'mysql'
|
18
18
|
gem 'mysql2'
|
19
|
+
elsif ENV['DB'] == 'postgres'
|
20
|
+
gem 'pg'
|
19
21
|
else
|
20
|
-
gem '
|
22
|
+
gem 'sqlite3', '~> 2.0'
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
@@ -56,12 +58,11 @@ group :test, :development do
|
|
56
58
|
end
|
57
59
|
|
58
60
|
group :development do
|
59
|
-
gem 'github_fast_changelog'
|
60
61
|
gem 'solargraph'
|
61
62
|
end
|
62
63
|
|
63
64
|
|
64
|
-
spree_opts = { github: 'spree/spree', branch: '
|
65
|
+
spree_opts = { github: 'spree/spree', branch: 'main' }
|
65
66
|
gem 'spree_core', spree_opts
|
66
67
|
gem 'spree_api', spree_opts
|
67
68
|
gemspec
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# Spree Admin Dashboard
|
6
6
|
|
7
|
-
This is the default Spree Admin Dashboard.
|
7
|
+
This is the default Spree Admin Dashboard.
|
8
8
|
|
9
9
|
## Developed by
|
10
10
|
|
@@ -37,52 +37,19 @@ Default credentials:
|
|
37
37
|
|
38
38
|
## Installation
|
39
39
|
|
40
|
-
Spree Admin Dashboard is bundled with [Spree Starter](https://github.com/spree/spree_starter) and we recommend following [Spree Getting Started guide](https://
|
40
|
+
Spree Admin Dashboard is bundled with [Spree Starter](https://github.com/spree/spree_starter) and we recommend following [Spree Getting Started guide](https://docs.spreecommerce.org/getting-started/installation).
|
41
41
|
|
42
|
-
You can also [add Spree and Admin Dashboard to an existing Ruby on Rails application](https://
|
42
|
+
You can also [add Spree and Admin Dashboard to an existing Ruby on Rails application](https://docs.spreecommerce.org/advanced/existing_app_tutorial) as well.
|
43
43
|
|
44
44
|
## Documentation
|
45
45
|
|
46
|
-
* [Developer Documentation](https://
|
46
|
+
* [Developer Documentation](https://docs.spreecommerce.org/)
|
47
47
|
|
48
48
|
## Contributing
|
49
49
|
|
50
50
|
Spree Admin Dashboard is an open source project and we love contributions in any form - pull requests, issues, feature ideas!
|
51
51
|
|
52
|
-
Please review the [Spree Contributing Guide](https://
|
53
|
-
|
54
|
-
### Development Setup (JavaScript)
|
55
|
-
|
56
|
-
When working on the JavaScript in Spree Dashboard locally, you will need to yarn link your local development copy of `@spree/dashboard`, to the Rails app you are working in, so that your changes are picked up and represented live in the view.
|
57
|
-
|
58
|
-
|
59
|
-
From the root of `spree_backend` run:
|
60
|
-
|
61
|
-
```bash
|
62
|
-
yarn link
|
63
|
-
```
|
64
|
-
|
65
|
-
Next, from the root of the Rails app you are using to develop run:
|
66
|
-
|
67
|
-
```bash
|
68
|
-
yarn link "@spree/dashboard"
|
69
|
-
```
|
70
|
-
|
71
|
-
Once your local Spree Dashboard is linked with the Rails app you are using for development you will need two terminal tabs open,
|
72
|
-
one at the root of your Rails app, and one at the root of `spree_backend`.
|
73
|
-
|
74
|
-
In the terminal window at the root of the `spree_backend` run:
|
75
|
-
|
76
|
-
```bash
|
77
|
-
yarn watch
|
78
|
-
```
|
79
|
-
|
80
|
-
And from the Rails app you are using to run Spree and develop in run the following:
|
81
|
-
|
82
|
-
```bash
|
83
|
-
bin/dev
|
84
|
-
```
|
85
|
-
Any changes made to the JavaScript files in `spree_backend` will be processed by yarn and picked up in the Rails app you are running for development.
|
52
|
+
Please review the [Spree Contributing Guide](https://docs.spreecommerce.org/developer/contributing/quickstart)
|
86
53
|
|
87
54
|
### Local setup
|
88
55
|
|
data/SECURITY.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Please see [Spree Guides Security section](https://
|
1
|
+
Please see [Spree Guides Security section](https://docs.spreecommerce.org/developer/security/quickstart).
|
@@ -1,6 +1,9 @@
|
|
1
1
|
//= link_tree ../images
|
2
2
|
|
3
|
-
//=
|
3
|
+
//= link_directory ../../javascript/spree/backend .js
|
4
|
+
//= link_directory ../../javascript/spree/backend/controllers .js
|
5
|
+
//= link_directory ../../javascript/spree/backend/helpers .js
|
6
|
+
|
4
7
|
//= link spree/backend/all.js
|
5
8
|
//= link spree/backend/all.css
|
6
9
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
const initTooltips = () => {
|
2
|
+
$('.with-tip').each(function() {
|
3
|
+
$(this).tooltip()
|
4
|
+
})
|
5
|
+
|
6
|
+
$('.with-tip').on('show.bs.tooltip', function(event) {
|
7
|
+
if (('ontouchstart' in window)) {
|
8
|
+
event.preventDefault()
|
9
|
+
}
|
10
|
+
})
|
11
|
+
}
|
12
|
+
|
13
|
+
const removeTooltips = () => {
|
14
|
+
$('.with-tip').each(function() {
|
15
|
+
$(this).tooltip('dispose')
|
16
|
+
})
|
17
|
+
}
|
18
|
+
|
19
|
+
document.addEventListener("turbo:click", removeTooltips)
|
20
|
+
document.addEventListener("turbo:load", initTooltips)
|
21
|
+
document.addEventListener('turbo:frame-render', initTooltips)
|
@@ -1,3 +1,7 @@
|
|
1
|
+
.dropdown-menu {
|
2
|
+
@extend .shadow;
|
3
|
+
}
|
4
|
+
|
1
5
|
.header {
|
2
6
|
.navbar {
|
3
7
|
min-height:54px;
|
@@ -16,13 +20,6 @@
|
|
16
20
|
}
|
17
21
|
}
|
18
22
|
|
19
|
-
#accountNav {
|
20
|
-
i {
|
21
|
-
font-size: 1.3em;
|
22
|
-
line-height: 1rem;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
23
|
#storeSwitcherDropdown {
|
27
24
|
.dropdown-menu.show {
|
28
25
|
min-width: 250px;
|
@@ -1,8 +1,22 @@
|
|
1
|
+
// https://github.com/twbs/bootstrap/blob/v4.6.2/scss/_variables.scss
|
2
|
+
|
1
3
|
$theme-colors: (
|
2
|
-
"primary": #
|
4
|
+
"primary": #000,
|
3
5
|
);
|
4
6
|
|
5
|
-
$enable-
|
7
|
+
$enable-responsive-font-sizes: true;
|
8
|
+
$font-family-sans-serif: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
|
9
|
+
$font-size-base: 0.813rem !default;
|
10
|
+
$font-size-plus: 0.875rem !default;
|
11
|
+
$font-size-sm: 0.75rem !default;
|
12
|
+
$font-size-lg: 1rem !default;
|
13
|
+
|
14
|
+
$border-radius: 0.5rem !default;
|
15
|
+
$border-radius-sm: 0.4rem !default;
|
16
|
+
$border-radius-lg: 0.75rem !default;
|
17
|
+
|
18
|
+
$dropdown-item-padding-y: .5rem !default;
|
19
|
+
$dropdown-item-padding-x: 1rem !default;
|
6
20
|
|
7
21
|
// https://github.com/twbs/bootstrap/issues/32019
|
8
22
|
// we need this hotfix for sassc
|
@@ -286,6 +286,14 @@ module Spree
|
|
286
286
|
def taxon_wysiwyg_editor_enabled?
|
287
287
|
Spree::Backend::Config[:taxon_wysiwyg_editor_enabled]
|
288
288
|
end
|
289
|
+
|
290
|
+
def spree_admin_show_version?
|
291
|
+
can?(:admin, current_store) && Spree::Backend::RuntimeConfig[:admin_show_version]
|
292
|
+
end
|
293
|
+
|
294
|
+
def spree_update_available?
|
295
|
+
@spree_update_available ||= !Rails.env.test? && Spree::Admin::Updater.update_available?
|
296
|
+
end
|
289
297
|
end
|
290
298
|
end
|
291
299
|
end
|
@@ -16,14 +16,14 @@ module Spree
|
|
16
16
|
def store_switcher_link(store)
|
17
17
|
if current_store.id == store.id
|
18
18
|
classes = 'disabled bg-light'
|
19
|
-
icon = svg_icon name: 'circle-fill.svg', width: '
|
19
|
+
icon = svg_icon name: 'circle-fill.svg', width: '14', height: '14'
|
20
20
|
else
|
21
21
|
classes = nil
|
22
|
-
icon = svg_icon name: 'circle.svg', width: '
|
22
|
+
icon = svg_icon name: 'circle.svg', width: '14', height: '14'
|
23
23
|
end
|
24
24
|
|
25
25
|
link_to icon + store.unique_name, spree.admin_url(host: store.formatted_url),
|
26
|
-
class: "#{classes}
|
26
|
+
class: "#{classes} dropdown-item", id: store.code, data: { turbo: false }
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Import and register all your controllers from the importmap under controllers/*
|
2
|
+
|
3
|
+
import { application } from "controllers/application"
|
4
|
+
|
5
|
+
// Eager load all controllers defined in the import map under controllers/**/*_controller
|
6
|
+
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
7
|
+
eagerLoadControllersFrom("controllers", application)
|
8
|
+
|
9
|
+
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
10
|
+
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
11
|
+
// lazyLoadControllersFrom("controllers", application)
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "helpers/request_utility"
|
@@ -3,7 +3,7 @@ module Spree
|
|
3
3
|
module Actions
|
4
4
|
class Action
|
5
5
|
STYLE_CLASSES = {
|
6
|
-
::Spree::Admin::Actions::ActionStyle::PRIMARY => 'btn-
|
6
|
+
::Spree::Admin::Actions::ActionStyle::PRIMARY => 'btn-primary',
|
7
7
|
::Spree::Admin::Actions::ActionStyle::SECONDARY => 'btn-secondary',
|
8
8
|
::Spree::Admin::Actions::ActionStyle::LIGHT => 'btn-light'
|
9
9
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'json'
|
3
|
+
require 'uri'
|
4
|
+
|
5
|
+
module Spree
|
6
|
+
module Admin
|
7
|
+
class Updater
|
8
|
+
SPREE_CLOUD_UPDATES_URL = 'https://spreecloud.io/updates.json'
|
9
|
+
|
10
|
+
@updates = nil
|
11
|
+
|
12
|
+
def self.update_available?
|
13
|
+
fetch_updates.any?
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.fetch_updates
|
17
|
+
@updates ||= Rails.cache.fetch("spree/admin/updater/fetch_updates/#{Spree.version}", expires_in: 1.day) do
|
18
|
+
uri = URI(SPREE_CLOUD_UPDATES_URL)
|
19
|
+
params = { version: Spree.version }
|
20
|
+
uri.query = URI.encode_www_form(params)
|
21
|
+
|
22
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
23
|
+
http.use_ssl = uri.scheme == 'https'
|
24
|
+
http.open_timeout = 1 # 1s timeout for opening the connection
|
25
|
+
http.read_timeout = 1 # 1s timeout for reading the response
|
26
|
+
|
27
|
+
response = http.get(uri)
|
28
|
+
return {} unless response.is_a?(Net::HTTPSuccess)
|
29
|
+
|
30
|
+
JSON.parse(response.body)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<div class="card-footer">
|
22
22
|
<div class="row text-center pb-0">
|
23
23
|
<div class="col-12 col-lg-6">
|
24
|
-
<%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :put, class: "btn btn-
|
24
|
+
<%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :put, class: "btn btn-primary" %>
|
25
25
|
</div>
|
26
26
|
<div class="col-12 col-lg-6">
|
27
27
|
<%= button_to Spree.t(:close_all_adjustments), close_adjustments_admin_order_path(@order), method: :put, class: "btn btn-danger" %>
|