Compare commits

..

No commits in common. '0331967decd4c74093691b9e12cffdeaa738da60' and '65e7e9cfc4375b0f1dbdd9940a5855d991df99d6' have entirely different histories.

  1. 24
      public/index.html
  2. 2
      src/AppRouter.js
  3. 48
      src/views/Home/Navbar/Laptop/index.js
  4. 11
      src/views/Home/Navbar/Laptop/index.scss

@ -1,13 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="false" /> <meta
name="viewport"
content="width=device-width, initial-scale=1"
user-scalable="false"
/>
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta name="description" content="دانوین" /> <meta name="description" content="دانوین" />
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" rel="stylesheet" /> <link
href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css"
rel="stylesheet"
/>
<meta name="mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
@ -19,7 +25,6 @@
<script src="en.js"></script> <script src="en.js"></script>
<script> <script>
const lang = localStorage.getItem("language"); const lang = localStorage.getItem("language");
window.lang = lang
window.ar = ar; window.ar = ar;
window.en = en; window.en = en;
function t(val) { function t(val) {
@ -48,8 +53,14 @@
<body> <body>
<!-- Google Tag Manager (noscript) --> <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L" height="0" width="0" <noscript
style="display: none; visibility: hidden"></iframe></noscript> ><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) --> <!-- End Google Tag Manager (noscript) -->
<div id="root"></div> <div id="root"></div>
<script> <script>
@ -71,5 +82,4 @@
} }
</script> </script>
</body> </body>
</html> </html>

@ -218,7 +218,7 @@ class AppRouter extends Component {
)} )}
</Route> </Route>
<Route exact path={"/profile"}> <Route exact path={"/profile"}>
{status ? <Auth page={"profile"} /> : null} {mobile ? status ? <Auth page={"profile"} /> : null : null}
</Route> </Route>
<Route exact path={"/qr-scan"}> <Route exact path={"/qr-scan"}>
{mobile ? ( {mobile ? (

@ -142,27 +142,11 @@ class LaptopNavbar extends Component {
</Menu> </Menu>
<select <select
className="language-select" className="language-select"
onChange={(e) => { onChange={(e) => changeLanguage(e.target.value)}
window.localStorage.setItem("language", e.target.value); defaultValue={localStorage.getItem("language") || "fa"}
window.location.reload();
}}
>
{console.log(window.lang)}
{[
{ key: "فارسی", lang: "fa", default: true },
{ key: "English", lang: "en" },
{ key: "العربیه", lang: "ar" },
].map((el, index) => (
<option
key={el.lang}
value={el.lang}
selected={
(!window.lang && el.default) || el.lang == window.lang
}
> >
{el.key} {["fa", "en", "ar"].map((lang, index) => (
</option> <option key={index}>{lang}</option>
))} ))}
</select> </select>
<div <div
@ -195,27 +179,11 @@ class LaptopNavbar extends Component {
<div className="d-flex"> <div className="d-flex">
<select <select
className="language-select" className="language-select"
onChange={(e) => { onChange={(e) => changeLanguage(e.target.value)}
window.localStorage.setItem("language", e.target.value); defaultValue={localStorage.getItem("language") || "fa"}
window.location.reload();
}}
>
{console.log(window.lang)}
{[
{ key: "فارسی", lang: "fa", default: true },
{ key: "English", lang: "en" },
{ key: "العربیه", lang: "ar" },
].map((el, index) => (
<option
key={el.lang}
value={el.lang}
selected={
(!window.lang && el.default) || el.lang == window.lang
}
> >
{el.key} {["fa", "en", "ar"].map((lang, index) => (
</option> <option key={index}>{lang}</option>
))} ))}
</select> </select>
<Link <Link

@ -3,16 +3,15 @@
margin: 0px auto; margin: 0px auto;
.language-select { .language-select {
border: 1px solid #6cbe44; border: none;
outline: none; outline: none;
width: 100px; width: 50px;
background-color: #6cbe44;
color: #6cbe44; color: white;
font-weight: 500; font-weight: 500;
margin: 0px 10px; margin: 0px 10px;
border-radius: 5px; border-radius: 5px;
padding: 3px; padding: 0px 4px;
} }
&__header { &__header {

Loading…
Cancel
Save