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
18 changes: 9 additions & 9 deletions frontend/src/ts/controllers/chart-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ class ChartWithUpdateColors<
}

async updateColors(): Promise<void> {
//@ts-expect-error its too difficult to figure out these types, but this works
//@ts-expect-error it's too difficult to figure out these types, but this works
await updateColors(this);
}

getDataset(id: DatasetIds): ChartDataset<TType, TData> {
//@ts-expect-error its too difficult to figure out these types, but this works
//@ts-expect-error it's too difficult to figure out these types, but this works
return this.data.datasets?.find((x) => x.yAxisID === id);
}

getScaleIds(): DatasetIds[] {
//@ts-expect-error its too difficult to figure out these types, but this works
//@ts-expect-error it's too difficult to figure out these types, but this works
return typedKeys(this.options?.scales ?? {}) as DatasetIds[];
}

getScale(
id: DatasetIds extends never ? never : "x" | DatasetIds,
): DatasetIds extends never ? never : CartesianScaleOptions {
//@ts-expect-error its too difficult to figure out these types, but this works
//@ts-expect-error it's too difficult to figure out these types, but this works
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
return this.options.scales[id];
}
Expand All @@ -120,7 +120,7 @@ export const result = new ChartWithUpdateColors<
labels: [],
datasets: [
{
//@ts-expect-error the type is defined incorrectly, have to ingore the error
//@ts-expect-error the type is defined incorrectly, have to ignore the error
clip: false,
label: "wpm",
data: [],
Expand All @@ -131,7 +131,7 @@ export const result = new ChartWithUpdateColors<
pointRadius: 1,
},
{
//@ts-expect-error the type is defined incorrectly, have to ingore the error
//@ts-expect-error the type is defined incorrectly, have to ignore the error
clip: false,
label: "raw",
data: [],
Expand All @@ -143,7 +143,7 @@ export const result = new ChartWithUpdateColors<
pointRadius: 0,
},
{
//@ts-expect-error the type is defined incorrectly, have to ingore the error
//@ts-expect-error the type is defined incorrectly, have to ignore the error
clip: false,
label: "errors",
data: [],
Expand All @@ -166,7 +166,7 @@ export const result = new ChartWithUpdateColors<
},
},
{
//@ts-expect-error the type is defined incorrectly, have to ingore the error
//@ts-expect-error the type is defined incorrectly, have to ignore the error
clip: false,
label: "burst",
data: [],
Expand Down Expand Up @@ -1268,7 +1268,7 @@ async function updateColors<
return;
}

//@ts-expect-error its too difficult to figure out these types, but this works
//@ts-expect-error it's too difficult to figure out these types, but this works
chart.data.datasets[0].borderColor = (ctx): string => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const isPb = ctx.raw?.isPb as boolean;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ts/test/test-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ export async function finish(difficultyFailed = false): Promise<void> {
if (!TestState.isActive) return;
TestUI.setResultCalculating(true);
const now = performance.now();
TestTimer.clear();
TestStats.setEnd(now);

// fade out the test and show loading
Expand Down Expand Up @@ -977,7 +978,6 @@ export async function finish(difficultyFailed = false): Promise<void> {
LiveBurst.hide();
TimerProgress.hide();
OutOfFocus.hide();
TestTimer.clear();
Monkey.hide();
void ModesNotice.update();

Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function getCssOptions({
preprocessorOptions: {
scss: {
additionalData(source, fp) {
if (fp.endsWith("index.scss")) {
if (isDevelopment || fp.endsWith("index.scss")) {
/** Enable for font awesome v6 */
/*
const fontawesomeClasses = getFontawesomeConfig();
Expand Down
Loading