shopify_app 7.2.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +5 -5
  2. data/.babelrc +5 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
  5. data/.github/probots.yml +2 -0
  6. data/.gitignore +5 -0
  7. data/.nvmrc +1 -0
  8. data/.rubocop.yml +10 -0
  9. data/.ruby-version +1 -0
  10. data/.travis.yml +24 -12
  11. data/CHANGELOG.md +151 -0
  12. data/Gemfile +2 -0
  13. data/README.md +167 -68
  14. data/app/assets/images/storage_access.svg +2 -0
  15. data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
  16. data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
  17. data/app/assets/javascripts/shopify_app/partition_cookies.js +7 -0
  18. data/app/assets/javascripts/shopify_app/redirect.js +33 -0
  19. data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
  20. data/app/assets/javascripts/shopify_app/storage_access.js +121 -0
  21. data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
  22. data/app/assets/javascripts/shopify_app/top_level.js +2 -0
  23. data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
  24. data/app/controllers/shopify_app/authenticated_controller.rb +5 -2
  25. data/app/controllers/shopify_app/callback_controller.rb +92 -0
  26. data/app/controllers/shopify_app/sessions_controller.rb +120 -2
  27. data/app/controllers/shopify_app/webhooks_controller.rb +11 -3
  28. data/app/views/shopify_app/partials/_button_styles.html.erb +104 -0
  29. data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
  30. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +129 -0
  31. data/app/views/shopify_app/partials/_layout_styles.html.erb +167 -0
  32. data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
  33. data/app/views/shopify_app/sessions/enable_cookies.html.erb +59 -0
  34. data/app/views/shopify_app/sessions/new.html.erb +88 -60
  35. data/app/views/shopify_app/sessions/request_storage_access.html.erb +67 -0
  36. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +63 -0
  37. data/app/views/shopify_app/shared/redirect.html.erb +22 -0
  38. data/config/locales/de.yml +22 -0
  39. data/config/locales/en.yml +12 -1
  40. data/config/locales/es.yml +21 -3
  41. data/config/locales/fr.yml +23 -0
  42. data/config/locales/it.yml +22 -0
  43. data/config/locales/ja.yml +17 -0
  44. data/config/locales/nl.yml +21 -0
  45. data/config/locales/pt-BR.yml +22 -0
  46. data/config/locales/zh-CN.yml +16 -0
  47. data/config/locales/zh-TW.yml +17 -0
  48. data/config/routes.rb +11 -1
  49. data/{QUICKSTART.md → docs/Quickstart.md} +26 -23
  50. data/docs/Releasing.md +18 -0
  51. data/docs/Troubleshooting.md +16 -0
  52. data/karma.conf.js +43 -0
  53. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +45 -0
  54. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +10 -0
  55. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +1 -0
  56. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +14 -0
  57. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +1 -5
  58. data/lib/generators/shopify_app/install/install_generator.rb +10 -16
  59. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +13 -9
  60. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +1 -1
  61. data/lib/generators/shopify_app/install/templates/shopify_app.rb +5 -3
  62. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +19 -4
  63. data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +16 -0
  64. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +17 -0
  65. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +42 -0
  66. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +5 -9
  67. data/lib/generators/shopify_app/shop_model/templates/db/migrate/{create_shops.rb → create_shops.erb} +1 -1
  68. data/lib/generators/shopify_app/shop_model/templates/shop.rb +0 -1
  69. data/lib/shopify_app/configuration.rb +27 -8
  70. data/lib/shopify_app/{app_proxy_verification.rb → controller_concerns/app_proxy_verification.rb} +2 -7
  71. data/lib/shopify_app/controller_concerns/embedded_app.rb +19 -0
  72. data/lib/shopify_app/controller_concerns/itp.rb +45 -0
  73. data/lib/shopify_app/controller_concerns/localization.rb +22 -0
  74. data/lib/shopify_app/controller_concerns/login_protection.rb +135 -0
  75. data/lib/shopify_app/{webhook_verification.rb → controller_concerns/webhook_verification.rb} +11 -12
  76. data/lib/shopify_app/engine.rb +10 -0
  77. data/lib/shopify_app/{scripttags_manager_job.rb → jobs/scripttags_manager_job.rb} +2 -2
  78. data/lib/shopify_app/{webhooks_manager_job.rb → jobs/webhooks_manager_job.rb} +0 -0
  79. data/lib/shopify_app/{scripttags_manager.rb → managers/scripttags_manager.rb} +24 -8
  80. data/lib/shopify_app/{webhooks_manager.rb → managers/webhooks_manager.rb} +1 -1
  81. data/lib/shopify_app/session/in_memory_session_store.rb +27 -0
  82. data/lib/shopify_app/{shopify_session_repository.rb → session/session_repository.rb} +0 -0
  83. data/lib/shopify_app/{session_storage.rb → session/session_storage.rb} +9 -0
  84. data/lib/shopify_app/utils.rb +2 -2
  85. data/lib/shopify_app/version.rb +1 -1
  86. data/lib/shopify_app.rb +21 -16
  87. data/package-lock.json +23 -0
  88. data/package.json +28 -0
  89. data/service.yml +7 -0
  90. data/shipit.rubygems.yml +2 -0
  91. data/shopify_app.gemspec +6 -5
  92. data/translation.yml +7 -0
  93. data/webpack.config.js +24 -0
  94. data/yarn.lock +4594 -0
  95. metadata +92 -35
  96. data/Gemfile.rails50 +0 -5
  97. data/Gemfile.ruby22 +0 -6
  98. data/Gemfile.ruby22.rails50 +0 -9
  99. data/RELEASING +0 -13
  100. data/lib/generators/shopify_app/install/templates/shopify_session_repository.rb +0 -23
  101. data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +0 -7
  102. data/lib/shopify_app/in_memory_session_store.rb +0 -25
  103. data/lib/shopify_app/login_protection.rb +0 -103
  104. data/lib/shopify_app/sessions_concern.rb +0 -101
  105. data/lib/shopify_app/shop.rb +0 -15
@@ -0,0 +1,167 @@
1
+ <style>
2
+ html,
3
+ body {
4
+ min-height:100%;
5
+ height:100%;
6
+ font-size:1.5rem;
7
+ font-weight:400;
8
+ line-height:2rem;
9
+ text-transform:initial;
10
+ letter-spacing:initial;
11
+ font-weight:400;
12
+ color:#212b36;
13
+ font-family:-apple-system, BlinkMacSystemFont, San Francisco, Roboto, Segoe UI, Helvetica Neue, sans-serif;
14
+ }
15
+
16
+ @media (min-width: 40em) {
17
+ html,
18
+ body {
19
+ font-size:1.4rem;
20
+ }
21
+ }
22
+
23
+ html {
24
+ position:relative;
25
+ font-size:62.5%;
26
+ -webkit-font-smoothing:antialiased;
27
+ -moz-osx-font-smoothing:grayscale;
28
+ -webkit-text-size-adjust:100%;
29
+ -ms-text-size-adjust:100%;
30
+ text-size-adjust:100%;
31
+ text-rendering:optimizeLegibility;
32
+ }
33
+
34
+ body {
35
+ min-height:100%;
36
+ margin:0;
37
+ padding:0;
38
+ background-color:#f4f6f8;
39
+ }
40
+
41
+ *,
42
+ *::before,
43
+ *::after{
44
+ box-sizing:border-box; }
45
+
46
+ h1,
47
+ h2,
48
+ h3,
49
+ h4,
50
+ h5,
51
+ h6,
52
+ p {
53
+ margin:0;
54
+ font-size:1em;
55
+ font-weight:400;
56
+ }
57
+
58
+ .Polaris-Page {
59
+ margin:0 auto;
60
+ padding:0;
61
+ max-width:99.8rem;
62
+ }
63
+
64
+ @media (min-width: 30.625em) {
65
+ .Polaris-Page {
66
+ padding:0 2rem;
67
+ }
68
+ }
69
+ @media (min-width: 46.5em) {
70
+ .Polaris-Page {
71
+ padding:0 3.2rem;
72
+ }
73
+ }
74
+
75
+ .Polaris-Page__Content {
76
+ margin:2rem 0;
77
+ }
78
+
79
+ @media (min-width: 46.5em) {
80
+ .Polaris-Page__Content {
81
+ margin-top:2rem;
82
+ }
83
+ }
84
+
85
+ @media (min-width: 46.5em) {
86
+ .Polaris-Page {
87
+ display: flex;
88
+ justify-content: center;
89
+ align-items: center;
90
+ height: 100vh;
91
+ }
92
+ }
93
+
94
+ .Polaris-Layout {
95
+ display:-webkit-box;
96
+ display:-ms-flexbox;
97
+ display:flex;
98
+ -ms-flex-wrap:wrap;
99
+ flex-wrap:wrap;
100
+ -webkit-box-pack:center;
101
+ -ms-flex-pack:center;
102
+ justify-content:center;
103
+ -webkit-box-align:start;
104
+ -ms-flex-align:start;
105
+ align-items:flex-start;
106
+ margin-top:-2rem;
107
+ margin-left:-2rem;
108
+ }
109
+
110
+ .Polaris-Layout__Section {
111
+ -webkit-box-flex:2;
112
+ -ms-flex:2 2 48rem;
113
+ flex:2 2 48rem;
114
+ min-width:51%;
115
+ }
116
+
117
+ .Polaris-Layout__Section--fullWidth {
118
+ -webkit-box-flex:1;
119
+ -ms-flex:1 1 100%;
120
+ flex:1 1 100%;
121
+ }
122
+
123
+ .Polaris-Layout__Section {
124
+ max-width:calc(100% - 2rem);
125
+ margin-top:2rem;
126
+ margin-left:2rem;
127
+ }
128
+
129
+ .Polaris-Stack {
130
+ margin-top:-1.6rem;
131
+ margin-left:-1.6rem;
132
+ display:-webkit-box;
133
+ display:-ms-flexbox;
134
+ display:flex;
135
+ -ms-flex-wrap:wrap;
136
+ flex-wrap:wrap;
137
+ -webkit-box-align:stretch;
138
+ -ms-flex-align:stretch;
139
+ align-items:stretch;
140
+ }
141
+
142
+ .Polaris-Stack > .Polaris-Stack__Item {
143
+ margin-top:1.6rem;
144
+ margin-left:1.6rem;
145
+ max-width:calc(100% - 1.6rem);
146
+ }
147
+
148
+ .Polaris-Stack__Item {
149
+ -webkit-box-flex:0;
150
+ -ms-flex:0 0 auto;
151
+ flex:0 0 auto;
152
+ min-width:0;
153
+ }
154
+
155
+ .Polaris-Stack--distributionTrailing {
156
+ -webkit-box-pack:end;
157
+ -ms-flex-pack:end;
158
+ justify-content:flex-end;
159
+ }
160
+
161
+ .Polaris-Stack--vertical {
162
+ -webkit-box-orient:vertical;
163
+ -webkit-box-direction:normal;
164
+ -ms-flex-direction:column;
165
+ flex-direction:column;
166
+ }
167
+ </style>
@@ -0,0 +1,35 @@
1
+ <style>
2
+ .Polaris-Heading {
3
+ font-size:1.7rem;
4
+ font-weight:600;
5
+ line-height:2.4rem;
6
+ margin:0;
7
+ }
8
+
9
+ @media (min-width: 40em) {
10
+ .Polaris-Heading {
11
+ font-size:1.6rem;
12
+ }
13
+ }
14
+
15
+ .Polaris-DisplayText {
16
+ margin:0;
17
+ }
18
+
19
+ .Polaris-DisplayText--sizeMedium {
20
+ font-size:2.1rem;
21
+ font-weight:400;
22
+ line-height:2.8rem;
23
+ }
24
+
25
+ @media (min-width: 40em) {
26
+ .Polaris-DisplayText--sizeMedium {
27
+ font-size:2.6rem;
28
+ line-height:3.2rem;
29
+ }
30
+ }
31
+
32
+ .Polaris-TextContainer > * + * {
33
+ margin-top:1.6rem;
34
+ }
35
+ </style>
@@ -0,0 +1,59 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <base target="_top">
6
+ <title>Redirecting…</title>
7
+ <%= render 'shopify_app/partials/layout_styles' %>
8
+ <%= render 'shopify_app/partials/typography_styles' %>
9
+ <%= render 'shopify_app/partials/card_styles' %>
10
+ <%= render 'shopify_app/partials/button_styles' %>
11
+ <style>
12
+ #CookiePartitionPrompt {
13
+ display: none;
14
+ }
15
+ </style>
16
+ <script>
17
+ window.apiKey = "<%= ShopifyApp.configuration.api_key %>";
18
+ window.shopOrigin = "https://<%= @shop %>";
19
+ </script>
20
+
21
+ <%= javascript_include_tag('shopify_app/enable_cookies', crossorigin: 'anonymous', integrity: true) %>
22
+ </head>
23
+ <body>
24
+ <main id="CookiePartitionPrompt">
25
+ <div class="Polaris-Page">
26
+ <div class="Polaris-Page__Content">
27
+ <div class="Polaris-Layout">
28
+ <div class="Polaris-Layout__Section">
29
+ <div class="Polaris-Stack Polaris-Stack--vertical">
30
+ <div class="Polaris-Stack__Item">
31
+ <div class="Polaris-Card">
32
+ <div class="Polaris-Card__Header">
33
+ <h1 class="Polaris-Heading"><%= I18n.t('enable_cookies_heading', app: ShopifyApp.configuration.application_name) %></h1>
34
+ </div>
35
+ <div class="Polaris-Card__Section">
36
+ <p><%= I18n.t('enable_cookies_body', app: ShopifyApp.configuration.application_name) %></p>
37
+ </div>
38
+ <div class="Polaris-Card__Section Polaris-Card__Section--subdued">
39
+ <p><%= I18n.t('enable_cookies_footer') %></p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div class="Polaris-Stack__Item">
44
+ <div class="Polaris-Stack Polaris-Stack--distributionTrailing">
45
+ <div class="Polaris-Stack__Item">
46
+ <button type="button" class="Polaris-Button Polaris-Button--primary" id="AcceptCookies">
47
+ <span class="Polaris-Button__Content"><span><%= I18n.t('enable_cookies_action') %></span></span>
48
+ </button>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </main>
58
+ </body>
59
+ </html>
@@ -3,92 +3,120 @@
3
3
  <head>
4
4
  <title>Shopify App — Installation</title>
5
5
 
6
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+
6
9
  <style>
7
- html, body { padding: 0; margin: 0; }
10
+ * {
11
+ -moz-box-sizing: border-box;
12
+ -webkit-box-sizing: border-box;
13
+ box-sizing: border-box;
14
+ }
8
15
 
9
16
  body {
10
- font-family: "ProximaNovaLight", "Helvetica Neue", Helvetica, Arial, sans-serif;
11
- background-color: #f2f7fa;
17
+ padding: 2.5em 0;
18
+ color: #212b37;
19
+ font-family: -apple-system,BlinkMacSystemFont,San Francisco,Roboto,Segoe UI,Helvetica Neue,sans-serif;
12
20
  }
13
21
 
14
- h1 {
15
- font-weight: 300;
16
- font-size: 40px;
17
- margin-bottom: 10px;
22
+ .container {
23
+ width: 100%;
24
+ text-align: center;
25
+ margin-left: auto;
26
+ margin-right: auto;
18
27
  }
19
28
 
20
- .subhead {
21
- font-size: 17px;
22
- line-height: 32px;
23
- font-weight: 300;
24
- color: #969A9C;
29
+ @media screen and (min-width: 510px) {
30
+ .container {
31
+ width: 510px;
32
+ }
25
33
  }
26
34
 
27
- input {
28
- width: 300px;
29
- height: 50px;
30
- padding: 10px;
31
- border: 1px solid #479CCf;
32
- color: #575757;
33
- background-color: #ffffff;
34
- box-sizing: border-box;
35
- border-radius: 4px 0 0 4px;
36
- font-size: 18px;
37
- float: left;
35
+ .title {
36
+ font-size: 1.5em;
37
+ margin: 2em auto;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ word-break: break-all;
38
42
  }
39
43
 
40
- button {
41
- color: #ffffff;
42
- background-color: #3793cb;
43
- width: 100px;
44
- height: 50px;
45
- padding: 10px 20px 10px 20px;
46
- box-sizing: border-box;
47
- border: none;
48
- text-shadow: 0 1px 0 #3188bc;
49
- font-size: 18px;
50
- cursor: pointer;
51
- border-radius: 0 4px 4px 0;
52
- float: right;
44
+ .subtitle {
45
+ font-size: 0.8em;
46
+ font-weight: 500;
47
+ color: #64737f;
48
+ line-height: 2em;
53
49
  }
54
50
 
55
- button:hover {
56
- background-color: #479CCf;
51
+ .error {
52
+ line-height: 1em;
53
+ padding: 0.5em;
54
+ color: red;
57
55
  }
58
56
 
59
- form {
60
- display: block;
57
+ input.marketing-input {
58
+ width: 100%;
59
+ height: 52px;
60
+ padding: 0 15px;
61
+ box-shadow: 0 0 0 1px #ddd;
62
+ border: 0;
63
+ border-radius: 5px;
64
+ background-color: #fff;
65
+ font-size: 1em;
66
+ margin-bottom: 15px;
61
67
  }
62
68
 
63
- .container {
69
+ input.marketing-input:focus {
70
+ color: #000;
71
+ outline: 0;
72
+ box-shadow: 0 0 0 2px #5e6ebf;
73
+ }
74
+
75
+ button.marketing-button {
76
+ display: inline-block;
77
+ width: 100%;
78
+ padding: 1.0625em 1.875em;
79
+ background-color: #5e6ebf;
80
+ color: #fff;
81
+ font-weight: 700;
82
+ font-size: 1em;
64
83
  text-align: center;
65
- margin-top: 100px;
66
- padding: 20px;
84
+ outline: none;
85
+ border: 0 solid transparent;
86
+ border-radius: 5px;
87
+ cursor: pointer;
67
88
  }
68
89
 
69
- .container__form {
70
- width: 400px;
71
- margin: auto;
90
+ button.marketing-button:hover {
91
+ background: linear-gradient(to bottom, #5c6ac4, #4959bd);
92
+ border-color: #3f4eae;
93
+ }
94
+
95
+ button.marketing-button:focus {
96
+ box-shadow: 0 0 0.1875em 0.1875em rgba(94,110,191,0.5);
97
+ background-color: #223274;
98
+ color: #fff;
72
99
  }
73
100
  </style>
74
101
  </head>
75
102
  <body>
76
103
 
77
104
  <main class="container" role="main">
78
- <header>
79
- <% application_name = ShopifyApp.configuration.application_name %>
80
- <h1><%= application_name.presence || 'Shopify App – Installation' %></h1>
81
- <p class="subhead">
82
- <label for="shop">Enter your shop domain to log in or install this app.</label>
83
- </p>
84
- </header>
85
-
86
- <div class="container__form">
87
- <form method="GET" action="login">
88
- <input type="text" name="shop" id="shop" placeholder="example.myshopify.com"/>
89
- <button type="submit">Install</button>
90
- </form>
91
- </div>
105
+ <% application_name = ShopifyApp.configuration.application_name %>
106
+ <h3 class="title">
107
+ <%= application_name.presence || 'Shopify App – Installation' %>
108
+ </h3>
109
+ <p class="subtitle">
110
+ <label for="shop">Enter your shop domain to log in or install this app.</label>
111
+ </p>
112
+
113
+ <%= form_tag login_path do %>
114
+ <% if flash[:error] %>
115
+ <div class="error"><%= flash[:error] %></div>
116
+ <% end %>
117
+ <input id="shop" name="shop" type="text" autofocus="autofocus" placeholder="example.myshopify.com" class="marketing-input">
118
+ <button type="submit" class="marketing-button">Install</button>
119
+ <% end %>
92
120
  </main>
93
121
 
94
122
  </body>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <base target="_top">
6
+ <title>Redirecting…</title>
7
+ <%= render 'shopify_app/partials/layout_styles' %>
8
+ <%= render 'shopify_app/partials/typography_styles' %>
9
+ <%= render 'shopify_app/partials/card_styles' %>
10
+ <%= render 'shopify_app/partials/button_styles' %>
11
+ <style>
12
+ #RequestStorageAccess {
13
+ display: none;
14
+ }
15
+ </style>
16
+ </head>
17
+ <body>
18
+ <%=
19
+ content_tag(:div, nil,
20
+ id: 'redirection-target',
21
+ data: {
22
+ target: {
23
+ myshopifyUrl: "https://#{current_shopify_domain}",
24
+ hasStorageAccessUrl: "#{has_storage_access_url}",
25
+ doesNotHaveStorageAccessUrl: "#{does_not_have_storage_access_url}",
26
+ appHomeUrl: "#{app_home_url}"
27
+ },
28
+ },
29
+ )
30
+ %>
31
+ <main id="RequestStorageAccess">
32
+ <div class="Polaris-Page">
33
+ <div class="Polaris-Page__Content">
34
+ <div class="Polaris-Layout">
35
+ <div class="Polaris-Layout__Section">
36
+ <div class="Polaris-Stack Polaris-Stack--vertical">
37
+ <div class="Polaris-Stack__Item">
38
+ <div class="Polaris-Card">
39
+ <div class="Polaris-Card__Header">
40
+ <h1 class="Polaris-Heading"><%= I18n.t('request_storage_access_heading', app: ShopifyApp.configuration.application_name) %></h1>
41
+ </div>
42
+ <div class="Polaris-Card__Section">
43
+ <p><%= I18n.t('request_storage_access_body', app: ShopifyApp.configuration.application_name) %></p>
44
+ </div>
45
+ <div class="Polaris-Card__Section Polaris-Card__Section--subdued">
46
+ <p><%= I18n.t('request_storage_access_footer') %></p>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="Polaris-Stack__Item">
51
+ <div class="Polaris-Stack Polaris-Stack--distributionTrailing">
52
+ <div class="Polaris-Stack__Item">
53
+ <button type="button" class="Polaris-Button Polaris-Button--primary" id="TriggerAllowCookiesPrompt">
54
+ <span class="Polaris-Button__Content"><span><%= I18n.t('request_storage_access_action') %></span></span>
55
+ </button>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </main>
65
+ <%= javascript_include_tag('shopify_app/request_storage_access', crossorigin: 'anonymous', integrity: true) %>
66
+ </body>
67
+ </html>
@@ -0,0 +1,63 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <base target="_top">
6
+ <title>Redirecting…</title>
7
+ <%= render 'shopify_app/partials/layout_styles' %>
8
+ <%= render 'shopify_app/partials/typography_styles' %>
9
+ <%= render 'shopify_app/partials/button_styles' %>
10
+ <%= render 'shopify_app/partials/empty_state_styles' %>
11
+ <style>
12
+ #TopLevelInteractionContent {
13
+ display: none;
14
+ }
15
+ </style>
16
+
17
+ <script>
18
+ window.apiKey = "<%= ShopifyApp.configuration.api_key %>";
19
+ window.shopOrigin = "https://<%= @shop %>";
20
+ window.redirectUrl = "<%= @url %>";
21
+ </script>
22
+
23
+ <%= javascript_include_tag('shopify_app/top_level', crossorigin: 'anonymous', integrity: true) %>
24
+ </head>
25
+ <body>
26
+ <main id="TopLevelInteractionContent">
27
+ <div class="Polaris-Page">
28
+ <div class="Polaris-Page__Content">
29
+ <div class="Polaris-Layout">
30
+ <div class="Polaris-Layout__Section">
31
+ <div class="Polaris-Stack Polaris-Stack--vertical">
32
+ <div class="Polaris-Stack__Item">
33
+ <div class="Polaris-EmptyState">
34
+ <div class="Polaris-EmptyState__Section">
35
+ <div class="Polaris-EmptyState__DetailsContainer">
36
+ <div class="Polaris-EmptyState__Details">
37
+ <div class="Polaris-TextContainer">
38
+ <h1 class="Polaris-DisplayText Polaris-DisplayText--sizeMedium"><%= I18n.t('top_level_interaction_heading', app: ShopifyApp.configuration.application_name) %></h1>
39
+ <div class="Polaris-EmptyState__Content">
40
+ <p><%= I18n.t('top_level_interaction_body', app: ShopifyApp.configuration.application_name) %></p>
41
+ </div>
42
+ </div>
43
+ <div class="Polaris-EmptyState__Actions">
44
+ <div class="Polaris-Stack Polaris-Stack--alignmentCenter">
45
+ <div class="Polaris-Stack__Item"><button type="button" id="TopLevelInteractionButton" class="Polaris-Button Polaris-Button--primary Polaris-Button--sizeLarge"><span class="Polaris-Button__Content"><span class="Polaris-Button__Icon"></span><span><%= I18n.t('top_level_interaction_action') %></span></span></button></div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="Polaris-EmptyState__ImageContainer">
51
+ <%= image_tag 'storage_access.svg', role: "presentation", alt: "", class: "Polaris-EmptyState__Image" %>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </main>
62
+ </body>
63
+ </html>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <base target="_top">
6
+ <title>Redirecting…</title>
7
+ <%= javascript_include_tag('shopify_app/redirect', crossorigin: 'anonymous', integrity: true) %>
8
+ </head>
9
+ <body>
10
+ <%=
11
+ content_tag(:div, nil,
12
+ id: 'redirection-target',
13
+ data: {
14
+ target: {
15
+ myshopifyUrl: "https://#{current_shopify_domain}",
16
+ url: url,
17
+ },
18
+ },
19
+ )
20
+ %>
21
+ </body>
22
+ </html>
@@ -0,0 +1,22 @@
1
+ ---
2
+ de:
3
+ logged_out: Erfolgreich ausgelogt
4
+ could_not_log_in: Shopify Store Login fehlgeschlagen
5
+ invalid_shop_url: Ungültige Shop-Domain
6
+ enable_cookies_heading: Cookies von %{app} aktivieren
7
+ enable_cookies_body: Sie müssen Cookies in diesem Browser manuell aktivieren, um
8
+ %{app} in Shopify verwenden zu können.
9
+ enable_cookies_footer: Mithilfe von Cookies kann die App Sie authentifizieren, indem
10
+ Ihre Einstellungen und persönlichen Informationen vorübergehend gespeichert werden.
11
+ Sie laufen nach 30 Tagen ab.
12
+ enable_cookies_action: Cookies aktivieren
13
+ top_level_interaction_heading: Ihr Browser muss %{app} authentifizieren
14
+ top_level_interaction_body: Ihr Browser verlangt, dass Apps von Drittanbietern wie
15
+ %{app} Sie um Zugriff auf Cookies bitten, bevor Shopify sie für Sie öffnen kann.
16
+ top_level_interaction_action: Weiter
17
+ request_storage_access_heading: "%{app} braucht Zugriff auf Cookies"
18
+ request_storage_access_body: Damit kann die App Sie authentifizieren, indem Ihre
19
+ Einstellungen und persönlichen Informationen vorübergehend gespeichert werden.
20
+ Klicken Sie auf "Weiter" und erlauben Sie den Cookies, die App zu verwenden.
21
+ request_storage_access_footer: Cookies laufen nach 30 Tagen ab.
22
+ request_storage_access_action: Weiter
@@ -1,4 +1,15 @@
1
1
  en:
2
- logged_in: 'Logged In'
3
2
  logged_out: 'Successfully logged out'
4
3
  could_not_log_in: 'Could not log in to Shopify store'
4
+ invalid_shop_url: 'Invalid shop domain'
5
+ enable_cookies_heading: "Enable cookies from %{app}"
6
+ enable_cookies_body: "You must manually enable cookies in this browser in order to use %{app} within Shopify."
7
+ enable_cookies_footer: 'Cookies let the app authenticate you by temporarily storing your preferences and personal information. They expire after 30 days.'
8
+ enable_cookies_action: 'Enable cookies'
9
+ top_level_interaction_heading: "Your browser needs to authenticate %{app}"
10
+ top_level_interaction_body: "Your browser requires third-party apps like %{app} to ask you for access to cookies before Shopify can open it for you."
11
+ top_level_interaction_action: 'Continue'
12
+ request_storage_access_heading: "%{app} needs access to cookies"
13
+ request_storage_access_body: "This lets the app authenticate you by temporarily storing your personal information. Click continue and allow cookies to use the app."
14
+ request_storage_access_footer: 'Cookies expire after 30 days.'
15
+ request_storage_access_action: 'Continue'
@@ -1,4 +1,22 @@
1
+ ---
1
2
  es:
2
- logged_in: 'Has iniciado sesión'
3
- logged_out: 'Cerrar sesión'
4
- could_not_log_in: 'No se pudo iniciar sesión en tu tienda de Shopify'
3
+ logged_out: Cerrar sesión
4
+ could_not_log_in: No se pudo iniciar sesión en tu tienda de Shopify
5
+ invalid_shop_url: Dominio de tienda inválido
6
+ enable_cookies_heading: Habilitar cookies de %{app}
7
+ enable_cookies_body: Debes habilitar manualmente las cookies en este navegador para
8
+ usar %{app} en Shopify.
9
+ enable_cookies_footer: Las cookies permiten que la aplicación te autentique almacenando
10
+ temporalmente tus preferencias y datos personales. Las cookies expiran al cabo
11
+ de 30 días.
12
+ enable_cookies_action: Habilitar cookies
13
+ top_level_interaction_heading: Tu navegador necesita autenticar %{app}
14
+ top_level_interaction_body: Tu navegador requiere aplicaciones externas como %{app}
15
+ para solicitarte acceso a cookies antes de que Shopify pueda abrirlo por ti.
16
+ top_level_interaction_action: Continuar
17
+ request_storage_access_heading: "%{app} necesita acceso a las cookies"
18
+ request_storage_access_body: Esto permite que la aplicación te autentique almacenando
19
+ temporalmente tus datos personales. Haz clic en continuar y permite que las cookies
20
+ utilicen la aplicación.
21
+ request_storage_access_footer: Las cookies expiran a los 30 días.
22
+ request_storage_access_action: Continuar