@punch-in/strapi-admin 1.0.4 → 1.0.6

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 => {
@@ -1,10 +1,10 @@
1
1
  import styled from 'styled-components';
2
2
  import PropTypes from 'prop-types';
3
-
3
+ //background: ${props => props.theme.main.colors.strapi['blue-darker']};
4
4
  const Wrapper = styled.div`
5
5
  position: absolute;
6
6
  width: 100%;
7
- background: ${props => props.theme.main.colors.strapi['blue-darker']};
7
+ background: rgb(0, 126, 255);
8
8
  bottom: 0;
9
9
  .poweredBy {
10
10
  width: 100%;
@@ -18,13 +18,14 @@ const Wrapper = styled.div`
18
18
  font-weight: 400;
19
19
  letter-spacing: 0.05rem;
20
20
  vertical-align: middle;
21
- color: ${({ theme }) => theme.main.colors.strapi['gray-light']};
21
+ color: ${({ theme }) => theme.main.colors['white']};
22
22
  }
23
23
  `;
24
24
 
25
25
  const A = styled.a`
26
+ color: #FFF;
26
27
  &:hover {
27
- color: #007bff;
28
+ color: rgb(255, 227, 0);
28
29
  text-decoration: underline;
29
30
  }
30
31
  `;
@@ -31,7 +31,7 @@ const A = styled.a`
31
31
  }
32
32
 
33
33
  &.linkActive {
34
- color: white !important;
34
+ color: ${props => props.theme.main.colors.leftMenu['link-visited']}; !important;
35
35
  border-left: 0.3rem solid ${props => props.theme.main.colors.strapi.blue};
36
36
  }
37
37
  `;
@@ -3,7 +3,6 @@ import styled from 'styled-components';
3
3
  const LeftMenuListLink = styled.div`
4
4
  max-height: 290px;
5
5
  margin-bottom: 19px;
6
- margin-right: 25px;
7
6
  overflow: auto;
8
7
  `;
9
8
 
@@ -45,12 +45,12 @@ function appReducer(state = initialState, action) {
45
45
  return null;
46
46
  });
47
47
  case GET_INFOS_DATA_SUCCEEDED: {
48
- if (action.data.strapiVersion !== state.get('strapiVersion')) {
49
- console.error(
50
- `It seems that the built version ${packageVersion} is different than your project's one (${action.data.strapiVersion})`
51
- );
52
- console.error('Please delete your `.cache` and `build` folders and restart your app');
53
- }
48
+ // if (action.data.strapiVersion !== state.get('strapiVersion')) {
49
+ // console.error(
50
+ // `It seems that the built version ${packageVersion} is different than your project's one (${action.data.strapiVersion})`
51
+ // );
52
+ // console.error('Please delete your `.cache` and `build` folders and restart your app');
53
+ // }
54
54
 
