add: pwa
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
|||||||
|
declare module 'next-pwa' {
|
||||||
|
import type { NextConfig } from 'next';
|
||||||
|
|
||||||
|
type WithPWA = (nextConfig: NextConfig) => NextConfig;
|
||||||
|
|
||||||
|
interface NextPWAOptions {
|
||||||
|
dest: string;
|
||||||
|
register?: boolean;
|
||||||
|
skipWaiting?: boolean;
|
||||||
|
disable?: boolean;
|
||||||
|
buildExcludes?: string[];
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
const withPWA: (options: NextPWAOptions) => WithPWA;
|
||||||
|
|
||||||
|
export default withPWA;
|
||||||
|
}
|
||||||
+33
-27
@@ -1,53 +1,59 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from 'next';
|
||||||
|
import withPWA from 'next-pwa';
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: 'standalone',
|
||||||
/* config options here */
|
|
||||||
poweredByHeader: false,
|
poweredByHeader: false,
|
||||||
images: {
|
images: {
|
||||||
domains: ["*"],
|
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
protocol: "https",
|
protocol: 'https',
|
||||||
hostname: "**",
|
hostname: '**',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
protocol: "http",
|
protocol: 'http',
|
||||||
hostname: "**",
|
hostname: '**',
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
headers: async () => [
|
headers: async () => [
|
||||||
{
|
{
|
||||||
source: "/:path*",
|
source: '/:path*',
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
key: "X-DNS-Prefetch-Control",
|
key: 'X-DNS-Prefetch-Control',
|
||||||
value: "on",
|
value: 'on',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "Strict-Transport-Security",
|
key: 'Strict-Transport-Security',
|
||||||
value: "max-age=63072000; includeSubDomains; preload",
|
value: 'max-age=63072000; includeSubDomains; preload',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "X-XSS-Protection",
|
key: 'X-XSS-Protection',
|
||||||
value: "1; mode=block",
|
value: '1; mode=block',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "X-Frame-Options",
|
key: 'X-Frame-Options',
|
||||||
value: "SAMEORIGIN",
|
value: 'SAMEORIGIN',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "X-Content-Type-Options",
|
key: 'X-Content-Type-Options',
|
||||||
value: "nosniff",
|
value: 'nosniff',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "Referrer-Policy",
|
key: 'Referrer-Policy',
|
||||||
value: "origin-when-cross-origin",
|
value: 'origin-when-cross-origin',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
const withPWANextConfig = withPWA({
|
||||||
|
dest: 'public',
|
||||||
|
register: true,
|
||||||
|
skipWaiting: true,
|
||||||
|
disable: process.env.NODE_ENV === 'development',
|
||||||
|
})(nextConfig);
|
||||||
|
|
||||||
|
export default withPWANextConfig;
|
||||||
|
|||||||
Generated
+3459
-128
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@
|
|||||||
"lucide-react": "^0.525.0",
|
"lucide-react": "^0.525.0",
|
||||||
"next": "15.3.4",
|
"next": "15.3.4",
|
||||||
"next-i18n-router": "^5.5.3",
|
"next-i18n-router": "^5.5.3",
|
||||||
|
"next-pwa": "^5.6.0",
|
||||||
"next-usequerystate": "^1.20.0",
|
"next-usequerystate": "^1.20.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-day-picker": "^9.8.0",
|
"react-day-picker": "^9.8.0",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200"><rect width="200" height="200" fill="url('#gradient')"></rect><defs><linearGradient id="SvgjsLinearGradient1001" gradientTransform="rotate(101 0.5 0.5)"><stop offset="0%" stop-color="#b7b8ba"></stop><stop offset="100%" stop-color="#ebf1f1"></stop></linearGradient></defs><g><g fill="#242f35" transform="matrix(7.071823204419889,0,0,7.071823204419889,-7.597636903188501,150.28003879410127)" stroke="#323847" stroke-width="0.2"><path d="M5.75 0L1.07 0L1.07-14.22L5.65-14.22Q7.54-14.22 9.04-13.36Q10.55-12.51 11.39-10.95Q12.24-9.39 12.25-7.46L12.25-7.46L12.25-6.81Q12.25-4.85 11.42-3.31Q10.60-1.76 9.10-0.88Q7.60-0.01 5.75 0L5.75 0ZM5.65-11.57L4.50-11.57L4.50-2.64L5.69-2.64Q7.17-2.64 7.96-3.69Q8.75-4.74 8.75-6.81L8.75-6.81L8.75-7.42Q8.75-9.48 7.96-10.53Q7.17-11.57 5.65-11.57L5.65-11.57ZM14.00-14.22L18.51-14.22L21.68-4.33L24.84-14.22L29.36-14.22L29.36 0L25.92 0L25.92-3.32L26.25-10.12L22.81 0L20.55 0L17.10-10.13L17.43-3.32L17.43 0L14.00 0L14.00-14.22Z"></path></g></g></svg><style>@media (prefers-color-scheme: light) { :root { filter: none; } }
|
||||||
|
@media (prefers-color-scheme: dark) { :root { filter: none; } }
|
||||||
|
</style></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"name": "DMenu - دی منو",
|
||||||
|
"short_name": "DMenu",
|
||||||
|
"start_url": "/",
|
||||||
|
"scope": "/",
|
||||||
|
"id": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"display_override": [
|
||||||
|
"fullscreen",
|
||||||
|
"minimal-ui",
|
||||||
|
"browser"
|
||||||
|
],
|
||||||
|
"background_color": "#F4F5F9",
|
||||||
|
"theme_color": "#F4F5F9",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"description": "DMenu is a modern, user-friendly menu management system designed to enhance the dining experience.",
|
||||||
|
"dir": "rtl",
|
||||||
|
"lang": "fa-IR",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Danak Team",
|
||||||
|
"url": "https://dmenu.com"
|
||||||
|
},
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/icons/web-app-manifest-192x192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/web-app-manifest-512x512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"purpose": "any"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": [
|
||||||
|
"food",
|
||||||
|
"restaurant",
|
||||||
|
"productivity"
|
||||||
|
],
|
||||||
|
"related_applications": [],
|
||||||
|
"prefer_related_applications": false
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Metadata } from "next";
|
import { Metadata, Viewport } from "next";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { ReactQueryProvider } from "@/components/providers/ReactQueryProvider";
|
import { ReactQueryProvider } from "@/components/providers/ReactQueryProvider";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
@@ -9,6 +9,11 @@ import TranslationsProvider from "@/components/utils/TranslationsProdiver";
|
|||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: 'Dashboard',
|
title: 'Dashboard',
|
||||||
description: 'Webapp dashboard',
|
description: 'Webapp dashboard',
|
||||||
|
manifest: '/manifest.json',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const viewport: Viewport = {
|
||||||
|
themeColor: '#F4F5F9',
|
||||||
}
|
}
|
||||||
|
|
||||||
const i18nNamespaces = ['common', 'menu', 'orders', 'auth', "rating", "chat", "notifications", 'parallels'];
|
const i18nNamespaces = ['common', 'menu', 'orders', 'auth', "rating", "chat", "notifications", 'parallels'];
|
||||||
|
|||||||
Reference in New Issue
Block a user