mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019b9ac87b | ||
|
|
0d23d43e79 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fredy",
|
"name": "fredy",
|
||||||
"version": "22.3.2",
|
"version": "22.3.3",
|
||||||
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ const JobGrid = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 }}>
|
||||||
{job.isOnlyShared && (
|
{job.isOnlyShared && (
|
||||||
<Popover content={getPopoverContent('This job has been shared with you — read only.')}>
|
<Popover content={getPopoverContent('This job has been shared with you - read only.')}>
|
||||||
<div>
|
<div>
|
||||||
<IconAlertTriangle style={{ color: 'rgba(var(--semi-yellow-7), 1)' }} />
|
<IconAlertTriangle style={{ color: 'rgba(var(--semi-yellow-7), 1)' }} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -112,9 +112,9 @@
|
|||||||
|
|
||||||
.semi-navigation-item {
|
.semi-navigation-item {
|
||||||
border-radius: @radius-btn !important;
|
border-radius: @radius-btn !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
color: @color-muted !important;
|
color: @color-muted !important;
|
||||||
transition: background @transition-fast, color @transition-fast !important;
|
transition: background @transition-fast, color @transition-fast, border-color @transition-fast !important;
|
||||||
margin: 2px 8px !important;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: @color-text !important;
|
color: @color-text !important;
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
&.semi-navigation-item-selected,
|
&.semi-navigation-item-selected,
|
||||||
&[aria-selected="true"] {
|
&[aria-selected="true"] {
|
||||||
background: rgba(224,74,56,0.12) !important;
|
background: rgba(224,74,56,0.12) !important;
|
||||||
border: 1px solid rgba(224,74,56,0.25) !important;
|
border-color: rgba(224,74,56,0.25) !important;
|
||||||
color: @color-text !important;
|
color: @color-text !important;
|
||||||
|
|
||||||
.semi-navigation-item-icon {
|
.semi-navigation-item-icon {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
import { Button, Tooltip } from '@douyinfe/semi-ui-19';
|
import { Button, Tooltip } from '@douyinfe/semi-ui-19';
|
||||||
import {
|
import {
|
||||||
IconBriefcase,
|
IconBriefcase,
|
||||||
IconCart,
|
|
||||||
IconDelete,
|
IconDelete,
|
||||||
IconLink,
|
IconLink,
|
||||||
IconMapPin,
|
IconMapPin,
|
||||||
@@ -15,6 +14,7 @@ import {
|
|||||||
IconEyeOpened,
|
IconEyeOpened,
|
||||||
} from '@douyinfe/semi-icons';
|
} from '@douyinfe/semi-icons';
|
||||||
import no_image from '../../assets/no_image.png';
|
import no_image from '../../assets/no_image.png';
|
||||||
|
import { formatEuroPrice } from '../../services/price/priceService.js';
|
||||||
import * as timeService from '../../services/time/timeService.js';
|
import * as timeService from '../../services/time/timeService.js';
|
||||||
import StatusControl from '../listings/StatusControl.jsx';
|
import StatusControl from '../listings/StatusControl.jsx';
|
||||||
|
|
||||||
@@ -52,10 +52,7 @@ const ListingsTable = ({ listings, onWatch, onNavigate, onDelete, onStatusChange
|
|||||||
|
|
||||||
<div className="listingsTable__row__price">
|
<div className="listingsTable__row__price">
|
||||||
{item.price ? (
|
{item.price ? (
|
||||||
<>
|
formatEuroPrice(item.price)
|
||||||
<IconCart size="small" />
|
|
||||||
{item.price}
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<span className="listingsTable__row__empty">---</span>
|
<span className="listingsTable__row__empty">---</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -55,8 +55,11 @@
|
|||||||
color: @color-success;
|
color: @color-success;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__address {
|
&__address {
|
||||||
@@ -94,26 +97,33 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__star {
|
&__star {
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
background: transparent;
|
background: rgba(0,0,0,0.28);
|
||||||
border: none;
|
border: 1px solid rgba(255,255,255,0.12);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
transition: background @transition-fast;
|
transition: background @transition-fast, border-color @transition-fast, transform @transition-fast;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(0, 0, 0, 0.1);
|
background: rgba(0,0,0,0.48);
|
||||||
|
border-color: rgba(255,255,255,0.22);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
box-shadow: 0 0 0 2px rgba(224,74,56,0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
color: @color-accent;
|
color: @color-accent;
|
||||||
font-size: 14px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.versionBanner {
|
.versionBanner {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
.semi-banner-body {
|
.semi-banner-body {
|
||||||
padding: 6px 16px;
|
padding: 6px 16px;
|
||||||
|
|||||||
22
ui/src/services/price/priceService.js
Normal file
22
ui/src/services/price/priceService.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026 by Christian Kellner.
|
||||||
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
const euroPriceFormatter = new Intl.NumberFormat('de-DE', {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number|string} price
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
export const formatEuroPrice = (price) => {
|
||||||
|
const parsedPrice = Number(price);
|
||||||
|
if (!Number.isFinite(parsedPrice)) {
|
||||||
|
return `${price} €`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${euroPriceFormatter.format(parsedPrice)} €`;
|
||||||
|
};
|
||||||
@@ -41,6 +41,7 @@ import maplibregl from 'maplibre-gl';
|
|||||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||||
import no_image from '../../assets/no_image.png';
|
import no_image from '../../assets/no_image.png';
|
||||||
import * as timeService from '../../services/time/timeService.js';
|
import * as timeService from '../../services/time/timeService.js';
|
||||||
|
import { formatEuroPrice } from '../../services/price/priceService.js';
|
||||||
import { distanceMeters, getBoundsFromCoords } from './mapUtils.js';
|
import { distanceMeters, getBoundsFromCoords } from './mapUtils.js';
|
||||||
import { xhrPost, xhrDelete } from '../../services/xhr.js';
|
import { xhrPost, xhrDelete } from '../../services/xhr.js';
|
||||||
import ListingDeletionModal from '../../components/ListingDeletionModal.jsx';
|
import ListingDeletionModal from '../../components/ListingDeletionModal.jsx';
|
||||||
@@ -323,7 +324,11 @@ export default function ListingDetail() {
|
|||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
key: 'Price',
|
key: 'Price',
|
||||||
value: `${listing.price} €`,
|
value: listing.price ? (
|
||||||
|
<span className="listing-detail__price">{formatEuroPrice(listing.price)}</span>
|
||||||
|
) : (
|
||||||
|
'N/A'
|
||||||
|
),
|
||||||
Icon: <IconCart />,
|
Icon: <IconCart />,
|
||||||
helpText: 'The asking price of this listing, as reported by the provider.',
|
helpText: 'The asking price of this listing, as reported by the provider.',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -199,6 +199,10 @@
|
|||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
padding: 0.2rem 0.6rem;
|
padding: 0.2rem 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__price {
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.listing-detail-popup {
|
.listing-detail-popup {
|
||||||
|
|||||||
Reference in New Issue
Block a user