Skip to content
16 changes: 14 additions & 2 deletions src/settings/appSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,16 @@ export default function otherSettings() {
key: "quickToolsTriggerMode",
text: strings["quicktools trigger mode"],
value: values.quickToolsTriggerMode,
valueText: (value) => value.capitalize(),
valueText: (value) => {
const options = {
[appSettings.QUICKTOOLS_TRIGGER_MODE_CLICK]:
strings["quicktools-trigger:click"],
[appSettings.QUICKTOOLS_TRIGGER_MODE_TOUCH]:
strings["quicktools-trigger:touch"],
};

return options[value] ?? (value != null ? value.capitalize() : value);
},
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Comment thread
claycuy marked this conversation as resolved.
select: [
[
appSettings.QUICKTOOLS_TRIGGER_MODE_CLICK,
Expand Down Expand Up @@ -307,7 +316,10 @@ export default function otherSettings() {
key: "console",
text: strings.console,
value: values.console,
select: [appSettings.CONSOLE_LEGACY, appSettings.CONSOLE_ERUDA],
select: [
[appSettings.CONSOLE_LEGACY, "Legacy"],
[appSettings.CONSOLE_ERUDA, "Eruda"],
],
info: strings["settings-info-app-console"],
category: categories.advanced,
},
Expand Down
7 changes: 7 additions & 0 deletions src/settings/previewSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export default function previewSettings() {
key: "previewMode",
text: strings["preview mode"],
value: values.previewMode,
valueText: (value) => {
const options = {
[appSettings.PREVIEW_MODE_BROWSER]: strings.browser,
[appSettings.PREVIEW_MODE_INAPP]: strings.inapp,
};
return options[value] || value.capitalize();
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
},
select: [
[appSettings.PREVIEW_MODE_BROWSER, strings.browser],
[appSettings.PREVIEW_MODE_INAPP, strings.inapp],
Expand Down
28 changes: 28 additions & 0 deletions src/settings/terminalSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export default function terminalSettings() {
key: "fontWeight",
text: strings["terminal:font weight"],
value: terminalValues.fontWeight,
valueText: (value) => {
const tuple = [
["normal", strings["terminal:normal"]],
["bold", strings["terminal:bold"]],
].find((item) => item[0] === value);

return tuple ? tuple[1] : value;
},
select: [
["normal", strings["terminal:normal"]],
["bold", strings["terminal:bold"]],
Expand All @@ -88,6 +96,7 @@ export default function terminalSettings() {
info: strings["info-fontWeight"],
category: categories.display,
},

{
key: "letterSpacing",
text: strings["letter spacing"],
Expand All @@ -108,6 +117,14 @@ export default function terminalSettings() {
key: "cursorStyle",
text: strings["terminal:cursor style"],
value: terminalValues.cursorStyle,
valueText: (value) => {
const option = [
["block", strings["terminal:block"]],
["underline", strings["terminal:underline"]],
["bar", strings["terminal:bar"]],
].find((item) => item[0] === value);
return option ? option[1] : value;
},
select: [
["block", strings["terminal:block"]],
["underline", strings["terminal:underline"]],
Expand All @@ -120,6 +137,17 @@ export default function terminalSettings() {
key: "cursorInactiveStyle",
text: strings["terminal:cursor inactive style"],
value: terminalValues.cursorInactiveStyle,
valueText: (value) => {
const options = [
["outline", strings["terminal:inactive outline"]],
["block", strings["terminal:inactive block"]],
["underline", strings["terminal:inactive underline"]],
["bar", strings["terminal:inactive bar"]],
["none", strings["terminal:inactive none"]],
];
const option = options.find((item) => item[0] === value);
return option ? option[1] : value;
},
select: [
["outline", strings["terminal:inactive outline"]],
["block", strings["terminal:inactive block"]],
Expand Down