From 0312d2c4a6c2877a99bf1014cac5be1709425c05 Mon Sep 17 00:00:00 2001 From: chip Date: Mon, 31 Aug 2020 23:18:13 +0200 Subject: [PATCH] Fix(Client): Fixed what rocky broke --- phone/src/ui/components/AppContent.js | 6 ++---- resources/client/cl_main.lua | 12 ++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/phone/src/ui/components/AppContent.js b/phone/src/ui/components/AppContent.js index 0f77d6f..168747f 100644 --- a/phone/src/ui/components/AppContent.js +++ b/phone/src/ui/components/AppContent.js @@ -1,10 +1,9 @@ import React from "react"; -import { Box, makeStyles, Backdrop, Paper, Container } from "@material-ui/core"; -import { red } from "@material-ui/core/colors"; +import { Box, makeStyles, Backdrop, Paper } from "@material-ui/core"; const useStyles = makeStyles((theme) => ({ wrapper: { - height: "80vh", + height: "67vh", overflow: "auto", }, box: { @@ -18,7 +17,6 @@ const useStyles = makeStyles((theme) => ({ }, paper: { width: "100%", - height: "80vh", }, })); diff --git a/resources/client/cl_main.lua b/resources/client/cl_main.lua index 4bc729b..fc8ba8a 100644 --- a/resources/client/cl_main.lua +++ b/resources/client/cl_main.lua @@ -6,6 +6,17 @@ Citizen.CreateThread(function() Citizen.Wait(0) end end) + +RegisterCommand('phone:close', function(source, args, rawCommand) + SendNUIMessage( -- Hides phone + { + app = 'PHONE', + method = 'setVisibility', + data = false + } + ) + SetNuiFocus(false, false) +end) ----- --END OF ESX ----- @@ -31,6 +42,7 @@ Citizen.CreateThread(function() } ) SetNuiFocus(true, true) + TriggerServerEvent('phone:getCredentials', source) elseif isPhoneOpen == true then isPhoneOpen = false print(Config.KeyTogglePhone) --Left for testing purposes.