mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-06 21:21:58 -07:00
app: add ivo to donators
This commit is contained in:
@@ -6,8 +6,8 @@ import { GENESIS_DAY } from "../../../../../scripts/lightweightCharts/whitespace
|
|||||||
import { Box } from "../../box";
|
import { Box } from "../../box";
|
||||||
import { Scrollable } from "../../scrollable";
|
import { Scrollable } from "../../scrollable";
|
||||||
|
|
||||||
const MULTIPLIER = 0.002;
|
const MULTIPLIER = 0.0025;
|
||||||
const DELAY = 10;
|
const DELAY = 25;
|
||||||
const LEFT = -1;
|
const LEFT = -1;
|
||||||
const RIGHT = 1;
|
const RIGHT = 1;
|
||||||
|
|
||||||
@@ -30,28 +30,33 @@ export function TimeScale({
|
|||||||
return chart.timeScale();
|
return chart.timeScale();
|
||||||
});
|
});
|
||||||
|
|
||||||
const interval = setInterval(() => {
|
let interval: number | undefined;
|
||||||
const time = timeScale();
|
|
||||||
|
|
||||||
if (!time) return;
|
|
||||||
|
|
||||||
|
function createScrollLoop() {
|
||||||
|
clearInterval(interval);
|
||||||
const direction = scrollDirection();
|
const direction = scrollDirection();
|
||||||
|
|
||||||
if (!direction) return;
|
if (!direction) return;
|
||||||
|
|
||||||
const range = time.getVisibleLogicalRange();
|
|
||||||
|
|
||||||
if (!range) return;
|
|
||||||
|
|
||||||
const speed = (range.to - range.from) * MULTIPLIER * direction;
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
range.from += speed;
|
interval = setInterval(() => {
|
||||||
// @ts-ignore
|
const time = timeScale();
|
||||||
range.to += speed;
|
|
||||||
|
|
||||||
time.setVisibleLogicalRange(range);
|
if (!time) return;
|
||||||
}, DELAY);
|
|
||||||
|
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));
|
onCleanup(() => clearInterval(interval));
|
||||||
|
|
||||||
@@ -61,7 +66,10 @@ export function TimeScale({
|
|||||||
<Button
|
<Button
|
||||||
square
|
square
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => scrollDirection.set((v) => (v === LEFT ? 0 : LEFT))}
|
onClick={() => {
|
||||||
|
scrollDirection.set((v) => (v === LEFT ? 0 : LEFT));
|
||||||
|
createScrollLoop();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Show
|
<Show
|
||||||
when={scrollDirection() === LEFT}
|
when={scrollDirection() === LEFT}
|
||||||
@@ -226,7 +234,10 @@ export function TimeScale({
|
|||||||
<Button
|
<Button
|
||||||
square
|
square
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => scrollDirection.set((v) => (v === RIGHT ? 0 : RIGHT))}
|
onClick={() => {
|
||||||
|
scrollDirection.set((v) => (v === RIGHT ? 0 : RIGHT));
|
||||||
|
createScrollLoop();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Show
|
<Show
|
||||||
when={scrollDirection() === RIGHT}
|
when={scrollDirection() === RIGHT}
|
||||||
|
|||||||
@@ -160,6 +160,11 @@ export function SettingsFrame({
|
|||||||
url: "https://twitter.com/DanielAngelovBG",
|
url: "https://twitter.com/DanielAngelovBG",
|
||||||
amount: 21_000,
|
amount: 21_000,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Ivo",
|
||||||
|
url: "https://primal.net/p/npub1mnwjn40hr042rsmzu64rsnwsw07uegg4tjkv620c94p6e797wkvq3qeujc",
|
||||||
|
amount: 5_000,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
.sort((a, b) =>
|
.sort((a, b) =>
|
||||||
b.amount !== a.amount
|
b.amount !== a.amount
|
||||||
|
|||||||
Reference in New Issue
Block a user