Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Churros
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matteo Planchet
Churros
Commits
1f5fbc8e
Commit
1f5fbc8e
authored
Dec 14, 2023
by
Ewen Le Bihan
Browse files
Options
Downloads
Patches
Plain Diff
feat(reports): show comments count on reports list page
parent
70458942
Branches
Branches containing commit
Tags
v1.36.0
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/app/src/routes/reports/+page.svelte
+18
-4
18 additions, 4 deletions
packages/app/src/routes/reports/+page.svelte
packages/app/src/routes/reports/+page.ts
+1
-0
1 addition, 0 deletions
packages/app/src/routes/reports/+page.ts
with
19 additions
and
4 deletions
packages/app/src/routes/reports/+page.svelte
+
18
−
4
View file @
1f5fbc8e
<script
lang=
"ts"
>
import
IconIssue
from
'
~icons/mdi/chat-alert-outline
'
;
import
IconMore
from
'
~icons/mdi/dots-horizontal-circle-outline
'
;
import
IconComments
from
'
~icons/mdi/comment-multiple-outline
'
;
import
Badge
from
'
$lib/components/Badge.svelte
'
;
import
{
IssueState
}
from
'
../../zeus
'
;
import
type
{
PageData
}
from
'
./$types
'
;
...
...
@@ -15,7 +16,7 @@
<h1><ButtonBack></ButtonBack>
Tes rapports
</h1>
<ul
class=
"nobullet reports"
>
{
#each
data
.
issuesByUser
as
{
number
,
title
,
state
,
duplicatedFrom
}
(
duplicatedFrom
??
number
)
}
{
#each
data
.
issuesByUser
as
{
number
,
title
,
state
,
duplicatedFrom
,
comments
}
(
duplicatedFrom
??
number
)
}
<li>
<a
href=
"./{number}"
>
<span
class=
"number"
>
#
{
duplicatedFrom
??
number
}
</span>
...
...
@@ -25,9 +26,16 @@
{
/if
}
{
title
}
</span>
<div
class=
"badges"
>
{
#if
comments
.
length
}
<Badge
title=
"
{
comments
.
length
}
commentaire{comments.length > 1 ? 's' : ''}"
><IconComments></IconComments>
{
comments
.
length
}
</Badge
>
{
/if
}
{
#if
state
===
IssueState
.
Closed
}
<Badge
theme=
"success"
>
Réglé
</Badge>
{
/if
}
</div>
</a>
</li>
{
:
else
}
...
...
@@ -94,6 +102,12 @@
font-family
:
var
(
--font-mono
);
}
.reports
.badges
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
0.5rem
;
}
h2
{
margin-top
:
2rem
;
margin-bottom
:
0.5rem
;
...
...
This diff is collapsed.
Click to expand it.
packages/app/src/routes/reports/+page.ts
+
1
−
0
View file @
1f5fbc8e
...
...
@@ -16,6 +16,7 @@ export const load: PageLoad = async ({ fetch, parent }) => {
difficulty
:
true
,
url
:
true
,
duplicatedFrom
:
true
,
comments
:
{
addedAt
:
true
},
},
},
{
fetch
,
parent
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment