fix(front): icon links and buttons in admin tables

This commit is contained in:
ArneBo 2025-04-14 13:36:13 +02:00
parent 989959f5e3
commit fce8deac11
6 changed files with 95 additions and 50 deletions

View File

@ -20,6 +20,7 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Link from '~/components/ui/Link.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -205,10 +206,14 @@ const labels = computed(() => ({
</router-link> </router-link>
</td> </td>
<td> <td>
<router-link :to="{name: 'manage.moderation.accounts.detail', params: {id: scope.obj.attributed_to.full_username }}"> <Link
<i class="wrench icon" /> icon="bi-wrench"
solid
square-small
:to="{name: 'manage.moderation.accounts.detail', params: {id: scope.obj.attributed_to.full_username }}"
>
<span class="visually-hidden">{{ labels.openModeration }}</span> <span class="visually-hidden">{{ labels.openModeration }}</span>
</router-link> </Link>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -217,10 +222,14 @@ const labels = computed(() => ({
</td> </td>
<td> <td>
<template v-if="!scope.obj.is_local"> <template v-if="!scope.obj.is_local">
<router-link :to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.attributed_to.domain }}"> <Link
<i class="wrench icon" /> icon="bi-wrench"
solid
square-small
:to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.attributed_to.domain }}"
>
<span class="visually-hidden">{{ labels.openModeration }}</span> <span class="visually-hidden">{{ labels.openModeration }}</span>
</router-link> </Link>
<a <a
href="" href=""
class="discrete link" class="discrete link"

View File

