diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js
index 6e8379bfb..2b35db653 100644
--- a/src/js/commandline-lists.js
+++ b/src/js/commandline-lists.js
@@ -206,7 +206,8 @@ export function updateTagCommands() {
commandsTags.list.push({
id: "clearTags",
- display: "Clear tags",
+ display: `Clear tags`,
+ icon: "fa-times",
exec: () => {
DB.getSnapshot().tags.forEach((tag) => {
tag.active = false;
@@ -220,13 +221,14 @@ export function updateTagCommands() {
let dis = tag.name;
if (tag.active === true) {
- dis = '' + dis;
+ dis = '' + dis;
} else {
- dis = '' + dis;
+ dis = '' + dis;
}
commandsTags.list.push({
id: "toggleTag" + tag.id,
+ noIcon: true,
display: dis,
sticky: true,
exec: () => {
@@ -235,14 +237,17 @@ export function updateTagCommands() {
let txt = tag.name;
if (tag.active === true) {
- txt = '' + txt;
+ txt = '' + txt;
} else {
- txt = '' + txt;
+ txt = '' + txt;
}
if (Commandline.isSingleListCommandLineActive()) {
$(
`#commandLine .suggestions .entry[command='toggleTag${tag.id}']`
- ).html("Change tags > " + txt);
+ ).html(
+ `
Tags > ` +
+ txt
+ );
} else {
$(
`#commandLine .suggestions .entry[command='toggleTag${tag.id}']`
@@ -256,7 +261,7 @@ export function updateTagCommands() {
}
let commandsPresets = {
- title: "Apply preset...",
+ title: "Presets...",
list: [],
};
@@ -2208,10 +2213,6 @@ export let defaultCommands = {
UpdateConfig.togglePunctuation();
},
},
- // exec: () => {
- // UpdateConfig.togglePunctuation();
- // TestLogic.restart();
- // },
},
{
id: "changeMode",
@@ -2242,24 +2243,32 @@ export let defaultCommands = {
{
visible: false,
id: "changeTags",
- display: "Change tags...",
- subgroup: true,
- exec: () => {
+ display: "Tags...",
+ icon: "fa-tag",
+ subgroup: commandsTags,
+ beforeSubgroup: () => {
updateTagCommands();
- current.push(commandsTags);
- Commandline.show();
},
+ // exec: () => {
+ // updateTagCommands();
+ // current.push();
+ // Commandline.show();
+ // },
},
{
visible: false,
id: "applyPreset",
- display: "Apply preset...",
- subgroup: true,
- exec: () => {
+ display: "Presets...",
+ icon: "fa-sliders-h",
+ subgroup: commandsPresets,
+ beforeSubgroup: () => {
updatePresetCommands();
- current.push(commandsPresets);
- Commandline.show();
},
+ // exec: () => {
+ // updatePresetCommands();
+ // current.push(commandsPresets);
+ // Commandline.show();
+ // },
},
{
id: "changeConfidenceMode",
diff --git a/src/js/commandline.js b/src/js/commandline.js
index 36aa8e7d2..b1eb9851b 100644
--- a/src/js/commandline.js
+++ b/src/js/commandline.js
@@ -46,7 +46,11 @@ function showFound() {
icon = `
`;
}
}
- commandsHTML += `
`;
+ let iconHTML = `
${icon}
`;
+ if (obj.noIcon && !isSingleListCommandLineActive()) {
+ iconHTML = "";
+ }
+ commandsHTML += `
${iconHTML}
${obj.display}
`;
}
});
$("#commandLine .suggestions").html(commandsHTML);
@@ -170,6 +174,9 @@ function trigger(command) {
showInput(obj.id, escaped, obj.defaultValue);
} else if (obj.subgroup) {
subgroup = true;
+ if (obj.beforeSubgroup) {
+ obj.beforeSubgroup();
+ }
CommandlineLists.current.push(obj.subgroup);
show();
} else {
@@ -227,6 +234,10 @@ function addChildCommands(
) {
icon = `
`;
}
+ if (commandItem.noIcon) {
+ icon = "";
+ }
+
if (parentCommandDisplay)
commandItemDisplay =
parentCommandDisplay + " > " + icon + commandItemDisplay;
diff --git a/src/js/input-controller.js b/src/js/input-controller.js
index 9944ee83f..6b1cba533 100644
--- a/src/js/input-controller.js
+++ b/src/js/input-controller.js
@@ -320,6 +320,7 @@ function handleSpace(event, isEnter) {
}
if (Config.stopOnError == "word") {
TestLogic.input.appendCurrent(" ");
+ Replay.addReplayEvent("incorrectLetter", "_");
TestUI.updateWordElement(true);
Caret.updatePosition();
}