@punch-in/strapi-admin 1.0.1 → 1.0.5

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/admin/src/app.js CHANGED
@@ -166,7 +166,7 @@ window.strapi = Object.assign(window.strapi || {}, {
166
166
  node: MODE || 'host',
167
167
  env: NODE_ENV,
168
168
  remoteURL,
169
- backendURL: BACKEND_URL === '/' ? window.location.origin : BACKEND_URL,
169
+ backendURL: 'https://' + window.location.hostname.replace('-admin',''),
170
170
  notification: {
171
171
  // New notification api
172
172
  toggle: config => {
@@ -27,9 +27,27 @@ const ApplicationInfosPage = () => {
27
27
  selectLatestRealase(state)
28
28
  );
29
29
 
30
- const currentPlan = appInfos.communityEdition
31
- ? 'app.components.UpgradePlanModal.text-ce'
32
- : 'app.components.UpgradePlanModal.text-ee';
30
+ let currentPlan =
31
+ switch (appInfos.maxUsers) {
32
+ case 100:
33
+ currentPlan = 'app.components.CurrentPlanModal.giant';
34
+ break;
35
+ case 50:
36
+ currentPlan = 'app.components.CurrentPlanModal.large';
37
+ break;
38
+ case 30:
39
+ currentPlan = 'app.components.CurrentPlanModal.medium';
40
+ break;
41
+ case 10:
42
+ currentPlan = 'app.components.CurrentPlanModal.light';
43
+ break;
44
+ default:
45
+ currentPlan = 'app.components.CurrentPlanModal.giant';
46
+ break;
47
+ }
48
+ // const currentPlan = appInfos.communityEdition
49
+ // ? 'app.components.UpgradePlanModal.text-ce'
50
+ // : 'app.components.UpgradePlanModal.text-ee';
33
51
 
34
52
  const headerProps = {
35
53
  title: { label: formatMessage({ id: 'Settings.application.title' }) },
@@ -67,7 +85,7 @@ const ApplicationInfosPage = () => {
67
85
  content={`v${appInfos.strapiVersion}`}
68
86
  />
69
87
  <Detail
70
- link={{ label: pricingLabel, href: 'https://strapi.io/pricing' }}
88
+ link={{ label: pricingLabel, href: 'https://www.punch-in.co.uk/#pricing' }}
71
89
  title={editionTitle}
72
90
  content={formatMessage({ id: currentPlan })}
73
91
  />
@@ -5,31 +5,20 @@
5
5
 
6
6
  import React, { memo } from 'react';
7
7
  import PropTypes from 'prop-types';
8
-
9
- import Gh from '../../assets/images/social_gh.png';
10
- import Discord from '../../assets/images/social_discord.png';
11
- import Twitter from '../../assets/images/social_twitter.png';
12
- import Reddit from '../../assets/images/social_reddit.png';
13
- import Strapi from '../../assets/images/social_strapi.png';
8
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
14
9
 
15
10
  import { SocialLinkWrapper } from './components';
16
11
 
17
12
  function getSrc(name) {
18
13
  switch (name) {
19
- case 'GitHub':
20
- return Gh;
21
- case 'Reddit':
22
- return Reddit;
23
- case 'Discord':
24
- return Discord;
25
- case 'Twitter':
26
- return Twitter;
27
- case 'Blog':
28
- case 'Forum':
14
+ case 'Facebook':
15
+ return (<FontAwesomeIcon icon="fa-brands fa-square-facebook" size="lg" />);
16
+ case 'LinkedIn':
17
+ return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" />);
29
18
  case 'Careers':
30
- return Strapi;
19
+ return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" color="#4199e1" />);
31
20
  default:
32
- return Strapi;
21
+ return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" />) />;
33
22
  }
34
23
  }
35
24
 
@@ -13,51 +13,34 @@ import { useModels } from '../../hooks';
13
13
 
14
14
  import useFetch from './hooks';
15
15
  import { ALink, Block, Container, LinkWrapper, P, Wave, Separator } from './components';
16
- import BlogPost from './BlogPost';
17
16
  import SocialLink from './SocialLink';
18
17
 
19
18
  const FIRST_BLOCK_LINKS = [
20
19
  {
21
20
  link:
22
- 'https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html#_4-create-a-category-content-type',
21
+ 'https://www.punch-in.co.uk/#docs',
23
22
  contentId: 'app.components.BlockLink.documentation.content',
24
23
  titleId: 'app.components.BlockLink.documentation',
25
24
  },
26
25
  {
27
- link: 'https://github.com/strapi/foodadvisor',
28
- contentId: 'app.components.BlockLink.code.content',
29
- titleId: 'app.components.BlockLink.code',
26
+ link: 'https://www.punch-in.co.uk/faq',
27
+ contentId: 'app.components.BlockLink.documentation.faq',
28
+ titleId: 'app.components.BlockLink.faq',
30
29
  },
31
30
  ];
32
31
 
33
32
  const SOCIAL_LINKS = [
34
33
  {
35
- name: 'GitHub',
36
- link: 'https://github.com/strapi/strapi/',
34
+ name: 'LinkedIn',
35
+ link: 'https://www.linkedin.com/company/punch-in-uk/',
37
36
  },
38
37
  {
39
- name: 'Discord',
40
- link: 'https://discord.strapi.io/',
41
- },
42
- {
43
- name: 'Reddit',
44
- link: 'https://www.reddit.com/r/Strapi/',
45
- },
46
- {
47
- name: 'Twitter',
48
- link: 'https://twitter.com/strapijs',
49
- },
50
- {
51
- name: 'Blog',
52
- link: 'https://strapi.io/blog',
53
- },
54
- {
55
- name: 'Forum',
56
- link: 'https://forum.strapi.io',
38
+ name: 'Facebook',
39
+ link: 'https://www.facebook.com/punch.in.uk',
57
40
  },
58
41
  {
59
42
  name: 'Careers',
60
- link: 'https://strapi.io/careers',
43
+ link: 'https://www.punch-in.co.uk/careers',
61
44
  },
62
45
  ];
63
46
 
@@ -152,30 +135,6 @@ const HomePage = ({ history: { push } }) => {
152
135
  }}
153
136
  </FormattedMessage>
154
137
  )}
155
- {hasAlreadyCreatedContentTypes && (
156
- <div style={{ marginTop: isLoading ? 60 : 50 }}>
157
- {posts.map((post, index) => (
158
- <BlogPost
159
- {...post}
160
- key={post.link}
161
- isFirst={index === 0}
162
- isLoading={isLoading}
163
- error={error}
164
- />
165
- ))}
166
- </div>
167
- )}
168
- <FormattedMessage id={linkProps.id}>
169
- {msg => (
170
- <ALink
171
- rel="noopener noreferrer"
172
- {...linkProps}
173
- style={{ verticalAlign: ' bottom', marginBottom: 5 }}
174
- >
175
- {msg}
176
- </ALink>
177
- )}
178
- </FormattedMessage>
179
138
  <Separator style={{ marginTop: 37, marginBottom: 36 }} />
180
139
  <div style={{ display: 'flex', justifyContent: 'space-between' }}>
181
140
  {FIRST_BLOCK_LINKS.map((data, index) => {
@@ -183,6 +183,10 @@
183
183
  "app.components.Button.cancel": "Cancel",
184
184
  "app.components.Button.reset": "Reset",
185
185
  "app.components.Button.save": "Save",
186
+ "app.components.CurrentPlanModal.giant":"Giant (max 100 users)",
187
+ "app.components.CurrentPlanModal.large":"Large (max 50 users)",
188
+ "app.components.CurrentPlanModal.medium":"Medium (max 30 users)",
189
+ "app.components.CurrentPlanModal.light":"Light (max 10 users)",
186
190
  "app.components.ComingSoonPage.comingSoon": "Coming soon",
187
191
  "app.components.DownloadInfo.download": "Download in progress...",
188
192
  "app.components.DownloadInfo.text": "This could take a minute. Thanks for your patience.",
@@ -76,6 +76,10 @@
76
76
  "app.components.Button.reset": "Annuler",
77
77
  "app.components.Button.save": "Sauvegarder",
78
78
  "app.components.ComingSoonPage.comingSoon": "Bientôt disponible",
79
+ "app.components.CurrentPlanModal.giant":"Géant (max 100 users)",
80
+ "app.components.CurrentPlanModal.large":"Grand (max 50 users)",
81
+ "app.components.CurrentPlanModal.medium":"Medium (max 30 users)",
82
+ "app.components.CurrentPlanModal.light":"Leger (max 10 users)",
79
83
  "app.components.DownloadInfo.download": "Téléchargement en cours...",
80
84
  "app.components.DownloadInfo.text": "Cela peut prendre une minute. Merci de patienter.",
81
85
  "app.components.EmptyAttributes.title": "Il n'y a pas encore de champ",
@@ -164,6 +164,10 @@
164
164
  "app.components.Button.reset": "Ripristina",
165
165
  "app.components.Button.save": "Salva",
166
166
  "app.components.ComingSoonPage.comingSoon": "In arrivo",
167
+ "app.components.CurrentPlanModal.giant":"Gigante (max 100 utilizzatori)",
168
+ "app.components.CurrentPlanModal.large":"Grande (max 50 utilizzatori)",
169
+ "app.components.CurrentPlanModal.medium":"Medio (max 30 utilizzatori)",
170
+ "app.components.CurrentPlanModal.light":"Leggero (max 10 utilizzatori)",
167
171
  "app.components.DownloadInfo.download": "Download in corso...",
168
172
  "app.components.DownloadInfo.text": "Potrebbe volerci un minuto. Grazie della pazienza.",
169
173
  "app.components.EmptyAttributes.title": "Campi non ancora presenti.",
@@ -28,11 +28,12 @@ module.exports = {
28
28
  const currentEnvironment = strapi.app.env;
29
29
  const autoReload = strapi.config.get('autoReload', false);
30
30
  const strapiVersion = strapi.config.get('info.strapi', null);
31
+ const maxUsers = strapi.config.get('info.maxUsers', 100);
31
32
  const nodeVersion = process.version;
32
33
  const communityEdition = !strapi.EE;
33
34
 
34
35
  return {
35
- data: { currentEnvironment, autoReload, strapiVersion, nodeVersion, communityEdition },
36
+ data: { currentEnvironment, autoReload, strapiVersion, nodeVersion, maxUsers, communityEdition },
36
37
  };
37
38
  },
38
39
 
package/index.js CHANGED
@@ -8,7 +8,7 @@ const WebpackDevServer = require('webpack-dev-server');
8
8
  const chalk = require('chalk');
9
9
  const chokidar = require('chokidar');
10
10
  // eslint-disable-next-line node/no-extraneous-require
11
- const hasEE = require('strapi/lib/utils/ee');
11
+ const hasEE = require('@punch-in/strapi/lib/utils/ee');
12
12
  const getWebpackConfig = require('./webpack.config.js');
13
13
 
14
14
  const getPkgPath = name => path.dirname(require.resolve(`${name}/package.json`));
@@ -89,7 +89,7 @@ const { languages } = require('./i18n');
89
89
 
90
90
  window.strapi = Object.assign(window.strapi || {}, {
91
91
  node: MODE || 'host',
92
- backendURL: BACKEND_URL === '/' ? window.location.origin : BACKEND_URL,
92
+ backendURL: BACKEND_URL === '/' ? window.location.host.replace('-admin','') : BACKEND_URL,
93
93
  languages,
94
94
  currentLanguage:
95
95
  window.localStorage.getItem('strapi-admin-language') ||
@@ -154,7 +154,7 @@ async function copyPlugin(name, dest) {
154
154
  }
155
155
 
156
156
  async function copyAdmin(dest) {
157
- const adminPath = getPkgPath('strapi-admin');
157
+ const adminPath = getPkgPath('@punch-in/strapi-admin');
158
158
 
159
159
  // TODO copy ee folders for plugins
160
160
  await fs.copy(path.resolve(adminPath, 'ee', 'admin'), path.resolve(dest, 'ee', 'admin'));
@@ -181,7 +181,7 @@ async function createCacheDir(dir) {
181
181
 
182
182
  const pluginsToCopy = Object.keys(pkgJSON.dependencies).filter(
183
183
  dep =>
184
- dep.startsWith('strapi-plugin') &&
184
+ dep.includes('strapi-plugin') &&
185
185
  fs.existsSync(path.resolve(getPkgPath(dep), 'admin', 'src', 'index.js'))
186
186
  );
187
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punch-in/strapi-admin",
3
- "version": "1.0.1",
3
+ "version": "1.0.5",
4
4
  "description": "Strapi Admin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,6 +37,7 @@
37
37
  "@fortawesome/free-brands-svg-icons": "^5.15.3",
38
38
  "@fortawesome/free-solid-svg-icons": "^5.15.3",
39
39
  "@fortawesome/react-fontawesome": "^0.1.14",
40
+ "@punch-in/strapi": "file:/webapps/punch-in-repo/strapi",
40
41
  "autoprefixer": "^9.8.6",
41
42
  "axios": "^0.21.1",
42
43
  "babel-loader": "^8.1.0",