1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

optimize ui (#7509)

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2025-02-24 16:04:06 +08:00
committed by GitHub
parent cd5f4511ab
commit 2f4b1e76e5
3 changed files with 9 additions and 7 deletions

View File

@@ -111,6 +111,7 @@ const AI = () => {
}
const fileDetails = detail[PRIVATE_COLUMN_KEY.FILE_DETAILS];
const location = detail[PRIVATE_COLUMN_KEY.LOCATION];
const address = detail[PRIVATE_COLUMN_KEY.LOCATION_TRANSLATED];
let update = {};
if (fileDetails) {
update[PRIVATE_COLUMN_KEY.FILE_DETAILS] = fileDetails;
@@ -118,6 +119,9 @@ const AI = () => {
if (location) {
update[PRIVATE_COLUMN_KEY.LOCATION] = location;
}
if (address) {
update[PRIVATE_COLUMN_KEY.LOCATION_TRANSLATED] = address;
}
Object.keys(update).length > 0 && onLocalRecordChange(recordId, update);
},
});

View File

@@ -1,5 +1,5 @@
.dirent-detail-item-value-map {
height: 100px;
height: 200px;
width: 100%;
}

View File

@@ -151,13 +151,11 @@ class Location extends React.Component {
<DetailItem field={{ key: PRIVATE_COLUMN_KEY.LOCATION, type: CellType.GEOLOCATION, name: getColumnDisplayName(PRIVATE_COLUMN_KEY.LOCATION) }} readonly={true}>
{isValid ? (
<div className="sf-metadata-ui cell-formatter-container geolocation-formatter sf-metadata-geolocation-formatter">
{!isLoading && this.mapType && address && (
<>
<span>{address}</span>
<br />
</>
{!isLoading && this.mapType && address ? (
<span>{address}</span>
) : (
<span>{getGeolocationDisplayString(position, { geo_format: GEOLOCATION_FORMAT.LNG_LAT })}</span>
)}
<span>{getGeolocationDisplayString(position, { geo_format: GEOLOCATION_FORMAT.LNG_LAT })}</span>
</div>
) : (
<div className="sf-metadata-record-cell-empty" placeholder={gettext('Empty')}></div>