@itcase/storybook-config 1.0.25 → 1.0.27

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.
package/config/status.js CHANGED
@@ -3,14 +3,17 @@ const STATUS = {
3
3
  emailDevelopServer: {
4
4
  color: '#ffffff',
5
5
  background: 'red',
6
+ description: 'Story use template from local django-server',
6
7
  },
7
8
  emailRemoteServer: {
8
9
  color: '#ffffff',
9
10
  background: 'green',
11
+ description: 'Story use template from remote server',
10
12
  },
11
- emailServerUrlNoAvaiable: {
13
+ emailServerUrlNotSet: {
12
14
  color: '#ffffff',
13
15
  background: 'red',
16
+ description: 'Please set EMAIL_URL in .env.local',
14
17
  },
15
18
  },
16
19
  }
@@ -24,7 +24,7 @@ function EmailTemplatePreview(props) {
24
24
  var emailPreviewIframe = document.getElementById('emailPreview');
25
25
  var loaded = function loaded() {
26
26
  var email = emailPreviewIframe.getElementsByClassName('email-body').length;
27
- if (!email && process.env.EMAIL_URL) {
27
+ if (!email && process.env.EMAIL_URL && process.env.EMAIL_URL.includes('http://')) {
28
28
  alert('Need to run the backend server to display email templates, use: python manage.py runserver');
29
29
  }
30
30
  };
@@ -22,7 +22,7 @@ function EmailTemplatePreview(props) {
22
22
  var emailPreviewIframe = document.getElementById('emailPreview');
23
23
  var loaded = function loaded() {
24
24
  var email = emailPreviewIframe.getElementsByClassName('email-body').length;
25
- if (!email && process.env.EMAIL_URL) {
25
+ if (!email && process.env.EMAIL_URL && process.env.EMAIL_URL.includes('http://')) {
26
26
  alert('Need to run the backend server to display email templates, use: python manage.py runserver');
27
27
  }
28
28
  };
@@ -3,14 +3,17 @@ const STATUS = {
3
3
  emailDevelopServer: {
4
4
  color: '#ffffff',
5
5
  background: 'red',
6
+ description: 'Story use template from local django-server',
6
7
  },
7
8
  emailRemoteServer: {
8
9
  color: '#ffffff',
9
10
  background: 'green',
11
+ description: 'Story use template from remote server',
10
12
  },
11
- emailServerUrlNoAvaiable: {
13
+ emailServerUrlNotSet: {
12
14
  color: '#ffffff',
13
15
  background: 'red',
16
+ description: 'Please set EMAIL_URL in .env.local',
14
17
  },
15
18
  },
16
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/storybook-config",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {