mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ccbdd8afc | ||
|
|
2a30c89eb2 | ||
|
|
4878dc98e3 | ||
|
|
dc2704997d | ||
|
|
e107b0fb00 | ||
|
|
6c08675fee |
@@ -79,6 +79,8 @@ const PARAM_NAME_MAP = {
|
|||||||
price: 'price',
|
price: 'price',
|
||||||
constructionyear: 'constructionyear',
|
constructionyear: 'constructionyear',
|
||||||
apartmenttypes: 'apartmenttypes',
|
apartmenttypes: 'apartmenttypes',
|
||||||
|
buildingtypes: 'buildingtypes',
|
||||||
|
ground: 'ground',
|
||||||
pricetype: 'pricetype',
|
pricetype: 'pricetype',
|
||||||
floor: 'floor',
|
floor: 'floor',
|
||||||
geocodes: 'geocodes',
|
geocodes: 'geocodes',
|
||||||
@@ -98,6 +100,7 @@ const EQUIPMENT_MAP = {
|
|||||||
guesttoilet: 'guestToilet',
|
guesttoilet: 'guestToilet',
|
||||||
balcony: 'balcony',
|
balcony: 'balcony',
|
||||||
handicappedaccessible: 'handicappedAccessible',
|
handicappedaccessible: 'handicappedAccessible',
|
||||||
|
lodgerflat: 'lodgerflat',
|
||||||
};
|
};
|
||||||
|
|
||||||
const REAL_ESTATE_TYPE = {
|
const REAL_ESTATE_TYPE = {
|
||||||
@@ -107,6 +110,10 @@ const REAL_ESTATE_TYPE = {
|
|||||||
'wohnung-kaufen-mit-balkon': 'apartmentbuy',
|
'wohnung-kaufen-mit-balkon': 'apartmentbuy',
|
||||||
'eigentumswohnung-mit-garten': 'apartmentbuy',
|
'eigentumswohnung-mit-garten': 'apartmentbuy',
|
||||||
'haus-kaufen': 'housebuy',
|
'haus-kaufen': 'housebuy',
|
||||||
|
'haus-mit-keller-kaufen': 'housebuy',
|
||||||
|
'luxushaus-kaufen': 'housebuy',
|
||||||
|
'villa-kaufen': 'housebuy',
|
||||||
|
'neubauhaus-kaufen': 'housebuy',
|
||||||
};
|
};
|
||||||
|
|
||||||
const WEB_PATH_TO_APARTMENT_EQUIPMENT_MAP = {
|
const WEB_PATH_TO_APARTMENT_EQUIPMENT_MAP = {
|
||||||
|
|||||||
26
package.json
26
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fredy",
|
"name": "fredy",
|
||||||
"version": "20.0.2",
|
"version": "20.0.4",
|
||||||
"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",
|
||||||
@@ -61,15 +61,15 @@
|
|||||||
"Firefox ESR"
|
"Firefox ESR"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@douyinfe/semi-icons": "^2.92.2",
|
"@douyinfe/semi-icons": "^2.93.0",
|
||||||
"@douyinfe/semi-ui": "2.92.2",
|
"@douyinfe/semi-ui": "2.93.0",
|
||||||
"@douyinfe/semi-ui-19": "^2.92.2",
|
"@douyinfe/semi-ui-19": "^2.93.0",
|
||||||
"@mapbox/mapbox-gl-draw": "^1.5.1",
|
"@mapbox/mapbox-gl-draw": "^1.5.1",
|
||||||
"@sendgrid/mail": "8.1.6",
|
"@sendgrid/mail": "8.1.6",
|
||||||
"@vitejs/plugin-react": "5.1.4",
|
"@vitejs/plugin-react": "6.0.1",
|
||||||
"@modelcontextprotocol/sdk": "^1.27.1",
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
||||||
"adm-zip": "^0.5.16",
|
"adm-zip": "^0.5.16",
|
||||||
"better-sqlite3": "^12.6.2",
|
"better-sqlite3": "^12.8.0",
|
||||||
"body-parser": "2.2.2",
|
"body-parser": "2.2.2",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
"cheerio": "^1.2.0",
|
"cheerio": "^1.2.0",
|
||||||
@@ -77,14 +77,14 @@
|
|||||||
"cookie-session": "2.1.1",
|
"cookie-session": "2.1.1",
|
||||||
"handlebars": "4.7.8",
|
"handlebars": "4.7.8",
|
||||||
"lodash": "4.17.23",
|
"lodash": "4.17.23",
|
||||||
"maplibre-gl": "^5.19.0",
|
"maplibre-gl": "^5.20.1",
|
||||||
"nanoid": "5.1.6",
|
"nanoid": "5.1.7",
|
||||||
"node-cron": "^4.2.1",
|
"node-cron": "^4.2.1",
|
||||||
"node-fetch": "3.3.2",
|
"node-fetch": "3.3.2",
|
||||||
"node-mailjet": "6.0.11",
|
"node-mailjet": "6.0.11",
|
||||||
"p-throttle": "^8.1.0",
|
"p-throttle": "^8.1.0",
|
||||||
"package-up": "^5.0.0",
|
"package-up": "^5.0.0",
|
||||||
"puppeteer": "^24.38.0",
|
"puppeteer": "^24.39.1",
|
||||||
"puppeteer-extra": "^3.3.6",
|
"puppeteer-extra": "^3.3.6",
|
||||||
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
||||||
"query-string": "9.3.1",
|
"query-string": "9.3.1",
|
||||||
@@ -99,9 +99,9 @@
|
|||||||
"semver": "^7.7.4",
|
"semver": "^7.7.4",
|
||||||
"serve-static": "2.2.1",
|
"serve-static": "2.2.1",
|
||||||
"slack": "11.0.2",
|
"slack": "11.0.2",
|
||||||
"vite": "7.3.1",
|
"vite": "8.0.0",
|
||||||
"x-var": "^3.0.1",
|
"x-var": "^3.0.1",
|
||||||
"zustand": "^5.0.11"
|
"zustand": "^5.0.12"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.29.0",
|
"@babel/core": "7.29.0",
|
||||||
@@ -118,8 +118,8 @@
|
|||||||
"globals": "^17.4.0",
|
"globals": "^17.4.0",
|
||||||
"history": "5.3.0",
|
"history": "5.3.0",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"less": "4.5.1",
|
"less": "4.6.4",
|
||||||
"lint-staged": "16.3.3",
|
"lint-staged": "16.4.0",
|
||||||
"mocha": "11.7.5",
|
"mocha": "11.7.5",
|
||||||
"nodemon": "^3.1.14",
|
"nodemon": "^3.1.14",
|
||||||
"prettier": "3.8.1"
|
"prettier": "3.8.1"
|
||||||
|
|||||||
@@ -3,36 +3,86 @@
|
|||||||
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Collapse, Descriptions } from '@douyinfe/semi-ui-19';
|
import { useState } from 'react';
|
||||||
|
import { Banner, Button, Modal, Tag, Space, Typography, Descriptions, MarkdownRender } from '@douyinfe/semi-ui-19';
|
||||||
|
import { IconAlertCircle, IconArrowRight } from '@douyinfe/semi-icons';
|
||||||
import { useSelector } from '../../services/state/store.js';
|
import { useSelector } from '../../services/state/store.js';
|
||||||
import { MarkdownRender } from '@douyinfe/semi-ui-19';
|
|
||||||
|
|
||||||
import './VersionBanner.less';
|
import './VersionBanner.less';
|
||||||
|
|
||||||
|
const { Text } = Typography;
|
||||||
|
|
||||||
export default function VersionBanner() {
|
export default function VersionBanner() {
|
||||||
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
const versionUpdate = useSelector((state) => state.versionUpdate.versionUpdate);
|
const versionUpdate = useSelector((state) => state.versionUpdate.versionUpdate);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Collapse>
|
<>
|
||||||
<Collapse.Panel header="A new version of Fredy is available" itemKey="1" className="versionBanner">
|
<Banner
|
||||||
<div className="versionBanner__content">
|
className="versionBanner"
|
||||||
<p>A new version of Fredy is available. Update now to take advantage of the latest features and bug fixes.</p>
|
type="warning"
|
||||||
<Descriptions row size="small">
|
bordered
|
||||||
<Descriptions.Item itemKey="Your Version">{versionUpdate.localFredyVersion}</Descriptions.Item>
|
closeIcon={null}
|
||||||
<Descriptions.Item itemKey="Latest Version">{versionUpdate.version}</Descriptions.Item>
|
description={
|
||||||
<Descriptions.Item itemKey="Github Release">
|
<div className="versionBanner__bar">
|
||||||
<a href={versionUpdate.url} target="_blank" rel="noreferrer">
|
<Space spacing={8} align="center">
|
||||||
{versionUpdate.url}
|
<IconAlertCircle size="small" />
|
||||||
</a>{' '}
|
<Text strong size="small">
|
||||||
</Descriptions.Item>
|
New version available
|
||||||
</Descriptions>
|
</Text>
|
||||||
<p>
|
<Tag color="amber" size="small" shape="circle">
|
||||||
<b>
|
{versionUpdate.version}
|
||||||
<small>Release Notes</small>
|
</Tag>
|
||||||
</b>
|
<Text type="tertiary" size="small">
|
||||||
</p>
|
Current: {versionUpdate.localFredyVersion}
|
||||||
|
</Text>
|
||||||
|
</Space>
|
||||||
|
<Button
|
||||||
|
theme="borderless"
|
||||||
|
size="small"
|
||||||
|
icon={<IconArrowRight />}
|
||||||
|
iconPosition="right"
|
||||||
|
onClick={() => setModalVisible(true)}
|
||||||
|
>
|
||||||
|
Release notes
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Modal
|
||||||
|
title={
|
||||||
|
<Space spacing={8} align="center">
|
||||||
|
<Text strong>Fredy {versionUpdate.version}</Text>
|
||||||
|
<Tag color="amber" size="small">
|
||||||
|
New
|
||||||
|
</Tag>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
visible={modalVisible}
|
||||||
|
onCancel={() => setModalVisible(false)}
|
||||||
|
width={640}
|
||||||
|
footer={
|
||||||
|
<Space>
|
||||||
|
<Button onClick={() => setModalVisible(false)}>Close</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={<IconArrowRight />}
|
||||||
|
iconPosition="right"
|
||||||
|
onClick={() => window.open(versionUpdate.url, '_blank')}
|
||||||
|
>
|
||||||
|
View on GitHub
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Descriptions row size="small" className="versionBanner__details">
|
||||||
|
<Descriptions.Item itemKey="Your Version">{versionUpdate.localFredyVersion}</Descriptions.Item>
|
||||||
|
<Descriptions.Item itemKey="Latest Version">{versionUpdate.version}</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
<div className="versionBanner__notes">
|
||||||
<MarkdownRender raw={versionUpdate.body} />
|
<MarkdownRender raw={versionUpdate.body} />
|
||||||
</div>
|
</div>
|
||||||
</Collapse.Panel>
|
</Modal>
|
||||||
</Collapse>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,24 @@
|
|||||||
.versionBanner {
|
.versionBanner {
|
||||||
background: rgba(var(--semi-teal-1), 1);
|
margin-bottom: 0 !important;
|
||||||
|
|
||||||
&__content {
|
.semi-banner-body {
|
||||||
overflow: auto;
|
padding: 6px 16px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
&__bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__details {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__notes {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user