app: add ivo to donators

This commit is contained in:
k
2024-07-23 08:44:52 +02:00
parent 1934c4bfda
commit bf169d6954
2 changed files with 36 additions and 20 deletions

View File

@@ -6,8 +6,8 @@ import { GENESIS_DAY } from "../../../../../scripts/lightweightCharts/whitespace
import { Box } from "../../box";
import { Scrollable } from "../../scrollable";
const MULTIPLIER = 0.002;
const DELAY = 10;
const MULTIPLIER = 0.0025;
const DELAY = 25;
const LEFT = -1;
const RIGHT = 1;
@@ -30,28 +30,33 @@ export function TimeScale({
return chart.timeScale();
});
const interval = setInterval(() => {
const time = timeScale();
if (!time) return;
let interval: number | undefined;
function createScrollLoop() {
clearInterval(interval);
const direction = scrollDirection();
if (!direction) return;
const range = time.getVisibleLogicalRange();
if (!range) return;
const speed = (range.to - range.from) * MULTIPLIER * direction;
// @ts-ignore
range.from += speed;
// @ts-ignore
range.to += speed;
interval = setInterval(() => {
const time = timeScale();
time.setVisibleLogicalRange(range);
}, DELAY);
if (!time) return;
const range = time.getVisibleLogicalRange();
if (!range) return;
const speed = (range.to - range.from) * MULTIPLIER * direction;
// @ts-ignore
range.from += speed;
// @ts-ignore
range.to += speed;
time.setVisibleLogicalRange(range);
}, DELAY);
}
onCleanup(() => clearInterval(interval));
@@ -61,7 +66,10 @@ export function TimeScale({
<Button
square
disabled={disabled}
onClick={() => scrollDirection.set((v) => (v === LEFT ? 0 : LEFT))}
onClick={() => {
scrollDirection.set((v) => (v === LEFT ? 0 : LEFT));
createScrollLoop();
}}
>
<Show
when={scrollDirection() === LEFT}
@@ -226,7 +234,10 @@ export function TimeScale({
<Button
square
disabled={disabled}
onClick={() => scrollDirection.set((v) => (v === RIGHT ? 0 : RIGHT))}
onClick={() => {
scrollDirection.set((v) => (v === RIGHT ? 0 : RIGHT));
createScrollLoop();
}}
>
<Show
when={scrollDirection() === RIGHT}

View File

@@ -160,6 +160,11 @@ export function SettingsFrame({
url: "https://twitter.com/DanielAngelovBG",
amount: 21_000,
},
{
name: "Ivo",
url: "https://primal.net/p/npub1mnwjn40hr042rsmzu64rsnwsw07uegg4tjkv620c94p6e797wkvq3qeujc",
amount: 5_000,
},
]
.sort((a, b) =>
b.amount !== a.amount