feat: color overhaul

This commit is contained in:
Xyphyn committed 2023-09-14 16:44:00 -07:00
1 parent 8fc452951b
commit e5fbf7493c
22 files changed
+234 -243

No files matched your search

+7
View File
@@ -2,6 +2,7 @@ import { goto } from '$app/navigation'
import { toast } from 'mono-svelte'
import { userSettings } from '$lib/settings.js'
import { get } from 'svelte/store'
import type { SubscribedType } from 'lemmy-js-client'
export const findClosestNumber = (numbers: number[], target: number): number =>
numbers.reduce((prev, curr) =>
@@ -98,3 +99,9 @@ export const trycatch = <T>(func: () => T): Maybe<T> => {
export const removeItem = <T>(array: T[], predicate: (item: T) => boolean) => {
array.splice(array.findIndex(predicate), 1)
}
export const DOMAIN_REGEX = /^((?!-)[A-Za-z0-9-]{1,63}\.)+[A-Za-z]{2,63}/gi
export const DOMAIN_REGEX_FORMS = '^((?!-)[A-Za-z0-9-]{1,63}.)+[A-Za-z]{2,63}'
export const isSubscribed = (subscribed: SubscribedType) =>
subscribed == 'Pending' || subscribed == 'Subscribed'