forked from MapComplete/MapComplete
		
	UI: fix stray element in theme.html
This commit is contained in:
		
							parent
							
								
									f26f22a95c
								
							
						
					
					
						commit
						1af21714f2
					
				
					 2 changed files with 20 additions and 18 deletions
				
			
		| 
						 | 
					@ -5,13 +5,17 @@ import CustomThemeError from "./UI/CustomThemeError.svelte"
 | 
				
			||||||
async function main() {
 | 
					async function main() {
 | 
				
			||||||
    const target = document.getElementById("maindiv")
 | 
					    const target = document.getElementById("maindiv")
 | 
				
			||||||
    const childs = Array.from(target.children)
 | 
					    const childs = Array.from(target.children)
 | 
				
			||||||
 | 
					    try {
 | 
				
			||||||
 | 
					        childs.forEach((ch) => target.removeChild(ch))
 | 
				
			||||||
 | 
					    } catch (e) {
 | 
				
			||||||
 | 
					        console.error("Huh? Couldn't remove child!")
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
        const theme = await DetermineTheme.getTheme()
 | 
					        const theme = await DetermineTheme.getTheme()
 | 
				
			||||||
        new SingleThemeGui({
 | 
					        new SingleThemeGui({
 | 
				
			||||||
            target,
 | 
					            target,
 | 
				
			||||||
            props: { theme },
 | 
					            props: { theme },
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        childs.forEach((ch) => target.removeChild(ch))
 | 
					 | 
				
			||||||
        Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
 | 
					        Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
 | 
				
			||||||
            el.parentElement.removeChild(el)
 | 
					            el.parentElement.removeChild(el)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,8 +54,7 @@
 | 
				
			||||||
<a rel="me" href="https://en.osm.town/@MapComplete" class="hidden">Mastodon</a>
 | 
					<a rel="me" href="https://en.osm.town/@MapComplete" class="hidden">Mastodon</a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="h-screen" id="maindiv">
 | 
					<div class="default-main h-screen" id="maindiv">
 | 
				
			||||||
    <div id="default-main h-full">
 | 
					 | 
				
			||||||
  <div class="w-full h-screen flex flex-col items-center justify-between  p-8">
 | 
					  <div class="w-full h-screen flex flex-col items-center justify-between  p-8">
 | 
				
			||||||
    <div class="w-full h-full flex flex-col items-center">
 | 
					    <div class="w-full h-full flex flex-col items-center">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,7 +75,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="flex justify-between items-end w-full absolute bottom-0 p-4 h-fit delete-on-load">
 | 
					<div class="flex justify-between items-end w-full absolute bottom-0 p-4 h-fit delete-on-load">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue