shopify_app 13.0.0 → 17.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug-report.md +63 -0
  3. data/.github/ISSUE_TEMPLATE/config.yml +1 -0
  4. data/.github/ISSUE_TEMPLATE/feature-request.md +33 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  6. data/.github/workflows/build.yml +38 -0
  7. data/.github/workflows/release.yml +24 -0
  8. data/.github/workflows/rubocop.yml +22 -0
  9. data/.gitignore +0 -2
  10. data/.rubocop.yml +14 -6
  11. data/CHANGELOG.md +132 -0
  12. data/CONTRIBUTING.md +76 -0
  13. data/Gemfile +5 -0
  14. data/Gemfile.lock +256 -0
  15. data/README.md +72 -534
  16. data/Rakefile +1 -0
  17. data/SECURITY.md +59 -0
  18. data/app/assets/images/storage_access.svg +1 -2
  19. data/app/assets/javascripts/shopify_app/storage_access.js +2 -1
  20. data/app/assets/javascripts/shopify_app/top_level_interaction.js +1 -1
  21. data/app/controllers/concerns/shopify_app/authenticated.rb +1 -0
  22. data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +26 -0
  23. data/app/controllers/concerns/shopify_app/require_known_shop.rb +39 -0
  24. data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
  25. data/app/controllers/shopify_app/authenticated_controller.rb +1 -0
  26. data/app/controllers/shopify_app/callback_controller.rb +105 -18
  27. data/app/controllers/shopify_app/extension_verification_controller.rb +2 -7
  28. data/app/controllers/shopify_app/sessions_controller.rb +22 -10
  29. data/app/controllers/shopify_app/webhooks_controller.rb +6 -5
  30. data/app/views/shopify_app/partials/_button_styles.html.erb +41 -36
  31. data/app/views/shopify_app/partials/_card_styles.html.erb +3 -3
  32. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +28 -59
  33. data/app/views/shopify_app/partials/_form_styles.html.erb +56 -0
  34. data/app/views/shopify_app/partials/_layout_styles.html.erb +16 -1
  35. data/app/views/shopify_app/partials/_typography_styles.html.erb +6 -6
  36. data/app/views/shopify_app/sessions/enable_cookies.html.erb +2 -7
  37. data/app/views/shopify_app/sessions/new.html.erb +38 -110
  38. data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -1
  39. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +21 -22
  40. data/config/locales/de.yml +11 -11
  41. data/config/locales/fi.yml +1 -1
  42. data/config/locales/nl.yml +7 -7
  43. data/config/locales/th.yml +4 -4
  44. data/config/locales/vi.yml +22 -0
  45. data/config/locales/zh-CN.yml +1 -1
  46. data/config/routes.rb +1 -0
  47. data/docs/Quickstart.md +15 -87
  48. data/docs/Releasing.md +18 -14
  49. data/docs/Upgrading.md +110 -0
  50. data/docs/shopify_app/authentication.md +124 -0
  51. data/docs/shopify_app/engine.md +82 -0
  52. data/docs/shopify_app/generators.md +127 -0
  53. data/docs/shopify_app/handling-access-scopes-changes.md +8 -0
  54. data/docs/shopify_app/script-tags.md +28 -0
  55. data/docs/shopify_app/session-repository.md +88 -0
  56. data/docs/shopify_app/testing.md +38 -0
  57. data/docs/shopify_app/webhooks.md +72 -0
  58. data/karma.conf.js +1 -1
  59. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +5 -3
  60. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +1 -0
  61. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +2 -1
  62. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +4 -4
  63. data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +5 -4
  64. data/lib/generators/shopify_app/add_webhook/templates/{webhook_job.rb → webhook_job.rb.tt} +5 -0
  65. data/lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb +4 -3
  66. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb +3 -3
  67. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb +10 -9
  68. data/lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb +1 -1
  69. data/lib/generators/shopify_app/controllers/controllers_generator.rb +2 -1
  70. data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +31 -3
  71. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +2 -0
  72. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +66 -16
  73. data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +11 -0
  74. data/lib/generators/shopify_app/install/install_generator.rb +46 -11
  75. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +1 -1
  76. data/lib/generators/shopify_app/install/templates/flash_messages.js +0 -2
  77. data/lib/generators/shopify_app/install/templates/omniauth.rb +3 -1
  78. data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +25 -0
  79. data/lib/generators/shopify_app/install/templates/shopify_provider.rb.tt +8 -0
  80. data/lib/generators/shopify_app/install/templates/user_agent.rb +2 -1
  81. data/lib/generators/shopify_app/products_controller/products_controller_generator.rb +19 -0
  82. data/lib/generators/shopify_app/products_controller/templates/products_controller.rb +8 -0
  83. data/lib/generators/shopify_app/routes/routes_generator.rb +1 -0
  84. data/lib/generators/shopify_app/routes/templates/routes.rb +10 -9
  85. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +39 -7
  86. data/lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb +5 -0
  87. data/lib/generators/shopify_app/shop_model/templates/shop.rb +2 -1
  88. data/lib/generators/shopify_app/shopify_app_generator.rb +4 -3
  89. data/lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb +5 -0
  90. data/lib/generators/shopify_app/user_model/templates/user.rb +2 -1
  91. data/lib/generators/shopify_app/user_model/user_model_generator.rb +39 -7
  92. data/lib/generators/shopify_app/views/views_generator.rb +2 -1
  93. data/lib/shopify_app/access_scopes/noop_strategy.rb +13 -0
  94. data/lib/shopify_app/access_scopes/shop_strategy.rb +24 -0
  95. data/lib/shopify_app/access_scopes/user_strategy.rb +41 -0
  96. data/lib/shopify_app/configuration.rb +40 -8
  97. data/lib/shopify_app/controller_concerns/app_proxy_verification.rb +3 -3
  98. data/lib/shopify_app/controller_concerns/csrf_protection.rb +15 -0
  99. data/lib/shopify_app/controller_concerns/embedded_app.rb +3 -2
  100. data/lib/shopify_app/controller_concerns/localization.rb +1 -0
  101. data/lib/shopify_app/controller_concerns/login_protection.rb +74 -16
  102. data/lib/shopify_app/controller_concerns/payload_verification.rb +24 -0
  103. data/lib/shopify_app/controller_concerns/webhook_verification.rb +3 -18
  104. data/lib/shopify_app/engine.rb +26 -0
  105. data/lib/shopify_app/jobs/scripttags_manager_job.rb +1 -1
  106. data/lib/shopify_app/jobs/webhooks_manager_job.rb +1 -1
  107. data/lib/shopify_app/managers/scripttags_manager.rb +4 -3
  108. data/lib/shopify_app/managers/webhooks_manager.rb +4 -3
  109. data/lib/shopify_app/middleware/jwt_middleware.rb +42 -0
  110. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +2 -1
  111. data/lib/shopify_app/omniauth/omniauth_configuration.rb +64 -0
  112. data/lib/shopify_app/session/in_memory_session_store.rb +7 -3
  113. data/lib/shopify_app/session/in_memory_shop_session_store.rb +12 -0
  114. data/lib/shopify_app/session/in_memory_user_session_store.rb +12 -0
  115. data/lib/shopify_app/session/jwt.rb +63 -0
  116. data/lib/shopify_app/session/null_user_session_store.rb +22 -0
  117. data/lib/shopify_app/session/session_repository.rb +13 -16
  118. data/lib/shopify_app/session/session_storage.rb +1 -0
  119. data/lib/shopify_app/session/shop_session_storage.rb +21 -9
  120. data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +58 -0
  121. data/lib/shopify_app/session/user_session_storage.rb +19 -8
  122. data/lib/shopify_app/session/user_session_storage_with_scopes.rb +58 -0
  123. data/lib/shopify_app/test_helpers/all.rb +2 -0
  124. data/lib/shopify_app/test_helpers/webhook_verification_helper.rb +17 -0
  125. data/lib/shopify_app/utils.rb +18 -5
  126. data/lib/shopify_app/version.rb +2 -1
  127. data/lib/shopify_app.rb +22 -5
  128. data/package.json +7 -8
  129. data/shopify_app.gemspec +13 -8
  130. data/translation.yml +1 -1
  131. data/yarn.lock +2120 -2168
  132. metadata +88 -16
  133. data/.github/ISSUE_TEMPLATE.md +0 -14
  134. data/.travis.yml +0 -27
  135. data/docs/install-on-dev-shop.png +0 -0
  136. data/docs/test-your-app.png +0 -0
  137. data/lib/generators/shopify_app/install/templates/shopify_app.rb +0 -15
  138. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -20
  139. data/package-lock.json +0 -7245