55
55
  return (
56
56
  state
@@ -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
  />
@@ -12,13 +12,13 @@ import { SocialLinkWrapper } from './components';
12
12
  function getSrc(name) {
13
13
  switch (name) {
14
14
  case 'Facebook':
15
- return (<FontAwesomeIcon icon="fa-brands fa-square-facebook" size="lg" />);
15
+ return (<FontAwesomeIcon icon={['fab', 'facebook']} size="lg" />);
16
16
  case 'LinkedIn':
17
- return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" />);
17
+ return (<FontAwesomeIcon icon={['fab', 'linkedin']} size="lg" />);
18
18
  case 'Careers':
19
- return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" color="#4199e1" />);
19
+ return (<FontAwesomeIcon icon={['fab', 'linkedin']} size="lg" color="#4199e1" />);
20
20
  default:
21
- return (<FontAwesomeIcon icon="fa-brands fa-linkedin" size="lg" />) />;
21
+ return (<FontAwesomeIcon icon={['fab', 'linkedin']} size="lg" />);
22
22
  }
23
23
  }
24
24
 
@@ -26,7 +26,7 @@ const SocialLink = ({ link, name }) => {
26
26
  return (
27
27
  <SocialLinkWrapper className="col-6">
28
28
  <a href={link} target="_blank" rel="noopener noreferrer">
29
- <img src={getSrc(name)} alt={name} />
29
+ {getSrc(name)}
30
30
  <span>{name}</span>
31
31
  </a>
32
32
  </SocialLinkWrapper>
@@ -13,7 +13,6 @@ 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 = [
@@ -25,7 +24,7 @@ const FIRST_BLOCK_LINKS = [
25
24
  },
26
25
  {
27
26
  link: 'https://www.punch-in.co.uk/faq',
28
- contentId: 'app.components.BlockLink.documentation.faq',
27
+ contentId: 'app.components.BlockLink.faq.content',
29
28
  titleId: 'app.components.BlockLink.faq',
30
29
  },
31
30
  ];
@@ -74,15 +73,7 @@ const HomePage = ({ history: { push } }) => {
74
73
  ? 'HomePage.greetings'
75
74
  : 'app.components.HomePage.welcome';
76
75
  const username = get(auth.getUserInfo(), 'firstname', '');
77
- const linkProps = hasAlreadyCreatedContentTypes
78
- ? {
79
- id: 'app.components.HomePage.button.blog',
80
- href: 'https://strapi.io/blog/',
81
- onClick: () => {},
82
- type: 'blog',
83
- target: '_blank',
84
- }
85
- : {
76
+ const linkProps = {
86
77
  id: 'app.components.HomePage.create',
87
78
  href: '',
88
79
  onClick: handleClick,
@@ -162,17 +153,6 @@ const HomePage = ({ history: { push } }) => {
162
153
  <FormattedMessage id="app.components.HomePage.community.content">
163
154
  {content => <P style={{ marginTop: 7, marginBottom: 0 }}>{content}</P>}
164
155
  </FormattedMessage>
165
- <FormattedMessage id="HomePage.roadmap">
166
- {msg => (
167
- <ALink
168
- rel="noopener noreferrer"
169
- href="https://portal.productboard.com/strapi/1-public-roadmap/tabs/2-under-consideration"
170
- target="_blank"
171
- >
172
- {msg}
173
- </ALink>
174
- )}
175
- </FormattedMessage>
176
156
 
177
157
  <Separator style={{ marginTop: 18 }} />
178
158
  <div
@@ -14,7 +14,7 @@ const Wrapper = styled.div`
14
14
  left: 0;
15
15
  height: 100vh;
16
16
  width: ${props => props.theme.main.sizes.leftMenu.width};
17
- background: ${props => props.theme.main.colors.strapi['blue-darker']};
17
+ background: ${props => props.theme.main.colors.strapi['light-blue-transparent']};
18
18
 
19
19
  /* scrollbar overrides */
20
20
  * {
@@ -30,7 +30,7 @@ const generateLinks = (links, type, configurations = []) => {
30
30
  }
31
31
 
32
32
  return {
33
- icon: 'circle',
33
+ icon: link.icon ? link.icon : 'circle',
34
34
  destination: `/plugins/content-manager/${link.kind}/${link.uid}`,
35
35
  isDisplayed: true,
36
36
  label: link.info.label,
@@ -34,8 +34,9 @@ const colors = {
34
34
  'background-alpha': 'rgba(14, 22, 34, 0.02)',
35
35
  },
36
36
  leftMenu: {
37
- 'link-hover': '#1c2431',
38
- 'link-color': '#919bae',
37
+ 'link-hover': '#c6eaff',
38
+ 'link-visited': '#950303',
39
+ 'link-color': '#666e7d',
39
40
  'title-color': '#5b626f',
40
41
  'background-header-link': '#007eff',
41
42
  },
@@ -45,6 +46,7 @@ const colors = {
45
46
  'blue-darker': '#18202e',
46
47
  'blue-dark': '#151c2e',
47
48
  blue: '#0097f7',
49
+ 'light-blue-transparent': '#0097f71c'
48
50
  },
49
51
  };
50
52
 
@@ -50,7 +50,7 @@
50
50
  "Documentation": "Documentation",
51
51
  "Email": "Email",
52
52
  "Files Upload": "Files Upload",
53
- "HomePage.community": "Join the Community",
53
+ "HomePage.community": "Join Punch-in Community",
54
54
  "HomePage.greetings": "Hi {name}!",
55
55
  "HomePage.helmet.title": "Homepage",
56
56
  "HomePage.roadmap": "See our roadmap",
@@ -180,9 +180,15 @@
180
180
  "app.components.BlockLink.code.content": "Learn by testing real projects developed the community.",
181
181
  "app.components.BlockLink.documentation": "Read the documentation",
182
182
  "app.components.BlockLink.documentation.content": "Discover the concepts, reference guides and tutorials.",
183
+ "app.components.BlockLink.faq": "Read our FAQ",
184
+ "app.components.BlockLink.faq.content": "Get answers to the most frequent questions from our customers.",
183
185
  "app.components.Button.cancel": "Cancel",
184
186
  "app.components.Button.reset": "Reset",
185
187
  "app.components.Button.save": "Save",
188
+ "app.components.CurrentPlanModal.giant":"Giant (max 100 users)",
189
+ "app.components.CurrentPlanModal.large":"Large (max 50 users)",
190
+ "app.components.CurrentPlanModal.medium":"Medium (max 30 users)",
191
+ "app.components.CurrentPlanModal.light":"Light (max 10 users)",
186
192
  "app.components.ComingSoonPage.comingSoon": "Coming soon",
187
193
  "app.components.DownloadInfo.download": "Download in progress...",
188
194
  "app.components.DownloadInfo.text": "This could take a minute. Thanks for your patience.",
@@ -212,7 +218,7 @@
212
218
  "app.components.LeftMenuFooter.documentation": "Documentation",
213
219
  "app.components.LeftMenuFooter.help": "Help",
214
220
  "app.components.LeftMenuFooter.poweredBy": "Powered by ",
215
- "app.components.LeftMenuLinkContainer.collectionTypes": "Collection Types",
221
+ "app.components.LeftMenuLinkContainer.collectionTypes": "Data stores",
216
222
  "app.components.LeftMenuLinkContainer.configuration": "Configurations",
217
223
  "app.components.LeftMenuLinkContainer.general": "General",
218
224
  "app.components.LeftMenuLinkContainer.installNewPlugin": "Marketplace",
@@ -43,7 +43,7 @@
43
43
  "Content Type Builder": "Content Types Builder",
44
44
  "Email": "E-mail",
45
45
  "Files Upload": "Téléversement de fichiers",
46
- "HomePage.community": "Rejoignez la Communauté",
46
+ "HomePage.community": "Rejoignez la Communauté de Punch-in",
47
47
  "HomePage.greetings": "Bonjour {name}!",
48
48
  "HomePage.helmet.title": "Accueil",
49
49
  "HomePage.roadmap": "Voir la roadmap",
@@ -72,10 +72,16 @@
72
72
  "app.components.BlockLink.code.content": "Apprenez en testant les projets développés par la communauté.",
73
73
  "app.components.BlockLink.documentation": "Voir la documentation",
74
74
  "app.components.BlockLink.documentation.content": "Découvrez les concepts, guides et tutoriaux.",
75
+ "app.components.BlockLink.faq": "Lisez notre FAQ",
76
+ "app.components.BlockLink.faq.content": "Lisez réponses aux questions plus fréquentes de nos clients",
75
77
  "app.components.Button.cancel": "Annuler",
76
78
  "app.components.Button.reset": "Annuler",
77
79
  "app.components.Button.save": "Sauvegarder",
78
80
  "app.components.ComingSoonPage.comingSoon": "Bientôt disponible",
81
+ "app.components.CurrentPlanModal.giant":"Géant (max 100 users)",
82
+ "app.components.CurrentPlanModal.large":"Grand (max 50 users)",
83
+ "app.components.CurrentPlanModal.medium":"Medium (max 30 users)",
84
+ "app.components.CurrentPlanModal.light":"Leger (max 10 users)",
79
85
  "app.components.DownloadInfo.download": "Téléchargement en cours...",
80
86
  "app.components.DownloadInfo.text": "Cela peut prendre une minute. Merci de patienter.",
81
87
  "app.components.EmptyAttributes.title": "Il n'y a pas encore de champ",
@@ -101,6 +107,7 @@
101
107
  "app.components.InstallPluginPage.description": "Améliorez votre app sans efforts",
102
108
  "app.components.InstallPluginPage.helmet": "Marketplace - Plugins",
103
109
  "app.components.InstallPluginPage.title": "Marketplace - Plugins",
110
+ "app.components.LeftMenuLinkContainer.collectionTypes": "Base des donnés",
104
111
  "app.components.LeftMenuFooter.documentation": "Documentation",
105
112
  "app.components.LeftMenuFooter.help": "Aide",
106
113
  "app.components.LeftMenuFooter.poweredBy": "Propulsé par ",
@@ -47,7 +47,7 @@
47
47
  "Documentation": "Documentazione",
48
48
  "Email": "Email",
49
49
  "Files Upload": "Caricamento Files",
50
- "HomePage.community": "Unisciti alla Community",
50
+ "HomePage.community": "Unisciti alla Community di Punch-in",
51
51
  "HomePage.greetings": "Ciao {name}!",
52
52
  "HomePage.helmet.title": "Homepage",
53
53
  "HomePage.roadmap": "Guarda la nostra roadmap",
@@ -160,10 +160,16 @@
160
160
  "app.components.BlockLink.code.content": "Impara testando progetti reali sviluppati dalla comunità.",
161
161
  "app.components.BlockLink.documentation": "Leggi la documentazione",
162
162
  "app.components.BlockLink.documentation.content": "Scopri funzionalità, guide di riferimento ed esercitazioni.",
163
+ "app.components.BlockLink.faq": "Sezione FAQ",
164
+ "app.components.BlockLink.faq.content": "Leggi le risposte alle domande più frequenti dei nostri clienti.",
163
165
  "app.components.Button.cancel": "Annulla",
164
166
  "app.components.Button.reset": "Ripristina",
165
167
  "app.components.Button.save": "Salva",
166
168
  "app.components.ComingSoonPage.comingSoon": "In arrivo",
169
+ "app.components.CurrentPlanModal.giant":"Gigante (max 100 utilizzatori)",
170
+ "app.components.CurrentPlanModal.large":"Grande (max 50 utilizzatori)",
171
+ "app.components.CurrentPlanModal.medium":"Medio (max 30 utilizzatori)",
172
+ "app.components.CurrentPlanModal.light":"Leggero (max 10 utilizzatori)",
167
173
  "app.components.DownloadInfo.download": "Download in corso...",
168
174
  "app.components.DownloadInfo.text": "Potrebbe volerci un minuto. Grazie della pazienza.",
169
175
  "app.components.EmptyAttributes.title": "Campi non ancora presenti.",
@@ -192,7 +198,7 @@
192
198
  "app.components.LeftMenuFooter.documentation": "Documentazione",
193
199
  "app.components.LeftMenuFooter.help": "Supporto",
194
200
  "app.components.LeftMenuFooter.poweredBy": "Offerto da ",
195
- "app.components.LeftMenuLinkContainer.collectionTypes": "Collezioni",
201
+ "app.components.LeftMenuLinkContainer.collectionTypes": "Base dati",
196
202
  "app.components.LeftMenuLinkContainer.configuration": "Configurazioni",
197
203
  "app.components.LeftMenuLinkContainer.general": "Generale",
198
204
  "app.components.LeftMenuLinkContainer.installNewPlugin": "Marketplace",
@@ -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
@@ -80,6 +80,9 @@ async function build({ dir, env, options, optimize }) {
80
80
  }
81
81
 
82
82
  async function createPluginsJs(plugins, localPlugins, dest) {
83
+ console.log(plugins);
84
+ console.log('============');
85
+ console.log(localPlugins);
83
86
  const content = `
84
87
  const injectReducer = require('./utils/injectReducer').default;
85
88
  const injectSaga = require('./utils/injectSaga').default;
@@ -89,7 +92,7 @@ const { languages } = require('./i18n');
89
92
 
90
93
  window.strapi = Object.assign(window.strapi || {}, {
91
94
  node: MODE || 'host',
92
- backendURL: BACKEND_URL === '/' ? window.location.origin : BACKEND_URL,
95
+ backendURL: BACKEND_URL === '/' ? window.location.host.replace('-admin','') : BACKEND_URL,
93
96
  languages,
94
97
  currentLanguage:
95
98
  window.localStorage.getItem('strapi-admin-language') ||
@@ -105,8 +108,8 @@ window.strapi = Object.assign(window.strapi || {}, {
105
108
  module.exports = {
106
109
  ${plugins
107
110
  .map(name => {
108
- const shortName = name.replace(/^strapi-plugin-/i, '');
109
- const req = `require('../../plugins/${name}/admin/src').default`;
111
+ const shortName = name.replace(/^(strapi-plugin-|@punch-in\/strapi-plugin-)/i, '');
112
+ const req = `require('../../plugins/${name.replace('@punch-in/','')}/admin/src').default`;
110
113
  return `'${shortName}': ${req},`;
111
114
  })
112
115
  .join('\n')}
@@ -135,7 +138,7 @@ async function copyPlugin(name, dest) {
135
138
  const pkgFilePath = getPkgPath(name);
136
139
 
137
140
  const resolveDepPath = (...args) => path.resolve(pkgFilePath, ...args);
138
- const resolveDest = (...args) => path.resolve(dest, 'plugins', name, ...args);
141
+ const resolveDest = (...args) => path.resolve(dest, 'plugins', name.replace('@punch-in/',''), ...args);
139
142
 
140
143
  const copy = (...args) => {
141
144
  return fs.copy(resolveDepPath(...args), resolveDest(...args));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punch-in/strapi-admin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Strapi Admin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +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
+ "@punch-in/strapi": "^1.0.5",
41
41
  "autoprefixer": "^9.8.6",
42
42
  "axios": "^0.21.1",
43
43
  "babel-loader": "^8.1.0",