mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 18:37:04 -04:00
ReviewDB: make warning review disableable; add timestamps (#948)
This commit is contained in:
parent
5b485806ea
commit
043381963b
7 changed files with 93 additions and 23 deletions
|
@ -16,9 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "@api/settings";
|
||||
import { classes, LazyComponent } from "@utils/misc";
|
||||
import { filters, findBulk } from "@webpack";
|
||||
import { Alerts, UserStore } from "@webpack/common";
|
||||
import { Alerts, moment, Timestamp, UserStore } from "@webpack/common";
|
||||
|
||||
import { Review } from "../entities/Review";
|
||||
import { deleteReview, reportReview } from "../Utils/ReviewDBAPI";
|
||||
|
@ -32,7 +33,7 @@ export default LazyComponent(() => {
|
|||
const [
|
||||
{ cozyMessage, buttons, message, groupStart },
|
||||
{ container, isHeader },
|
||||
{ avatar, clickable, username, messageContent, wrapper, cozy },
|
||||
{ avatar, clickable, username, messageContent, wrapper, cozy, timestampInline, timestamp },
|
||||
{ contents },
|
||||
buttonClasses,
|
||||
{ defaultColor }
|
||||
|
@ -102,6 +103,16 @@ export default LazyComponent(() => {
|
|||
{review.sender.username}
|
||||
</span>
|
||||
{review.sender.badges.map(badge => <ReviewBadge {...badge} />)}
|
||||
|
||||
{
|
||||
!Settings.plugins.ReviewDB.hideTimestamps && (
|
||||
<Timestamp
|
||||
timestamp={moment(review.timestamp * 1000)}
|
||||
compact={true}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
<p
|
||||
className={classes(messageContent, defaultColor)}
|
||||
style={{ fontSize: 15, marginTop: 4 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue