Fixed command line theme bug

This commit is contained in:
Estebene 2021-05-01 22:56:52 +12:00
parent 94d2c7ead9
commit f02bfe9988
2 changed files with 6 additions and 3 deletions

View file

@ -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);

View file

@ -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",