|
|
|
@ -123,7 +123,7 @@ parcelRequire = (function (modules, cache, entry, globalName) {
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports.default = exports.SEND_MAIL = exports.API_INIT_LAME = exports.API_INIT_GOOD = exports.API_INIT = exports.API_RENDER_PAGES = exports.API_IMAGES_UPLOAD = exports.API_BACKUP_RESTORE = exports.API_BACKUP_DOWNLOAD = exports.API_BACKUP_CREATE = exports.API_SETTINGS_WRITE = exports.API_PAGE_DELETE = exports.API_PAGE_CREATE = exports.API_PAGE_WRITE = exports.UPLOAD_PROGRESS = exports.SITE_BACKGROUND_UPLOADED = exports.AVATAR_UPLOADED = exports.MENU_UPDATED = exports.MENU_DELETE_ITEM = exports.MENU_ADD_ITEM = exports.SETTINGS_NOT_UPDATED = exports.SETTINGS_UPDATED = exports.TAG_PAGES_NOT_RENDERED = exports.TAG_PAGES_RENDERED = exports.PAGES_NOT_RENDERED = exports.PAGES_RENDERED = exports.PAGE_DELETED = exports.PAGE_UPDATED = exports.PAGE_ADDED = exports.PAGE_ERROR = exports.FEATURE_IMAGE_ADDED = exports.POST_IMAGE_ADDED = exports.SETTINGS_LOADED = exports.IMG_REQUEST_LAME = exports.IMG_REQUEST_GOOD = exports.API_REQUEST_LAME = exports.API_REQUEST_GOOD = exports.REQUEST_LAME = exports.REQUEST_GOOD = void 0;
|
|
|
|
|
exports.default = exports.SEND_MAIL = exports.API_INIT_LAME = exports.API_INIT_GOOD = exports.API_INIT = exports.API_REINDEX_PAGES = exports.API_RENDER_PAGES = exports.API_IMAGES_UPLOAD = exports.API_BACKUP_RESTORE = exports.API_BACKUP_DOWNLOAD = exports.API_BACKUP_CREATE = exports.API_SETTINGS_WRITE = exports.API_PAGE_DELETE = exports.API_PAGE_CREATE = exports.API_PAGE_WRITE = exports.UPLOAD_PROGRESS = exports.SITE_BACKGROUND_UPLOADED = exports.AVATAR_UPLOADED = exports.MENU_UPDATED = exports.MENU_DELETE_ITEM = exports.MENU_ADD_ITEM = exports.SETTINGS_NOT_UPDATED = exports.SETTINGS_UPDATED = exports.TAG_PAGES_NOT_RENDERED = exports.TAG_PAGES_RENDERED = exports.PAGES_NOT_RENDERED = exports.PAGES_RENDERED = exports.PAGE_DELETED = exports.PAGE_UPDATED = exports.PAGE_ADDED = exports.PAGE_ERROR = exports.FEATURE_IMAGE_ADDED = exports.POST_IMAGE_ADDED = exports.SETTINGS_LOADED = exports.IMG_REQUEST_LAME = exports.IMG_REQUEST_GOOD = exports.API_REQUEST_LAME = exports.API_REQUEST_GOOD = exports.REQUEST_LAME = exports.REQUEST_GOOD = void 0;
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
@ -195,6 +195,8 @@ var API_IMAGES_UPLOAD = 'uploadProfileImages';
|
|
|
|
|
exports.API_IMAGES_UPLOAD = API_IMAGES_UPLOAD;
|
|
|
|
|
var API_RENDER_PAGES = 'renderPages';
|
|
|
|
|
exports.API_RENDER_PAGES = API_RENDER_PAGES;
|
|
|
|
|
var API_REINDEX_PAGES = 'reindexPages';
|
|
|
|
|
exports.API_REINDEX_PAGES = API_REINDEX_PAGES;
|
|
|
|
|
var API_INIT = 'blogInit';
|
|
|
|
|
exports.API_INIT = API_INIT;
|
|
|
|
|
var API_INIT_GOOD = 'blogInitGood';
|
|
|
|
@ -380,7 +382,7 @@ exports.default = APIUtils;
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports.default = exports.API_SEND_MAIL = exports.API_INIT_RESTORE_BACKUP = exports.API_RESTORE_BACKUP = exports.API_DOWNLOAD_BACKUP = exports.API_CREATE_BACKUP = exports.API_NAV_SYNC = exports.API_PUBLISH_PAGES = exports.API_UPLOAD_BACKGROUND = exports.API_UPLOAD_AVATAR = exports.API_SETTINGS_SYNC = exports.API_IMAGE_UPLOAD = exports.API_DELETE_PAGE = exports.API_EDIT_PAGE = exports.API_NEW_PAGE = exports.API_GET_NAV = exports.API_STATUS = exports.CONTENT_TYPE_FORM = exports.CONTENT_TYPE_JSON = exports.TASK_PAGE_DELETE = exports.TASK_PAGE_EDIT = exports.TASK_PAGE_CREATE = exports.REQUEST_TYPE_DELETE = exports.REQUEST_TYPE_PUT = exports.REQUEST_TYPE_GET = exports.REQUEST_TYPE_POST = void 0;
|
|
|
|
|
exports.default = exports.API_SEND_MAIL = exports.API_INIT_RESTORE_BACKUP = exports.API_RESTORE_BACKUP = exports.API_DOWNLOAD_BACKUP = exports.API_CREATE_BACKUP = exports.API_REINDEX_PAGES = exports.API_NAV_SYNC = exports.API_PUBLISH_PAGES = exports.API_UPLOAD_BACKGROUND = exports.API_UPLOAD_AVATAR = exports.API_SETTINGS_SYNC = exports.API_IMAGE_UPLOAD = exports.API_DELETE_PAGE = exports.API_EDIT_PAGE = exports.API_NEW_PAGE = exports.API_GET_NAV = exports.API_STATUS = exports.CONTENT_TYPE_FORM = exports.CONTENT_TYPE_JSON = exports.TASK_PAGE_DELETE = exports.TASK_PAGE_EDIT = exports.TASK_PAGE_CREATE = exports.REQUEST_TYPE_DELETE = exports.REQUEST_TYPE_PUT = exports.REQUEST_TYPE_GET = exports.REQUEST_TYPE_POST = void 0;
|
|
|
|
|
|
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../com/events/DataEvent"));
|
|
|
|
|
|
|
|
|
@ -434,6 +436,8 @@ var API_PUBLISH_PAGES = '/api/v1/settings/publish-pages';
|
|
|
|
|
exports.API_PUBLISH_PAGES = API_PUBLISH_PAGES;
|
|
|
|
|
var API_NAV_SYNC = '/api/v1/settings/nav-sync';
|
|
|
|
|
exports.API_NAV_SYNC = API_NAV_SYNC;
|
|
|
|
|
var API_REINDEX_PAGES = '/api/v1/settings/reindex';
|
|
|
|
|
exports.API_REINDEX_PAGES = API_REINDEX_PAGES;
|
|
|
|
|
var API_CREATE_BACKUP = '/api/v1/backup/create';
|
|
|
|
|
exports.API_CREATE_BACKUP = API_CREATE_BACKUP;
|
|
|
|
|
var API_DOWNLOAD_BACKUP = '/api/v1/backup/download';
|
|
|
|
@ -666,6 +670,19 @@ var APIUtils = /*#__PURE__*/function () {
|
|
|
|
|
reject(err);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "handleReindex",
|
|
|
|
|
value: function handleReindex(data) {
|
|
|
|
|
var _this10 = this;
|
|
|
|
|
|
|
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
|
|
_this10._request(API_REINDEX_PAGES, DataEvent.API_REINDEX_PAGES, REQUEST_TYPE_POST, CONTENT_TYPE_JSON, data).then(function (result) {
|
|
|
|
|
resolve(result);
|
|
|
|
|
}).catch(function (err) {
|
|
|
|
|
reject(err);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} //--------------------------
|
|
|
|
|
// private
|
|
|
|
|
//--------------------------
|
|
|
|
@ -693,7 +710,7 @@ var APIUtils = /*#__PURE__*/function () {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (requestType == REQUEST_TYPE_PUT || requestType == REQUEST_TYPE_POST) {
|
|
|
|
|
if (eventType === DataEvent.API_PAGE_WRITE || eventType === DataEvent.API_IMAGES_UPLOAD || eventType === DataEvent.API_SETTINGS_WRITE || eventType === DataEvent.API_PAGE_DELETE || eventType === DataEvent.API_RENDER_PAGES || eventType === DataEvent.API_BACKUP_CREATE || eventType === DataEvent.API_BACKUP_RESTORE) request.setRequestHeader('x-access-token', self.token);
|
|
|
|
|
if (eventType === DataEvent.API_PAGE_WRITE || eventType === DataEvent.API_IMAGES_UPLOAD || eventType === DataEvent.API_SETTINGS_WRITE || eventType === DataEvent.API_PAGE_DELETE || eventType === DataEvent.API_RENDER_PAGES || eventType === DataEvent.API_BACKUP_CREATE || eventType === DataEvent.API_BACKUP_RESTORE || eventType === DataEvent.API_REINDEX_PAGES) request.setRequestHeader('x-access-token', self.token);
|
|
|
|
|
|
|
|
|
|
switch (contentType) {
|
|
|
|
|
case CONTENT_TYPE_JSON:
|
|
|
|
@ -3953,9 +3970,12 @@ var PostEditor = /*#__PURE__*/function () {
|
|
|
|
|
key: "handleImageUpload",
|
|
|
|
|
value: function handleImageUpload(type, files) {
|
|
|
|
|
var self = this;
|
|
|
|
|
notify.alert('Uploading Image', null);
|
|
|
|
|
admin.imageUpload(type, files).then(function (r) {
|
|
|
|
|
if (r.type == DataEvent.POST_IMAGE_ADDED) self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
|
|
|
|
}).catch(function () {//console.log('ERROR', err);
|
|
|
|
|
notify.alert('Image Added to Entry', true);
|
|
|
|
|
}).catch(function () {
|
|
|
|
|
notify.alert('Uh oh. Image not added', false); //console.log('ERROR', err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
@ -4297,6 +4317,9 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
|
document.getElementById('create-backup').addEventListener('click', function (e) {
|
|
|
|
|
return _this.handleBackup(e);
|
|
|
|
|
});
|
|
|
|
|
document.getElementById('reindex-pages').addEventListener('click', function (e) {
|
|
|
|
|
return _this.handleReindex(e);
|
|
|
|
|
});
|
|
|
|
|
} //--------------------------
|
|
|
|
|
// event handlers
|
|
|
|
|
//--------------------------
|
|
|
|
@ -4413,6 +4436,21 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
|
notify.alert(err, false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "handleReindex",
|
|
|
|
|
value: function handleReindex(e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
var task = {
|
|
|
|
|
task: 'cleanup pages indexes'
|
|
|
|
|
};
|
|
|
|
|
notify.alert('Cleaning up page indexes', null);
|
|
|
|
|
admin.handleReindex(task).then(function (r) {
|
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
|
}).catch(function (err) {
|
|
|
|
|
notify.alert(err, false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return SettingsIndex;
|
|
|
|
@ -8574,7 +8612,7 @@ var parent = module.bundle.parent;
|
|
|
|
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
|
|
|
|
var hostname = "" || location.hostname;
|
|
|
|
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
|
|
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "57701" + '/');
|
|
|
|
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "55198" + '/');
|
|
|
|
|
|
|
|
|
|
ws.onmessage = function (event) {
|
|
|
|
|
checkedAssets = {};
|
|
|
|
|