From 967f9b414e2ebcf13ba20b6118cc3cf11322e138 Mon Sep 17 00:00:00 2001 From: dimitar Date: Sat, 26 Apr 2025 17:46:59 +0200 Subject: [PATCH] prod --- backend/src/config/cors.config.ts | 6 +- backend/src/email/email.service.ts | 28 ++ backend/src/main.ts | 74 ++-- .../src/components/ultrasound/ultraSound.jsx | 343 +++++++++--------- frontend/src/pages/homepage/Home.jsx | 2 +- frontend/vite.config.js | 16 +- 6 files changed, 252 insertions(+), 217 deletions(-) diff --git a/backend/src/config/cors.config.ts b/backend/src/config/cors.config.ts index 98c9fbc..93fb029 100644 --- a/backend/src/config/cors.config.ts +++ b/backend/src/config/cors.config.ts @@ -3,8 +3,10 @@ export const corsConfig = { "http://localhost:5173", "http://localhost:4444", "http://localhost:3000", - "https://www.placebo.mk", - "https://placebo.mk", + "https://www.imk.mk", + "https://imk.mk/", + // "https://www.placebo.mk", + // "https://placebo.mk", "https://imkapi.oblak.solutions", // "https://eu-assets.i.posthog.com", // "https://app.posthog.com", diff --git a/backend/src/email/email.service.ts b/backend/src/email/email.service.ts index 3457624..4aa6adb 100644 --- a/backend/src/email/email.service.ts +++ b/backend/src/email/email.service.ts @@ -253,6 +253,26 @@ export class EmailService {

If you didn't request this, please ignore this email or contact support if you have concerns.

Best regards,
IMK Team

+
+

Барање за ресетирање лозинка

+

Hello ${name},

+

Добивме барање за ресетирање лозинка. Кликнете на линкот подолу за да поставите нова лозинка:

+

+ Ресетирај лозинка +

+

This link will expire in 1 hour.

+

Линкот е валиден 1 час.

+

If you didn't request this, please ignore this email or contact support if you have concerns.

+

Доколку не сте побарале ресетирање на лозинка игнорирајте ја оваа е-пошта

+

Секое добро,
IMK Team

+
`, }; @@ -287,6 +307,14 @@ export class EmailService {

If you did not make this change, please contact our support team immediately.

Best regards,
IMK Team

+ +
+

Лозинката е успешно променена

+

Здраво ${name},

+

Вашата лозинка е успешно променена.

+

Доколку не сте побарале промената на лозинката, ве молиме веднаш да не контактирате.

+

Секое добро,
IMK Team

+
`, }; diff --git a/backend/src/main.ts b/backend/src/main.ts index da87609..90598e1 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -32,43 +32,43 @@ async function bootstrap() { }), ); - app.use( - helmet({ - contentSecurityPolicy: { - directives: { - defaultSrc: ["'self'"], - scriptSrc: [ - "'self'", - "'unsafe-inline'", - "'unsafe-eval'", - "https://eu-assets.i.posthog.com", - "https://app.posthog.com", - "https://eu.posthog.com", - ], - connectSrc: [ - "'self'", - "https://eu.posthog.com", - "https://eu-assets.i.posthog.com", - "https://app.posthog.com", - ], - imgSrc: ["'self'", "data:", "https:"], - styleSrc: ["'self'", "'unsafe-inline'"], - fontSrc: ["'self'", "data:", "https:"], - rameSrc: [ - "'self'", - "https://eu-assets.i.posthog.com", - "https://app.posthog.com", - ], - }, - }, - crossOriginResourcePolicy: { - policy: "cross-origin", - }, - crossOriginOpenerPolicy: { - policy: "same-origin-allow-popups", - }, - }), - ); + // app.use( + // helmet({ + // contentSecurityPolicy: { + // directives: { + // defaultSrc: ["'self'"], + // scriptSrc: [ + // "'self'", + // "'unsafe-inline'", + // "'unsafe-eval'", + // "https://eu-assets.i.posthog.com", + // "https://app.posthog.com", + // "https://eu.posthog.com", + // ], + // connectSrc: [ + // "'self'", + // "https://eu.posthog.com", + // "https://eu-assets.i.posthog.com", + // "https://app.posthog.com", + // ], + // imgSrc: ["'self'", "data:", "https:"], + // styleSrc: ["'self'", "'unsafe-inline'"], + // fontSrc: ["'self'", "data:", "https:"], + // rameSrc: [ + // "'self'", + // "https://eu-assets.i.posthog.com", + // "https://app.posthog.com", + // ], + // }, + // }, + // crossOriginResourcePolicy: { + // policy: "cross-origin", + // }, + // crossOriginOpenerPolicy: { + // policy: "same-origin-allow-popups", + // }, + // }), + // ); const port = process.env.PORT || 3000; diff --git a/frontend/src/components/ultrasound/ultraSound.jsx b/frontend/src/components/ultrasound/ultraSound.jsx index 46f12c5..56a8bb3 100644 --- a/frontend/src/components/ultrasound/ultraSound.jsx +++ b/frontend/src/components/ultrasound/ultraSound.jsx @@ -1,176 +1,181 @@ -import { useEffect } from 'react'; -import { motion } from 'framer-motion'; -import { Card } from '../UI/Card'; +import { useEffect } from "react"; +import { motion } from "framer-motion"; +import { Card } from "../UI/Card"; +import { ScrollDownArrow } from "../UI/ScrollDownArrow"; export default function UltraSound() { - useEffect(() => { - window.scrollTo({ top: 0, behavior: "smooth" }) - }, []) + useEffect(() => { + window.scrollTo({ top: 0, behavior: "smooth" }); + }, []); - const scrollToContent = () => { - const contentSection = document.getElementById('video-section'); - contentSection?.scrollIntoView({ behavior: 'smooth' }); - }; + const scrollToContent = () => { + const contentSection = document.getElementById("video-section"); + contentSection?.scrollIntoView({ behavior: "smooth" }); + }; - const videoDetails = { - title: "Ултразвучно испитување", - description: "Ултразвучното испитување е неразорна метода за испитување на материјали која користи високофреквентни звучни бранови за откривање на внатрешни дефекти или за карактеризација на материјалите.", - benefits: [ - "Неразорно испитување - не предизвикува оштетување на материјалот", - "Висока прецизност во откривањето на дефекти", - "Можност за испитување на различни материјали и дебелини", - "Брзи и точни резултати", - "Безбедна метода за операторот и околината" - ], - applications: [ - "Испитување на заварени споеви", - "Детекција на пукнатини и празнини", - "Мерење на дебелина на материјали", - "Контрола на квалитет во производство", - "Инспекција на метални конструкции" - ], - videoUrl: "https://www.youtube.com/embed/WGjG8XWS9RQ?si=fE2aL5eZ-5ivuuxV" - }; + const videoDetails = { + title: "Ултразвучно испитување", + description: + "Ултразвучното испитување е неразорна метода за испитување на материјали која користи високофреквентни звучни бранови за откривање на внатрешни дефекти или за карактеризација на материјалите.", + benefits: [ + "Неразорно испитување - не предизвикува оштетување на материјалот", + "Висока прецизност во откривањето на дефекти", + "Можност за испитување на различни материјали и дебелини", + "Брзи и точни резултати", + "Безбедна метода за операторот и околината", + ], + applications: [ + "Испитување на заварени споеви", + "Детекција на пукнатини и празнини", + "Мерење на дебелина на материјали", + "Контрола на квалитет во производство", + "Инспекција на метални конструкции", + ], + videoUrl: "https://www.youtube.com/embed/WGjG8XWS9RQ?si=fE2aL5eZ-5ivuuxV", + }; - return ( -
- {/* Hero Section */} -
-
-
-
- -

- {videoDetails.title} -

-
-

- {videoDetails.description} -

-
+ return ( +
+ {/* Hero Section */} +
+
+
+
+ +

+ {videoDetails.title} +

+
+

+ {videoDetails.description} +

+
- {/* Animated Down Arrow */} - - - - - -
-
-
- - {/* Video Section */} -
-
- -