design nosepass template, add tests, add template previews

This commit is contained in:
Amruth Pillai
2023-11-17 08:31:12 +01:00
parent 0b4cb71320
commit 34247f13b6
92 changed files with 24440 additions and 35518 deletions

View File

@ -5,8 +5,8 @@ import { defaultItem, itemSchema } from "../shared";
// Schema
export const languageSchema = itemSchema.extend({
name: z.string().min(1),
fluency: z.string(),
fluencyLevel: z.number().min(1).max(6),
description: z.string(),
level: z.number().min(0).max(5).default(1),
});
// Type
@ -16,6 +16,6 @@ export type Language = z.infer<typeof languageSchema>;
export const defaultLanguage: Language = {
...defaultItem,
name: "",
fluency: "",
fluencyLevel: 1,
description: "",
level: 1,
};

View File

@ -6,7 +6,7 @@ import { defaultItem, itemSchema } from "../shared";
export const skillSchema = itemSchema.extend({
name: z.string(),
description: z.string(),
level: z.number().min(1).max(5).default(1),
level: z.number().min(0).max(5).default(1),
keywords: z.array(z.string()).default([]),
});