ongoing UI work; fixes; TV callback loop problems again/still
This commit is contained in:
11
src/misc.js
11
src/misc.js
@@ -1,6 +1,7 @@
|
||||
import {FixedNumber} from "ethers";
|
||||
import {usePrefStore, useStore} from "@/store/store.js";
|
||||
import {token} from "@/blockchain/token.js";
|
||||
import Color from "color";
|
||||
|
||||
export class SingletonCoroutine {
|
||||
constructor(f, delay=10, retry=true) {
|
||||
@@ -137,4 +138,12 @@ export function builderDefaults(builder, defaults) {
|
||||
|
||||
export function uuid() {
|
||||
return crypto.randomUUID();
|
||||
}
|
||||
}
|
||||
|
||||
export function lightenColor(color, lightness=85) {
|
||||
return new Color(color).hsl().lightness(lightness).string()
|
||||
}
|
||||
|
||||
export function lightenColor2(color) {
|
||||
return lightenColor(color,98)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user