mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Notification alert stays on if it is an incoming call and phone is closed (#115)
* Phone now shows all the time slide a bit if incoming call exists | can close alerts! * Improve animation * Improve call controls * Make alerts not overflow | Call modal is navigable out :) * Open modal when accepting call * Cant navigate back from homepage * Avoid call route if no call active + rename things * Impprove main apps icons sizes * hover effect to app icons :) * Revert interface change * fix(phone/dialer): resolve not calling when adding contacts Co-authored-by: Christopher <[email protected]>
This commit is contained in:
1 parent
d2461bab16
commit
41674968ab
24 files changed
+396
-206
No files matched your search
+15
-16
@@ -5,7 +5,7 @@ import { Route } from 'react-router-dom';
|
||||
import { CallModal } from './os/call/components/CallModal';
|
||||
import { HomeApp } from './apps/home/components/Home';
|
||||
import { Slide } from '@material-ui/core';
|
||||
import { useInitKeyboard } from './os/keyboard/hooks/useKeyboard';
|
||||
import { useKeyboardService } from './os/keyboard/hooks/useKeyboardService';
|
||||
import { NotificationBar } from './os/notifications/components/NotificationBar';
|
||||
import { Navigation } from './os/navigation-bar/components/Navigation';
|
||||
import { useNuiService } from './os/nui-events/hooks/useNuiService';
|
||||
@@ -22,27 +22,24 @@ import { useNotesService } from './apps/notes/hooks/useNotesService';
|
||||
import { usePhotoService } from './apps/camera/hooks/usePhotoService';
|
||||
import { useSettings } from './apps/settings/hooks/useSettings';
|
||||
import { useCallService } from './os/call/hooks/useCallService';
|
||||
import { useModal } from './os/call/hooks/useModal';
|
||||
import { useDialService } from './apps/dialer/hooks/useDialService';
|
||||
import InjectDebugData from './os/debug/InjectDebugData';
|
||||
import { usePhoneVisibility } from './os/phone/hooks/usePhoneVisibility';
|
||||
import { Snackbar } from './ui/components/Snackbar';
|
||||
import { NotificationAlert } from './os/notifications/components/NotificationAlert';
|
||||
import { useCallModal } from './os/call/hooks/useCallModal';
|
||||
|
||||
function Phone() {
|
||||
const { modal } = useModal();
|
||||
const { apps } = useApps();
|
||||
|
||||
const [settings] = useSettings();
|
||||
|
||||
const { bottom, visibility } = usePhoneVisibility();
|
||||
|
||||
useNuiService();
|
||||
useKeyboardService();
|
||||
usePhoneService();
|
||||
useSimcardService();
|
||||
useContactsService();
|
||||
useTwitterService();
|
||||
useInitKeyboard();
|
||||
useSelloutService();
|
||||
useBankService();
|
||||
useMessagesService();
|
||||
@@ -51,6 +48,9 @@ function Phone() {
|
||||
useCallService();
|
||||
useDialService();
|
||||
|
||||
const { modal: callModal } = useCallModal();
|
||||
const { bottom, visibility } = usePhoneVisibility();
|
||||
|
||||
return (
|
||||
<Slide direction='up' in={visibility}>
|
||||
<div className='PhoneWrapper'>
|
||||
@@ -79,16 +79,15 @@ function Phone() {
|
||||
<>
|
||||
<NotificationBar />
|
||||
<div className='PhoneAppContainer'>
|
||||
{modal ? (
|
||||
<CallModal />
|
||||
) : (
|
||||
<>
|
||||
<Route exact path='/' component={HomeApp} />
|
||||
{apps.map((App) => (
|
||||
<App.Route key={App.id} />
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
<>
|
||||
<Route exact path='/' component={HomeApp} />
|
||||
{callModal && (
|
||||
<Route exact path='/call' component={CallModal} />
|
||||
)}
|
||||
{apps.map((App) => (
|
||||
<App.Route key={App.id} />
|
||||
))}
|
||||
</>
|
||||
<NotificationAlert />
|
||||
<Snackbar />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user