Skip to content

Commit

Permalink
Added Yoast to plugins list
Browse files Browse the repository at this point in the history
Added Wordpress Auth Salt Generation
Added Success Notification
Upped Version to 0.1.1
  • Loading branch information
sami616 committed Dec 8, 2017
1 parent 2cb175a commit 98dbcca
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "APL",
"description": "Advanced Project Launcher",
"author": "srdesigns",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"main": "electron/index.js",
"homepage": "./",
Expand All @@ -11,6 +11,7 @@
"electron-updater": "^2.16.1",
"express": "^4.16.2",
"firebase": "^4.6.2",
"node-jen": "^1.0.6",
"polished": "^1.9.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
Expand Down
11 changes: 10 additions & 1 deletion src/actions/wpActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const path = window.require('path');
const fs = window.require('fs');
const request = window.require('request');
const unzip = window.require('unzip');
const Jen = window.require('node-jen');
const hdl = new Jen(true);


export const check = e => {
Expand Down Expand Up @@ -41,7 +43,7 @@ export const downloadWP = () => {
return (dispatch, getState) => {

const { yearPath, wordpressPath } = getState().setup.paths;
const { renameConfig, dbPrefix, dbName, dbUser, dbPass, dbHost } = getState().wp
const { renameConfig, dbPrefix, dbName, dbUser, dbPass, dbHost, generateAuth } = getState().wp
const zipPath = path.join(yearPath, 'wp.zip');


Expand Down Expand Up @@ -102,6 +104,13 @@ export const downloadWP = () => {
result = result.replace('password_here', dbPass);
result = result.replace('localhost', dbHost);

if(generateAuth){
for(let s=0; s<=8; s++){
result = result.replace('put your unique phrase here', hdl.password(64,64));
}

}

fs.writeFile(wpConfigPath, result, 'utf8', function (err) {
if (err) { return console.log(err) }
});
Expand Down
4 changes: 4 additions & 0 deletions src/components/screens/End.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class End extends Component {
app.quit();
}

componentDidMount(){
new Notification('Success', { body: 'Project initialized' });
}

render() {
return (

Expand Down
4 changes: 2 additions & 2 deletions src/components/screens/Wordpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class Wordpress extends Component {

<Ul>
<Li>
<CheckBox id="renameConfig" onClick={(e) => { check(e) }} checked={renameConfig} />
<CheckBox id="renameConfig" onClick={e => { check(e) }} checked={renameConfig} />
<Label>Rename wp config</Label>
</Li>

<Li>
<CheckBox id="generateAuth" checked={generateAuth} />
<CheckBox id="generateAuth" onClick={e => { check(e) } } checked={generateAuth} />
<Label>Generate auth keys (coming soon)</Label>
</Li>

Expand Down
9 changes: 9 additions & 0 deletions src/reducers/pluginReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ const defaults = {
downloading: false,
downloaded: false,
failed: false,
},
{
label: 'Yoast',
id: 'yoast',
url: 'https://firebasestorage.googleapis.com/v0/b/wp-project-launcher.appspot.com/o/yoast.zip?alt=media&token=b22ae0c5-e37e-4c4f-ae58-494502e4ab0c',
checked: false,
downloading: false,
downloaded: false,
failed: false,
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4788,6 +4788,10 @@ node-int64@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"

node-jen@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/node-jen/-/node-jen-1.0.6.tgz#eb7533757e0bfd7e372d22f6f37543f2511200ae"

node-libs-browser@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646"
Expand Down

0 comments on commit 98dbcca

Please sign in to comment.