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

View File

@@ -1,5 +1,5 @@
.dirent-detail-item-value-map { .dirent-detail-item-value-map {
height: 100px; height: 200px;
width: 100%; 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}> <DetailItem field={{ key: PRIVATE_COLUMN_KEY.LOCATION, type: CellType.GEOLOCATION, name: getColumnDisplayName(PRIVATE_COLUMN_KEY.LOCATION) }} readonly={true}>
{isValid ? ( {isValid ? (
<div className="sf-metadata-ui cell-formatter-container geolocation-formatter sf-metadata-geolocation-formatter"> <div className="sf-metadata-ui cell-formatter-container geolocation-formatter sf-metadata-geolocation-formatter">
{!isLoading && this.mapType && address && ( {!isLoading && this.mapType && address ? (
<> <span>{address}</span>
<span>{address}</span> ) : (
<br /> <span>{getGeolocationDisplayString(position, { geo_format: GEOLOCATION_FORMAT.LNG_LAT })}</span>
</>
)} )}
<span>{getGeolocationDisplayString(position, { geo_format: GEOLOCATION_FORMAT.LNG_LAT })}</span>
</div> </div>
) : ( ) : (
<div className="sf-metadata-record-cell-empty" placeholder={gettext('Empty')}></div> <div className="sf-metadata-record-cell-empty" placeholder={gettext('Empty')}></div>