Merge master

This commit is contained in:
Pieter Vander Vennet 2024-09-04 02:56:01 +02:00
commit cbea216d01
119 changed files with 5314 additions and 4218 deletions

View file

@ -3,28 +3,27 @@
import { sineIn } from "svelte/easing"
import { UIEventSource } from "../../Logic/UIEventSource.js"
export let shown: UIEventSource<boolean>;
export let shown: UIEventSource<boolean>
let transitionParams = {
x: -320,
duration: 200,
easing: sineIn
};
easing: sineIn,
}
let hidden = !shown.data
$: {
shown.setData(!hidden)
}
shown.addCallback(sh => {
shown.addCallback((sh) => {
hidden = !sh
})
</script>
<Drawer placement="left"
transitionType="fly" {transitionParams}
divClass = "overflow-y-auto z-50 "
bind:hidden={hidden}>
<slot>
CONTENTS
</slot>
<Drawer
placement="left"
transitionType="fly"
{transitionParams}
divClass="overflow-y-auto z-50 "
bind:hidden
>
<slot>CONTENTS</slot>
</Drawer>

View file

@ -30,7 +30,7 @@
}}
>
<div
class="content relative normal-background pointer-events-auto h-full"
class="content normal-background pointer-events-auto relative h-full"
on:click|stopPropagation={() => {}}
>
<div class="h-full rounded-xl">
@ -39,20 +39,16 @@
<slot name="close-button">
<!-- The close button is placed _after_ the default slot in order to always paint it on top -->
<div class="absolute top-0 right-0">
<CloseButton class="normal-background mt-2 mr-2"
on:click={() => dispatch("close")}
/>
<CloseButton class="normal-background mt-2 mr-2" on:click={() => dispatch("close")} />
</div>
</slot>
</div>
</div>
<style>
.content {
border-radius: 0.5rem;
overflow-x: hidden;
box-shadow: 0 0 1rem #00000088;
}
.content {
border-radius: 0.5rem;
overflow-x: hidden;
box-shadow: 0 0 1rem #00000088;
}
</style>

View file

@ -4,7 +4,6 @@
export let text: string
export let href: string
export let classnames: string = undefined
export let download: string = undefined
export let ariaLabel: string = undefined
@ -13,7 +12,7 @@
</script>
<a
href={Utils.prepareHref(href) }
href={Utils.prepareHref(href)}
aria-label={ariaLabel}
title={ariaLabel}
target={newTab ? "_blank" : undefined}

View file

@ -14,6 +14,6 @@
osmConnection.LogOut()
}}
>
<ArrowRightOnRectangle class="h-6 w-6 max-h-full" />
<ArrowRightOnRectangle class="h-6 max-h-full w-6" />
<Tr t={Translations.t.general.logout} />
</button>

View file

@ -14,7 +14,6 @@
export let arialabel: Translation = undefined
export let arialabelDynamic: Store<Translation> = new ImmutableStore(arialabel)
let arialabelString = arialabelDynamic.bind((tr) => tr?.current)
</script>
<button

View file

@ -26,14 +26,14 @@
{/if}
<style>
:global(.page-header) {
display: flex;
align-items: center;
}
:global(.page-header) {
display: flex;
align-items: center;
}
:global(.page-header svg) {
width: 2rem;
height: 2rem;
margin-right: 0.75rem;
}
:global(.page-header svg) {
width: 2rem;
height: 2rem;
margin-right: 0.75rem;
}
</style>

View file

@ -9,35 +9,30 @@
export let value: UIEventSource<string>
let _value = value.data ?? ""
value.addCallbackD(v => {
value.addCallbackD((v) => {
_value = v
})
$: value.set(_value)
const dispatch = createEventDispatcher<{ search }>()
export let placeholder: Translation = Translations.t.general.search.search
export let placeholder: Translation = Translations.t.general.search.search
</script>
<form
class="flex justify-center"
on:submit|preventDefault={() => dispatch("search")}
>
<form class="flex justify-center" on:submit|preventDefault={() => dispatch("search")}>
<label
class="neutral-label my-2 flex w-full items-center rounded-full border-2 border-black sm:w-1/2 box-shadow"
class="neutral-label box-shadow my-2 flex w-full items-center rounded-full border-2 border-black sm:w-1/2"
>
<input
type="search"
style=" --tw-ring-color: rgb(0 0 0 / 0) !important;"
class="ml-4 pl-1 w-full outline-none border-none"
class="ml-4 w-full border-none pl-1 outline-none"
on:keypress={(keypr) => {
return keypr.key === "Enter" ? dispatch("search") : undefined
}}
return keypr.key === "Enter" ? dispatch("search") : undefined
}}
bind:value={_value}
use:set_placeholder={placeholder}
use:ariaLabel={Translations.t.general.search.search}
/>
<SearchIcon aria-hidden="true" class="h-8 w-8 mx-2" />
<SearchIcon aria-hidden="true" class="mx-2 h-8 w-8" />
</label>
</form>

View file

@ -7,6 +7,5 @@
<slot />
</div>
<slot class="border-t-gray-300 mt-1" name="footer" />
<slot class="mt-1 border-t-gray-300" name="footer" />
</div>