@@ -1,14 +1,15 @@
1
+ # frozen_string_literal: true
1
2
  module ShopifyApp
3
+ class MissingWebhookJobError < StandardError; end
4
+
2
5
  class WebhooksController < ActionController::Base
3
6
  include ShopifyApp::WebhookVerification
4
7
 
5
- class ShopifyApp::MissingWebhookJobError < StandardError; end
6
-
7
8
  def receive
8
9
  params.permit!
9
- job_args = {shop_domain: shop_domain, webhook: webhook_params.to_h}
10
+ job_args = { shop_domain: shop_domain, webhook: webhook_params.to_h }
10
11
  webhook_job_klass.perform_later(job_args)
11
- head :no_content
12
+ head(:ok)
12
13
  end
13
14
 
14
15
  private
@@ -18,7 +19,7 @@ module ShopifyApp
18
19
  end
19
20
 
20
21
  def webhook_job_klass
21
- webhook_job_klass_name.safe_constantize or raise ShopifyApp::MissingWebhookJobError
22
+ webhook_job_klass_name.safe_constantize || raise(ShopifyApp::MissingWebhookJobError)
22
23
  end
23
24
 
24
25
  def webhook_job_klass_name(type = webhook_type)
@@ -1,6 +1,5 @@
1
1
  <style>
