mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +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,8 +1,8 @@
|
||||
import React from "react";
|
||||
import MuiAlert from "@material-ui/lab/Alert";
|
||||
import React from 'react';
|
||||
import MuiAlert from '@material-ui/lab/Alert';
|
||||
|
||||
export function Alert(props) {
|
||||
return <MuiAlert elevation={6} variant="filled" {...props} />;
|
||||
return <MuiAlert elevation={6} variant='filled' {...props} />;
|
||||
}
|
||||
|
||||
export default Alert;
|
||||
@@ -1,25 +1,25 @@
|
||||
import React from "react";
|
||||
import { Box, makeStyles, Backdrop, Paper } from "@material-ui/core";
|
||||
import { AppContentTypes } from "../interface/InterfaceUI";
|
||||
import React from 'react';
|
||||
import { Box, makeStyles, Backdrop, Paper } from '@material-ui/core';
|
||||
import { AppContentTypes } from '../interface/InterfaceUI';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
wrapper: {
|
||||
height: "70vh", // NOTE: Taso: Hacky change temp, this should be done automatically tbh. Will refactor at some point
|
||||
overflow: "auto",
|
||||
height: '70vh', // NOTE: Taso: Hacky change temp, this should be done automatically tbh. Will refactor at some point
|
||||
overflow: 'auto',
|
||||
},
|
||||
box: {
|
||||
width: "100%",
|
||||
height: "100%", // allow application to fill entireity of space
|
||||
position: "relative",
|
||||
overflow: "auto",
|
||||
width: '100%',
|
||||
height: '100%', // allow application to fill entireity of space
|
||||
position: 'relative',
|
||||
overflow: 'auto',
|
||||
},
|
||||
backdrop: {
|
||||
position: "absolute",
|
||||
position: 'absolute',
|
||||
zIndex: 1,
|
||||
},
|
||||
paper: {
|
||||
width: "100%",
|
||||
height: "100%", // allow application to fill entireity of space
|
||||
width: '100%',
|
||||
height: '100%', // allow application to fill entireity of space
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Avatar from "@material-ui/core/Avatar";
|
||||
import { green } from "@material-ui/core/colors";
|
||||
import { Button } from "@material-ui/core";
|
||||
import Nui from "../../os/nui-events/utils/Nui";
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import Avatar from '@material-ui/core/Avatar';
|
||||
import { green } from '@material-ui/core/colors';
|
||||
import { Button } from '@material-ui/core';
|
||||
import Nui from '../../os/nui-events/utils/Nui';
|
||||
|
||||
interface IStyles {
|
||||
root: any;
|
||||
@@ -13,8 +13,8 @@ interface IStyles {
|
||||
const useStyles = makeStyles(
|
||||
(theme): IStyles => ({
|
||||
root: {
|
||||
display: "flex",
|
||||
"& > *": {
|
||||
display: 'flex',
|
||||
'& > *': {
|
||||
margin: theme.spacing(1),
|
||||
},
|
||||
padding: 0,
|
||||
@@ -36,8 +36,8 @@ export const AppIcon = ({ id, name, icon, backgroundColor, color }) => {
|
||||
});
|
||||
|
||||
const openAppCallback = () => {
|
||||
Nui.send(`phone:app:${id}`)
|
||||
}
|
||||
Nui.send(`phone:app:${id}`);
|
||||
};
|
||||
|
||||
return (
|
||||
<Button onClick={openAppCallback} className={classes.root}>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { Typography, Box, makeStyles } from "@material-ui/core";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Variant } from "@material-ui/core/styles/createTypography";
|
||||
import React from 'react';
|
||||
import { Typography, Box, makeStyles } from '@material-ui/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Variant } from '@material-ui/core/styles/createTypography';
|
||||
|
||||
interface IProps {
|
||||
app: any;
|
||||
@@ -17,8 +17,8 @@ interface IUseStyle {
|
||||
const useStyle = makeStyles(
|
||||
(theme): IUseStyle => ({
|
||||
root: ({ backgroundColor }) => ({
|
||||
width: "100%",
|
||||
textAlign: "left",
|
||||
width: '100%',
|
||||
textAlign: 'left',
|
||||
backgroundColor: backgroundColor || theme.palette.background.default,
|
||||
}),
|
||||
text: ({ color }) => ({
|
||||
@@ -30,7 +30,7 @@ const useStyle = makeStyles(
|
||||
// but need to think about the best way to do that for standardization sake.
|
||||
export const AppTitle = ({
|
||||
app: { backgroundColor, color, nameLocale },
|
||||
variant = "h5",
|
||||
variant = 'h5',
|
||||
...props
|
||||
}: IProps) => {
|
||||
const classes = useStyle({ color, backgroundColor });
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import MaterialButton from "@material-ui/core/Button";
|
||||
import React from 'react';
|
||||
import MaterialButton from '@material-ui/core/Button';
|
||||
|
||||
export const Button = ({ ...props }) => {
|
||||
return (
|
||||
<MaterialButton aria-label="button" {...props}>
|
||||
<MaterialButton aria-label='button' {...props}>
|
||||
{props.children}
|
||||
</MaterialButton>
|
||||
);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import React from 'react';
|
||||
|
||||
import styled from "styled-components";
|
||||
import styled from 'styled-components';
|
||||
|
||||
const Input = styled("input")`
|
||||
const Input = styled('input')`
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import MaterialList from "@material-ui/core/List";
|
||||
import React from 'react';
|
||||
import MaterialList from '@material-ui/core/List';
|
||||
|
||||
export const List = ({ ...props }) => {
|
||||
return (
|
||||
<MaterialList aria-label="list" {...props}>
|
||||
<MaterialList aria-label='list' {...props}>
|
||||
{props.children}
|
||||
</MaterialList>
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import MaterialListItem from "@material-ui/core/ListItem";
|
||||
import React from 'react';
|
||||
import MaterialListItem from '@material-ui/core/ListItem';
|
||||
|
||||
export const ListItem = ({ ...props }) => {
|
||||
return (
|
||||
<MaterialListItem aria-label="list item" {...props}>
|
||||
<MaterialListItem aria-label='list item' {...props}>
|
||||
{props.children}
|
||||
</MaterialListItem>
|
||||
);
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Paper } from "@material-ui/core";
|
||||
import React, { useEffect } from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Paper } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
zIndex: 10,
|
||||
background: "#424242",
|
||||
marginTop: "15px",
|
||||
width: "90%",
|
||||
display: "flex",
|
||||
flexFlow: "column nowrap",
|
||||
position: "absolute",
|
||||
top: "80px",
|
||||
background: '#424242',
|
||||
marginTop: '15px',
|
||||
width: '90%',
|
||||
display: 'flex',
|
||||
flexFlow: 'column nowrap',
|
||||
position: 'absolute',
|
||||
top: '80px',
|
||||
},
|
||||
displayBlock: {
|
||||
/*Sets modal to center*/
|
||||
display: "flex",
|
||||
flexFlow: "column nowrap",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
position: "relative",
|
||||
display: 'flex',
|
||||
flexFlow: 'column nowrap',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'relative',
|
||||
},
|
||||
displayNone: {
|
||||
display: "none",
|
||||
display: 'none',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -31,15 +31,15 @@ export const Modal = ({ children, visible, handleClose }) => {
|
||||
|
||||
// when the user presses escape we should close the modal
|
||||
const _handleEscape = (e) => {
|
||||
const isEscapeKey = e.key === "Escape" || e.key === "Esc";
|
||||
const isEscapeKey = e.key === 'Escape' || e.key === 'Esc';
|
||||
if (isEscapeKey) {
|
||||
e.preventDefault();
|
||||
handleClose();
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
window.addEventListener("keydown", _handleEscape, true);
|
||||
return () => window.removeEventListener("keydown", _handleEscape);
|
||||
window.addEventListener('keydown', _handleEscape, true);
|
||||
return () => window.removeEventListener('keydown', _handleEscape);
|
||||
});
|
||||
|
||||
const showHideClassName = visible
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from "./AppWrapper";
|
||||
export * from './AppWrapper';
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { ContextMenu } from "../components/ContextMenu";
|
||||
import React, { useState } from 'react';
|
||||
import { ContextMenu } from '../components/ContextMenu';
|
||||
|
||||
type UseContextMenu = [any, any, () => JSX.Element, boolean];
|
||||
|
||||
|
||||
Reference in new issue
Block a user