Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
de3e120
brrap
Miodec Apr 6, 2026
a204e40
brbrrrr
Miodec Apr 6, 2026
4925702
bbrrr
Miodec Apr 6, 2026
ec86cb6
spacer
Miodec Apr 6, 2026
84113ac
asdf
Miodec Apr 6, 2026
60187d0
asdf
Miodec Apr 6, 2026
03d0947
min speed
Miodec Apr 6, 2026
1362330
customs
Miodec Apr 6, 2026
976d31c
language
Miodec Apr 6, 2026
3eb51e7
funbox
Miodec Apr 6, 2026
4bc52cd
order
Miodec Apr 6, 2026
0981406
always auto
Miodec Apr 6, 2026
0aed268
rename
Miodec Apr 6, 2026
ec6fac7
rename
Miodec Apr 6, 2026
822e158
only set overflow when necessary
Miodec Apr 6, 2026
a48b61a
ballon size
Miodec Apr 6, 2026
15439ba
custom poly, custom layoutfluid
Miodec Apr 6, 2026
b373dc3
compare
Miodec Apr 6, 2026
44a645f
quicknav, tip, account settings notice
Miodec Apr 6, 2026
238b068
LS
Miodec Apr 6, 2026
1edae42
layout
Miodec Apr 6, 2026
b87048c
options metadata
Miodec Apr 6, 2026
471ed0f
last one for today
Miodec Apr 6, 2026
b34a52f
aiaiai
Miodec Apr 6, 2026
dee659b
Merge branch 'master' into solid-settings2
Miodec Apr 8, 2026
9d0126e
meta
Miodec Apr 8, 2026
d93676f
filter
Miodec Apr 8, 2026
9a81eb0
pace caret
Miodec Apr 8, 2026
d881bcd
more
Miodec Apr 8, 2026
25fbc1b
mooore
Miodec Apr 8, 2026
2a5b7e9
hide
Miodec Apr 8, 2026
c0e61f3
nevermind
Miodec Apr 8, 2026
88c2d90
fix
Miodec Apr 8, 2026
d98cce1
yap
Miodec Apr 8, 2026
5b61fdb
Merge branch 'master' into solid-settings2
Miodec Apr 9, 2026
eb41d04
aaa
Miodec Apr 9, 2026
1bc43d2
remove console log
Miodec Apr 9, 2026
aa0593f
yayo
Miodec Apr 9, 2026
7dfc5d4
custom background
Miodec Apr 9, 2026
04559d0
ref oneverychange
Miodec Apr 10, 2026
a361e62
custom backogrund filters
Miodec Apr 10, 2026
cf32b38
reactive file storage
Miodec Apr 11, 2026
78fc491
asdf
Miodec Apr 11, 2026
c4d661a
auto switch themes
Miodec Apr 11, 2026
fdd4c0f
yaya
Miodec Apr 11, 2026
985f01e
Merge branch 'master' into solid-settings2
Miodec Apr 11, 2026
793adec
yeya
Miodec Apr 11, 2026
bd9d55d
limit cookie import export reset
Miodec Apr 11, 2026
9a983c3
meta
Miodec Apr 11, 2026
c110c01
fiiix
Miodec Apr 11, 2026
8f1f9d0
cookies
Miodec Apr 12, 2026
db39cd0
cookies
Miodec Apr 12, 2026
3d19347
comment
Miodec Apr 12, 2026
d19a148
REMOVE DUPLICATES FROM HERE, RESET TO HERE IF NEED BE
Miodec Apr 12, 2026
e0ab2d0
review
Miodec Apr 12, 2026
7ca3b60
ignore the 'reset to here' commit lol
Miodec Apr 12, 2026
288206d
asdf
Miodec Apr 12, 2026
102bcf9
yeet
Miodec Apr 12, 2026
2d1478e
hide
Miodec Apr 12, 2026
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
3,813 changes: 1,928 additions & 1,885 deletions frontend/src/html/pages/settings.html

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion frontend/src/ts/anim.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { engine } from "animejs";
import { LocalStorageWithSchema } from "./utils/local-storage-with-schema";
import { z } from "zod";
import { createSignal } from "solid-js";

export const fpsLimitSchema = z.number().int().min(15).max(1000);

Expand All @@ -10,14 +11,19 @@ const fpsLimit = new LocalStorageWithSchema({
fallback: 1000,
});

const [fpsLimitSignal, setFpsLimitSignal] = createSignal(fpsLimit.get());

export function setfpsLimit(fps: number): boolean {
const result = fpsLimit.set(fps);
if (result) {
setFpsLimitSignal(fps);
}
applyEngineSettings();
return result;
}

export function getfpsLimit(): number {
return fpsLimit.get();
return fpsLimitSignal();
}

