add: param based pwa manifest
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"name": "Zhivan - ژیوان",
|
||||||
|
"short_name": "Zhivan",
|
||||||
|
"start_url": "/zhivan",
|
||||||
|
"scope": "/",
|
||||||
|
"id": "/zhivan",
|
||||||
|
"display": "standalone",
|
||||||
|
"display_override": [
|
||||||
|
"fullscreen",
|
||||||
|
"minimal-ui",
|
||||||
|
"browser"
|
||||||
|
],
|
||||||
|
"background_color": "#F4F5F9",
|
||||||
|
"theme_color": "#F4F5F9",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"description": "Zhivan Menu by Danak. 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": "Zhivan",
|
||||||
|
"url": "https://dmenu.com/zhivan"
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -1,16 +1,34 @@
|
|||||||
import PreferenceWrapper from '@/components/wrapper/PreferenceWrapper';
|
import PreferenceWrapper from '@/components/wrapper/PreferenceWrapper'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import type { Metadata, Viewport } from 'next'
|
||||||
|
|
||||||
|
export async function generateMetadata ({
|
||||||
|
params
|
||||||
|
}: {
|
||||||
|
params: { name: string }
|
||||||
|
}): Promise<Metadata> {
|
||||||
|
const { name } = await params
|
||||||
|
return {
|
||||||
|
title: `${name} Dashboard`,
|
||||||
|
description: `PWA dashboard for ${name}`,
|
||||||
|
manifest: `/manifests/${name}/manifest.json`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function generateViewport ({}: {
|
||||||
|
params: { name: string }
|
||||||
|
}): Promise<Viewport> {
|
||||||
|
return {
|
||||||
|
themeColor: '#F4F5F9'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.ReactElement
|
children: React.ReactElement
|
||||||
}
|
}
|
||||||
|
|
||||||
function layout({ children }: Props) {
|
function layout ({ children }: Props) {
|
||||||
return (
|
return <PreferenceWrapper>{children}</PreferenceWrapper>
|
||||||
<PreferenceWrapper>
|
|
||||||
{children}
|
|
||||||
</PreferenceWrapper>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default layout
|
export default layout
|
||||||
|
|||||||
Reference in New Issue
Block a user