mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 11:06:17 +08:00
Merge pull request #1338 from Estebene/bug-command-theme
Command Line interferring with the random theme fully fixed
This commit is contained in:
commit
72e358fe8a
1 changed files with 8 additions and 2 deletions
|
@ -370,7 +370,10 @@ $("#commandLineWrapper #commandLine .suggestions").on("mouseover", (e) => {
|
|||
let list = CommandlineLists.current[CommandlineLists.current.length - 1];
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.id == hoverId) {
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
if (
|
||||
(!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme") &&
|
||||
!ThemeController.randomTheme
|
||||
)
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
|
@ -492,7 +495,10 @@ $(document).keydown((e) => {
|
|||
CommandlineLists.current[CommandlineLists.current.length - 1];
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.id == hoverId) {
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
if (
|
||||
(!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme") &&
|
||||
!ThemeController.randomTheme
|
||||
)
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
|
|
Loading…
Add table
Reference in a new issue