Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions frontend/src/styles/caret.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

&.carrot {
background-color: transparent;
background-image: url("/images/carrot.png");
background-image: url("/images/caret/carrot.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
Expand All @@ -47,7 +47,16 @@

&.banana {
background-color: transparent;
background-image: url("/images/banana.png");
background-image: url("/images/caret/banana.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
width: 1em;
}

&.monkey {
background-color: transparent;
background-image: url("/images/caret/monkey.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/ts/commandline/commandline-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
caretStyle: {
subgroup: {
options: "fromSchema",
isVisible: (value) => !["banana", "carrot"].includes(value),
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
},
},
paceCaret: {
Expand Down Expand Up @@ -489,7 +489,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
paceCaretStyle: {
subgroup: {
options: "fromSchema",
isVisible: (value) => !["banana", "carrot"].includes(value),
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
},
},

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/ts/constants/default-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config, CustomThemeColors } from "@monkeytype/schemas/configs";

const obj = {
const obj: Config = {
theme: "serika_dark",
themeLight: "serika",
themeDark: "serika_dark",
Expand Down Expand Up @@ -101,7 +101,7 @@ const obj = {
tapeMargin: 50,
maxLineWidth: 0,
playTimeWarning: "off",
} as Config;
};

export function getDefaultConfig(): Config {
return structuredClone(obj);
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/ts/utils/caret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,16 @@ export class Caret {
this.style = style;
this.element.style.width = "";
this.element.classList.remove(
...["off", "default", "underline", "outline", "block", "carrot", "banana"]
...[
"off",
"default",
"underline",
"outline",
"block",
"carrot",
"banana",
"monkey",
]
);
this.element.classList.add(style);
}
Expand Down
Binary file added frontend/static/images/caret/monkey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/schemas/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const CaretStyleSchema = z.enum([
"underline",
"carrot",
"banana",
"monkey",
]);
export type CaretStyle = z.infer<typeof CaretStyleSchema>;

Expand Down
Loading