Browse Source

fix: datee formate and topbar

stage
Vitalik 2 months ago
parent
commit
8b873a9858
  1. 6
      .env
  2. 9
      scripts/push.sh
  3. 2
      src/containers/App/router/routes.config.ts
  4. 2
      src/containers/Layout/topbar/TopbarProfile.tsx
  5. 4
      src/services/system/real-time.service.ts
  6. 5
      src/shared/helpers/get-time-from-message-send.helper.ts

6
.env

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
# REACT_APP_MOD=production
REACT_APP_MOD=production
# REACT_APP_MOD=local
# Sentry logger setup
# SENTRY_ENVIROMENT=production
SENTRY_ENVIROMENT=develop
SENTRY_ENVIROMENT=production
# SENTRY_ENVIROMENT=develop
# The SENTRY_AUTH_TOKEN variable is picked up by the Sentry Build Plugin.
# It's used for authentication when uploading source maps.

9
scripts/push.sh

@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
# npm run build
ssh -p 32452 programmer@195.201.197.217 "
cd /home/programmer/web-app &&
ssh developer@10.3.1.164 "
cd /var/www/web-app &&
rm -R build
"
scp -P 32452 -r ./build programmer@195.201.197.217:/home/programmer/web-app/build
scp -r ./build developer@10.3.1.164:/var/www/web-app/build
ssh -p 32452 programmer@195.201.197.217 "nginx -s reload"
ssh developer@10.3.1.164 "sudo systemctl restart nginx"
# scp -r build developer@10.3.1.164:/var/www/web-app/build

2
src/containers/App/router/routes.config.ts

@ -83,7 +83,7 @@ const privateRoutes = [ @@ -83,7 +83,7 @@ const privateRoutes = [
component: ContactPage,
},
{
path: "/s_e_c_r_e_t_m_o_d",
path: "/mod",
component: SecretModPage,
},
];

2
src/containers/Layout/topbar/TopbarProfile.tsx

@ -31,7 +31,7 @@ export const TopBarProfile = () => { @@ -31,7 +31,7 @@ export const TopBarProfile = () => {
};
let userAvatar = default_avatar;
if (avatarProfile || profile.info.avatarUrl) {
userAvatar = getImageThumb(avatarProfile, "small");
userAvatar = avatarProfile;
}
return (

4
src/services/system/real-time.service.ts

@ -101,6 +101,10 @@ export class SocketIo { @@ -101,6 +101,10 @@ export class SocketIo {
this._onSocketSendEvent("version");
this._onSocketSendEvent("stopSessions");
this._on("secret-mod/turn", () => {
window.location.reload();
});
this._on("error/join-user", async () => {
await authService.refreshSession();
this.emit("join-user");

5
src/shared/helpers/get-time-from-message-send.helper.ts

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
import moment from "moment";
export const getTimeFromMessageSend = (date: string) => {
const sendDate = new Date(date);
const todayDate = new Date();
@ -9,7 +11,8 @@ export const getTimeFromMessageSend = (date: string) => { @@ -9,7 +11,8 @@ export const getTimeFromMessageSend = (date: string) => {
const sendTimeToRender = sendDate.toString().substr(16, 5);
return sendTimeToRender;
}
console.log(sendDate);
const sendDateToRender = sendDate.toLocaleDateString().replaceAll("/", ".");
const sendDateToRender = moment(sendDate).format("DD-MM-YYYY");
return sendDateToRender;
};

Loading…
Cancel
Save