mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-25 07:17:23 +08:00
Fixed command line theme bug
This commit is contained in:
parent
94d2c7ead9
commit
f02bfe9988
2 changed files with 6 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ function showInput(command, placeholder, defaultValue = "") {
|
|||
$("#commandInput input").focus();
|
||||
$("#commandInput input").attr("command", "");
|
||||
$("#commandInput input").attr("command", command);
|
||||
if (defaultValue != ""){
|
||||
if (defaultValue != "") {
|
||||
$("#commandInput input").select();
|
||||
}
|
||||
}
|
||||
|
|
@ -46,7 +46,10 @@ function showFound() {
|
|||
try {
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.found) {
|
||||
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))
|
||||
Config.previewFontFamily(Config.fontFamily);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Config from "./config";
|
|||
import * as UI from "./ui";
|
||||
|
||||
let isPreviewingTheme = false;
|
||||
let randomTheme = null;
|
||||
export let randomTheme = null;
|
||||
|
||||
export const colorVars = [
|
||||
"--bg-color",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue