mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +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,18 +1,18 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Button } from "@material-ui/core";
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Button } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
buttons: {
|
||||
display: "flex",
|
||||
flexFlow: "row nowrap",
|
||||
justifyContent: "flex-end",
|
||||
alignItems: "justify-content",
|
||||
marginRight: "15px",
|
||||
display: 'flex',
|
||||
flexFlow: 'row nowrap',
|
||||
justifyContent: 'flex-end',
|
||||
alignItems: 'justify-content',
|
||||
marginRight: '15px',
|
||||
},
|
||||
close: {
|
||||
marginLeft: "8px",
|
||||
marginLeft: '8px',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -27,23 +27,23 @@ export const ControlButtons = ({
|
||||
|
||||
const imagePromptVisible = showImagePrompt && !showEmoji;
|
||||
const primaryButtonText = imagePromptVisible
|
||||
? t("APPS_TWITTER_SUBMIT_IMAGE")
|
||||
: t("APPS_TWITTER_TWEET");
|
||||
? t('APPS_TWITTER_SUBMIT_IMAGE')
|
||||
: t('APPS_TWITTER_TWEET');
|
||||
const showCloseButton = showImagePrompt || showEmoji;
|
||||
|
||||
return (
|
||||
<div className={classes.buttons}>
|
||||
<Button variant="contained" color="primary" onClick={onPrimaryClick}>
|
||||
<Button variant='contained' color='primary' onClick={onPrimaryClick}>
|
||||
{primaryButtonText}
|
||||
</Button>
|
||||
{showCloseButton && (
|
||||
<Button
|
||||
className={classes.close}
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
variant='contained'
|
||||
color='secondary'
|
||||
onClick={onCloseClick}
|
||||
>
|
||||
{t("APPS_TWITTER_CLOSE_IMAGE")}
|
||||
{t('APPS_TWITTER_CLOSE_IMAGE')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Button } from "@material-ui/core";
|
||||
import InsertPhotoIcon from "@material-ui/icons/InsertPhoto";
|
||||
import EmojiIcon from "@material-ui/icons/SentimentSatisfied";
|
||||
import { usePhone } from "../../../../os/phone/hooks/usePhone";
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Button } from '@material-ui/core';
|
||||
import InsertPhotoIcon from '@material-ui/icons/InsertPhoto';
|
||||
import EmojiIcon from '@material-ui/icons/SentimentSatisfied';
|
||||
import { usePhone } from '../../../../os/phone/hooks/usePhone';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
buttons: {
|
||||
display: "flex",
|
||||
flexFlow: "row nowrap",
|
||||
justifyContent: "flex-start",
|
||||
paddingLeft: "5px", // re-align left buttons after overriding material-ui spacing
|
||||
display: 'flex',
|
||||
flexFlow: 'row nowrap',
|
||||
justifyContent: 'flex-start',
|
||||
paddingLeft: '5px', // re-align left buttons after overriding material-ui spacing
|
||||
},
|
||||
button: {
|
||||
background: "transparent",
|
||||
minWidth: "45px", // override default material-ui spacing between buttons
|
||||
background: 'transparent',
|
||||
minWidth: '45px', // override default material-ui spacing between buttons
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -29,12 +29,12 @@ export const IconButtons = ({ onImageClick, onEmojiClick }) => {
|
||||
<div className={classes.buttons}>
|
||||
{enableImages && (
|
||||
<Button className={classes.button} onClick={onImageClick}>
|
||||
<InsertPhotoIcon color="action" />
|
||||
<InsertPhotoIcon color='action' />
|
||||
</Button>
|
||||
)}
|
||||
{enableEmojis && (
|
||||
<Button className={classes.button} onClick={onEmojiClick}>
|
||||
<EmojiIcon color="action" />
|
||||
<EmojiIcon color='action' />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { useState } from "react";
|
||||
import { Button, CircularProgress } from "@material-ui/core";
|
||||
import FavoriteBorderIcon from "@material-ui/icons/FavoriteBorder";
|
||||
import FavoriteIcon from "@material-ui/icons/Favorite";
|
||||
import React, { useState } from 'react';
|
||||
import { Button, CircularProgress } from '@material-ui/core';
|
||||
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
|
||||
import FavoriteIcon from '@material-ui/icons/Favorite';
|
||||
|
||||
import Nui from "../../../../os/nui-events/utils/Nui";
|
||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||
|
||||
const LOADING_TIME = 1250;
|
||||
|
||||
@@ -12,7 +12,7 @@ function LikeButton({ tweetId, isLiked }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleClick = () => {
|
||||
Nui.send("phone:toggleLike", tweetId);
|
||||
Nui.send('phone:toggleLike', tweetId);
|
||||
setLoading(true);
|
||||
window.setTimeout(() => {
|
||||
setLiked(!liked);
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import PublishIcon from "@material-ui/icons/Publish";
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Fab } from '@material-ui/core';
|
||||
import PublishIcon from '@material-ui/icons/Publish';
|
||||
|
||||
import { useProfile } from "../../hooks/useProfile";
|
||||
import { useProfile } from '../../hooks/useProfile';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
position: "absolute",
|
||||
bottom: "15px",
|
||||
right: "15px",
|
||||
position: 'absolute',
|
||||
bottom: '15px',
|
||||
right: '15px',
|
||||
},
|
||||
button: {
|
||||
background: "#00acee",
|
||||
background: '#00acee',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -37,7 +37,7 @@ export function ProfileUpdateButton({ handleClick }) {
|
||||
<div className={classes.root}>
|
||||
<Fab
|
||||
className={classes.button}
|
||||
color="primary"
|
||||
color='primary'
|
||||
onClick={handleClick}
|
||||
disabled={isLoading}
|
||||
>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { Button } from "@material-ui/core";
|
||||
import QuoteIcon from "@material-ui/icons/FormatQuote";
|
||||
import React from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { Button } from '@material-ui/core';
|
||||
import QuoteIcon from '@material-ui/icons/FormatQuote';
|
||||
|
||||
import { twitterState } from "../../hooks/state";
|
||||
import { twitterState } from '../../hooks/state';
|
||||
|
||||
export const QuoteButton = ({ message }) => {
|
||||
const setModalVisible = useSetRecoilState(twitterState.showCreateTweetModal);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { Button } from "@material-ui/core";
|
||||
import ReplyIcon from "@material-ui/icons/Reply";
|
||||
import React from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { Button } from '@material-ui/core';
|
||||
import ReplyIcon from '@material-ui/icons/Reply';
|
||||
|
||||
import { twitterState } from "../../hooks/state";
|
||||
import { twitterState } from '../../hooks/state';
|
||||
|
||||
export const ReplyButton = ({ profile_name }) => {
|
||||
const setModalVisible = useSetRecoilState(twitterState.showCreateTweetModal);
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
Button,
|
||||
CircularProgress,
|
||||
MenuItem
|
||||
} from "@material-ui/core";
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, CircularProgress, MenuItem } from '@material-ui/core';
|
||||
import DoneIcon from '@material-ui/icons/Done';
|
||||
|
||||
import Nui from "../../../../os/nui-events/utils/Nui";
|
||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||
|
||||
const LOADING_TIME = 1250;
|
||||
|
||||
@@ -16,7 +12,7 @@ function ReportButton({ handleClose, tweetId, isReported }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleClick = () => {
|
||||
Nui.send("phone:reportTweet", tweetId);
|
||||
Nui.send('phone:reportTweet', tweetId);
|
||||
setLoading(true);
|
||||
window.setTimeout(() => {
|
||||
setLoading(false);
|
||||
@@ -26,24 +22,22 @@ function ReportButton({ handleClose, tweetId, isReported }) {
|
||||
|
||||
if (isReported) {
|
||||
return (
|
||||
<MenuItem onClick={handleClose}>
|
||||
<DoneIcon />
|
||||
<span style={{ marginLeft: '5px' }}>{t('APPS_TWITTER_REPORTED')}</span>
|
||||
</MenuItem >
|
||||
<MenuItem onClick={handleClose}>
|
||||
<DoneIcon />
|
||||
<span style={{ marginLeft: '5px' }}>{t('APPS_TWITTER_REPORTED')}</span>
|
||||
</MenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Button disabled>
|
||||
<CircularProgress id="twitter-report-progress" size={22} />
|
||||
<CircularProgress id='twitter-report-progress' size={22} />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<MenuItem onClick={handleClick}>{t('APPS_TWITTER_REPORT')}</MenuItem >
|
||||
);
|
||||
return <MenuItem onClick={handleClick}>{t('APPS_TWITTER_REPORT')}</MenuItem>;
|
||||
}
|
||||
|
||||
export default ReportButton;
|
||||
@@ -1,16 +1,16 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import SearchIcon from "@material-ui/icons/Search";
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Fab } from '@material-ui/core';
|
||||
import SearchIcon from '@material-ui/icons/Search';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
position: "absolute",
|
||||
bottom: "15px",
|
||||
right: "15px",
|
||||
position: 'absolute',
|
||||
bottom: '15px',
|
||||
right: '15px',
|
||||
},
|
||||
button: {
|
||||
background: "#00acee",
|
||||
background: '#00acee',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -19,7 +19,7 @@ export function ProfileUpdateButton({ handleClick }) {
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<Fab className={classes.button} color="primary" onClick={handleClick}>
|
||||
<Fab className={classes.button} color='primary' onClick={handleClick}>
|
||||
<SearchIcon />
|
||||
</Fab>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import CreateIcon from "@material-ui/icons/Create";
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Fab } from '@material-ui/core';
|
||||
import CreateIcon from '@material-ui/icons/Create';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
position: "absolute",
|
||||
bottom: "75px",
|
||||
right: "15px",
|
||||
position: 'absolute',
|
||||
bottom: '75px',
|
||||
right: '15px',
|
||||
},
|
||||
button: {
|
||||
background: "#00acee",
|
||||
background: '#00acee',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -19,7 +19,7 @@ export function TweetButton({ openModal }) {
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<Fab className={classes.button} color="primary" onClick={openModal}>
|
||||
<Fab className={classes.button} color='primary' onClick={openModal}>
|
||||
<CreateIcon />
|
||||
</Fab>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user