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