export function applyEngineSettings(): void {
Expand Down
18 changes: 2 additions & 16 deletions frontend/src/ts/commandline/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,8 @@ import {
} from "./commandline-metadata";
import { Command } from "./types";
import * as ConfigSchemas from "@monkeytype/schemas/configs";
import { z, ZodSchema, ZodFirstPartySchemaTypes } from "zod";

function getOptions<T extends ZodSchema>(schema: T): undefined | z.infer<T>[] {
if (schema instanceof z.ZodLiteral) {
return [schema.value] as z.infer<T>[];
} else if (schema instanceof z.ZodEnum) {
return schema.options as z.infer<T>[];
} else if (schema instanceof z.ZodBoolean) {
return [true, false] as z.infer<T>[];
} else if (schema instanceof z.ZodUnion) {
return (schema.options as ZodSchema[])
.flatMap(getOptions)
.filter((it) => it !== undefined) as z.infer<T>[];
}
return undefined;
}
import { ZodSchema, ZodFirstPartySchemaTypes } from "zod";
import { getOptions } from "../utils/zod";

export function buildCommandForConfigKey<
K extends keyof CommandlineConfigMetadataObject,
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/ts/components/common/AnimatedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ type AnimatedModalProps = ParentProps<{
onBackdropClick?: (e: MouseEvent) => void;
onScroll?: (e: Event) => void;

closeOnWrapperClick?: boolean;
closeOnEscape?: boolean;

title?: string;
modalClass?: string;
dialogClass?: string;
wrapperClass?: string;
//todo check if wrapper and dialog can be merged into one
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new Todo was discovered. If it is not a priority right now,consider marking it for later attention.
todo check if wrapper and dialog can be merged into one

}>;

const DEFAULT_ANIMATION_DURATION = 125;
Expand Down Expand Up @@ -279,6 +284,7 @@ export function AnimatedModal(props: AnimatedModalProps): JSXElement {

const handleKeyDown = (e: KeyboardEvent): void => {
if (e.key === "Escape" && visibility()) {
if (props.closeOnEscape === false) return;
e.preventDefault();
e.stopPropagation();
if (props.onEscape) {
Expand All @@ -290,6 +296,7 @@ export function AnimatedModal(props: AnimatedModalProps): JSXElement {
};

const handleBackdropClick = (e: MouseEvent): void => {
if (props.closeOnWrapperClick === false) return;
if (e.target === dialogEl()?.native) {
if (props.onBackdropClick) {
props.onBackdropClick(e);
Expand All @@ -311,12 +318,17 @@ export function AnimatedModal(props: AnimatedModalProps): JSXElement {
ref={dialogRef}
class={cn(
"fixed top-0 left-0 z-1000 m-0 hidden h-screen max-h-screen w-screen max-w-screen border-none bg-[rgba(0,0,0,0.5)] p-8 backdrop:bg-transparent",
props.wrapperClass,
props.dialogClass,
)}
onKeyDown={handleKeyDown}
onMouseDown={handleBackdropClick}
>
<div class="pointer-events-none flex h-full w-full items-center justify-center">
<div
class={cn(
"pointer-events-none flex h-full w-full items-center justify-center",
props.wrapperClass,
)}
>
<div
class={cn(
"modal pointer-events-auto grid h-max max-h-full w-full max-w-md gap-4 overflow-auto rounded-double bg-bg p-4 text-text ring-4 ring-sub-alt sm:p-8",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/ts/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type ButtonProps = BaseProps & {
href?: never;
sameTarget?: true;
disabled?: boolean;
danger?: boolean;
};

type AnchorProps = BaseProps & {
Expand Down Expand Up @@ -70,6 +71,9 @@ export function Button(props: ButtonProps | AnchorProps): JSXElement {
variant() === "text" &&
isActive() &&
"[--themable-button-hover-text:var(--themable-button-hover-text)] [--themable-button-text:var(--themable-button-active)]",
!isAnchor() &&
(props as ButtonProps).danger &&
"[--themable-button-bg:var(--error-color)] [--themable-button-hover-bg:var(--text-color)] [--themable-button-hover-text:var(--bg-color)] [--themable-button-text:var(--bg-color)]",
{
"pointer-events-none opacity-[0.33]": props.disabled,
},
Expand Down
46 changes: 46 additions & 0 deletions frontend/src/ts/components/common/Slider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { createEffect, createSignal, JSXElement } from "solid-js";

type Props = {
ref?: (el: HTMLInputElement) => void;
value: number;
min: number;
max: number;
step?: number;
onChange?: (value: number) => void;
onEveryChange?: (value: number) => void;
text?: (value: number) => string | JSXElement;
};

export function Slider(props: Props): JSXElement {
// oxlint-disable-next-line solid/reactivity props.value only used as the initial value, not tracked.
const [value, setValue] = createSignal(props.value);

createEffect(() => setValue(props.value));

const textToDisplay = () => {
if (props.text) {
return props.text(value());
}
return value();
};

return (
<div class="grid grid-cols-[3ch_1fr] items-center gap-4">
<div>{textToDisplay()}</div>
<input
ref={props.ref}
type="range"
min={props.min}
max={props.max}
value={value()}
step={props.step}
onInput={(e) => {
const newValue = Number(e.target.value);
setValue(newValue);
props.onEveryChange?.(newValue);
}}
onChange={(e) => props.onChange?.(Number(e.target.value))}
/>
</div>
);
}
46 changes: 34 additions & 12 deletions frontend/src/ts/components/common/anime/AnimeShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,40 @@ export function AnimeShow(
>
<AnimePresence exitBeforeEnter>
<Show when={props.when}>
<Anime
initial={{ height: 0 } as Partial<AnimationParams>}
animate={
{ height: "auto", duration: duration() } as AnimationParams
}
exit={{ height: 0, duration: duration() } as AnimationParams}
style={{ overflow: "hidden" }}
{...props.animeProps}
class={props.class}
>
{props.children}
</Anime>
{(() => {
let ref: HTMLElement | undefined;
return (
<Anime
ref={(el) => (ref = el)}
initial={{ height: 0 } as Partial<AnimationParams>}
animate={
{
height: "auto",
duration: duration(),
onBegin: () => {
if (ref) ref.style.overflow = "hidden";
},
onComplete: () => {
if (ref) ref.style.overflow = "";
},
} as AnimationParams
}
exit={
{
height: 0,
duration: duration(),
onBegin: () => {
if (ref) ref.style.overflow = "hidden";
},
} as AnimationParams
}
{...props.animeProps}
class={props.class}
>
{props.children}
</Anime>
);
})()}
</Show>
</AnimePresence>
</Show>
Expand Down
Loading
Loading