|
|
@ -3617,8 +3617,10 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
|
|
var notifcation = document.getElementById('notifications');
|
|
|
|
var notifcation = document.getElementById('notifications');
|
|
|
|
var message = document.getElementById('notifyMessage');
|
|
|
|
|
|
|
|
var messageText = document.getElementById('message-text');
|
|
|
|
var messageText = document.getElementById('message-text');
|
|
|
|
|
|
|
|
var iconGood = document.getElementById('notify-good');
|
|
|
|
|
|
|
|
var iconLame = document.getElementById('notify-lame');
|
|
|
|
|
|
|
|
var iconWorking = document.getElementById('notify-working');
|
|
|
|
|
|
|
|
|
|
|
|
var Notfications = /*#__PURE__*/function () {
|
|
|
|
var Notfications = /*#__PURE__*/function () {
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
@ -3634,47 +3636,67 @@ var Notfications = /*#__PURE__*/function () {
|
|
|
|
_createClass(Notfications, [{
|
|
|
|
_createClass(Notfications, [{
|
|
|
|
key: "alert",
|
|
|
|
key: "alert",
|
|
|
|
value: function alert(text, status) {
|
|
|
|
value: function alert(text, status) {
|
|
|
|
messageText.innerHTML = text;
|
|
|
|
//notifcation.style.display = 'flex';
|
|
|
|
notifcation.style.display = 'flex';
|
|
|
|
iconWorking.style.display = 'none';
|
|
|
|
|
|
|
|
iconGood.style.display = 'none';
|
|
|
|
|
|
|
|
iconLame.style.display = 'none';
|
|
|
|
var color = '';
|
|
|
|
var color = '';
|
|
|
|
status ? color = '#32cd32' : color = '#F64747';
|
|
|
|
|
|
|
|
|
|
|
|
if (status !== null) {
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
|
|
color = '#32cd32';
|
|
|
|
|
|
|
|
iconWorking.style.display = 'none';
|
|
|
|
|
|
|
|
iconGood.style.display = 'block';
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
color = '#F64747';
|
|
|
|
|
|
|
|
iconWorking.style.display = 'none';
|
|
|
|
|
|
|
|
iconLame.style.display = 'block';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
color = '#200317';
|
|
|
|
|
|
|
|
iconWorking.style.display = 'block';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notifcation.classList.remove('notify-close');
|
|
|
|
|
|
|
|
notifcation.classList.add('notify-open');
|
|
|
|
|
|
|
|
messageText.innerHTML = text;
|
|
|
|
(0, _animeEs.default)({
|
|
|
|
(0, _animeEs.default)({
|
|
|
|
targets: messageText,
|
|
|
|
targets: messageText,
|
|
|
|
backgroundColor: color,
|
|
|
|
backgroundColor: color,
|
|
|
|
easing: 'easeInOutQuint',
|
|
|
|
easing: 'easeInOutQuint',
|
|
|
|
duration: 500,
|
|
|
|
duration: 700,
|
|
|
|
complete: function complete() {
|
|
|
|
complete: function complete() {
|
|
|
|
|
|
|
|
if (status !== null) {
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
(0, _animeEs.default)({
|
|
|
|
notifcation.classList.add('notify-close');
|
|
|
|
targets: messageText,
|
|
|
|
notifcation.classList.remove('notify-open');
|
|
|
|
backgroundColor: '#374857',
|
|
|
|
|
|
|
|
easing: 'easeOutQuint',
|
|
|
|
|
|
|
|
duration: 500
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
(0, _animeEs.default)({
|
|
|
|
/*
|
|
|
|
|
|
|
|
anime({
|
|
|
|
targets: message,
|
|
|
|
targets: message,
|
|
|
|
marginTop: '-20px',
|
|
|
|
marginTop: '-20px',
|
|
|
|
easing: 'easeInOutQuint',
|
|
|
|
easing: 'easeInOutQuint',
|
|
|
|
duration: 500,
|
|
|
|
duration: 500,
|
|
|
|
opacity: 1,
|
|
|
|
opacity: 1,
|
|
|
|
complete: function complete() {
|
|
|
|
complete: () => {
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(() => {
|
|
|
|
(0, _animeEs.default)({
|
|
|
|
anime({
|
|
|
|
targets: message,
|
|
|
|
targets: message,
|
|
|
|
marginTop: '-125px',
|
|
|
|
marginTop: '-125px',
|
|
|
|
easing: 'easeOutQuint',
|
|
|
|
easing: 'easeOutQuint',
|
|
|
|
duration: 500,
|
|
|
|
duration: 500,
|
|
|
|
opacity: 0,
|
|
|
|
opacity: 0,
|
|
|
|
complete: function complete() {
|
|
|
|
complete: () => {
|
|
|
|
notifcation.style.display = 'none';
|
|
|
|
notifcation.style.display = 'none';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 1000);
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
*/
|
|
|
|
} //--------------------------
|
|
|
|
} //--------------------------
|
|
|
|
// event handlers
|
|
|
|
// event handlers
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
@ -3839,6 +3861,7 @@ var PostEditor = /*#__PURE__*/function () {
|
|
|
|
var task = '';
|
|
|
|
var task = '';
|
|
|
|
e === EditorEvent.EDITOR_SAVE ? task = _FipamoAdminAPI.TASK_PAGE_CREATE : task = _FipamoAdminAPI.TASK_PAGE_EDIT;
|
|
|
|
e === EditorEvent.EDITOR_SAVE ? task = _FipamoAdminAPI.TASK_PAGE_CREATE : task = _FipamoAdminAPI.TASK_PAGE_EDIT;
|
|
|
|
new _PageActions.default().collectInfo(document.getElementById('featured-image-upload').files[0]).then(function (page) {
|
|
|
|
new _PageActions.default().collectInfo(document.getElementById('featured-image-upload').files[0]).then(function (page) {
|
|
|
|
|
|
|
|
notify.alert('Writing down changes', null);
|
|
|
|
admin.pageActions(task, page).then(function (r) {
|
|
|
|
admin.pageActions(task, page).then(function (r) {
|
|
|
|
if (r.type === DataEvent.PAGE_ERROR || r.type === DataEvent.API_REQUEST_LAME) {
|
|
|
|
if (r.type === DataEvent.PAGE_ERROR || r.type === DataEvent.API_REQUEST_LAME) {
|
|
|
|
notify.alert(r.message, false);
|
|
|
|
notify.alert(r.message, false);
|
|
|
@ -4207,6 +4230,7 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('save-toggle').addEventListener('click', function () {
|
|
|
|
document.getElementById('save-toggle').addEventListener('click', function () {
|
|
|
|
return new _SettingsActions.default().getInfo().then(function (data) {
|
|
|
|
return new _SettingsActions.default().getInfo().then(function (data) {
|
|
|
|
|
|
|
|
notify.alert('Saving Settings', null);
|
|
|
|
admin.syncSettings(data).then(function (r) {
|
|
|
|
admin.syncSettings(data).then(function (r) {
|
|
|
|
if (r.type == DataEvent.SETTINGS_UPDATED) {
|
|
|
|
if (r.type == DataEvent.SETTINGS_UPDATED) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
@ -4348,6 +4372,7 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
key: "handleImageUpload",
|
|
|
|
key: "handleImageUpload",
|
|
|
|
value: function handleImageUpload(type, files) {
|
|
|
|
value: function handleImageUpload(type, files) {
|
|
|
|
|
|
|
|
notify.alert('Uploading Image... ', null);
|
|
|
|
admin.imageUpload(type, files).then(function (r) {
|
|
|
|
admin.imageUpload(type, files).then(function (r) {
|
|
|
|
if (r.type == DataEvent.AVATAR_UPLOADED) {
|
|
|
|
if (r.type == DataEvent.AVATAR_UPLOADED) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
@ -4367,6 +4392,7 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
var task = {
|
|
|
|
var task = {
|
|
|
|
task: 'publish all pages'
|
|
|
|
task: 'publish all pages'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
notify.alert('Publishing site...', null);
|
|
|
|
admin.publishSite(task).then(function (r) {
|
|
|
|
admin.publishSite(task).then(function (r) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
}).catch(function (err) {
|
|
|
|
}).catch(function (err) {
|
|
|
@ -4378,6 +4404,7 @@ var SettingsIndex = /*#__PURE__*/function () {
|
|
|
|
value: function handleBackup(e) {
|
|
|
|
value: function handleBackup(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
|
|
|
|
notify.alert('Creating backup', null);
|
|
|
|
admin.handleBackup(e.target.id, e.target.files).then(function (r) {
|
|
|
|
admin.handleBackup(e.target.id, e.target.files).then(function (r) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
}).catch(function (err) {
|
|
|
|
}).catch(function (err) {
|
|
|
@ -8210,6 +8237,7 @@ var NavIndex = /*#__PURE__*/function () {
|
|
|
|
_sortablejs.default.create(document.getElementById('nav-pages'), {
|
|
|
|
_sortablejs.default.create(document.getElementById('nav-pages'), {
|
|
|
|
onUpdate: function onUpdate() {
|
|
|
|
onUpdate: function onUpdate() {
|
|
|
|
new _NavActions.default().syncMenu().then(function (data) {
|
|
|
|
new _NavActions.default().syncMenu().then(function (data) {
|
|
|
|
|
|
|
|
notify.alert('Updating Menu', null);
|
|
|
|
admin.syncNav(data).then(function (r) {
|
|
|
|
admin.syncNav(data).then(function (r) {
|
|
|
|
if (r.type == DataEvent.MENU_UPDATED) {
|
|
|
|
if (r.type == DataEvent.MENU_UPDATED) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
@ -8243,6 +8271,7 @@ var NavIndex = /*#__PURE__*/function () {
|
|
|
|
new _NavActions.default().removeItem(id);
|
|
|
|
new _NavActions.default().removeItem(id);
|
|
|
|
new _NavActions.default().syncMenu().then(function (data) {
|
|
|
|
new _NavActions.default().syncMenu().then(function (data) {
|
|
|
|
data.remove = e.target.getAttribute('data-uuid');
|
|
|
|
data.remove = e.target.getAttribute('data-uuid');
|
|
|
|
|
|
|
|
notify.alert('Editing Menu', null);
|
|
|
|
admin.syncNav(data).then(function (r) {
|
|
|
|
admin.syncNav(data).then(function (r) {
|
|
|
|
if (r.type == DataEvent.MENU_UPDATED) {
|
|
|
|
if (r.type == DataEvent.MENU_UPDATED) {
|
|
|
|
notify.alert(r.message, true);
|
|
|
|
notify.alert(r.message, true);
|
|
|
@ -8427,10 +8456,12 @@ var Base = /*#__PURE__*/function () {
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
var authForm = data.formDataToJSON(document.getElementById('login'));
|
|
|
|
var authForm = data.formDataToJSON(document.getElementById('login'));
|
|
|
|
|
|
|
|
notify.alert('Looking, hold up', null);
|
|
|
|
api.login(authForm).then(function (response) {
|
|
|
|
api.login(authForm).then(function (response) {
|
|
|
|
if (response.type === DataEvent.REQUEST_LAME) {
|
|
|
|
if (response.type === DataEvent.REQUEST_LAME) {
|
|
|
|
notify.alert(response.message, false);
|
|
|
|
notify.alert(response.message, false);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notify.alert(response.message, true);
|
|
|
|
e.target.innerHTML = response.message;
|
|
|
|
e.target.innerHTML = response.message;
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
window.location = '/@/dashboard';
|
|
|
|
window.location = '/@/dashboard';
|
|
|
@ -8541,7 +8572,7 @@ var parent = module.bundle.parent;
|
|
|
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
|
|
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
|
|
|
var hostname = "" || location.hostname;
|
|
|
|
var hostname = "" || location.hostname;
|
|
|
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
|
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
|
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "59699" + '/');
|
|
|
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "53859" + '/');
|
|
|
|
|
|
|
|
|
|
|
|
ws.onmessage = function (event) {
|
|
|
|
ws.onmessage = function (event) {
|
|
|
|
checkedAssets = {};
|
|
|
|
checkedAssets = {};
|
|
|
|