feat(client/debug): Phone restart command (#145)

Trigger a UI restart by entering the command `phone:restart` in the F8 console.
This commit is contained in:
Taso authored and GitHub committed 2021-03-06 10:38:10 -05:00
1 parent 531a341ffd
commit 605f957f9a
3 files changed
+53 -11

No files matched your search

+9 -11
View File
@@ -46,15 +46,6 @@ const hidePhone = async (): Promise<void> => {
* Register Command and Keybinding
*
* * * * * * * * * * * * */
RegisterCommand(
'phone:close',
async () => {
await hidePhone();
},
false,
);
RegisterCommand(
'phone',
async () => {
@@ -65,9 +56,16 @@ RegisterCommand(
);
RegisterCommand(
'phone:open',
'phone:restart',
async () => {
await showPhone();
await hidePhone();
SendNuiMessage(
JSON.stringify({
app: 'PHONE',
method: 'startRestart',
data: {},
}),
);
},
false,
);