| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | import { Utils } from "./Utils" | 
					
						
							|  |  |  | import DetermineLayout from "./Logic/DetermineLayout" | 
					
						
							| 
									
										
										
										
											2023-04-13 23:40:28 +02:00
										 |  |  | import ThemeViewState from "./Models/ThemeViewState" | 
					
						
							|  |  |  | import SvelteUIElement from "./UI/Base/SvelteUIElement" | 
					
						
							|  |  |  | import ThemeViewGUI from "./UI/ThemeViewGUI.svelte" | 
					
						
							| 
									
										
										
										
											2023-06-07 17:33:07 +02:00
										 |  |  | import {FixedUiElement} from "./UI/Base/FixedUiElement"; | 
					
						
							| 
									
										
										
										
											2021-03-22 02:45:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-15 14:52:11 +02:00
										 |  |  | // Miscelleanous
 | 
					
						
							| 
									
										
										
										
											2021-10-15 05:20:02 +02:00
										 |  |  | Utils.DisableLongPresses() | 
					
						
							| 
									
										
										
										
											2021-03-22 02:45:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-21 18:35:31 +01:00
										 |  |  | // @ts-ignore
 | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | DetermineLayout.GetLayout() | 
					
						
							| 
									
										
										
										
											2023-04-13 23:40:28 +02:00
										 |  |  |     .then((layout) => { | 
					
						
							|  |  |  |         const state = new ThemeViewState(layout) | 
					
						
							|  |  |  |         const main = new SvelteUIElement(ThemeViewGUI, { state }) | 
					
						
							|  |  |  |         main.AttachTo("maindiv") | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |     }) | 
					
						
							|  |  |  |     .catch((err) => { | 
					
						
							|  |  |  |         console.error("Error while initializing: ", err, err.stack) | 
					
						
							| 
									
										
										
										
											2023-06-07 17:33:07 +02:00
										 |  |  |         new FixedUiElement(err).SetClass("block alert").AttachTo("maindiv") | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |     }) |