mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-26 15:01:20 +00:00
fix: linting and formatting
This commit is contained in:
parent
2bd4f9d60c
commit
b96e8293e3
8 changed files with 65 additions and 52 deletions
|
@ -11,3 +11,4 @@ node_modules
|
|||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
backend
|
16
.github/dependabot.yaml
vendored
16
.github/dependabot.yaml
vendored
|
@ -1,14 +1,14 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: 'daily'
|
||||
reviewers:
|
||||
- "bartvdbraak"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
- 'bartvdbraak'
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: 'weekly'
|
||||
reviewers:
|
||||
- "bartvdbraak"
|
||||
- 'bartvdbraak'
|
||||
|
|
2
.github/renovate.json
vendored
2
.github/renovate.json
vendored
|
@ -2,4 +2,4 @@
|
|||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base"],
|
||||
"reviewers": ["bartvdbraak"]
|
||||
}
|
||||
}
|
||||
|
|
2
.github/workflows/linting.yaml
vendored
2
.github/workflows/linting.yaml
vendored
|
@ -35,4 +35,4 @@ jobs:
|
|||
uses: wearerequired/lint-action@v2.3.0
|
||||
with:
|
||||
eslint: true
|
||||
prettier: true
|
||||
prettier: true
|
||||
|
|
2
.github/workflows/unlighthouse.yaml
vendored
2
.github/workflows/unlighthouse.yaml
vendored
|
@ -167,4 +167,4 @@ jobs:
|
|||
with:
|
||||
header: ${{ env.COMMENT_ID }}
|
||||
message: |
|
||||
⚡️ Lighthouse report cancelled
|
||||
⚡️ Lighthouse report cancelled
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
backend
|
|
@ -1,17 +1,17 @@
|
|||
<script lang="ts" context="module">
|
||||
const MAX_IMAGE_SIZE = 5;
|
||||
const ACCEPTED_IMAGE_TYPES = [
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/svg+xml',
|
||||
'image/gif',
|
||||
'image/webp'
|
||||
];
|
||||
// const MAX_IMAGE_SIZE = 5;
|
||||
// const ACCEPTED_IMAGE_TYPES = [
|
||||
// 'image/jpeg',
|
||||
// 'image/png',
|
||||
// 'image/svg+xml',
|
||||
// 'image/gif',
|
||||
// 'image/webp'
|
||||
// ];
|
||||
import { z } from 'zod';
|
||||
const sizeInMB = (sizeInBytes: number, decimalsNum = 2) => {
|
||||
const result = sizeInBytes / (1024 * 1024);
|
||||
return +result.toFixed(decimalsNum);
|
||||
};
|
||||
// const sizeInMB = (sizeInBytes: number, decimalsNum = 2) => {
|
||||
// const result = sizeInBytes / (1024 * 1024);
|
||||
// return +result.toFixed(decimalsNum);
|
||||
// };
|
||||
export const avatarFormSchema = z.object({
|
||||
avatar: z.any()
|
||||
// .custom<FileList>()
|
||||
|
|
|
@ -32,35 +32,46 @@
|
|||
class="space-y-8"
|
||||
debug={dev ? true : false}
|
||||
>
|
||||
<Form.Item>
|
||||
<Form.Field {config} name="type">
|
||||
<Form.RadioGroup
|
||||
class="grid max-w-xl grid-cols-3 gap-8 pt-2"
|
||||
orientation="horizontal"
|
||||
>
|
||||
<!-- value={user?.appearanceMode} -->
|
||||
<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" />
|
||||
<Bell class="mb-3 h-6 w-6" />
|
||||
<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>
|
||||
</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">
|
||||
<Form.RadioItem id="tickets" value="tickets" class="sr-only" />
|
||||
<Person class="mb-3 h-6 w-6" />
|
||||
<span class="block w-full p-2 text-center font-normal">New tickets</span>
|
||||
<span class="text-sm text-center text-muted-foreground">Only new unassigned tickets</span>
|
||||
</Label>
|
||||
<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">
|
||||
<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-sm text-center text-muted-foreground">Turn off all notifications.</span>
|
||||
</Label>
|
||||
</Form.RadioGroup>
|
||||
<Form.Validation />
|
||||
</Form.Field>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Form.Field {config} name="type">
|
||||
<Form.RadioGroup class="grid max-w-xl grid-cols-3 gap-8 pt-2" orientation="horizontal">
|
||||
<!-- value={user?.appearanceMode} -->
|
||||
<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" />
|
||||
<Bell class="mb-3 h-6 w-6" />
|
||||
<span class="block w-full p-2 text-center font-normal">Everything</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"
|
||||
>
|
||||
<Form.RadioItem id="tickets" value="tickets" class="sr-only" />
|
||||
<Person class="mb-3 h-6 w-6" />
|
||||
<span class="block w-full p-2 text-center font-normal">New tickets</span>
|
||||
<span class="text-center text-sm text-muted-foreground"
|
||||
>Only new unassigned tickets</span
|
||||
>
|
||||
</Label>
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
|
|
Loading…
Reference in a new issue