Merge develop

This commit is contained in:
Pieter Vander Vennet 2024-08-26 01:30:48 +02:00
commit 125139a672
313 changed files with 2392 additions and 19940 deletions

View file

@ -90,9 +90,7 @@ export default class UrlValidator extends Validator {
*
* const v = new UrlValidator()
* v.getFeedback("example.").textFor("en") // => "This is not a valid web address"
* v.isValid("https://booking.com/some-hotel.html") // => false
* v.getFeedback("https://booking.com/some-hotel.html").textFor("en").indexOf("low-quality") > 0 // => true
*
* v.getFeedback("https://booking.com/some-hotel.html").textFor("en") // => Translations.t.validation.url.spamSite.Subs({host: "booking.com"}).textFor("en")
*/
getFeedback(s: string, getCountry?: () => string): Translation | undefined {
if (
@ -128,6 +126,10 @@ export default class UrlValidator extends Validator {
return undefined
}
/**
* const v = new UrlValidator()
* v.isValid("https://booking.com/some-hotel.html") // => false
*/
isValid(str: string): boolean {
try {

View file

@ -39,6 +39,8 @@
import Gear from "../../assets/svg/Gear.svelte"
import { DesktopComputerIcon, UserCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
import Relocation from "../../assets/svg/Relocation.svelte"
import LockClosed from "@babeard/svelte-heroicons/solid/LockClosed"
import Key from "@babeard/svelte-heroicons/solid/Key"
/**
* Renders a single icon.
@ -146,6 +148,10 @@
<PencilIcon class={clss} {color} />
{:else if icon === "user_circle"}
<UserCircleIcon class={clss} {color} />
{:else if icon === "lock"}
<LockClosed class={clss} {color} />
{:else if icon === "key"}
<Key class={clss} {color} />
{:else if Utils.isEmoji(icon)}
<span style={`font-size: ${emojiHeight}; line-height: ${emojiHeight}`}>
{icon}