From 7a283d1c4b579d53927c67ebf15db8c6c23b32aa Mon Sep 17 00:00:00 2001 From: Anders Evenrud Date: Fri, 10 Apr 2020 22:18:45 +0200 Subject: [PATCH] Update URL resolver to support home VFS (#106) --- src/utils/url.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/url.js b/src/utils/url.js index 68c73aa5..2f3cfba1 100644 --- a/src/utils/url.js +++ b/src/utils/url.js @@ -52,7 +52,11 @@ export const urlResolver = configuration => { metadata.type === 'icons' ? 'icons' : 'apps' ); - url = `${type}/${metadata.name}${path}`; + if (metadata._user) { + url = `vfs/readfile?path=${encodeURIComponent(`home:/.packages/${metadata.name}${path}`)}`; + } else { + url = `${type}/${metadata.name}${path}`; + } } return prefix