mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
Fiz(AppContent): Scroll fix
This commit is contained in:
1 parent
0300dc53d8
commit
c78eba04c9
3 files changed
+109
-53
No files matched your search
+84
-41
@@ -18,49 +18,92 @@ import { useApps } from "./os/apps/hooks/useApps";
|
||||
|
||||
import { useContactsService } from "./apps/contacts/hooks/useContactsService";
|
||||
|
||||
// @TODO: Remove this testing shit
|
||||
// Used for testing NUI events while we work on clientside
|
||||
//setTimeout(() => {
|
||||
// window.dispatchEvent(
|
||||
// new MessageEvent("message", {
|
||||
// data: {
|
||||
// app: "SIMCARD",
|
||||
// method: "setNumber",
|
||||
// data: "111-1134",
|
||||
// },
|
||||
// })
|
||||
// );
|
||||
//}, 1000);
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
app: "SIMCARD",
|
||||
method: "setNumber",
|
||||
data: "111-1134",
|
||||
},
|
||||
})
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
//setTimeout(() => {
|
||||
// window.dispatchEvent(
|
||||
// new MessageEvent("message", {
|
||||
// data: {
|
||||
// app: "BANK",
|
||||
// method: "setContacts",
|
||||
// data: [
|
||||
// {
|
||||
// id: 1,
|
||||
// number: '345-4366',
|
||||
// display: 'Kevin'
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// })
|
||||
// );
|
||||
//}, 1000);
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
app: "BANK",
|
||||
method: "setContacts",
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
number: "345-4366",
|
||||
display: "Kevin",
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
//setTimeout(() => {
|
||||
// window.dispatchEvent(
|
||||
// new MessageEvent("message", {
|
||||
// data: {
|
||||
// app: "PHONE",
|
||||
// method: "setVisibility",
|
||||
// data: true,
|
||||
// },
|
||||
// })
|
||||
// );
|
||||
//}, 1000);
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
app: "PHONE",
|
||||
method: "setVisibility",
|
||||
data: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
function Phone() {
|
||||
useNuiService();
|
||||
|
||||
@@ -4,6 +4,8 @@ import { AppTitle } from "../../../ui/components/AppTitle";
|
||||
import { AppContent } from "../../../ui/components/AppContent";
|
||||
import { ContactList } from "./ContactList";
|
||||
import { useApp } from "../../../os/apps/hooks/useApps";
|
||||
import { Button } from "../../../ui/components/Button";
|
||||
import AddCircleIcon from "@material-ui/icons/AddCircle";
|
||||
|
||||
export const ContactsApp = () => {
|
||||
const contacts = useApp("CONTACTS");
|
||||
@@ -12,6 +14,9 @@ export const ContactsApp = () => {
|
||||
<AppTitle app={contacts} />
|
||||
<AppContent>
|
||||
<ContactList />
|
||||
<Button fullWidth>
|
||||
<AddCircleIcon />
|
||||
</Button>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
);
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import React from "react";
|
||||
import { Box, makeStyles, Backdrop, Paper } from "@material-ui/core";
|
||||
import { Box, makeStyles, Backdrop, Paper, Container } from "@material-ui/core";
|
||||
import { red } from "@material-ui/core/colors";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
wrapper: {
|
||||
height: "80vh",
|
||||
overflow: "auto",
|
||||
},
|
||||
box: {
|
||||
width: "100%",
|
||||
position: "relative",
|
||||
overflow: "auto",
|
||||
},
|
||||
backdrop: {
|
||||
position: "absolute",
|
||||
@@ -12,7 +18,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
paper: {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
height: "80vh",
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -25,15 +31,17 @@ export const AppContent = ({
|
||||
}) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Box flexGrow={1} className={classes.box} {...props}>
|
||||
<Paper square px={2} pt={1} elevation={0} className={classes.paper}>
|
||||
<Backdrop
|
||||
className={classes.backdrop}
|
||||
open={backdrop || false}
|
||||
onClick={onClickBackdrop}
|
||||
></Backdrop>
|
||||
{children}
|
||||
</Paper>
|
||||
</Box>
|
||||
<Paper className={classes.wrapper}>
|
||||
<Box flexGrow={1} className={classes.box} {...props}>
|
||||
<Paper square px={2} pt={1} elevation={0} className={classes.paper}>
|
||||
<Backdrop
|
||||
className={classes.backdrop}
|
||||
open={backdrop || false}
|
||||
onClick={onClickBackdrop}
|
||||
></Backdrop>
|
||||
{children}
|
||||
</Paper>
|
||||
</Box>
|
||||
</Paper>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user