Merge branch 'link-purpose-issues' into 'develop'

Link purpose issues

Closes #1129

See merge request funkwhale/funkwhale!1175
This commit is contained in:
Agate 2020-07-27 11:05:35 +02:00
commit 9a0bcffaf1
17 changed files with 37 additions and 34 deletions

View File

@ -2,6 +2,7 @@
<div v-if='maxPage > 1' class="ui pagination menu component-pagination" role="navigation" :aria-label="labels.pagination">
<a href
:disabled="current - 1 < 1"
:title="labels.previousPage"
@click.prevent.stop="selectPage(current - 1)"
:class="[{'disabled': current - 1 < 1}, 'item']"><i class="angle left icon"></i></a>
<template v-if="!compact">
@ -18,6 +19,7 @@
</template>
<a href
:disabled="current + 1 > maxPage"
:title="labels.nextPage"
@click.prevent.stop="selectPage(current + 1)"
:class="[{'disabled': current + 1 > maxPage}, 'item']"><i class="angle right icon"></i></a>
</div>
@ -36,7 +38,9 @@ export default {
computed: {
labels() {
return {
pagination: this.$pgettext('Content/*/Hidden text/Noun', "Pagination")
pagination: this.$pgettext('Content/*/Hidden text/Noun', "Pagination"),
previousPage: this.$pgettext('Content/*/Link', "Previous Page"),
nextPage: this.$pgettext('Content/*/Link', "Next Page")
}
},
pages: function() {

View File

@ -10,14 +10,14 @@
<img ref="cover" v-else-if="currentTrack.album && currentTrack.album.cover && currentTrack.album.cover.original" :src="$store.getters['instance/absoluteUrl'](currentTrack.album.cover.medium_square_crop)">
<img class="ui image" v-else src="../assets/audio/default-cover.png">
<h1 class="ui header">
<div class="content">
<router-link class="small header discrete link track" :title="currentTrack.title" :to="{name: 'library.tracks.detail', params: {id: currentTrack.id }}">
{{ currentTrack.title | truncate(35) }}
<div class="content ellipsis">
<router-link class="small header discrete link track" :to="{name: 'library.tracks.detail', params: {id: currentTrack.id }}">
{{ currentTrack.title }}
</router-link>
<div class="sub header">
<router-link class="discrete link artist" :title="currentTrack.artist.name" :to="{name: 'library.artists.detail', params: {id: currentTrack.artist.id }}">
{{ currentTrack.artist.name | truncate(35) }}</router-link> <template v-if="currentTrack.album">/<router-link class="discrete link album" :title="currentTrack.album.title" :to="{name: 'library.albums.detail', params: {id: currentTrack.album.id }}">
{{ currentTrack.album.title | truncate(35) }}
<div class="sub header ellipsis">
<router-link class="discrete link artist" :to="{name: 'library.artists.detail', params: {id: currentTrack.artist.id }}">
{{ currentTrack.artist.name }}</router-link> <template v-if="currentTrack.album">/<router-link class="discrete link album" :to="{name: 'library.albums.detail', params: {id: currentTrack.album.id }}">
{{ currentTrack.album.title }}
</router-link></template>
</div>
</div>

View File

@ -6,7 +6,7 @@
<logo class="logo"></logo>
</i>
</router-link>
<router-link v-if="!$store.state.auth.authenticated" class="logo-wrapper" :to="{name: logoUrl}">
<router-link v-if="!$store.state.auth.authenticated" class="logo-wrapper" :to="{name: logoUrl}" :title="'Funkwhale'">
<img src="../assets/logo/text-white.svg" />
</router-link>
<nav class="top ui compact right aligned inverted text menu">

View File

@ -7,7 +7,7 @@
</div>
<div class="content">
<strong>
<router-link class="discrete link" :title="object.artist.name" :to="{name: 'channels.detail', params: {id: urlId}}">
<router-link class="discrete link" :to="{name: 'channels.detail', params: {id: urlId}}">
{{ object.artist.name }}
</router-link>
</strong>

View File

@ -24,7 +24,7 @@
src="../../assets/audio/default-cover.png">
<div class="ellipsis content">
<strong>
<router-link class="discrete link" :title="entry.title" :to="{name: 'library.tracks.detail', params: {id: entry.id}}">
<router-link class="discrete link" :to="{name: 'library.tracks.detail', params: {id: entry.id}}">
{{ entry.title }}
</router-link>
</strong>

View File

@ -6,10 +6,10 @@
<img @click="$router.push({name: 'library.albums.detail', params: {id: serie.id}})" class="channel-image" v-if="cover.original" v-lazy="$store.getters['instance/absoluteUrl'](cover.square_crop)">
<img @click="$router.push({name: 'library.albums.detail', params: {id: serie.id}})" class="channel-image" v-else src="../../assets/audio/default-cover.png">
</div>
<div class="content">
<div class="content ellipsis">
<strong>
<router-link class="discrete ellipsis link" :title="serie.title" :to="{name: 'library.albums.detail', params: {id: serie.id}}">
{{ serie.title|truncate(30) }}
<router-link class="discrete link" :to="{name: 'library.albums.detail', params: {id: serie.id}}">
{{ serie.title }}
</router-link>
</strong>
<div class="description">

View File

@ -16,13 +16,13 @@
</div>
<div @click.stop.prevent="" class="middle aligned content ellipsis">
<strong>
<router-link @click.stop.prevent="" class="small header discrete link track" :title="currentTrack.title" :to="{name: 'library.tracks.detail', params: {id: currentTrack.id }}">
<router-link @click.stop.prevent="" class="small header discrete link track" :to="{name: 'library.tracks.detail', params: {id: currentTrack.id }}">
{{ currentTrack.title }}
</router-link>
</strong>
<div class="meta">
<router-link @click.stop.prevent="" class="discrete link" :title="currentTrack.artist.name" :to="{name: 'library.artists.detail', params: {id: currentTrack.artist.id }}">
{{ currentTrack.artist.name }}</router-link><template v-if="currentTrack.album"> /<router-link @click.stop.prevent="" class="discrete link" :title="currentTrack.album.title" :to="{name: 'library.albums.detail', params: {id: currentTrack.album.id }}">
<router-link @click.stop.prevent="" class="discrete link" :to="{name: 'library.artists.detail', params: {id: currentTrack.artist.id }}">
{{ currentTrack.artist.name }}</router-link><template v-if="currentTrack.album"> /<router-link @click.stop.prevent="" class="discrete link" :to="{name: 'library.albums.detail', params: {id: currentTrack.album.id }}">
{{ currentTrack.album.title }}
</router-link></template>
</div>

View File

@ -7,13 +7,13 @@
</div>
<div class="content">
<strong>
<router-link class="discrete link" :title="album.title" :to="{name: 'library.albums.detail', params: {id: album.id}}">
<router-link class="discrete link" :to="{name: 'library.albums.detail', params: {id: album.id}}">
{{ album.title }}
</router-link>
</strong>
<div class="description">
<span>
<router-link :title="album.artist.name" class="discrete link" :to="{name: 'library.artists.detail', params: {id: album.artist.id}}">
<router-link class="discrete link" :to="{name: 'library.artists.detail', params: {id: album.artist.id}}">
{{ album.artist.name }}
</router-link>
</span>

View File

@ -7,7 +7,7 @@
</div>
<div class="content">
<strong>
<router-link class="discrete link" :title="artist.name" :to="{name: 'library.artists.detail', params: {id: artist.id}}">
<router-link class="discrete link" :to="{name: 'library.artists.detail', params: {id: artist.id}}">
{{ artist.name|truncate(30) }}
</router-link>
</strong>

View File

@ -8,7 +8,7 @@
<img class="ui mini image" v-else src="../../../assets/audio/default-cover.png">
</td>
<td colspan="6">
<router-link class="track" :title="track.title" :to="{name: 'library.tracks.detail', params: {id: track.id }}">
<router-link class="track" :to="{name: 'library.tracks.detail', params: {id: track.id }}">
<template v-if="displayPosition && track.position">
{{ track.position }}.
</template>
@ -21,7 +21,7 @@
</router-link>
</td>
<td colspan="4">
<router-link v-if="track.album" class="album discrete link" :title="track.album.title" :to="{name: 'library.albums.detail', params: {id: track.album.id }}">
<router-link v-if="track.album" class="album discrete link" :to="{name: 'library.albums.detail', params: {id: track.album.id }}">
{{ track.album.title|truncate(40) }}
</router-link>
</td>

View File

@ -14,15 +14,15 @@
<div class="middle aligned content">
<div class="ui unstackable grid">
<div class="thirteen wide stretched column">
<div>
<router-link :title="object.track.title" :to="{name: 'library.tracks.detail', params: {id: object.track.id}}">
{{ object.track.title|truncate(25) }}
<div class="ellipsis">
<router-link :to="{name: 'library.tracks.detail', params: {id: object.track.id}}">
{{ object.track.title }}
</router-link>
</div>
<div class="meta">
<div class="meta ellipsis">
<span>
<router-link :title="object.track.artist.name" class="discrete link" :to="{name: 'library.artists.detail', params: {id: object.track.artist.id}}">
{{ object.track.artist.name|truncate(25) }}
<router-link class="discrete link" :to="{name: 'library.artists.detail', params: {id: object.track.artist.id}}">
{{ object.track.artist.name }}
</router-link>
</span>
</div>

View File

@ -117,7 +117,7 @@
<translate translate-context="Content/*/*/Noun">License</translate>
</td>
<td class="right aligned">
<a v-if="license" :title="license.name" :href="license.url" target="_blank" rel="noopener noreferrer">{{ license.name }}</a>
<a v-if="license" :href="license.url" target="_blank" rel="noopener noreferrer">{{ license.name }}</a>
<translate v-else translate-context="*/*/*">N/A</translate>
</td>
</tr>

View File

@ -47,7 +47,7 @@
</template>
<template slot="row-cells" slot-scope="scope">
<td>
<router-link :to="{name: 'manage.library.tags.detail', params: {id: scope.obj.name }}" :title="scope.obj.name">
<router-link :to="{name: 'manage.library.tags.detail', params: {id: scope.obj.name }}">
{{ scope.obj.name|truncate(30, "…", true) }}
</router-link>
</td>

View File

@ -69,7 +69,7 @@
</template>
<template slot="row-cells" slot-scope="scope">
<td>
<router-link :to="{name: 'manage.library.uploads.detail', params: {id: scope.obj.uuid }}" :title="displayName(scope.obj)">
<router-link :to="{name: 'manage.library.uploads.detail', params: {id: scope.obj.uuid }}">
{{ displayName(scope.obj)|truncate(30, "…", true) }}
</router-link>
</td>

View File

@ -8,7 +8,7 @@
</div>
<div class="content">
<strong>
<router-link class="discrete link" :title="playlist.name" :to="{name: 'library.playlists.detail', params: {id: playlist.id }}">
<router-link class="discrete link" :to="{name: 'library.playlists.detail', params: {id: playlist.id }}">
{{ playlist.name }}
</router-link>
</strong>

View File

@ -4,7 +4,6 @@
:to="{name: detailRoute, params: {id: tag}}"
:class="['ui', 'circular', 'hashtag', 'label', labelClasses]"
v-for="tag in toDisplay"
:title="tag"
:key="tag">
#{{ tag|truncate(truncateSize) }}
</router-link>

View File

@ -123,7 +123,7 @@
<template slot="row-cells" slot-scope="scope">
<template v-if="scope.obj.track">
<td>
<router-link :to="{name: 'library.tracks.detail', params: {id: scope.obj.track.id }}" :title="scope.obj.track.title">
<router-link :to="{name: 'library.tracks.detail', params: {id: scope.obj.track.id }}">
{{ scope.obj.track.title|truncate(25) }}
</router-link>
</td>