chore: test deploy snapshot
This commit is contained in:
@@ -26,7 +26,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let installMetadata = null;
|
let installMetadata = null;
|
||||||
let staticManifestHref = null;
|
|
||||||
|
|
||||||
if (pathname === '/play/apps') {
|
if (pathname === '/play/apps') {
|
||||||
const appId = searchParams.get('app')?.trim() ?? '';
|
const appId = searchParams.get('app')?.trim() ?? '';
|
||||||
@@ -57,7 +56,6 @@
|
|||||||
themeColor: '#165dff',
|
themeColor: '#165dff',
|
||||||
scope: pathname,
|
scope: pathname,
|
||||||
};
|
};
|
||||||
staticManifestHref = '/chat-share.webmanifest';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!installMetadata) {
|
if (!installMetadata) {
|
||||||
@@ -92,7 +90,7 @@
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const manifestHref = staticManifestHref ?? URL.createObjectURL(
|
const manifestHref = URL.createObjectURL(
|
||||||
new Blob([JSON.stringify(manifest, null, 2)], {
|
new Blob([JSON.stringify(manifest, null, 2)], {
|
||||||
type: 'application/manifest+json',
|
type: 'application/manifest+json',
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1199,10 +1199,6 @@ function buildAbsoluteShareUrl(path?: string | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createChatShareManifestHref(pathname: string, title?: string | null) {
|
function createChatShareManifestHref(pathname: string, title?: string | null) {
|
||||||
if (isAppleMobileDevice()) {
|
|
||||||
return '/chat-share.webmanifest';
|
|
||||||
}
|
|
||||||
|
|
||||||
const normalizedTitle = title?.trim();
|
const normalizedTitle = title?.trim();
|
||||||
return createInstallManifestObjectUrl({
|
return createInstallManifestObjectUrl({
|
||||||
startPath: pathname,
|
startPath: pathname,
|
||||||
|
|||||||
@@ -154,14 +154,13 @@ export function swapInstallDocumentMetadata(options: SwapInstallDocumentMetadata
|
|||||||
|
|
||||||
|
|
||||||
type BootstrapInstallMetadataResult = {
|
type BootstrapInstallMetadataResult = {
|
||||||
manifestHref: string;
|
manifestObjectUrl: string;
|
||||||
title: string;
|
title: string;
|
||||||
themeColor: string;
|
themeColor: string;
|
||||||
} | null;
|
} | null;
|
||||||
|
|
||||||
type BootstrapInstallMetadataDefinition = {
|
type BootstrapInstallMetadataDefinition = {
|
||||||
description: string;
|
description: string;
|
||||||
manifestPath?: string;
|
|
||||||
scope?: string;
|
scope?: string;
|
||||||
shortName?: string;
|
shortName?: string;
|
||||||
themeColor: string;
|
themeColor: string;
|
||||||
@@ -235,7 +234,6 @@ function resolveBootstrapInstallMetadataDefinition(pathname: string, search: str
|
|||||||
shortName: '공유채팅',
|
shortName: '공유채팅',
|
||||||
description: '리소스 공유 채팅방을 홈 화면 앱으로 바로 엽니다.',
|
description: '리소스 공유 채팅방을 홈 화면 앱으로 바로 엽니다.',
|
||||||
themeColor: '#165dff',
|
themeColor: '#165dff',
|
||||||
manifestPath: '/chat-share.webmanifest',
|
|
||||||
scope: pathname,
|
scope: pathname,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -256,7 +254,7 @@ export function applyBootstrapInstallMetadataForCurrentRoute(): BootstrapInstall
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
manifestHref: metadata.manifestPath ?? createCurrentRouteInstallManifestObjectUrl(metadata),
|
manifestObjectUrl: createCurrentRouteInstallManifestObjectUrl(metadata),
|
||||||
title: metadata.title,
|
title: metadata.title,
|
||||||
themeColor: metadata.themeColor,
|
themeColor: metadata.themeColor,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ async function bootstrap() {
|
|||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
const bootstrapInstallMetadata = applyBootstrapInstallMetadataForCurrentRoute();
|
const bootstrapInstallMetadata = applyBootstrapInstallMetadataForCurrentRoute();
|
||||||
|
|
||||||
if (bootstrapInstallMetadata?.manifestHref) {
|
if (bootstrapInstallMetadata?.manifestObjectUrl) {
|
||||||
restoreBootstrapInstallMetadata = swapInstallDocumentMetadata({
|
restoreBootstrapInstallMetadata = swapInstallDocumentMetadata({
|
||||||
manifestHref: bootstrapInstallMetadata.manifestHref,
|
manifestHref: bootstrapInstallMetadata.manifestObjectUrl,
|
||||||
title: bootstrapInstallMetadata.title,
|
title: bootstrapInstallMetadata.title,
|
||||||
themeColor: bootstrapInstallMetadata.themeColor,
|
themeColor: bootstrapInstallMetadata.themeColor,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user