mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Update branch
Merge branch 'add-overlay-blocker' of github.com:strapi/strapi into add-overlay-blocker
This commit is contained in:
commit
b29ff0893e
@ -330,7 +330,7 @@ export default FooPage;
|
||||
|
||||
## OverlayBlocker
|
||||
|
||||
The OverlayBlocker is a React component that is very useful to block user interactions when the strapi server is restarting in order to avoid front-end errors. This component is automatically displayed when the server needs to restart. You need to disable in order to override the current design.
|
||||
The OverlayBlocker is a React component that is very useful to block user interactions when the strapi server is restarting in order to avoid front-end errors. This component is automatically displayed when the server needs to restart. You need to disable it in order to override the current design (once disabled it won't show on the other plugins so it's really important to enable it back when the component is unmounting).
|
||||
|
||||
### Usage
|
||||
|
||||
@ -341,7 +341,7 @@ The OverlayBlocker is a React component that is very useful to block user intera
|
||||
|
||||
### Example
|
||||
|
||||
In this example we'll have a button that when clicked it will display the OverlayBlocker for 5 seconds thus 'freezes' the admin so the user can't navigate (it simulates a very long server restart).
|
||||
In this example we'll have a button that when clicked will display the OverlayBlocker for 5 seconds thus 'freezes' the admin so the user can't navigate (it simulates a very long server restart).
|
||||
|
||||
**Path -** `./plugins/my-plugin/admin/src/containers/FooPage/constants.js`.
|
||||
```js
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"devDependencies": {
|
||||
"assert": "~1.3.0",
|
||||
"babel-eslint": "^6.1.2",
|
||||
|
@ -19,7 +19,10 @@ import styles from './styles.scss';
|
||||
class InstallPluginPopup extends React.Component {
|
||||
handleClick = () => {
|
||||
this.props.history.push({ pathname: this.props.history.location.pathname });
|
||||
this.context.downloadPlugin(this.props.plugin.id);
|
||||
|
||||
if (!this.props.isAlreadyInstalled) {
|
||||
this.context.downloadPlugin(this.props.plugin.id);
|
||||
}
|
||||
}
|
||||
|
||||
toggle = () => {
|
||||
@ -56,6 +59,7 @@ class InstallPluginPopup extends React.Component {
|
||||
short: this.props.plugin.id === 'support-us' ? <FormattedMessage id={this.props.plugin.description.short} /> : this.props.plugin.description.short,
|
||||
long: this.props.plugin.id === 'support-us' ? <FormattedMessage id={this.props.plugin.description.long || this.props.plugin.description.short} /> : this.props.plugin.description.long || this.props.plugin.description.short,
|
||||
};
|
||||
const buttonName = this.props.isAlreadyInstalled ? 'app.components.PluginCard.Button.label.install' : 'app.components.InstallPluginPopup.downloads';
|
||||
|
||||
return (
|
||||
<Modal isOpen={this.props.isOpen} toggle={this.toggle} className={styles.modalPosition}>
|
||||
@ -93,7 +97,7 @@ class InstallPluginPopup extends React.Component {
|
||||
</div>
|
||||
<div className={styles.buttonWrapper} onClick={this.handleClick}>
|
||||
<div>
|
||||
<FormattedMessage id="app.components.InstallPluginPopup.downloads" />
|
||||
<FormattedMessage id={buttonName} />
|
||||
</div>
|
||||
{/* Uncomment whebn prices are running}
|
||||
<div>{this.props.plugin.price} €</div>
|
||||
@ -149,6 +153,7 @@ InstallPluginPopup.propTypes = {
|
||||
short: PropTypes.string,
|
||||
}),
|
||||
history: PropTypes.object.isRequired,
|
||||
isAlreadyInstalled: PropTypes.bool.isRequired,
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
plugin: PropTypes.object.isRequired,
|
||||
};
|
||||
|
@ -23,10 +23,6 @@
|
||||
flex-grow: 2;
|
||||
}
|
||||
}
|
||||
// > div:last-child {
|
||||
// width: 50px;
|
||||
// border-left: 1px solid #0774D9;
|
||||
// }
|
||||
}
|
||||
|
||||
.headerButtonContainer {
|
||||
@ -102,6 +98,7 @@
|
||||
color: #C3C5C8;
|
||||
opacity: 1;
|
||||
outline: 0!important;
|
||||
cursor: pointer;
|
||||
}
|
||||
> span {
|
||||
display: none;
|
||||
|
@ -64,7 +64,13 @@ class PluginCard extends React.Component {
|
||||
}
|
||||
|
||||
handleDownloadPlugin = (e) => {
|
||||
this.props.downloadPlugin(e);
|
||||
if (!this.props.isAlreadyInstalled && this.props.plugin.id !== 'support-us') {
|
||||
this.props.downloadPlugin(e);
|
||||
} else if (this.props.plugin.id === 'support-us') {
|
||||
this.aTag.click();
|
||||
} else {
|
||||
this.props.history.push('/list-plugins');
|
||||
}
|
||||
}
|
||||
|
||||
shouldOpenModal = (props) => {
|
||||
@ -132,9 +138,10 @@ class PluginCard extends React.Component {
|
||||
onClick={this.handleDownloadPlugin}
|
||||
/>
|
||||
<a
|
||||
href="mailto:hi@strapi.io?subject=I'd like to support Strapi"
|
||||
href="https://strapi.io/shop"
|
||||
style={{ display: 'none' }}
|
||||
ref={(a) => { this.aTag = a; }}
|
||||
target="_blank"
|
||||
>
|
||||
|
||||
</a>
|
||||
|
@ -13,10 +13,6 @@ import { FormattedMessage } from 'react-intl';
|
||||
import Ico from 'components/Ico';
|
||||
import ListRow from 'components/ListRow';
|
||||
import PopUpWarning from 'components/PopUpWarning';
|
||||
import IconAuth from 'assets/icons/icon_auth-permissions.svg';
|
||||
import IconCtb from 'assets/icons/icon_content-type-builder.svg';
|
||||
import IconCm from 'assets/icons/icon_content-manager.svg';
|
||||
import IconSettings from 'assets/icons/icon_settings-manager.svg';
|
||||
|
||||
import styles from './styles.scss';
|
||||
|
||||
@ -34,30 +30,16 @@ class Row extends React.Component {
|
||||
this.props.onDeleteClick(e);
|
||||
}
|
||||
|
||||
renderImg = () => {
|
||||
switch (this.props.plugin.name) {
|
||||
case 'Auth & Permissions':
|
||||
return <img src={IconAuth} alt="logo" />;
|
||||
case 'Content Manager':
|
||||
return <img src={IconCm} alt="logo" />;
|
||||
case 'Settings Manager':
|
||||
return <img src={IconSettings} alt="logo" />;
|
||||
case 'Content Type Builder':
|
||||
return <img src={IconCtb} alt="logo" />;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ListRow>
|
||||
<div className={cn("col-md-11", styles.nameWrapper)}>
|
||||
<div className={styles.icoContainer} style={{ marginRight: '30px' }}>
|
||||
<div className={styles.icoContainer} style={{ marginRight: '14px' }}>
|
||||
<img src={`${this.props.plugin.logo}`} alt="icon" />
|
||||
</div>
|
||||
<div className={styles.pluginContent}>
|
||||
<span>{this.props.plugin.name} — </span>
|
||||
<FormattedMessage id={this.props.plugin.description} />
|
||||
<FormattedMessage id={`${this.props.plugin.description}.short`} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-1">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-admin",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Strapi Admin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -28,8 +28,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"sanitize.css": "^4.1.0",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8",
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-bookshelf",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Bookshelf hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -19,8 +19,8 @@
|
||||
"bookshelf": "^0.10.3",
|
||||
"lodash": "^4.17.4",
|
||||
"pluralize": "^6.0.0",
|
||||
"strapi-knex": "3.0.0-alpha.7.3",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-knex": "3.0.0-alpha.8",
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-ejs",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "EJS hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-admin",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate the default admin panel for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"fs-extra": "^4.0.1",
|
||||
"lodash": "^4.17.4",
|
||||
"strapi-admin": "3.0.0-alpha.7.3"
|
||||
"strapi-admin": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-api",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate an API for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-controller",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate a controller for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-model",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate a model for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-new",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -18,7 +18,7 @@
|
||||
"get-installed-path": "^3.0.1",
|
||||
"inquirer": "^4.0.2",
|
||||
"lodash": "^4.17.4",
|
||||
"strapi-utils": "3.0.0-alpha.7.3",
|
||||
"strapi-utils": "3.0.0-alpha.8",
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-plugin",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate an plugin for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-policy",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate a policy for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate-service",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Generate a service for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-generate",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Master of ceremonies for the Strapi generators.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -17,7 +17,7 @@
|
||||
"fs-extra": "^4.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"reportback": "^2.0.1",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
@ -57,9 +57,8 @@ function PopUpWarning({ content, isOpen, onConfirm, onlyConfirmButton, popUpWarn
|
||||
<ModalHeader toggle={toggleModal} className={styles.header}>
|
||||
<FormattedMessage id={content.title || 'components.popUpWarning.title'} />
|
||||
</ModalHeader>
|
||||
<div className={styles.bordered} />
|
||||
<ModalBody>
|
||||
<div className={styles.modalDangerBodyContainer}>
|
||||
<ModalBody className={styles.modalBody}>
|
||||
<div className={styles.modalBodyContainer}>
|
||||
<img src={icons[popUpWarningType]} alt="icon" />
|
||||
<FormattedMessage id={content.message || 'components.popUpWarning.message'}>
|
||||
{(message) => (
|
||||
|
@ -1,9 +1,14 @@
|
||||
.popUpWarning { /* stylelint-disable */
|
||||
width: 37.5rem!important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
border: none!important;
|
||||
margin-left: 30px;
|
||||
margin-right: 30px;
|
||||
padding-bottom: 11px !important;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
> h4 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
@ -11,104 +16,136 @@
|
||||
font-weight: bold!important;
|
||||
font-size: 1.8rem!important;
|
||||
}
|
||||
|
||||
> button {
|
||||
margin-right: 0!important;
|
||||
color: #C3C5C8;
|
||||
opacity: 1;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 100;
|
||||
z-index: 999;
|
||||
cursor: pointer;
|
||||
|
||||
> span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover, &:focus {
|
||||
color: #C3C5C8;
|
||||
opacity: 1;
|
||||
outline: 0!important;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '\F00d';
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
font-family: 'FontAwesome';
|
||||
font-weight: 400;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.modalPosition {
|
||||
top: 16.8rem;
|
||||
left: 18.2rem;
|
||||
margin-top: 0 !important;
|
||||
|
||||
.modalPosition {
|
||||
> div {
|
||||
width: 37.5rem;
|
||||
padding: 0 !important;
|
||||
border:none;
|
||||
border-radius: 2px;
|
||||
width: 37.5rem;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.modalDangerBodyContainer {
|
||||
padding-top: .1rem;
|
||||
> img {
|
||||
width: 2.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
> p {
|
||||
line-height: 1.8rem;
|
||||
}
|
||||
|
||||
.modalBodyContainer {
|
||||
padding: .1rem;
|
||||
color: #F64D0A;
|
||||
text-align: center;
|
||||
font-family: Lato;
|
||||
font-size: 1.3rem;
|
||||
|
||||
> img {
|
||||
width: 2.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
> p {
|
||||
line-height: 1.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.modalBody {
|
||||
padding: 16px 30px 15px 30px !important;
|
||||
}
|
||||
|
||||
|
||||
.buttonContainer {
|
||||
width: 100%;
|
||||
padding: 0 .5rem;
|
||||
display: flex;
|
||||
margin-top: 3.5rem;
|
||||
width: 100%;
|
||||
margin-top: 37px;
|
||||
justify-content: space-between;
|
||||
|
||||
> button {
|
||||
position: relative;
|
||||
height: 3rem;
|
||||
width: 15rem;
|
||||
position: relative;
|
||||
border-radius: 0.3rem;
|
||||
text-transform: capitalize;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
text-transform: capitalize;
|
||||
font-family: Lato;
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
cursor: pointer;
|
||||
|
||||
> i {
|
||||
margin-right: 1.3rem;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
&:hover {
|
||||
&::after {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-radius: 0.3rem;
|
||||
content: '';
|
||||
opacity: 0.1;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.3rem;
|
||||
background: #FFFFFF;
|
||||
opacity: 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.primary {
|
||||
font-weight: 500;
|
||||
background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: white !important;
|
||||
border: none !important;
|
||||
background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%);
|
||||
color: white !important;
|
||||
font-weight: 500;
|
||||
|
||||
&:active, &:focus, &:hover {
|
||||
box-shadow: inset 1px 1px 3px rgba(0,0,0,.15);
|
||||
background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%);
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
background-color: transparent;
|
||||
background: linear-gradient(315deg, #0097F6 0%, #005EEA 100%);
|
||||
box-shadow: inset 1px 1px 3px rgba(0,0,0,.15);
|
||||
}
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.secondary {
|
||||
// height: 32px !important;
|
||||
color: #F64D0A !important;
|
||||
border: 0.1rem solid #F64D0A !important;
|
||||
position: relative;
|
||||
border: 0.1rem solid #F64D0A !important;
|
||||
border-radius: 3px;
|
||||
color: #F64D0A !important;
|
||||
overflow: hidden;
|
||||
|
||||
&:active {
|
||||
border: 0.15rem solid #F64D0A;
|
||||
}
|
||||
&:focus, &:hover {
|
||||
background-color: transparent !important;
|
||||
color: #F64D0A;
|
||||
border: 0.1rem solid #F64D0A;
|
||||
}
|
||||
}
|
||||
.bordered {
|
||||
margin-top: -.4rem;
|
||||
margin-left: 3rem;
|
||||
margin-right: 3rem;
|
||||
border: 1px solid #F6F6F6;
|
||||
border: 0.15rem solid #F64D0A;
|
||||
}
|
||||
|
||||
&:focus, &:hover {
|
||||
border: 0.1rem solid #F64D0A;
|
||||
background-color: transparent !important;
|
||||
color: #F64D0A;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-helper-plugin",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Helper for Strapi plugins development",
|
||||
"engines": {
|
||||
"node": ">= 8.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-knex",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Knex hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-middleware-views",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Views hook to enable server-side rendering for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-mongoose",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Mongoose hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -19,7 +19,7 @@
|
||||
"mongoose": "^5.0.0-rc1",
|
||||
"mongoose-float": "^1.0.2",
|
||||
"pluralize": "^6.0.0",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-content-manager",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "A powerful UI to easily manage your data.",
|
||||
"engines": {
|
||||
"node": ">= 8.0.0",
|
||||
@ -46,6 +46,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-select": "^1.0.0-rc.5",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8"
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-content-type-builder",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Strapi plugin to create content type (API).",
|
||||
"strapi": {
|
||||
"name": "Content Type Builder",
|
||||
@ -25,11 +25,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"pluralize": "^7.0.0",
|
||||
"strapi-generate": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-api": "3.0.0-alpha.7.3"
|
||||
"strapi-generate": "3.0.0-alpha.8",
|
||||
"strapi-generate-api": "3.0.0-alpha.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-email",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "Email",
|
||||
@ -27,7 +27,7 @@
|
||||
"sendmail": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-settings-manager",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Strapi plugin to manage settings.",
|
||||
"strapi": {
|
||||
"name": "Settings Manager",
|
||||
@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"flag-icon-css": "^2.8.0",
|
||||
"react-select": "^1.0.0-rc.5",
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-plugin-users-permissions",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "Auth & Permissions",
|
||||
@ -30,7 +30,7 @@
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strapi-helper-plugin": "3.0.0-alpha.7.3"
|
||||
"strapi-helper-plugin": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
|
@ -278,14 +278,15 @@ module.exports = {
|
||||
1️⃣ EXECUTE THE FOLLOWING SQL QUERY
|
||||
|
||||
CREATE TABLE "${tableName}" (
|
||||
id integer NOT NULL,
|
||||
id ${Model.client === 'pg' ? 'SERIAL' : 'INT AUTO_INCREMENT'} NOT NULL PRIMARY KEY,
|
||||
username text,
|
||||
email text,
|
||||
provider text,
|
||||
role text,
|
||||
"resetPasswordToken" text,
|
||||
${Model.client === 'pg' ? '"resetPasswordToken"' : 'resetPasswordToken'} text,
|
||||
password text,
|
||||
updated_at timestamp with time zone,
|
||||
created_at timestamp with time zone
|
||||
updated_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'},
|
||||
created_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'}
|
||||
);
|
||||
|
||||
2️⃣ RESTART YOUR SERVER
|
||||
@ -300,10 +301,10 @@ CREATE TABLE "${tableName}" (
|
||||
.then(() => {
|
||||
const attributes = _.cloneDeep(Model.attributes);
|
||||
attributes.id = {
|
||||
type: 'integer'
|
||||
type: Model.client === 'pg' ? 'integer' : 'int'
|
||||
};
|
||||
attributes.updated_at = attributes.created_at = {
|
||||
type: 'timestamp with time zone'
|
||||
type: Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'
|
||||
};
|
||||
|
||||
let commands = '';
|
||||
@ -317,7 +318,7 @@ CREATE TABLE "${tableName}" (
|
||||
description.type = 'text';
|
||||
}
|
||||
|
||||
commands += `\r\nALTER TABLE "${tableName}" ADD "${attribute}" ${description.type};`;
|
||||
commands += `\r\nALTER TABLE "${tableName}" ADD ${Model.client === 'pg' ? `"${attribute}"` : `${attribute}`} ${description.type};`;
|
||||
}
|
||||
|
||||
resolve();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-redis",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Redis hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -18,7 +18,7 @@
|
||||
"ioredis": "^3.1.2",
|
||||
"lodash": "^4.17.4",
|
||||
"stack-trace": "0.0.10",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"strapi": {
|
||||
"isHook": true
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi-utils",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "Shared utilities for the Strapi packages",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "strapi",
|
||||
"version": "3.0.0-alpha.7.3",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.",
|
||||
"homepage": "http://strapi.io",
|
||||
"keywords": [
|
||||
@ -55,14 +55,14 @@
|
||||
"rimraf": "^2.6.2",
|
||||
"semver": "^5.4.1",
|
||||
"stack-trace": "0.0.10",
|
||||
"strapi-generate": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-admin": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-api": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-new": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-plugin": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-policy": "3.0.0-alpha.7.3",
|
||||
"strapi-generate-service": "3.0.0-alpha.7.3",
|
||||
"strapi-utils": "3.0.0-alpha.7.3"
|
||||
"strapi-generate": "3.0.0-alpha.8",
|
||||
"strapi-generate-admin": "3.0.0-alpha.8",
|
||||
"strapi-generate-api": "3.0.0-alpha.8",
|
||||
"strapi-generate-new": "3.0.0-alpha.8",
|
||||
"strapi-generate-plugin": "3.0.0-alpha.8",
|
||||
"strapi-generate-policy": "3.0.0-alpha.8",
|
||||
"strapi-generate-service": "3.0.0-alpha.8",
|
||||
"strapi-utils": "3.0.0-alpha.8"
|
||||
},
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
|
Loading…
x
Reference in New Issue
Block a user