2
2
  .Polaris-Button {
3
- fill:#637381;
4
3
  position:relative;
5
4
  display:-webkit-inline-box;
6
5
  display:-ms-inline-flexbox;
@@ -15,12 +14,14 @@
15
14
  min-width:3.6rem;
16
15
  margin:0;
17
16
  padding:0.7rem 1.6rem;
18
- background:linear-gradient(to bottom, white, #f9fafb);
19
- border:1px solid #c4cdd5;
20
- box-shadow:0 1px 0 0 rgba(22, 29, 37, 0.05);
21
- border-radius:3px;
17
+ background-color:#ffffff;
18
+ border:1px solid #babfc3;
19
+ border-top-color: #c9cccf;
20
+ border-bottom-color: #babfc4;
21
+ box-shadow:0 1px 0 0 rgba(0, 0, 0, 0.05);
22
+ border-radius:4px;
22
23
  line-height:1;
23
- color:#212b36;
24
+ color:#202223;
24
25
  text-align:center;
25
26
  cursor:pointer;
26
27
  -webkit-user-select:none;
@@ -29,30 +30,44 @@
29
30
  user-select:none;
30
31
  text-decoration:none;
31
32
  transition-property:background, border, box-shadow;
32
- transition-duration:200ms;
33
+ transition-duration:100ms;
33
34
  transition-timing-function:cubic-bezier(0.64, 0, 0.35, 1);
34
35
  }
35
36
 
36
37
  .Polaris-Button:hover {
37
- background:linear-gradient(to bottom, #f9fafb, #f4f6f8);
38
- border-color:#c4cdd5;
38
+ background-color:#f6f6f7;
39
39
  }
40
40
 
41
41
  .Polaris-Button:focus {
42
- border-color:#5c6ac4;
43
42
  outline:0;
44
- box-shadow:0 0 0 1px #5c6ac4;
43
+ }
44
+
45
+ .Polaris-Button:focus:after {
46
+ box-shadow:0 0 0 .2rem #448fff;
47
+ }
48
+
49
+ .Polaris-Button:after {
50
+ content:'';
51
+ position:absolute;
52
+ z-index:1;
53
+ top:-.2rem;
54
+ right:-.2rem;
55
+ bottom:-.2rem;
56
+ left:-.2rem;
57
+ display:block;
58
+ pointer-events:none;
59
+ box-shadow:0 0 0 -.2rem #448fff;
60
+ transition:box-shadow 100ms cubic-bezier(0.64, 0, 0.35, 1);
61
+ border-radius:5px;
45
62
  }
46
63
 
47
64
  .Polaris-Button:active {
48
- background:linear-gradient(to bottom, #f4f6f8, #f4f6f8);
49
- border-color:#c4cdd5;
50
- box-shadow:0 0 0 0 transparent, inset 0 1px 1px 0 rgba(99, 115, 129, 0.1), inset 0 1px 4px 0 rgba(99, 115, 129, 0.2);
65
+ background-color:#f1f2f3);
51
66
  }
52
67
 
53
68
  .Polaris-Button__Content {
54
- font-size:1.5rem;
55
- font-weight:400;
69
+ font-size:1.4rem;
70
+ font-weight:500;
56
71
  line-height:1.6rem;
57
72
  text-transform:initial;
58
73
  letter-spacing:initial;
@@ -70,35 +85,25 @@
70
85
  min-height:1px;
71
86
  }
72
87
 
73
- @media (min-width: 40em) {
74
- .Polaris-Button__Content {
75
- font-size:1.4rem;
76
- }
77
- }
78
-
79
88
  .Polaris-Button--primary {
80
- background:linear-gradient(to bottom, #6371c7, #5563c1);
81
- border-color:#3f4eae;
82
- box-shadow:inset 0 1px 0 0 #6774c8, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 0 0 transparent;
89
+ background-color:#008060;
90
+ border-color:transparent;
91
+ border-width:0;
83
92
  color:white;
84
- fill:white;
85
93
  }
86
94
 
87
95
  .Polaris-Button--primary:hover {
88
- background:linear-gradient(to bottom, #5c6ac4, #4959bd);
89
- border-color:#3f4eae;
96
+ background-color:#006e52;
97
+ border-color:transparent;
90
98
  color:white;
91
- text-decoration:none;
92
99
  }
93
100
 
94
- .Polaris-Button--primary:focus {
95
- border-color:#202e78;
96
- box-shadow:inset 0 1px 0 0 #6f7bcb, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 0 1px #202e78;
101
+ .Polaris-Button--primary:active {
102
+ background-color:#005e46;
103
+ border-color:transparent;
97
104
  }
98
105
 
99
- .Polaris-Button--primary:active {
100
- background:linear-gradient(to bottom, #3f4eae, #3f4eae);
101
- border-color:#38469b;
102
- box-shadow:inset 0 0 0 0 transparent, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 1px 0 #38469b;
106
+ .Polaris-Button--sizeLarge {
107
+ padding:1.1rem 2.4rem;
103
108
  }
104
109
  </style>
@@ -11,7 +11,7 @@
11
11
 
12
12
  @media (min-width: 30.625em) {
13
13
  .Polaris-Card {
14
- border-radius:3px;
14
+ border-radius:8px;
15
15
  }
16
16
  }
17
17
 
@@ -24,10 +24,10 @@
24
24
  }
25
25
 
26
26
  .Polaris-Card__Section + .Polaris-Card__Section {
27
- border-top:1px solid #dfe3e8;
27
+ border-top:.1rem solid #e4e5e7;
28
28
  }
29
29
 
30
30
  .Polaris-Card__Section--subdued {
31
- background-color:#f9fafb;
31
+ background-color:#fafbfb;
32
32
  }
33
33
  </style>
@@ -11,8 +11,8 @@
11
11
  -ms-flex-align:center;
12
12
  align-items:center;
13
13
  width:100%;
14
- margin:2rem auto 0 auto;
15
- padding:2rem 0;
14
+ margin:0 auto;
15
+ padding:2rem 0 6rem;
16
16
  max-width:99.8rem;
17
17
  }
18
18
 
@@ -24,33 +24,22 @@
24
24
  }
25
25
 
26
26
  .Polaris-EmptyState__Section {
27
- position:relative;
28
27
  display:-webkit-box;
29
28
  display:-ms-flexbox;
30
29
  display:flex;
31
30
  -webkit-box-orient:vertical;
32
- -webkit-box-direction:normal;
33
- -ms-flex-direction:column;
34
- flex-direction:column;
31
+ -webkit-box-direction:reverse;
32
+ -ms-flex-direction:column-reverse;
33
+ flex-direction:column-reverse;
35
34
  -webkit-box-flex:1;
36
35
  -ms-flex:1 1 auto;
37
36
  flex:1 1 auto;
37
+ -webkit-box-align:center;
38
+ -ms-flex-align:center;
39
+ align-items:center;
38
40
  width:100%;
39
41
  }
40
42
 
41
- @media (min-width: 46.5em) {
42
- .Polaris-EmptyState__Section {
43
- left:2rem;
44
- -webkit-box-orient:horizontal;
45
- -webkit-box-direction:normal;
46
- -ms-flex-direction:row;
47
- flex-direction:row;
48
- -webkit-box-align:center;
49
- -ms-flex-align:center;
50
- align-items:center;
51
- }
52
- }
53
-
54
43
  .Polaris-EmptyState__ImageContainer,
55
44
  .Polaris-EmptyState__DetailsContainer {
56
45
  -webkit-box-flex:1;
@@ -58,6 +47,7 @@
58
47
  flex:1 1 auto;
59
48
  padding:0;
60
49
  margin:0;
50
+ text-align:center;
61
51
  }
62
52
 
63
53
  @media (min-width: 46.5em) {
@@ -68,37 +58,32 @@
68
58
  }
69
59
  }
70
60
 
71
- @media (max-width: 30.625em) {
72
- .Polaris-EmptyState__ImageContainer,
73
- .Polaris-EmptyState__DetailsContainer {
74
- overflow-x:hidden;
75
- }
76
- }
77
-
78
61
  .Polaris-EmptyState__Details {
79
- position:relative;
80
- z-index:10;
81
- padding:0 1.6rem;
82
- width:33.6rem;
83
- }
84
-
85
- @media (min-width: 30.625em) {
86
- .Polaris-EmptyState__Details {
87
- padding:0;
88
- }
62
+ max-width:40rem;
63
+ display:-webkit-box;
64
+ display:-ms-flexbox;
65
+ display: flex;
66
+ -webkit-box-orient:vertical;
67
+ -webkit-box-direction:normal;
68
+ -ms-flex-direction:column;
69
+ flex-direction: column;
70
+ -webkit-box-align:center;
71
+ -ms-flex-align:center;
72
+ align-items: center;
89
73
  }
90
74
 
91
75
  .Polaris-EmptyState__Content {
92
- font-size:1.6rem;
76
+ margin-top: 1.6rem;
77
+ font-size:1.5rem;
93
78
  font-weight:400;
94
- line-height:2.4rem;
95
- color:#637381;
79
+ line-height:2rem;
80
+ color:#6d7175;
81
+ padding-bottom: .8rem;
96
82
  }
97
83
 
98
84
  @media (min-width: 40em) {
99
85
  .Polaris-EmptyState__Content {
100
- font-size:2rem;
101
- line-height:2.8rem;
86
+ font-size:1.4rem;
102
87
  }
103
88
  }
104
89
 
@@ -107,23 +92,7 @@
107
92
  }
108
93
 
109
94
  .Polaris-EmptyState__Image {
110
- display: none;
111
- }
112
-
113
- @media (min-width: 30.625em) {
114
- .Polaris-EmptyState__Image {
115
- display: block;
116
- margin-left:-60%;
117
- margin-top:-30%;
118
- width:200%;
119
- }
120
- }
121
-
122
- @media (min-width: 46.5em) {
123
- .Polaris-EmptyState__Image {
124
- margin-top:0;
125
- margin-left:-90%;
126
- width:200%;
127
- }
95
+ margin: 0;
96
+ width: auto;
128
97
  }
129
98
  </style>
@@ -0,0 +1,56 @@
1
+ <style>
2
+ .Polaris-Label {
3
+ margin-bottom:.4rem;
4
+ }
5
+
6
+ .Polaris-Label__Text {
7
+ -webkit-tap-highlight-color:transparent;
8
+ }
9
+
10
+ .Polaris-TextField {
11
+ position:relative;
12
+ margin-bottom:1.6rem;
13
+ }
14
+
15
+ .Polaris-TextField--InlineError {
16
+ margin-bottom:.4rem;
17
+ }
18
+
19
+ .Polaris-TextField__Input {
20
+ width:100%;
21
+ padding:.5rem 1.2rem;
22
+ border:1px solid #c9cccf;
23
+ border-top-color:#aeb4b9;
24
+ border-radius:4px;
25
+ box-shadow:none;
26
+ line-height:2.4rem;
27
+ }
28
+
29
+ .Polaris-TextField__Input:focus {
30
+ outline:none;
31
+ }
32
+
33
+ .Polaris-TextField__Backdrop:after {
34
+ content:'';
35
+ position:absolute;
36
+ z-index:1;
37
+ top:-.2rem;
38
+ right:-.2rem;
39
+ bottom:-.2rem;
40
+ left:-.2rem;
41
+ display:block;
42
+ pointer-events:none;
43
+ box-shadow:0 0 0 -.2rem #448fff;
44
+ transition:box-shadow .1s cubic-bezier(0.64, 0, 0.35, 1);
45
+ border-radius:5px;
46
+ }
47
+
48
+ .Polaris-TextField__Input:focus~.Polaris-TextField__Backdrop:after {
49
+ box-shadow:0 0 0 .2rem #448fff;
50
+ }
51
+
52
+ .Polaris-InlineError {
53
+ color:#d72c0d;
54
+ margin-bottom:1.6rem;
55
+ }
56
+ </style>
@@ -35,7 +35,7 @@
35
35
  min-height:100%;
36
36
  margin:0;
37
37
  padding:0;
38
- background-color:#f4f6f8;
38
+ background-color:#f6f6f7;
39
39
  }
40
40
 
41
41
  *,
@@ -61,6 +61,10 @@
61
61
  max-width:99.8rem;
62
62
  }
63
63
 
64
+ .Polaris-Page--InstallApp {
65
+ max-width: 70rem;
66
+ }
67
+
64
68
  @media (min-width: 30.625em) {
65
69
  .Polaris-Page {
66
70
  padding:0 2rem;
@@ -73,6 +77,7 @@
73
77
  }
74
78
 
75
79
  .Polaris-Page__Content {
80
+ width: 100%;
76
81
  margin:2rem 0;
77
82
  }
78
83
 
@@ -158,6 +163,16 @@
158
163
  justify-content:flex-end;
159
164
  }
160
165
 
166
+ .Polaris-Stack--distributionTrailingCustomSpacing {
167
+ margin-right:2rem;
168
+ }
169
+
170
+ @media (min-width: 30.625em) {
171
+ .Polaris-Stack--distributionTrailingCustomSpacing {
172
+ margin-right:0;
173
+ }
174
+ }
175
+
161
176
  .Polaris-Stack--vertical {
162
177
  -webkit-box-orient:vertical;
163
178
  -webkit-box-direction:normal;
@@ -16,16 +16,16 @@
16
16
  margin:0;
17
17
  }
18
18
 
19
- .Polaris-DisplayText--sizeMedium {
20
- font-size:2.1rem;
19
+ .Polaris-DisplayText--sizeSmall {
20
+ font-size:1.6rem;
21
21
  font-weight:400;
22
- line-height:2.8rem;
22
+ line-height:2.4rem;
23
23
  }
24
24
 
25
25
  @media (min-width: 40em) {
26
- .Polaris-DisplayText--sizeMedium {
27
- font-size:2.6rem;
28
- line-height:3.2rem;
26
+ .Polaris-DisplayText--sizeSmall {
27
+ font-size:2rem;
28
+ line-height:2.8rem;
29
29
  }
30
30
  }
31
31
 
@@ -14,15 +14,10 @@
14
14
  display: none;
15
15
  }
16
16
  </style>
17
- <script>
18
- window.apiKey = "<%= ShopifyApp.configuration.api_key %>";
19
- window.shopOrigin = "https://<%= @shop %>";
20
- window.returnTo = "<%= params[:return_to] %>"
21
- </script>
22
17
 
23
18
  <%= javascript_include_tag('shopify_app/enable_cookies', crossorigin: 'anonymous', integrity: true) %>
24
19
  </head>
25
- <body>
20
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="https://<%= @shop %>" data-redirect-url="<%= @url %>">
26
21
  <%=
27
22
  content_tag(
28
23
  :div, nil,
@@ -57,7 +52,7 @@
57
52
  </div>
58
53
  </div>
59
54
  <div class="Polaris-Stack__Item">
60
- <div class="Polaris-Stack Polaris-Stack--distributionTrailing">
55
+ <div class="Polaris-Stack Polaris-Stack--distributionTrailing Polaris-Stack--distributionTrailingCustomSpacing">
61
56
  <div class="Polaris-Stack__Item">
62
57
  <button type="button" class="Polaris-Button Polaris-Button--primary" id="AcceptCookies">
63
58
  <span class="Polaris-Button__Content"><span><%= I18n.t('enable_cookies_action') %></span></span>