Small UI tweaks

This commit is contained in:
koalasat
2025-07-31 11:33:05 +02:00
parent 8860be1df8
commit ba17d9767f
4 changed files with 28 additions and 20 deletions

View File

@ -102,7 +102,7 @@ const DepthChart: React.FC<DepthChartProps> = ({
const prices: number[] = enrichedOrders.map((order) => order?.base_price ?? 0);
const medianValue = ~~matchMedian(prices);
const maxValue = prices.sort((a, b) => b - a).slice(0, 1)[0] ?? 1500;
const maxValue = prices.sort((a, b) => b - a).slice(0, 1)[0] ?? 0;
const maxRange = maxValue - medianValue;
const rangeSteps = maxRange / 10;
@ -261,11 +261,21 @@ const DepthChart: React.FC<DepthChartProps> = ({
const formatAxisX = (value: number): string => {
if (xType === 'base_price') {
let formatted = value;
if (value > 1000000) {
formatted = formatted / 1000000;
return `${formatted}M`;
} else if (value > 1000) {
formatted = formatted / 1000;
return `${formatted}K`;
} else {
return value.toString();
}
} else {
return `${value}%`;
}
};
const formatAxisY = (value: number): string => `${value}BTC`;
const formatAxisY = (value: number): string => `${value}`;
const handleOnClick: PointMouseHandler = (point: Point) => {
onOrderClicked(point.data?.order?.id, point.data?.order?.coordinatorShortAlias);
};
@ -361,10 +371,7 @@ const DepthChart: React.FC<DepthChartProps> = ({
</Grid>
</Grid>
</Grid>
<Grid
container
style={{ height: `${height * 0.825}em`, width: '100%', padding: '1em' }}
>
<Grid container style={{ height: `${height * 0.9}em`, width: '100%', padding: '1em' }}>
<ResponsiveLine
data={series}
enableArea={true}
@ -384,7 +391,7 @@ const DepthChart: React.FC<DepthChartProps> = ({
format: formatAxisX,
}}
margin={{
left: 4.64 * em,
left: 3 * em,
right: 0.714 * em,
bottom:
xType === 'base_price'

View File

@ -439,7 +439,6 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
{value.length > 0 && !props.multiple ? null : (
<input
ref={filterInputRef}
autoFocus={true}
style={
props.isFilter
? {

View File

@ -86,9 +86,11 @@ const EncryptedChat: React.FC<Props> = ({
const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content);
const oneMonth = 2419200;
const fourteenDays = 14 * 24 * 60 * 60;
const randomSeconds = Math.floor(Math.random() * fourteenDays);
const expirationTime = Math.floor(Date.now() / 1000) + fourteenDays + randomSeconds;
wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + oneMonth).toString()]);
wrappedEvent.tags.push(['expiration', expirationTime.toString()]);
federation.roboPool.sendEvent(wrappedEvent);
} catch (error) {

View File

@ -9,12 +9,12 @@ RoboSats v0.8.1-alpha is now out! :rocket:
# Android
**[Click to download universal RoboSats APK for Android](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.apk)**
**[Click to download universal RoboSats APK for Android](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.short_sha.apk)**
Smaller bundles for each CPU architecture available in the attachments.
### Verify the app using GPG:
1. [Download the ascii armored signature](https://github.com/Reckless-Satoshi/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.${{ steps.short-sha.outputs.short_sha }}.apk.asc)
1. [Download the ascii armored signature](https://github.com/Reckless-Satoshi/robosats/releases/download/v0.8.1-alpha/robosats-v0.8.1.alpha-universal.short_sha.apk.asc)
2. Run this command on a directory that contains the apk file and and the ascii armored signature.
`gpg --verify robosats-v0.8.1.alpha-universal.apk.asc`
@ -28,17 +28,17 @@ Additionally, you can download it from [Izzysoft repository](https://apt.izzysof
**Download the Desktop App zip file**
Find the zip file that suits with your operative system:
- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.${{ steps.short-sha.outputs.short_sha }}.zip)
- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.${{ steps.short-sha.outputs.short_sha }}.zip)
- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.${{ steps.short-sha.outputs.short_sha }}.zip)
- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.short_sha.zip)
- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.short_sha.zip)
- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.short_sha.zip)
### Verify the app using GPG:
1. Download the ascii armored signature:
- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.${{ steps.short-sha.outputs.short_sha }}.zip.asc)
- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.${{ steps.short-sha.outputs.short_sha }}.zip.asc)
- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.${{ steps.short-sha.outputs.short_sha }}.zip.asc)
- [Windows](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-win32-ia32.short_sha.zip.asc)
- [Mac](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-mac-darwin-x64.short_sha.zip.asc)
- [Linux](https://github.com/RoboSats/robosats/releases/download/v0.8.1-alpha/robosats-desktop-v0.8.1.alpha-linux-x64.short_sha.zip.asc)
3. Run this command on a directory that contains the apk file and and the ascii armored signature.
`gpg --verify robosats-v0.8.1.alpha-....asc`