Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jan 3, 2024
2 parents a51debf + 3103f4c commit 83ce90d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added energy storage container to database, myems-api and myems-admin
- added baidu map link and google maps link to get coordinate in myems-admin
- added cookieExpireTime to config.js in myems-web
- added background image to login page in myems-web
-
### Changed
- changed microgrid monitoring in myems-web
Expand Down
20 changes: 10 additions & 10 deletions myems-web/src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,23 @@ const Main = props => {
let user_uuid = getCookieValue('user_uuid');
let token = getCookieValue('token');
if(checkEmpty(token)|| checkEmpty(user_uuid)) return;
createCookie('is_logged_in', true, 1000 * 60 * 10 * 1);
createCookie('user_name', user_name, 1000 * 60 * 10 * 1);
createCookie('user_display_name', user_display_name, 1000 * 60 * 10 * 1);
createCookie('user_uuid', user_uuid, 1000 * 60 * 10 * 1);
createCookie('token', token, 1000 * 60 * 10 * 1);
createCookie('is_logged_in', true, settings.cookieExpireTime);
createCookie('user_name', user_name, settings.cookieExpireTime);
createCookie('user_display_name', user_display_name, settings.cookieExpireTime);
createCookie('user_uuid', user_uuid, settings.cookieExpireTime);
createCookie('token', token, settings.cookieExpireTime);
};
const mousedown = () => {
let user_name = getCookieValue('user_name');
let user_display_name = getCookieValue('user_display_name');
let user_uuid = getCookieValue('user_uuid');
let token = getCookieValue('token');
if(checkEmpty(token)|| checkEmpty(user_uuid)) return;
createCookie('is_logged_in', true, 1000 * 60 * 10 * 1);
createCookie('user_name', user_name, 1000 * 60 * 10 * 1);
createCookie('user_display_name', user_display_name, 1000 * 60 * 10 * 1);
createCookie('user_uuid', user_uuid, 1000 * 60 * 10 * 1);
createCookie('token', token, 1000 * 60 * 10 * 1);
createCookie('is_logged_in', true, settings.cookieExpireTime);
createCookie('user_name', user_name, settings.cookieExpireTime);
createCookie('user_display_name', user_display_name, settings.cookieExpireTime);
createCookie('user_uuid', user_uuid, settings.cookieExpireTime);
createCookie('token', token, settings.cookieExpireTime);
};
window.addEventListener("mousemove", mousemove);
window.addEventListener("mousedown", mousedown);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/Meter/RealtimeChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Card, CardHeader, CardBody, ListGroup, ListGroupItem } from 'reactstrap
import { rgbaColor } from '../../../helpers/utils';
import { withTranslation } from 'react-i18next';
import {v4 as uuid} from 'uuid';
import { APIBaseURL, settings } from '../../../config';
import { APIBaseURL } from '../../../config';
import { getCookieValue, floatFormatter } from '../../../helpers/utils';
import { toast } from 'react-toastify';

Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/Space/RealtimeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { Card, CardHeader, CardBody, ListGroup, ListGroupItem } from 'reactstrap';
import { withTranslation } from 'react-i18next';
import {v4 as uuid} from 'uuid';
import { APIBaseURL, settings } from '../../../config';
import { APIBaseURL } from '../../../config';
import { getCookieValue } from '../../../helpers/utils';
import { toast } from 'react-toastify';

Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
setIsFetchDashboard(false);
toast(
<Fragment>
{t("Welcome to MyEMS")}!<br />
{t("Welcome to MyEMS")}<br />
{t("An Industry Leading Open Source Energy Management System")}
</Fragment>
);
Expand Down
3 changes: 2 additions & 1 deletion myems-web/src/layouts/AuthBasicLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Card, CardBody, Col, Row } from 'reactstrap';
import Logo from '../components/navbar/Logo';
import Section from '../components/common/Section';
import AuthBasicRoutes from '../components/auth/basic/AuthBasicRoutes';
import bg1 from '../assets/img/generic/login-bg-1920x1080.jpg';

const AuthBasicLayout = () => (
<Section className="py-0">
<Section className="py-0 overflow-hidden" image={bg1} position="center bottom" overlay>
<Row className="flex-center min-vh-100 py-6">
<Col sm={10} md={8} lg={6} xl={5} className="col-xxl-4">
<Logo />
Expand Down

0 comments on commit 83ce90d

Please sign in to comment.