mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
styling: Enforced styling across all files (#55)
This commit is contained in:
165 files changed
+1879
-1725
No files matched your search
@@ -1,63 +1,63 @@
|
||||
import React, { memo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import React, { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import {
|
||||
ListItemAvatar,
|
||||
Avatar as MuiAvatar,
|
||||
ListItem,
|
||||
Typography,
|
||||
} from "@material-ui/core";
|
||||
} from '@material-ui/core';
|
||||
|
||||
import { secondsToHumanReadable } from "../../utils/time";
|
||||
import LikeButton from "../buttons/LikeButton";
|
||||
import ReplyButton from "../buttons/ReplyButton";
|
||||
import ImageDisplay from "../images/ImageDisplay";
|
||||
import Avatar from "../Avatar";
|
||||
import { secondsToHumanReadable } from '../../utils/time';
|
||||
import LikeButton from '../buttons/LikeButton';
|
||||
import ReplyButton from '../buttons/ReplyButton';
|
||||
import ImageDisplay from '../images/ImageDisplay';
|
||||
import Avatar from '../Avatar';
|
||||
import ShowMore from './ShowMore';
|
||||
import { QuoteButton } from "../buttons/QuoteButton";
|
||||
import { usePhone } from "../../../../os/phone/hooks/usePhone";
|
||||
import { QuoteButton } from '../buttons/QuoteButton';
|
||||
import { usePhone } from '../../../../os/phone/hooks/usePhone';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
overflowX: "hidden",
|
||||
display: "flex",
|
||||
flexFlow: "row nowrap",
|
||||
alignItems: "flex-start",
|
||||
width: "100%",
|
||||
marginTop: "3px",
|
||||
overflowX: 'hidden',
|
||||
display: 'flex',
|
||||
flexFlow: 'row nowrap',
|
||||
alignItems: 'flex-start',
|
||||
width: '100%',
|
||||
marginTop: '3px',
|
||||
},
|
||||
content: {
|
||||
display: "flex",
|
||||
marginTop: "-10px", // easier to do this here than override the MUI styles
|
||||
flexFlow: "column nowrap",
|
||||
width: "100%",
|
||||
display: 'flex',
|
||||
marginTop: '-10px', // easier to do this here than override the MUI styles
|
||||
flexFlow: 'column nowrap',
|
||||
width: '100%',
|
||||
},
|
||||
primary: {
|
||||
display: "flex",
|
||||
flexFlow: "row nowrap",
|
||||
width: "100%",
|
||||
alignItems: "flex-end",
|
||||
display: 'flex',
|
||||
flexFlow: 'row nowrap',
|
||||
width: '100%',
|
||||
alignItems: 'flex-end',
|
||||
},
|
||||
profile: {
|
||||
fontSize: "18px",
|
||||
fontWeight: "bold",
|
||||
fontSize: '18px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
date: {
|
||||
marginLeft: "10px",
|
||||
fontSize: "14px",
|
||||
marginLeft: '10px',
|
||||
fontSize: '14px',
|
||||
},
|
||||
message: {
|
||||
fontSize: "18px",
|
||||
color: "rgba(255, 255, 255, 0.7)",
|
||||
fontSize: '18px',
|
||||
color: 'rgba(255, 255, 255, 0.7)',
|
||||
},
|
||||
buttonContainer: {
|
||||
display: "flex",
|
||||
flexFlow: "row nowrap",
|
||||
justifyContent: "space-between",
|
||||
width: "100%",
|
||||
marginLeft: "-20px", // easier to do this here than override the MUI styles
|
||||
marginTop: "3px",
|
||||
}
|
||||
display: 'flex',
|
||||
flexFlow: 'row nowrap',
|
||||
justifyContent: 'space-between',
|
||||
width: '100%',
|
||||
marginLeft: '-20px', // easier to do this here than override the MUI styles
|
||||
marginTop: '3px',
|
||||
},
|
||||
}));
|
||||
|
||||
export const Tweet = (tweet) => {
|
||||
@@ -81,15 +81,15 @@ export const Tweet = (tweet) => {
|
||||
|
||||
// this is a workaround to transfer string new lines and returns that
|
||||
// are stored into the database into html for the UI to render
|
||||
const formattedMessage = message.replace(/\n\r?/g, "<br />");
|
||||
const profileName = profile_name ? `@${profile_name}` : "";
|
||||
const formattedMessage = message.replace(/\n\r?/g, '<br />');
|
||||
const profileName = profile_name ? `@${profile_name}` : '';
|
||||
|
||||
return (
|
||||
<ListItem className={classes.root} divider>
|
||||
{enableAvatars && (
|
||||
<ListItemAvatar>
|
||||
<MuiAvatar>
|
||||
<Avatar avatarUrl={avatar_url} height="40px" width="40px" />
|
||||
<Avatar avatarUrl={avatar_url} height='40px' width='40px' />
|
||||
</MuiAvatar>
|
||||
</ListItemAvatar>
|
||||
)}
|
||||
@@ -98,9 +98,9 @@ export const Tweet = (tweet) => {
|
||||
<div className={classes.profile}>{profileName}</div>
|
||||
<Typography
|
||||
className={classes.date}
|
||||
component="div"
|
||||
variant="body2"
|
||||
color="textSecondary"
|
||||
component='div'
|
||||
variant='body2'
|
||||
color='textSecondary'
|
||||
>
|
||||
{secondsToHumanReadable(t, seconds_since_tweet)}
|
||||
</Typography>
|
||||
|
||||
Reference in new issue
Block a user