Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #435 from GetPublii/0.33.5
Browse files Browse the repository at this point in the history
0.33.5
  • Loading branch information
dziudek committed May 6, 2019
2 parents dd6981e + d67a9b0 commit cd2d7b4
Show file tree
Hide file tree
Showing 279 changed files with 14,064 additions and 16,171 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@
[Publii](https://getpublii.com/) is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast
and hassle-free, even for beginners.

**Current version: 0.33.4 (build 11590)**
**Current version: 0.34.0 (build 11726)**

## Why Publii?
Unlike static-site generators that are often unwieldy and difficult to use, Publii provides an
Expand Down
10 changes: 8 additions & 2 deletions app/back-end/app.js
Expand Up @@ -183,6 +183,12 @@ class App {
* @returns {object}
*/
switchSite(site) {
if (!site) {
return {
status: false
};
}

const siteDir = path.join(this.sitesDir, site);
const menuConfigPath = path.join(siteDir, 'input', 'config', 'menu.config.json');
const themeConfigPath = path.join(siteDir, 'input', 'config', 'theme.config.json');
Expand Down Expand Up @@ -449,8 +455,8 @@ class App {
windowParams.y > electron.screen.getPrimaryDisplay().workAreaSize.height
)
) {
windowParams.x = 50;
windowParams.y = 50;
windowParams.x = 0;
windowParams.y = 0;
}

if(!(/^win/).test(process.platform)) {
Expand Down
2 changes: 1 addition & 1 deletion app/back-end/builddata.json
@@ -1 +1 @@
{"version":"0.33.4","build":11590,"status":"Beta"}
{"version":"0.34.0","build":11726,"status":"Beta"}
8 changes: 6 additions & 2 deletions app/back-end/events/backup.js
Expand Up @@ -129,11 +129,15 @@ class BackupEvents {
tempDir: tempDir
});

backupProcess.on('message', function(data) {
if(data.type === 'app-backup-restore-success') {
backupProcess.on('message', data => {
if (data.type === 'app-backup-restore-success') {
event.sender.send('app-backup-restored', {
status: true
});
} else if (data.type === 'app-backup-restore-close-db') {
if (this.app.db) {
this.app.db.close();
}
} else {
event.sender.send('app-backup-restored', {
status: false,
Expand Down
15 changes: 14 additions & 1 deletion app/back-end/events/site.js
Expand Up @@ -63,6 +63,10 @@ class SiteEvents {
!fs.existsSync(path.join(appInstance.sitesDir, config.settings.name)) &&
slug(config.settings.displayName) === config.settings.name
) {
if (appInstance.db) {
appInstance.db.close();
}

// If yes - rename the dir
delete appInstance.sites[siteName];
siteName = config.settings.name;
Expand Down Expand Up @@ -306,7 +310,8 @@ class SiteEvents {
newConfig: {
config: themeConfig.config,
customConfig: themeConfig.customConfig,
postConfig: themeConfig.postConfig
postConfig: themeConfig.postConfig,
defaultTemplates: themeConfig.defaultTemplates
}
});
});
Expand Down Expand Up @@ -349,6 +354,14 @@ class SiteEvents {
site.regenerateThumbnails(event.sender);
});

/*
* Regenerate thumbnails stauts
*/
ipcMain.on('app-site-regenerate-thumbnails-required', function(event, config) {
let site = new Site(appInstance, config, true);
site.regenerateThumbnailsIsRequired(event.sender);
});

/*
* Delete website
*/
Expand Down
7 changes: 6 additions & 1 deletion app/back-end/modules/backup/backup.js
Expand Up @@ -286,7 +286,12 @@ class Backup {
return;
}

// Remove site dir contents
// Close DB connection and remove site dir contents
process.send({
type: 'app-backup-restore-close-db',
status: true
});

fs.emptyDirSync(destinationPath);

// Move files from the temp dir to the site dir
Expand Down
141 changes: 0 additions & 141 deletions app/back-end/modules/custom-changes/ftp/test/test-parser.js

This file was deleted.

4 changes: 0 additions & 4 deletions app/back-end/modules/custom-changes/ftp/test/test.js

This file was deleted.

1 change: 0 additions & 1 deletion app/back-end/modules/custom-changes/netlify/.npmignore

This file was deleted.

0 comments on commit cd2d7b4

Please sign in to comment.