From 3d5aadc46d5976d8e168d7692b5ac4787ea2a41b Mon Sep 17 00:00:00 2001 From: erik-sn Date: Sat, 26 Sep 2020 16:55:03 -0400 Subject: [PATCH] override material ui theme with twitter blue --- .../src/apps/twitter/components/TwitterApp.js | 8 +++----- .../components/profile/ProfileUpdateButton.js | 1 - phone/src/apps/twitter/components/twitter.css | 20 ++++++++++++++++++- resources/server/sv_twitter.lua | 4 ---- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/phone/src/apps/twitter/components/TwitterApp.js b/phone/src/apps/twitter/components/TwitterApp.js index 48cfb1e..44ab090 100644 --- a/phone/src/apps/twitter/components/TwitterApp.js +++ b/phone/src/apps/twitter/components/TwitterApp.js @@ -55,13 +55,11 @@ export const TwitterApp = () => { ); return ( - + -
- - {component} -
+ + {component}
{showTweetButton && } { setMimimumLoadPassed(false); const timeout = window.setTimeout(() => { - console.log("debug 1.0"); setMimimumLoadPassed(true); }, MINIMUM_LOAD_TIME); return () => window.clearTimeout(timeout); diff --git a/phone/src/apps/twitter/components/twitter.css b/phone/src/apps/twitter/components/twitter.css index 4242666..c257ed5 100644 --- a/phone/src/apps/twitter/components/twitter.css +++ b/phone/src/apps/twitter/components/twitter.css @@ -1,3 +1,21 @@ -.Mui-selected { +/* 00acee is "twitter blue" and we want to use that to override +some of the Material UI primary theme settings */ + +/* override the bottom navigation active color */ +#twitter-app .Mui-selected { color: #00acee !important; } +/* override the FAB (action buttons) background when selected */ +#twitter-app .MuiFab-primary { + background: #00acee !important; +} + +/* override the labels on text fields */ +#twitter-app .MuiInputLabel-formControl.Mui-focused { + color: #00acee !important; +} + +/* override the underlines of text fields */ +#twitter-app .Mui-focused:after { + border-bottom-color: #00acee !important; +} diff --git a/resources/server/sv_twitter.lua b/resources/server/sv_twitter.lua index 08e83be..cefcd75 100644 --- a/resources/server/sv_twitter.lua +++ b/resources/server/sv_twitter.lua @@ -106,8 +106,6 @@ ESX.RegisterServerCallback('phone:getOrCreateTwitterProfile', function(source, c end) function updateProfile(identifier, data, cb) - print(identifier) - print(data) MySQL.Async.execute('UPDATE npwd_twitter_profiles SET avatar_url = @avatar_url, profile_name = @profile_name, bio = @bio, location = @location, job = @job WHERE identifier = @identifier', { ['identifier'] = identifier, @@ -117,7 +115,6 @@ function updateProfile(identifier, data, cb) ['location'] = data.location, ['job'] = data.job, }, function(result) - print('result1: ', result) cb(result) end) end @@ -129,7 +126,6 @@ ESX.RegisterServerCallback('phone:updateTwitterProfile', function(source, cb, da local _identifier = xPlayer.getIdentifier() updateProfile(_identifier, data, function(result) - print('result2: ', result) cb(result) end) end)