mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
message stuff
This commit is contained in:
1 parent
e7612066dc
commit
f7b8517155
4 files changed
+29
-4
No files matched your search
@@ -20,6 +20,7 @@ import { useContactsService } from "./apps/contacts/hooks/useContactsService";
|
||||
import { useTwitterService } from "./apps/twitter/hooks/useTwitterService";
|
||||
import { useSelloutService } from "./apps/sellout/hooks/useSelloutService";
|
||||
import { useBankService } from './apps/bank/hooks/useBankService';
|
||||
import { useMessagesService } from "./apps/messages/hooks/useMessageService";
|
||||
|
||||
//These events are just for testing. Comment it out before building.
|
||||
setTimeout(() => {
|
||||
@@ -34,6 +35,26 @@ setTimeout(() => {
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
app: "MESSAGES",
|
||||
method: "setMessages",
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
sender: 'chip',
|
||||
receiver: 'rocky',
|
||||
sms: 'Hello there',
|
||||
owner: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
@@ -183,6 +204,7 @@ function Phone() {
|
||||
useInitKeyboard();
|
||||
useSelloutService();
|
||||
useBankService();
|
||||
useMessagesService()
|
||||
|
||||
if (visibility === false) {
|
||||
return null;
|
||||
|
||||
@@ -3,14 +3,17 @@ import { AppWrapper } from "../../../ui/components";
|
||||
import { AppTitle } from "../../../ui/components/AppTitle";
|
||||
import { AppContent } from "../../../ui/components/AppContent";
|
||||
import { useApp } from "../../../os/apps/hooks/useApps";
|
||||
import MessagesList from "./list/MessagesList";
|
||||
import { MessageModal } from "./modal/MessageModal";
|
||||
|
||||
export const MessagesApp = () => {
|
||||
const messages = useApp("MESSAGES");
|
||||
return (
|
||||
<AppWrapper>
|
||||
<AppTitle app={messages} />
|
||||
<MessageModal />
|
||||
<AppContent>
|
||||
<h1>Fuck off</h1>
|
||||
<MessagesList />
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
);
|
||||
|
||||
@@ -19,10 +19,10 @@ export const MessageModal = () => {
|
||||
<Button onClick={() => setMessageModal(false)}><ArrowBackIcon /></Button>
|
||||
{message.map((message) => (
|
||||
<>
|
||||
<Paper>{message.name}</Paper>
|
||||
<Paper style={{ textAlign: 'center' }}>{message.name}</Paper>
|
||||
{message.messages.map((sms) => (
|
||||
<div className={classes.messageContainer}>
|
||||
<Paper className={sms.source == 'chip' ? classes.sourceSms : classes.sms} variant="elevation">
|
||||
<Paper className={sms.source == 'chip' ? classes.sourceSms : classes.sms} variant="outlined">
|
||||
<p>{sms.sms}</p>
|
||||
</Paper>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { makeStyles } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
modalRoot: {
|
||||
zIndex: 30,
|
||||
zIndex: 10,
|
||||
position: 'absolute',
|
||||
height: '100%',
|
||||
width: '100%'
|
||||
|
||||
Reference in new issue
Block a user