fix: linting and formatting

This commit is contained in:
Bart van der Braak 2024-02-17 18:31:04 +01:00
parent 2bd4f9d60c
commit b96e8293e3
8 changed files with 65 additions and 52 deletions

View file

@ -11,3 +11,4 @@ node_modules
pnpm-lock.yaml pnpm-lock.yaml
package-lock.json package-lock.json
yarn.lock yarn.lock
backend

View file

@ -1,14 +1,14 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "npm" - package-ecosystem: 'npm'
directory: "/" directory: '/'
schedule: schedule:
interval: "daily" interval: 'daily'
reviewers: reviewers:
- "bartvdbraak" - 'bartvdbraak'
- package-ecosystem: "github-actions" - package-ecosystem: 'github-actions'
directory: "/" directory: '/'
schedule: schedule:
interval: "weekly" interval: 'weekly'
reviewers: reviewers:
- "bartvdbraak" - 'bartvdbraak'

View file

@ -2,3 +2,4 @@
pnpm-lock.yaml pnpm-lock.yaml
package-lock.json package-lock.json
yarn.lock yarn.lock
backend

View file

@ -1,17 +1,17 @@
<script lang="ts" context="module"> <script lang="ts" context="module">
const MAX_IMAGE_SIZE = 5; // const MAX_IMAGE_SIZE = 5;
const ACCEPTED_IMAGE_TYPES = [ // const ACCEPTED_IMAGE_TYPES = [
'image/jpeg', // 'image/jpeg',
'image/png', // 'image/png',
'image/svg+xml', // 'image/svg+xml',
'image/gif', // 'image/gif',
'image/webp' // 'image/webp'
]; // ];
import { z } from 'zod'; import { z } from 'zod';
const sizeInMB = (sizeInBytes: number, decimalsNum = 2) => { // const sizeInMB = (sizeInBytes: number, decimalsNum = 2) => {
const result = sizeInBytes / (1024 * 1024); // const result = sizeInBytes / (1024 * 1024);
return +result.toFixed(decimalsNum); // return +result.toFixed(decimalsNum);
}; // };
export const avatarFormSchema = z.object({ export const avatarFormSchema = z.object({
avatar: z.any() avatar: z.any()
// .custom<FileList>() // .custom<FileList>()

View file

@ -32,35 +32,46 @@
class="space-y-8" class="space-y-8"
debug={dev ? true : false} debug={dev ? true : false}
> >
<Form.Item> <Form.Item>
<Form.Field {config} name="type"> <Form.Field {config} name="type">
<Form.RadioGroup <Form.RadioGroup class="grid max-w-xl grid-cols-3 gap-8 pt-2" orientation="horizontal">
class="grid max-w-xl grid-cols-3 gap-8 pt-2" <!-- value={user?.appearanceMode} -->
orientation="horizontal" <Label
> for="all"
<!-- value={user?.appearanceMode} --> class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"
<Label for="all" class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"> >
<Form.RadioItem id="all" value="all" class="sr-only" /> <Form.RadioItem id="all" value="all" class="sr-only" />
<Bell class="mb-3 h-6 w-6" /> <Bell class="mb-3 h-6 w-6" />
<span class="block w-full p-2 text-center font-normal">Everything</span> <span class="block w-full p-2 text-center font-normal">Everything</span>
<span class="text-sm text-center text-muted-foreground">New tickets and updates.</span> <span class="text-center text-sm text-muted-foreground">New tickets and updates.</span
</Label> >
<Label for="tickets" class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"> </Label>
<Form.RadioItem id="tickets" value="tickets" class="sr-only" /> <Label
<Person class="mb-3 h-6 w-6" /> for="tickets"
<span class="block w-full p-2 text-center font-normal">New tickets</span> class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"
<span class="text-sm text-center text-muted-foreground">Only new unassigned tickets</span> >
</Label> <Form.RadioItem id="tickets" value="tickets" class="sr-only" />
<Label for="none" class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"> <Person class="mb-3 h-6 w-6" />
<Form.RadioItem id="none" value="none" class="sr-only" /> <span class="block w-full p-2 text-center font-normal">New tickets</span>
<EyeNone class="mb-3 h-6 w-6" /> <span class="text-center text-sm text-muted-foreground"
<span class="block w-full p-2 text-center font-normal">Ignore</span> >Only new unassigned tickets</span
<span class="text-sm text-center text-muted-foreground">Turn off all notifications.</span> >
</Label> </Label>
</Form.RadioGroup> <Label
<Form.Validation /> for="none"
</Form.Field> class="flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground [&:has([data-state=checked])]:border-primary"
</Form.Item> >
<Form.RadioItem id="none" value="none" class="sr-only" />
<EyeNone class="mb-3 h-6 w-6" />
<span class="block w-full p-2 text-center font-normal">Ignore</span>
<span class="text-center text-sm text-muted-foreground"
>Turn off all notifications.</span
>
</Label>
</Form.RadioGroup>
<Form.Validation />
</Form.Field>
</Form.Item>
</Form.Root> </Form.Root>
</Card.Content> </Card.Content>
</Card.Root> </Card.Root>