Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
ui
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
12
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
ui
Commits
fb7356b1
Commit
fb7356b1
authored
2 years ago
by
Kasper Seweryn
🥞
Browse files
Options
Downloads
Patches
Plain Diff
Fix navigation button in podcast card
parent
efa36bc8
No related branches found
No related tags found
1 merge request
!1
Implement all components
Pipeline
#23481
failed with stages
in 2 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/card/podcast/Card.vue
+6
-13
6 additions, 13 deletions
src/components/card/podcast/Card.vue
with
6 additions
and
13 deletions
src/components/card/podcast/Card.vue
+
6
−
13
View file @
fb7356b1
<
script
setup
lang=
"ts"
>
import
{
FwCard
,
FwPlayButton
,
FwOptionsButton
}
from
'
~/components
'
import
{
FwCard
,
FwOptionsButton
}
from
'
~/components
'
import
{
useTimeAgo
}
from
'
@vueuse/core
'
import
{
useRouter
}
from
'
vue-router
'
interface
Podcast
{
id
:
number
name
:
string
artist
:
{
id
:
number
name
:
string
modification_date
:
'
2022-09-11
'
cover
:
{
...
...
@@ -17,26 +17,19 @@ interface Podcast {
}
}
interface
Events
{
(
e
:
'
play
'
,
podcast
:
Podcast
):
void
}
interface
Props
{
podcast
:
Podcast
}
const
emit
=
defineEmits
<
Events
>
()
const
props
=
defineProps
<
Props
>
()
const
timeAgo
=
useTimeAgo
(
new
Date
(
props
.
podcast
.
artist
.
modification_date
))
let
navigate
=
(
to
:
'
artist
'
|
'
podcast
'
)
=>
{}
let
navigate
=
()
=>
{}
if
(
import
.
meta
.
env
.
PROD
)
{
const
router
=
useRouter
()
navigate
=
(
to
:
'
artist
'
|
'
podcast
'
)
=>
to
===
'
podcast
'
?
router
.
push
({
name
:
'
library.albums.detail
'
,
params
:
{
id
:
props
.
podcast
.
id
}
})
:
router
.
push
({
name
:
'
library.channels.detail
'
,
params
:
{
id
:
props
.
podcast
.
artist
.
id
}
})
navigate
=
()
=>
router
.
push
({
name
:
'
library.artists.detail
'
,
params
:
{
id
:
props
.
podcast
.
artist
.
id
}
})
}
</
script
>
...
...
@@ -44,11 +37,11 @@ if (import.meta.env.PROD) {
<fw-card
:title=
"podcast.name"
:image=
"podcast.artist.cover.urls.original"
@
click=
"navigate
('podcast')
"
@
click=
"navigate"
class=
"podcast-card"
>
<a
@
click.stop=
"navigate
('artist')
"
@
click.stop=
"navigate"
class=
"funkwhale link"
>
{{
podcast
.
artist
.
name
}}
...
...
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