Merge branch 'feature/debug_manifest' into 'develop'
Feature/debug manifest See merge request witel3/loan-facilities-expert!63
This commit is contained in:
@@ -2,6 +2,18 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||
|
||||
|
||||
NEXT_PUBLIC_PRIMARY_MAIN = "#084070"
|
||||
NEXT_PUBLIC_PRIMARY_CONTRAST_TEXT = "#fff"
|
||||
NEXT_PUBLIC_PRIMARY_LIGHT = "#2c6291"
|
||||
NEXT_PUBLIC_PRIMARY_DARK = "#11293e"
|
||||
|
||||
|
||||
NEXT_PUBLIC_SECONDARY_MAIN = "#FF4E00"
|
||||
NEXT_PUBLIC_SECONDARY_CONTRAST_TEXT = "#fff"
|
||||
NEXT_PUBLIC_SECONDARY_LIGHT = "#ed743e"
|
||||
NEXT_PUBLIC_SECONDARY_DARK = "#ad3a07"
|
||||
|
||||
NEXT_PUBLIC_API_URL = "http://Your IP:3000"
|
||||
|
||||
NEXT_PUBLIC_BASE_URL = "deploy api"
|
||||
|
||||
@@ -6,7 +6,7 @@ const nextConfig = {
|
||||
defaultLocale: 'fa',
|
||||
locales: ['fa'],
|
||||
localeDetection: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
|
||||
BIN
public/icons/favicon.png
Normal file
BIN
public/icons/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
57
public/manifest.json
Normal file
57
public/manifest.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"short_name": "Loan Facilities Dashboard",
|
||||
"name": "Loan Facilities Expert Dashboard",
|
||||
"description": "Loan Facilities",
|
||||
"version": "1.0.0",
|
||||
"version_name": "1.0.0 beta",
|
||||
"start_url": "/dashboard",
|
||||
"orientation": "portrait",
|
||||
"display": "standalone",
|
||||
"theme_color": "#084070",
|
||||
"background_color": "#084070",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/maskable_icon.png",
|
||||
"sizes": "any",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/maskable_icon_x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
"government"
|
||||
]
|
||||
}
|
||||
@@ -96,7 +96,7 @@ const DashboardChangePasswordComponent = () => {
|
||||
<Box
|
||||
sx={{position: "relative", width: "100%", height: 200}}
|
||||
>
|
||||
<Image fill src="/images/change-password.svg" alt=""/>
|
||||
<Image fill src="/images/change-password.svg" alt="" priority/>
|
||||
</Box>
|
||||
<Typography margin={2} variant="h4" textAlign="center">
|
||||
{t("ChangePassword.typography_change_password")}
|
||||
|
||||
@@ -64,7 +64,7 @@ const LoginComponent = () => {
|
||||
<Box
|
||||
sx={{position: "relative", width: "100%", height: 200}}
|
||||
>
|
||||
<Image fill src="/images/login.svg" alt={t("app_name")}/>
|
||||
<Image fill src="/images/login.svg" alt={t("app_name")} priority/>
|
||||
</Box>
|
||||
<Typography margin={2} variant="h4" textAlign="center">
|
||||
{t("login_expert")}
|
||||
|
||||
@@ -3,16 +3,16 @@ import {faIR} from "@mui/x-date-pickers/locales";
|
||||
const theme = {
|
||||
palette: {
|
||||
primary: {
|
||||
main: "#084070",
|
||||
contrastText: "#fff",
|
||||
light: "#2c6291",
|
||||
dark: "#11293e",
|
||||
main: process.env.NEXT_PUBLIC_PRIMARY_MAIN,
|
||||
contrastText: process.env.NEXT_PUBLIC_PRIMARY_CONTRAST_TEXT,
|
||||
light: process.env.NEXT_PUBLIC_PRIMARY_LIGHT,
|
||||
dark: process.env.NEXT_PUBLIC_PRIMARY_DARK,
|
||||
},
|
||||
secondary: {
|
||||
main: "#FF4E00",
|
||||
contrastText: "#fff",
|
||||
light: "#ed743e",
|
||||
dark: "#ad3a07",
|
||||
main: process.env.NEXT_PUBLIC_SECONDARY_MAIN,
|
||||
contrastText: process.env.NEXT_PUBLIC_SECENDARY_CONTRAST_TEXT,
|
||||
light: process.env.NEXT_PUBLIC_SECENDARY_LIGHT,
|
||||
dark: process.env.NEXT_PUBLIC_SECENDARY_DARK,
|
||||
},
|
||||
},
|
||||
faIR,
|
||||
|
||||
@@ -83,13 +83,13 @@ function AppLayout({children, isBot}) {
|
||||
rel="icon"
|
||||
type="image/svg"
|
||||
sizes="32x32"
|
||||
href="/images/logo.png"
|
||||
href="/icons/favicon.png"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/svg"
|
||||
sizes="16x16"
|
||||
href="/images/logo.png"
|
||||
href="/icons/favicon.png"
|
||||
/>
|
||||
</Head>
|
||||
<NextNProgress
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import {Divider, Stack, Toolbar, Typography} from "@mui/material";
|
||||
import {useTranslations} from "next-intl";
|
||||
import SidebarList from "./SidebarList";
|
||||
import useUser from "@/lib/app/hooks/useUser";
|
||||
|
||||
const SidebarDrawer = ({handleDrawerToggle}) => {
|
||||
const {user} = useUser()
|
||||
const t = useTranslations();
|
||||
return (
|
||||
<>
|
||||
@@ -12,10 +14,7 @@ const SidebarDrawer = ({handleDrawerToggle}) => {
|
||||
{t("app_short_name")}
|
||||
</Typography>
|
||||
<Typography variant="caption">
|
||||
{
|
||||
t("expert") /* make if on thease t("user_welfare_services")
|
||||
t("user_navy") */
|
||||
}
|
||||
{user.name} | {user.position}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Toolbar>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {NextLinkComposed} from "@/core/components/LinkRouting";
|
||||
import ExpandLess from "@mui/icons-material/ExpandLess";
|
||||
import ExpandMore from "@mui/icons-material/ExpandMore";
|
||||
import {Badge, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography,} from "@mui/material";
|
||||
import {Badge, IconButton, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography,} from "@mui/material";
|
||||
import {useTranslations} from "next-intl";
|
||||
import {Fragment} from "react";
|
||||
import SidebarListSubItem from "./SidebarListSubItem";
|
||||
@@ -11,7 +11,19 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
||||
|
||||
return (
|
||||
<Fragment key={item.key}>
|
||||
<ListItem disablePadding sx={{display: "block"}}>
|
||||
<ListItem disablePadding secondaryAction={
|
||||
<IconButton>
|
||||
<Badge
|
||||
badgeContent="56"
|
||||
color="error"
|
||||
variant="standard"
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
/>
|
||||
</IconButton>
|
||||
}>
|
||||
<ListItemButton
|
||||
selected={item.selected}
|
||||
{...(item.type == "page" && {
|
||||
@@ -29,6 +41,7 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
}}
|
||||
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
@@ -51,17 +64,9 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
{item.type == "menu" &&
|
||||
(item.showSubItem ? <ExpandLess/> : <ExpandMore/>)}
|
||||
<Badge
|
||||
badgeContent="21"
|
||||
color="error"
|
||||
variant="standard"
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
/>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
{item.subItem && (
|
||||
|
||||
@@ -9,13 +9,14 @@ import {NextIntlProvider} from "next-intl";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
|
||||
const App = ({Component, pageProps}) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<UserProvider>
|
||||
<LanguageProvider>
|
||||
<NextIntlProvider messages={pageProps.messages || {}}>
|
||||
<MuiLayout isBot={pageProps.isBot}>
|
||||
{pageProps.message ? <TitlePage text={pageProps.title}/> : ''}
|
||||
{pageProps.messages ? <TitlePage text={pageProps.title}/> : ''}
|
||||
<LoadingProvider>
|
||||
<AppLayout isBot={pageProps.isBot}>
|
||||
<Component {...pageProps} />
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function MyDocument(props) {
|
||||
<Head>
|
||||
<meta name="theme-color" content={theme.palette.primary.main}/>
|
||||
<meta name="emotion-insertion-point" content=""/>
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico"/>
|
||||
<link rel="shortcut icon" href="/icons/favicon.png"/>
|
||||
<link rel="manifest" href="/manifest.json"/>
|
||||
{emotionStyleTags}
|
||||
</Head>
|
||||
|
||||
Reference in New Issue
Block a user