forked from MapComplete/MapComplete
		
	Cleanup .bg-red which does not exist anymore
				
					
				
			This commit is contained in:
		
							parent
							
								
									2eabfea8af
								
							
						
					
					
						commit
						14ae7e3272
					
				
					 3 changed files with 74 additions and 71 deletions
				
			
		| 
						 | 
					@ -1,17 +1,17 @@
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
    import {Translation} from "../i18n/Translation"
 | 
					  import { Translation } from "../i18n/Translation"
 | 
				
			||||||
  import * as personal from "../../assets/themes/personal/personal.json"
 | 
					  import * as personal from "../../assets/themes/personal/personal.json"
 | 
				
			||||||
    import {ImmutableStore, Store, UIEventSource} from "../../Logic/UIEventSource"
 | 
					  import { ImmutableStore, Store, UIEventSource } from "../../Logic/UIEventSource"
 | 
				
			||||||
    import UserDetails, {OsmConnection} from "../../Logic/Osm/OsmConnection"
 | 
					  import UserDetails, { OsmConnection } from "../../Logic/Osm/OsmConnection"
 | 
				
			||||||
  import Constants from "../../Models/Constants"
 | 
					  import Constants from "../../Models/Constants"
 | 
				
			||||||
    import type {LayoutInformation} from "../../Models/ThemeConfig/LayoutConfig"
 | 
					  import type { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig"
 | 
				
			||||||
  import Tr from "../Base/Tr.svelte"
 | 
					  import Tr from "../Base/Tr.svelte"
 | 
				
			||||||
    import SubtleLink from "../Base/SubtleLink.svelte";
 | 
					  import SubtleLink from "../Base/SubtleLink.svelte"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  export let theme: LayoutInformation
 | 
					  export let theme: LayoutInformation
 | 
				
			||||||
  export let isCustom: boolean = false
 | 
					  export let isCustom: boolean = false
 | 
				
			||||||
  export let userDetails: UIEventSource<UserDetails>
 | 
					  export let userDetails: UIEventSource<UserDetails>
 | 
				
			||||||
    export let state: { layoutToUse: {id: string}, osmConnection: OsmConnection }
 | 
					  export let state: { layoutToUse: { id: string }; osmConnection: OsmConnection }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $: title = new Translation(
 | 
					  $: title = new Translation(
 | 
				
			||||||
    theme.title,
 | 
					    theme.title,
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,6 @@
 | 
				
			||||||
      return undefined
 | 
					      return undefined
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    let path = window.location.pathname
 | 
					    let path = window.location.pathname
 | 
				
			||||||
    // Path starts with a '/' and contains everything, e.g. '/dir/dir/page.html'
 | 
					    // Path starts with a '/' and contains everything, e.g. '/dir/dir/page.html'
 | 
				
			||||||
    path = path.substr(0, path.lastIndexOf("/"))
 | 
					    path = path.substr(0, path.lastIndexOf("/"))
 | 
				
			||||||
| 
						 | 
					@ -47,7 +46,11 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?`
 | 
					    let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?`
 | 
				
			||||||
        if (location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.port === "1234") {
 | 
					    if (
 | 
				
			||||||
 | 
					      location.hostname === "localhost" ||
 | 
				
			||||||
 | 
					      location.hostname === "127.0.0.1" ||
 | 
				
			||||||
 | 
					      location.port === "1234"
 | 
				
			||||||
 | 
					    ) {
 | 
				
			||||||
      // Redirect to 'theme.html?layout=* instead of 'layout.html'. This is probably a debug run, where the routing does not work
 | 
					      // Redirect to 'theme.html?layout=* instead of 'layout.html'. This is probably a debug run, where the routing does not work
 | 
				
			||||||
      linkPrefix = `${path}/theme.html?layout=${layout.id}&`
 | 
					      linkPrefix = `${path}/theme.html?layout=${layout.id}&`
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -68,12 +71,12 @@
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{#if theme.id !== personal.id || $userDetails.csCount > Constants.userJourney.personalLayoutUnlock}
 | 
					{#if theme.id !== personal.id || $userDetails.csCount > Constants.userJourney.personalLayoutUnlock}
 | 
				
			||||||
    <SubtleLink href={$href} options={{extraClasses: "w-full"}}>
 | 
					  <SubtleLink href={$href} options={{ extraClasses: "w-full" }}>
 | 
				
			||||||
        <img slot="image" src={theme.icon} class="block h-11 w-11 bg-red mx-4" alt=""/>
 | 
					    <img slot="image" src={theme.icon} class="block h-11 w-11 mx-4" alt="" />
 | 
				
			||||||
    <span class="flex flex-col text-ellipsis overflow-hidden">
 | 
					    <span class="flex flex-col text-ellipsis overflow-hidden">
 | 
				
			||||||
          <Tr t={title}/>
 | 
					      <Tr t={title} />
 | 
				
			||||||
      <span class="subtle max-h-12 truncate text-ellipsis">
 | 
					      <span class="subtle max-h-12 truncate text-ellipsis">
 | 
				
			||||||
            <Tr t={description}/>
 | 
					        <Tr t={description} />
 | 
				
			||||||
      </span>
 | 
					      </span>
 | 
				
			||||||
    </span>
 | 
					    </span>
 | 
				
			||||||
  </SubtleLink>
 | 
					  </SubtleLink>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ export default class CheckBoxes extends InputElement<number[]> {
 | 
				
			||||||
            label.htmlFor = input.id
 | 
					            label.htmlFor = input.id
 | 
				
			||||||
            label.appendChild(input)
 | 
					            label.appendChild(input)
 | 
				
			||||||
            label.appendChild(inputI.ConstructElement())
 | 
					            label.appendChild(inputI.ConstructElement())
 | 
				
			||||||
            label.classList.add("block", "w-full", "p-2", "cursor-pointer", "bg-red")
 | 
					            label.classList.add("block", "w-full", "p-2", "cursor-pointer")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            formTag.appendChild(label)
 | 
					            formTag.appendChild(label)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -118,7 +118,7 @@ export class RadioButton<T> extends InputElement<T> {
 | 
				
			||||||
            const label = document.createElement("label")
 | 
					            const label = document.createElement("label")
 | 
				
			||||||
            label.appendChild(labelHtml)
 | 
					            label.appendChild(labelHtml)
 | 
				
			||||||
            label.htmlFor = input.id
 | 
					            label.htmlFor = input.id
 | 
				
			||||||
            label.classList.add("flex", "w-full", "cursor-pointer", "bg-red")
 | 
					            label.classList.add("flex", "w-full", "cursor-pointer")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!this._dontStyle) {
 | 
					            if (!this._dontStyle) {
 | 
				
			||||||
                labelHtml.classList.add("p-2")
 | 
					                labelHtml.classList.add("p-2")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue