mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Add quick access and improve Apps config
This commit is contained in:
1 parent
6ae60b377c
commit
c149a1f49e
5 files changed
+115
-26
No files matched your search
+13
-7
@@ -1,8 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import './Phone.css';
|
||||
import './i18n';
|
||||
import { Route } from 'react-router-dom';
|
||||
import MessageIcon from '@material-ui/icons/Email';
|
||||
import { Route, useHistory } from 'react-router-dom';
|
||||
import { CallModal } from './modal/components/CallModal';
|
||||
import { HomeApp } from './apps/home/components/Home';
|
||||
import { createMuiTheme, ThemeProvider } from '@material-ui/core';
|
||||
@@ -32,6 +31,7 @@ import { useCallService } from './modal/hooks/useCallService';
|
||||
import { useModal } from './modal/hooks/useModal';
|
||||
import { useDialService } from './apps/dialer/hooks/useDialService';
|
||||
import InjectDebugData from './os/debug/InjectDebugData';
|
||||
import { useQuickAccess } from './os/notifications/hooks/useQuickAccess';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
@@ -42,6 +42,8 @@ InjectDebugData([
|
||||
]);
|
||||
|
||||
function Phone() {
|
||||
const history = useHistory();
|
||||
const quickAccess = useQuickAccess();
|
||||
useNuiService();
|
||||
usePhoneService();
|
||||
const { visibility } = usePhone();
|
||||
@@ -103,10 +105,15 @@ function Phone() {
|
||||
<>
|
||||
<NotificationBar
|
||||
notifications={[
|
||||
{
|
||||
key: 'newMessage',
|
||||
icon: <NotificationIcon Icon={MessageIcon} />,
|
||||
},
|
||||
...quickAccess.map((qa) => ({
|
||||
key: qa.id,
|
||||
icon: (
|
||||
<NotificationIcon
|
||||
icon={qa.notificationIcon}
|
||||
onClick={() => history.push(qa.path)}
|
||||
/>
|
||||
),
|
||||
})),
|
||||
]}
|
||||
/>
|
||||
<div className='PhoneAppContainer'>
|
||||
@@ -115,7 +122,6 @@ function Phone() {
|
||||
) : (
|
||||
<>
|
||||
<Route exact path='/' component={HomeApp} />
|
||||
|
||||
{allApps.map((App) => (
|
||||
<App.Route key={App.id} />
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user