mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 01:12:03 +00:00
[share/upload links] show exact expiration time (#4570)
This commit is contained in:
@@ -105,20 +105,13 @@ class Item extends Component {
|
||||
}
|
||||
|
||||
renderExpiration = () => {
|
||||
let item = this.props.item;
|
||||
const item = this.props.item;
|
||||
if (!item.expire_date) {
|
||||
return (
|
||||
<Fragment>--</Fragment>
|
||||
);
|
||||
}
|
||||
let expire_date = moment(item.expire_date).format('YYYY-MM-DD');
|
||||
return (
|
||||
<Fragment>
|
||||
{item.is_expired ?
|
||||
<span className="error">{expire_date}</span> : expire_date
|
||||
}
|
||||
</Fragment>
|
||||
);
|
||||
return '--';
|
||||
}
|
||||
const expire_date = moment(item.expire_date).format('YYYY-MM-DD');
|
||||
const expire_time = moment(item.expire_date).format('YYYY-MM-DD HH:mm:ss');
|
||||
return (<span className={item.is_expired ? 'error' : ''} title={expire_time}>{expire_date}</span>);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user