formatting

This commit is contained in:
2026-04-12 19:23:30 +02:00
parent 9dcdfb981a
commit 6f19d12964
5 changed files with 36 additions and 40 deletions
-2
View File
@@ -6,8 +6,6 @@
"build": "vite build", "build": "vite build",
"build:ssr": "vite build && vite build --ssr", "build:ssr": "vite build && vite build --ssr",
"dev": "vite", "dev": "vite",
"format": "prettier --write resources/",
"format:check": "prettier --check resources/",
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint:check": "eslint .", "lint:check": "eslint .",
"types:check": "vue-tsc --noEmit" "types:check": "vue-tsc --noEmit"
+14 -8
View File
@@ -71,7 +71,9 @@ const hasPermission = (actorId: number, permission: string) =>
</div> </div>
<div v-else class="overflow-x-auto"> <div v-else class="overflow-x-auto">
<table class="divide-border min-w-full divide-y text-sm"> <table
class="divide-border min-w-full divide-y text-sm"
>
<thead <thead
class="bg-muted/40 text-muted-foreground text-left" class="bg-muted/40 text-muted-foreground text-left"
> >
@@ -95,7 +97,9 @@ const hasPermission = (actorId: number, permission: string) =>
class="bg-background align-top" class="bg-background align-top"
> >
<td class="px-4 py-4"> <td class="px-4 py-4">
<div class="text-foreground font-medium"> <div
class="text-foreground font-medium"
>
{{ user.name }} {{ user.name }}
</div> </div>
</td> </td>
@@ -131,9 +135,11 @@ const hasPermission = (actorId: number, permission: string) =>
</Badge> </Badge>
<span <span
v-if=" v-if="
(directPermissions[ (
directPermissions[
user.id user.id
] ?? []).length === 0 ] ?? []
).length === 0
" "
class="text-muted-foreground" class="text-muted-foreground"
> >
@@ -154,9 +160,7 @@ const hasPermission = (actorId: number, permission: string) =>
> >
<label <label
v-for="option in permissionOptions" v-for="option in permissionOptions"
:key=" :key="`${user.id}-${option.value}`"
`${user.id}-${option.value}`
"
class="border-border inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm" class="border-border inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm"
> >
<input <input
@@ -171,7 +175,9 @@ const hasPermission = (actorId: number, permission: string) =>
" "
class="border-input text-primary focus:ring-ring size-4 rounded" class="border-input text-primary focus:ring-ring size-4 rounded"
/> />
<span>{{ option.label }}</span> <span>{{
option.label
}}</span>
</label> </label>
<div class="w-full sm:hidden" /> <div class="w-full sm:hidden" />
+4 -1
View File
@@ -38,7 +38,10 @@ const breadcrumbs: BreadcrumbItem[] = [
description="Create and browse project spaces that will later host boards, backlog, and settings." description="Create and browse project spaces that will later host boards, backlog, and settings."
/> />
<Button v-if="$page.props.auth.permissions.projectCreate" as-child> <Button
v-if="$page.props.auth.permissions.projectCreate"
as-child
>
<Link :href="create()"> <Link :href="create()">
<Plus class="size-4" /> <Plus class="size-4" />
New project New project
@@ -22,10 +22,7 @@ import {
metadata as metadataSettings, metadata as metadataSettings,
repositories as repositorySettings, repositories as repositorySettings,
} from '@/routes/projects/settings'; } from '@/routes/projects/settings';
import type { import type { BreadcrumbItem, ProjectGeneralSettingsPageProps } from '@/types';
BreadcrumbItem,
ProjectGeneralSettingsPageProps,
} from '@/types';
import { computed } from 'vue'; import { computed } from 'vue';
const props = defineProps<ProjectGeneralSettingsPageProps>(); const props = defineProps<ProjectGeneralSettingsPageProps>();
@@ -124,24 +121,24 @@ const submitDelete = (): void => {
</CardHeader> </CardHeader>
<CardContent class="grid gap-4 md:grid-cols-2"> <CardContent class="grid gap-4 md:grid-cols-2">
<div class="rounded-xl border border-border/70 p-4"> <div class="border-border/70 rounded-xl border p-4">
<p <p
class="text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground" class="text-muted-foreground text-xs font-semibold uppercase tracking-[0.18em]"
> >
Project name Project name
</p> </p>
<p class="mt-2 text-sm font-semibold text-foreground"> <p class="text-foreground mt-2 text-sm font-semibold">
{{ project.name }} {{ project.name }}
</p> </p>
</div> </div>
<div class="rounded-xl border border-border/70 p-4"> <div class="border-border/70 rounded-xl border p-4">
<p <p
class="text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground" class="text-muted-foreground text-xs font-semibold uppercase tracking-[0.18em]"
> >
Project key Project key
</p> </p>
<p class="mt-2 text-sm font-semibold text-foreground"> <p class="text-foreground mt-2 text-sm font-semibold">
{{ project.key }} {{ project.key }}
</p> </p>
</div> </div>
@@ -166,9 +163,9 @@ const submitDelete = (): void => {
<CardContent class="space-y-5"> <CardContent class="space-y-5">
<div <div
class="rounded-xl border border-red-200/80 bg-background/80 p-4 dark:border-red-900/60" class="bg-background/80 rounded-xl border border-red-200/80 p-4 dark:border-red-900/60"
> >
<p class="text-sm font-medium text-foreground"> <p class="text-foreground text-sm font-medium">
Confirm by typing the exact project key: Confirm by typing the exact project key:
<span class="font-semibold">{{ project.key }}</span> <span class="font-semibold">{{ project.key }}</span>
</p> </p>
@@ -193,7 +190,7 @@ const submitDelete = (): void => {
<div <div
class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"
> >
<p class="text-sm text-muted-foreground"> <p class="text-muted-foreground text-sm">
This action cannot be undone. This action cannot be undone.
</p> </p>
+7 -15
View File
@@ -53,11 +53,7 @@ const permissionsForTeam = (teamId: number): Record<string, string[]> =>
<Badge variant="outline" class="gap-1.5 px-3 py-1"> <Badge variant="outline" class="gap-1.5 px-3 py-1">
<Shield class="size-3.5" /> <Shield class="size-3.5" />
{{ {{ canCreateTeams ? 'Global admin' : 'Team-scoped access' }}
canCreateTeams
? 'Global admin'
: 'Team-scoped access'
}}
</Badge> </Badge>
</div> </div>
@@ -254,9 +250,7 @@ const permissionsForTeam = (teamId: number): Record<string, string[]> =>
option.value, option.value,
) )
" "
:key=" :key="`${team.id}-${user.id}-${option.value}-badge`"
`${team.id}-${user.id}-${option.value}-badge`
"
variant="secondary" variant="secondary"
> >
{{ option.label }} {{ option.label }}
@@ -266,8 +260,9 @@ const permissionsForTeam = (teamId: number): Record<string, string[]> =>
( (
permissionsForTeam( permissionsForTeam(
team.id, team.id,
)[user.id] ?? )[
[] user.id
] ?? []
).length === 0 ).length === 0
" "
class="text-muted-foreground" class="text-muted-foreground"
@@ -297,9 +292,7 @@ const permissionsForTeam = (teamId: number): Record<string, string[]> =>
> >
<label <label
v-for="option in permissionOptions" v-for="option in permissionOptions"
:key=" :key="`${team.id}-${user.id}-${option.value}`"
`${team.id}-${user.id}-${option.value}`
"
class="border-border inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm" class="border-border inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm"
> >
<input <input
@@ -353,8 +346,7 @@ const permissionsForTeam = (teamId: number): Record<string, string[]> =>
<Card v-if="teams.length === 0"> <Card v-if="teams.length === 0">
<CardContent class="text-muted-foreground p-6 text-sm"> <CardContent class="text-muted-foreground p-6 text-sm">
No teams are available for your current No teams are available for your current permissions.
permissions.
</CardContent> </CardContent>
</Card> </Card>
</div> </div>