Skip to content

Commit

Permalink
Update github repo package
Browse files Browse the repository at this point in the history
  • Loading branch information
underpostnet committed Dec 31, 2024
1 parent 652d5fb commit 171d19b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/client/components/core/LogIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ const LogIn = {
if ('model' in inputData) body[inputData.model] = s(`.${inputData.id}`).value;
}
const result = await UserService.post({ id: 'auth', body });
if (result.status === 'success') await Auth.sessionIn(result);
if (result.status === 'success') {
await Auth.sessionIn(result);
setTimeout(() => {
if (s(`.modal-log-in`)) s(`.btn-close-modal-log-in`).click();
if (s(`.modal-sign-up`)) s(`.btn-close-modal-sign-up`).click();
});
}
if (result.status === 'error' && result.message.match('attempts')) {
htmls(`.login-attempt-warn-value`, result.message.split(':')[1]);
s(`.login-attempt-warn-container`).classList.remove('hide');
Expand Down
4 changes: 1 addition & 3 deletions src/client/components/core/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,6 @@ const Modal = {
case 'slide-menu-right':
case 'slide-menu-left':
const backMenuButtonEvent = async () => {
if (location.pathname !== getProxyPath()) setPath(getProxyPath());
if (s(`.menu-btn-container-children`)) htmls(`.menu-btn-container-children`, '');
// htmls(`.nav-title-display-${'modal-menu'}`, html`<i class="fas fa-home"></i> ${Translate.Render('home')}`);
htmls(`.nav-title-display-${'modal-menu'}`, html``);
Expand All @@ -1346,8 +1345,7 @@ const Modal = {
backMenuButtonEvent();
}
s(`.btn-close-modal-menu`).click();
if (window.location.pathname !== (getProxyPath() === '/' ? getProxyPath() : `${getProxyPath()}/`))
setPath(getProxyPath());
setPath(getProxyPath());
setDocTitle({ ...options.RouterInstance, route: '' });
};
EventsUI.onClick(`.btn-icon-menu-back`, backMenuButtonEvent);
Expand Down
5 changes: 4 additions & 1 deletion src/client/components/core/VanillaJs.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ const pasteData = () => new Promise((resolve) => navigator.clipboard.readText().
* history.
* @memberof VanillaJS
*/
const setPath = (path = '/', stateStorage = {}, title = '') => history.pushState(stateStorage, title, path);
const setPath = (path = '/', stateStorage = {}, title = '') => {
if (window.location.pathname === path || window.location.pathname === `${path}/`) return;
return history.pushState(stateStorage, title, path);
};

/**
* The function `getQueryParams` extracts query parameters from the current URL and returns them as an
Expand Down
3 changes: 0 additions & 3 deletions src/client/components/default/LogInDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const LogInDefault = async function () {
s(`.main-btn-sign-up`).style.display = 'none';
s(`.main-btn-log-out`).style.display = null;
s(`.main-btn-account`).style.display = null;

if (s(`.modal-log-in`)) s(`.btn-close-modal-log-in`).click();
if (s(`.modal-sign-up`)) s(`.btn-close-modal-sign-up`).click();
};
const { user } = await Auth.sessionIn();
ElementsDefault.Data.user.main.model.user = user;
Expand Down
1 change: 1 addition & 0 deletions src/server/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ const maintenanceMiddleware = (req, res, port, proxyRouter) => {

const setUpProxyMaintenanceServer = ({ deployGroupId }) => {
shellExec(`pm2 kill`);
shellExec(`node bin/deploy valkey-service`);
const proxyDeployId = fs.readFileSync(`./engine-private/deploy/${deployGroupId}.proxy`, 'utf8').trim();
shellExec(`node bin/deploy conf ${proxyDeployId} production`);
shellExec(`node bin/deploy run ${proxyDeployId} maintenance`);
Expand Down

0 comments on commit 171d19b

Please sign in to comment.