diff --git a/index.html b/index.html index 337407cb..c6ee01d7 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,6 @@ html, body { background: #ab25c0; /* before page load */ - /* background: rgb(171, 37, 192); before page load */ height: 100%; margin: 0; } diff --git a/package.json b/package.json index 3e1fd6e0..400e9089 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "app.salona", "private": true, - "version": "2.90.8", + "version": "2.90.9", "type": "module", "scripts": { "dev": "vite --host", diff --git a/src/App.tsx b/src/App.tsx index 035dc69b..2141772b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,5 @@ import { useEffect } from "react"; -import "aos/dist/aos.css"; -import "swiper/swiper-bundle.css"; -import "react-h5-audio-player/lib/styles.css"; -import "./App.css"; + import AOS from "aos"; import { ErrorBoundary } from "react-error-boundary"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -11,10 +8,7 @@ import { ErrorBoundaryFallback } from "@/components/ErrorBoundaryFallback"; import SplashScreen from "./components/SplashScreen"; import { Toaster } from "react-hot-toast"; import VpnDetector from "./components/VpnDetector"; -import { - mutationErrorHandler, - requestErrorRetryHandler, -} from "./utils/error-handlers"; +import { mutationErrorHandler, requestErrorRetryHandler } from "./utils/error-handlers"; import UpdateDetector from "./components/UpdateDetector"; import { MultiAccountsProvider } from "@appointment/hooks/useMultipleAccounts.tsx"; @@ -22,89 +16,85 @@ import AllRoutes from "@/routes"; import useSamsungBrowserWarning from "./hooks/useSamsungBrowserWarning"; import InternetStatusDetector from "./components/InternetStatusDetector"; -import "./App.css"; import LayoutWithNavigation from "./apps/new-ui/components/FooterLayout"; +import "swiper/swiper-bundle.css"; +import "react-h5-audio-player/lib/styles.css"; +import "./App.css"; const preventPinchZoom = (event: TouchEvent) => { - if (event.touches.length > 1) event.preventDefault(); + if (event.touches.length > 1) event.preventDefault(); }; //main file function App() { - // ====================DON'T DELETE PLEASE========================================== - // useEffect(() => { - // const themeColorMetaTag = document.querySelector( - // 'meta[name="theme-color"]' - // ); - // if (themeColorMetaTag) { - // const backgroundColor = getComputedStyle(document.body).backgroundColor; + // ====================DON'T DELETE PLEASE========================================== + // useEffect(() => { + // const themeColorMetaTag = document.querySelector( + // 'meta[name="theme-color"]' + // ); + // if (themeColorMetaTag) { + // const backgroundColor = getComputedStyle(document.body).backgroundColor; - // // If backgroundColor is transparent or the default color, set it to black - // themeColorMetaTag.setAttribute("content", backgroundColor || "#000"); - // } - // }, []); + // // If backgroundColor is transparent or the default color, set it to black + // themeColorMetaTag.setAttribute("content", backgroundColor || "#000"); + // } + // }, []); - // ============================================================= - useEffect(() => { - const themeColorMetaTag = document.querySelector( - 'meta[name="theme-color"]' + // ============================================================= + useEffect(() => { + const themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); + if (themeColorMetaTag) { + themeColorMetaTag.setAttribute("content", "#ab25c0"); // رنگ بنفش ثابت + } + }, []); + + useSamsungBrowserWarning(); + const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: Infinity, + retry: requestErrorRetryHandler, + }, + mutations: { + onError: mutationErrorHandler, + }, + }, + }); + + useEffect(() => { + AOS.init({ + duration: 1200, + once: true, + }); + + document.addEventListener("touchmove", preventPinchZoom, { + passive: false, + }); + return () => { + document.removeEventListener("touchmove", preventPinchZoom); + }; + }, []); + + return ( + + + + + + + }> + + + + + + + + + + + ); - if (themeColorMetaTag) { - themeColorMetaTag.setAttribute("content", "#ab25c0"); // رنگ بنفش ثابت - } - }, []); - - useSamsungBrowserWarning(); - const queryClient = new QueryClient({ - defaultOptions: { - queries: { - staleTime: Infinity, - retry: requestErrorRetryHandler, - }, - mutations: { - onError: mutationErrorHandler, - }, - }, - }); - - useEffect(() => { - AOS.init({ - duration: 1200, - once: true, - }); - - document.addEventListener("touchmove", preventPinchZoom, { - passive: false, - }); - return () => { - document.removeEventListener("touchmove", preventPinchZoom); - }; - }, []); - - return ( - - - - - - - ( - - )} - > - - - - - - - - - - - - ); } export default App; diff --git a/src/apps/new-ui/pages/Profile/+components/LangSupportRow.tsx b/src/apps/new-ui/pages/Profile/+components/LangSupportRow.tsx index 354eeac6..c41a42c8 100644 --- a/src/apps/new-ui/pages/Profile/+components/LangSupportRow.tsx +++ b/src/apps/new-ui/pages/Profile/+components/LangSupportRow.tsx @@ -7,9 +7,8 @@ const LangSupportRow: React.FC = ({ headsetIcon, onOpenSupport }) => { return (
headset icon diff --git a/src/apps/new-ui/pages/Profile/+components/PillSelect.tsx b/src/apps/new-ui/pages/Profile/+components/PillSelect.tsx index f33783e3..bf8450f1 100644 --- a/src/apps/new-ui/pages/Profile/+components/PillSelect.tsx +++ b/src/apps/new-ui/pages/Profile/+components/PillSelect.tsx @@ -47,8 +47,6 @@ export default function PillSelect({ options, value, defaultValue, onChange, cla return (
setOpen((s) => !s)} aria-haspopup="listbox" aria-expanded={open} diff --git a/src/apps/new-ui/pages/Profile/index.tsx b/src/apps/new-ui/pages/Profile/index.tsx index 7f9bac76..c5b5d02a 100644 --- a/src/apps/new-ui/pages/Profile/index.tsx +++ b/src/apps/new-ui/pages/Profile/index.tsx @@ -231,7 +231,7 @@ const Profile: React.FC = () => { }, []); return ( -
+
{ navigate("/modules-list")} />
- setLang(v)} - /> +
+ setLang(v)} + /> +
diff --git a/src/main.tsx b/src/main.tsx index 4d703c98..7a7ab530 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,7 @@ // import { StrictMode } from 'react'; import { createRoot } from "react-dom/client"; import App from "./App.tsx"; +import "aos/dist/aos.css"; window.requestAnimationFrame(() => { const el = document.getElementById('initial-bg'); diff --git a/vite.config.ts b/vite.config.ts index e100d675..a630afcf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,7 +22,7 @@ export default defineConfig({ short_name: "Salona", start_url: "/", scope: "/", - theme_color: "#ab25c0", + theme_color: "#000000", background_color: "#ab25c0", dir: "rtl", lang: "fa",