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