diff --git a/package.json b/package.json index bba74b63d2e2..57cfa34daf68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cipp", - "version": "10.4.4", + "version": "10.4.5", "author": "CIPP Contributors", "homepage": "https://cipp.app/", "bugs": { diff --git a/public/manifest.json b/public/manifest.json index 2cc60cd8b5a7..42f5d73ea6af 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,15 +1,26 @@ { - "short_name": "Carpatin", - "name": "Carpatin", + "short_name": "CIPP", + "name": "CIPP - CyberDrian Improved Partner Portal", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" } ], - "start_url": ".", + "start_url": "/", + "scope": "/", "display": "standalone", - "theme_color": "#000000", + "theme_color": "#ffffff", "background_color": "#ffffff" -} \ No newline at end of file +} diff --git a/public/sw.js b/public/sw.js new file mode 100644 index 000000000000..a5b7af04ecf4 --- /dev/null +++ b/public/sw.js @@ -0,0 +1,8 @@ +// Minimal service worker to satisfy Chrome's installability criteria. +// This does NOT cache anything or provide offline support — it simply +// passes all requests through to the network so Chrome treats the site +// as an installable web app. + +self.addEventListener('install', () => self.skipWaiting()) +self.addEventListener('activate', (event) => event.waitUntil(self.clients.claim())) +self.addEventListener('fetch', () => {}) diff --git a/public/version.json b/public/version.json index 0ac81ba1b0ba..a09d0fcf2ccd 100644 --- a/public/version.json +++ b/public/version.json @@ -1,3 +1,3 @@ { - "version": "10.4.4" + "version": "10.4.5" } diff --git a/src/components/CippComponents/CippIntunePolicyDetails.jsx b/src/components/CippComponents/CippIntunePolicyDetails.jsx index 064230da3e18..b1820e1c47b8 100644 --- a/src/components/CippComponents/CippIntunePolicyDetails.jsx +++ b/src/components/CippComponents/CippIntunePolicyDetails.jsx @@ -60,5 +60,5 @@ export const CippIntunePolicyDetails = ({ row, tenant }) => { ) } - return + return } diff --git a/src/components/CippFormPages/CippJSONView.jsx b/src/components/CippFormPages/CippJSONView.jsx index f5044792b149..fb69ef966b37 100644 --- a/src/components/CippFormPages/CippJSONView.jsx +++ b/src/components/CippFormPages/CippJSONView.jsx @@ -248,27 +248,29 @@ function CippJsonView({ type, defaultOpen = false, title = 'Policy Details', + tenant = null, }) { const [viewJson, setViewJson] = useState(false) const [accordionOpen, setAccordionOpen] = useState(defaultOpen) const [drilldownData, setDrilldownData] = useState([]) // Array of { data, title } + const objectTenant = + tenant || object?.Tenant || object?.tenant || object?.TenantFilter || object?.tenantFilter || null + // Use the GUID resolver hook - const { guidMapping, isLoadingGuids, resolveGuids, isGuid } = useGuidResolver() + const { guidMapping, isLoadingGuids, resolveGuids, isGuid } = useGuidResolver(objectTenant) const resolvedType = type || (object?.omaSettings || object?.settings || object?.definitionValues || object?.added ? 'intune' : undefined) - const adminTemplateTenant = - object?.Tenant || object?.tenant || object?.TenantFilter || object?.tenantFilter || null const { definitionsMap: addedDefinitionsMap, isLoadingDefinitions, isDefinitionsError, } = useAdminTemplateDefinitions({ added: object?.added, - manualTenant: adminTemplateTenant, + manualTenant: objectTenant, waiting: resolvedType === 'intune', }) diff --git a/src/pages/_app.js b/src/pages/_app.js index f924bd5f626e..aa387f0417fa 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -80,6 +80,11 @@ const App = (props) => { useEffect(() => { if (typeof window === 'undefined') return + // Register minimal service worker for Chrome installability + if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('/sw.js').catch(() => {}) + } + const language = navigator.language || navigator.userLanguage || 'en-US' const baseLang = language.split('-')[0] diff --git a/src/pages/_document.js b/src/pages/_document.js index c764cde02995..4cceb2676ef2 100644 --- a/src/pages/_document.js +++ b/src/pages/_document.js @@ -8,6 +8,12 @@ class CustomDocument extends Document { return ( + + + + + +