mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	refactor(server): loading runtime JS as early as possible
This commit is contained in:
		@@ -8,6 +8,7 @@
 | 
				
			|||||||
	  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
 | 
						  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
 | 
				
			||||||
    <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
 | 
					    <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
 | 
				
			||||||
    <title>Trilium Notes</title>
 | 
					    <title>Trilium Notes</title>
 | 
				
			||||||
 | 
					    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body
 | 
					<body
 | 
				
			||||||
  id="trilium-app"
 | 
					  id="trilium-app"
 | 
				
			||||||
@@ -60,7 +61,6 @@
 | 
				
			|||||||
<link href="<%= assetPath %>/src/boxicons.css" rel="stylesheet">
 | 
					<link href="<%= assetPath %>/src/boxicons.css" rel="stylesheet">
 | 
				
			||||||
<link href="<%= assetPath %>/stylesheets/print.css" rel="stylesheet" media="print">
 | 
					<link href="<%= assetPath %>/stylesheets/print.css" rel="stylesheet" media="print">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
					 | 
				
			||||||
<script src="<%= appPath %>/desktop.js" crossorigin type="module"></script>
 | 
					<script src="<%= appPath %>/desktop.js" crossorigin type="module"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,6 +15,7 @@
 | 
				
			|||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-light.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-light.css">
 | 
				
			||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-next.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-next.css">
 | 
				
			||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/style.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/style.css">
 | 
				
			||||||
 | 
					    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body lang="<%= currentLocale.id %>" dir="<%= currentLocale.rtl ? 'rtl' : 'ltr' %>">
 | 
					<body lang="<%= currentLocale.id %>" dir="<%= currentLocale.rtl ? 'rtl' : 'ltr' %>">
 | 
				
			||||||
<div class="container login-page">
 | 
					<div class="container login-page">
 | 
				
			||||||
@@ -74,7 +75,6 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
					 | 
				
			||||||
<script src="<%= appPath %>/login.js" crossorigin type="module"></script>
 | 
					<script src="<%= appPath %>/login.js" crossorigin type="module"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -96,6 +96,8 @@
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    </style>
 | 
					    </style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body
 | 
					<body
 | 
				
			||||||
    class="mobile heading-style-<%= headingStyle %>"
 | 
					    class="mobile heading-style-<%= headingStyle %>"
 | 
				
			||||||
@@ -111,7 +113,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<%- include("./partials/windowGlobal.ejs", locals) %>
 | 
					<%- include("./partials/windowGlobal.ejs", locals) %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
					 | 
				
			||||||
<script src="<%= appPath %>/mobile.js" crossorigin type="module"></script>
 | 
					<script src="<%= appPath %>/mobile.js" crossorigin type="module"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<link href="api/fonts" rel="stylesheet">
 | 
					<link href="api/fonts" rel="stylesheet">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@
 | 
				
			|||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-light.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-light.css">
 | 
				
			||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-next.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/theme-next.css">
 | 
				
			||||||
    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/style.css">
 | 
					    <link rel="stylesheet" href="<%= assetPath %>/stylesheets/style.css">
 | 
				
			||||||
 | 
					    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
<div class="container set-password">
 | 
					<div class="container set-password">
 | 
				
			||||||
@@ -44,7 +45,6 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
					 | 
				
			||||||
<script src="<%= appPath %>/set_password.js" crossorigin type="module"></script>
 | 
					<script src="<%= appPath %>/set_password.js" crossorigin type="module"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,6 +43,7 @@
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    </style>
 | 
					    </style>
 | 
				
			||||||
 | 
					    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
<noscript><%= t("javascript-required") %></noscript>
 | 
					<noscript><%= t("javascript-required") %></noscript>
 | 
				
			||||||
@@ -165,7 +166,6 @@
 | 
				
			|||||||
<!-- Required for correct loading of scripts in Electron -->
 | 
					<!-- Required for correct loading of scripts in Electron -->
 | 
				
			||||||
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
 | 
					<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
 | 
					 | 
				
			||||||
<script src="<%= appPath %>/setup.js" crossorigin type="module"></script>
 | 
					<script src="<%= appPath %>/setup.js" crossorigin type="module"></script>
 | 
				
			||||||
<link href="<%= assetPath %>/stylesheets/theme-light.css" rel="stylesheet" />
 | 
					<link href="<%= assetPath %>/stylesheets/theme-light.css" rel="stylesheet" />
 | 
				
			||||||
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet" />
 | 
					<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet" />
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user