@ -20,6 +20,8 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Link from '~/components/ui/Link.vue'
import Button from '~/components/ui/Button.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -202,10 +204,14 @@ const labels = computed(() => ({
</router-link> </router-link>
</td> </td>
<td> <td>
<router-link :to="{name: 'manage.library.artists.detail', params: {id: scope.obj.artist_credit[0].artist.id }}"> <Link
<i class="wrench icon" /> icon="bi-wrench"
solid
square-small
:to="{name: 'manage.library.artists.detail', params: {id: scope.obj.artist_credit[0].artist.id }}"
>
<span class="visually-hidden">{{ labels.openModeration }}</span> <span class="visually-hidden">{{ labels.openModeration }}</span>
</router-link> </Link>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -215,25 +221,28 @@ const labels = computed(() => ({
</td> </td>
<td> <td>
<template v-if="!scope.obj.is_local"> <template v-if="!scope.obj.is_local">
<router-link :to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"> <Link
<i class="wrench icon" /> icon="bi-box-arrow-up-right"
solid
square-small
:to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"
>
<span class="visually-hidden">{{ labels.openModeration }}</span> <span class="visually-hidden">{{ labels.openModeration }}</span>
</router-link> </Link>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
>{{ scope.obj.domain }}</a> >{{ scope.obj.domain }}</a>
</template> </template>
<a <Button
v-else v-else
href="" icon="bi-house-fill"
class="ui tiny accent icon link label" square-small
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
> >
<i class="home icon" />
{{ t('components.manage.library.AlbumsTable.link.local') }} {{ t('components.manage.library.AlbumsTable.link.local') }}
</a> </Button>
</td> </td>
<td> <td>
{{ scope.obj.tracks_count }} {{ scope.obj.tracks_count }}

View File

@ -20,6 +20,7 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Link from '~/components/ui/Link.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -217,9 +218,12 @@ const getUrl = (artist: { channel?: number; id: number }) => {
</td> </td>
<td> <td>
<template v-if="!scope.obj.is_local"> <template v-if="!scope.obj.is_local">
<router-link :to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"> <Link
<i class="wrench icon" /> solid
</router-link> square-small
icon="bi-wrench"
:to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"

View File

@ -20,6 +20,8 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Link from '~/components/ui/Link.vue'
import Button from '~/components/ui/Button.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -219,9 +221,12 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
</router-link> </router-link>
</td> </td>
<td> <td>
<router-link :to="{name: 'manage.moderation.accounts.detail', params: {id: scope.obj.actor.full_username }}"> <Link
<i class="wrench icon" /> solid
</router-link> square-small
icon="bi-wrench"
:to="{name: 'manage.moderation.accounts.detail', params: {id: scope.obj.actor.full_username }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -231,9 +236,12 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
</td> </td>
<td> <td>
<template v-if="!scope.obj.is_local"> <template v-if="!scope.obj.is_local">
<router-link :to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"> <Link
<i class="wrench icon" /> solid
</router-link> square-small
icon="bi-box-arrow-up-right"
:to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -241,15 +249,14 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
>{{ scope.obj.domain }}</a> >{{ scope.obj.domain }}</a>
</template> </template>
<a <Button
v-else v-else
href="" square-small
class="ui tiny accent icon link label" icon="bi-house-fill"
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
> >
<i class="home icon" />
{{ t('components.manage.library.LibrariesTable.link.local') }} {{ t('components.manage.library.LibrariesTable.link.local') }}
</a> </Button>
</td> </td>
<td> <td>
<a <a

View File

@ -20,6 +20,7 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Link from '~/components/ui/Link.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -191,9 +192,13 @@ const labels = computed(() => ({
</td> </td>
<td> <td>
<template v-if="scope.obj.album"> <template v-if="scope.obj.album">
<router-link :to="{name: 'manage.library.albums.detail', params: {id: scope.obj.album.id }}"> <Link
<i class="wrench icon" /> solid
</router-link> ghost
square-small
icon="bi-wrench"
:to="{name: 'manage.library.albums.detail', params: {id: scope.obj.album.id }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -203,9 +208,13 @@ const labels = computed(() => ({
</template> </template>
</td> </td>
<td> <td>
<router-link :to="{name: 'manage.library.artists.detail', params: {id: scope.obj.artist_credit[0].artist.id }}"> <Link
<i class="wrench icon" /> solid
</router-link> ghost
square-small
icon="bi-wrench"
:to="{name: 'manage.library.artists.detail', params: {id: scope.obj.artist_credit[0].artist.id }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -215,9 +224,13 @@ const labels = computed(() => ({
</td> </td>
<td> <td>
<template v-if="!scope.obj.is_local"> <template v-if="!scope.obj.is_local">
<router-link :to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"> <Link
<i class="wrench icon" /> solid
</router-link> ghost
square-small
icon="bi-wrench"
:to="{name: 'manage.moderation.domains.detail', params: {id: scope.obj.domain }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -231,7 +244,7 @@ const labels = computed(() => ({
class="ui tiny accent icon link label" class="ui tiny accent icon link label"
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
> >
<i class="home icon" /> <i class="bi bi-house-fill" />
{{ t('components.manage.library.TracksTable.link.local') }} {{ t('components.manage.library.TracksTable.link.local') }}
</a> </a>
</td> </td>

View File

@ -23,6 +23,7 @@ import usePage from '~/composables/navigation/usePage'
import Layout from '~/components/ui/Layout.vue' import Layout from '~/components/ui/Layout.vue'
import Spacer from '~/components/ui/Spacer.vue' import Spacer from '~/components/ui/Spacer.vue'
import Button from '~/components/ui/Button.vue' import Button from '~/components/ui/Button.vue'
import Link from '~/components/ui/Link.vue'
import Input from '~/components/ui/Input.vue' import Input from '~/components/ui/Input.vue'
import Loader from '~/components/ui/Loader.vue' import Loader from '~/components/ui/Loader.vue'
import Pagination from '~/components/ui/Pagination.vue' import Pagination from '~/components/ui/Pagination.vue'
@ -275,9 +276,12 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
</router-link> </router-link>
</td> </td>
<td> <td>
<router-link :to="{name: 'manage.library.libraries.detail', params: {id: scope.obj.library.uuid }}"> <Link
<i class="wrench icon" /> solid
</router-link> square-small
icon="bi-wrench"
:to="{name: 'manage.library.libraries.detail', params: {id: scope.obj.library.uuid }}"
/>
<a <a
href="" href=""
class="discrete link" class="discrete link"
@ -308,15 +312,14 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
>{{ scope.obj.domain }}</a> >{{ scope.obj.domain }}</a>
</template> </template>
<a <Button
v-else v-else
href="" square-small
class="ui tiny accent icon link label" icon="bi-house-fill"
@click.prevent="addSearchToken('domain', scope.obj.domain)" @click.prevent="addSearchToken('domain', scope.obj.domain)"
> >
<i class="home icon" />
{{ t('components.manage.library.UploadsTable.link.local') }} {{ t('components.manage.library.UploadsTable.link.local') }}
</a> </Button>
</td> </td>
<td> <td>
<a <a
@ -338,7 +341,7 @@ const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
{{ getImportStatusChoice(scope.obj.import_status).label }} {{ getImportStatusChoice(scope.obj.import_status).label }}
</a> </a>
<Button <Button
class="tiny" square-small
icon="bi-question-circle" icon="bi-question-circle"
:title="sharedLabels.fields.import_status.label" :title="sharedLabels.fields.import_status.label"
@click="detailedUpload = scope.obj; showUploadDetailModal = true" @click="detailedUpload = scope.obj; showUploadDetailModal = true"