@@ -18,7 +18,7 @@ import { getLogLevel } from 'vs/platform/log/common/log';
18
18
import { IProductService } from 'vs/platform/product/common/productService' ;
19
19
import { toWorkspaceFolder } from 'vs/platform/workspace/common/workspace' ;
20
20
import { IWebWorkspace , IWorkbenchConfigurationSerialized } from 'vs/platform/workspaces/common/workbench' ;
21
- import { AssetPaths , SERVICE_WORKER_FILE_NAME } from 'vs/server/services/net/common/http' ;
21
+ import { AssetPaths , ICON_SIZES , SERVICE_WORKER_FILE_NAME } from 'vs/server/services/net/common/http' ;
22
22
import { getCachedNlsConfiguration , getLocaleFromConfig } from 'vs/workbench/services/extensions/node/nls' ;
23
23
import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService' ;
24
24
import { ParsedRequest } from './net/abstractIncomingRequestService' ;
@@ -88,6 +88,7 @@ export class EnvironmentServerService extends NativeEnvironmentService implement
88
88
const productConfiguration : Writeable < IProductConfiguration > = {
89
89
...productService ,
90
90
91
+ // Service Worker
91
92
serviceWorker : {
92
93
scope : req . pathPrefix ,
93
94
url : this . createRequestUrl ( req , SERVICE_WORKER_FILE_NAME ) . toString ( ) ,
@@ -97,22 +98,17 @@ export class EnvironmentServerService extends NativeEnvironmentService implement
97
98
logoutEndpointUrl : logoutEndpointUrl . toString ( ) ,
98
99
webEndpointUrl : this . createRequestUrl ( req , AssetPaths . StaticBase ) . toString ( ) ,
99
100
webEndpointUrlTemplate : this . createRequestUrl ( req , AssetPaths . StaticBase ) . toString ( ) ,
100
- icons : [
101
- {
102
- src : this . createRequestUrl ( req , '/static/resources/web/pwa-icon-192.png' ) . toString ( ) ,
103
- type : 'image/png' ,
104
- sizes : '192x192' ,
105
- } ,
106
- {
107
- src : this . createRequestUrl ( req , '/static/resources/web/pwa-icon-512.png' ) . toString ( ) ,
108
- type : 'image/png' ,
109
- sizes : '512x512' ,
110
- } ,
111
- ] ,
112
101
113
102
// Proxy
114
103
/** The URL constructor should be decoded here to retain the port template variable. */
115
104
proxyEndpointUrlTemplate : decodeURI ( this . createRequestUrl ( req , AssetPaths . ProxyUri ) . toString ( ) ) ,
105
+
106
+ // Metadata
107
+ icons : ICON_SIZES . map ( ( size => ( {
108
+ src : this . createRequestUrl ( req , `/static/resources/web/pwa-icon-${ size } .png` ) . toString ( ) ,
109
+ type : 'image/png' ,
110
+ sizes : `${ size } x${ size } ` ,
111
+ } ) ) )
116
112
} ;
117
113
118
114
if ( ! this . configuration . disableUpdateCheck ) {
@@ -284,3 +280,4 @@ export class EnvironmentServerService extends NativeEnvironmentService implement
284
280
] ;
285
281
}
286
282
}
283
+
0 commit comments