Browse Source

added import for thread.app.js

Skylsmoi 6 years ago
parent
commit
884ea1584b
3 changed files with 15 additions and 32 deletions
  1. 1 0
      .gitignore
  2. 0 27
      dist/app/pageHtml.app.js
  3. 14 5
      dist/index.html

+ 1 - 0
.gitignore View File

@@ -4,3 +4,4 @@
4 4
 node_modules/
5 5
 /dist/tracim.app.entry.js
6 6
 /dist/tracim.vendor.bundle.js
7
+/dist/app/*

File diff suppressed because it is too large
+ 0 - 27
dist/app/pageHtml.app.js


+ 14 - 5
dist/index.html View File

@@ -26,15 +26,19 @@
26 26
     -->
27 27
 
28 28
     <script src='./app/pageHtml.app.js'></script>
29
+    <script src='./app/thread.app.js'></script>
29 30
 
30 31
     <script src="./dev/jquery-3.2.1.js"></script>
31 32
     <script src="./dev/popper-1.12.3.js"></script>
32 33
     <script src="./dev/bootstrap-4.0.0-beta.2.js"></script>
33 34
 
34 35
     <script type='text/javascript'>
35
-      GLOBAL_renderApp = data => {
36
-        if (data.file.type === 'PageHtml') {
37
-          appPageHtml.renderApp('appContainer', data)
36
+      GLOBAL_renderApp = app => {
37
+        switch (app.appData.name) {
38
+          case 'PageHtml':
39
+            appPageHtml.renderApp('appContainer'); break
40
+          case 'Thread':
41
+            appThread.renderApp('appContainer'); break
38 42
         }
39 43
       }
40 44
 
@@ -43,8 +47,13 @@
43 47
         document.dispatchEvent(event)
44 48
       }
45 49
 
46
-      GLOBAL_unmountApp = () => {
47
-        appPageHtml.hideApp('appContainer')
50
+      GLOBAL_unmountApp = appName => {
51
+        switch (appName) {
52
+          case 'PageHtml':
53
+            appPageHtml.hideApp('appContainer'); break
54
+          case 'Thread':
55
+            appThread.hideApp('appContainer'); break
56
+        }
48 57
       }
49 58
 
50 59
       // only usefull if plugin doesn't handle fileContent himself