diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-07-31 17:08:29 +0200 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-07-31 17:08:29 +0200 |
commit | bd49d59008d64db13e3f37277ec873a3a464ef9e (patch) | |
tree | 7d4f4a943477e543abbcacd2ceb2ac0002054910 /src/index.html | |
parent | Merge branch 'develop' into feature/todos (diff) | |
download | ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.tar.gz ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.tar.zst ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.zip |
MVP for service <-> todos integration
Diffstat (limited to 'src/index.html')
-rw-r--r-- | src/index.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/index.html b/src/index.html index f29aa2686..198c1ab7b 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -35,11 +35,16 @@ | |||
35 | const originalReloadBehaviour = window._onLiveReloadFileChanged; | 35 | const originalReloadBehaviour = window._onLiveReloadFileChanged; |
36 | 36 | ||
37 | window._onLiveReloadFileChanged = (file) => { | 37 | window._onLiveReloadFileChanged = (file) => { |
38 | if (!file.path.includes('/build/webview/') && !file.path.includes('/build/index.js') && !file.path.includes('/build/electron/')) { | 38 | const isTodoPreloadPath = file.path.includes('/build/features/todos/preload.js'); |
39 | if (!file.path.includes('/build/webview/') && !file.path.includes('/build/index.js') && !file.path.includes('/build/electron/') && !isTodoPreloadPath) { | ||
39 | originalReloadBehaviour(file); | 40 | originalReloadBehaviour(file); |
40 | } else { | 41 | } else { |
41 | if (file.path.includes('/build/webview/')) { | 42 | if (isTodoPreloadPath) { |
42 | debug('Livereload: Reloading all webvies'); | 43 | debug('Livereload: Reloading all webviews'); |
44 | const webview = document.querySelector('webview[partition="persist:todos"]'); | ||
45 | if (webview) webview.reload(); | ||
46 | } else if (file.path.includes('/build/webview/')) { | ||
47 | debug('Livereload: Reloading all webviews'); | ||
43 | const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload()); | 48 | const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload()); |
44 | } else { | 49 | } else { |
45 | debug('Livereload: skip reload as only main process files have changed'); | 50 | debug('Livereload: skip reload as only main process files have changed'); |