Fix v-if keys

This commit is contained in:
wvffle 2022-06-30 01:32:37 +00:00 committed by Georg Krause
parent 5dfce40cb6
commit 442f9ce0d7
30 changed files with 26 additions and 90 deletions

View File

@ -24,7 +24,6 @@
<div class="description">
<translate
v-if="object.artist.content_category === 'podcast'"
key="1"
class="meta ellipsis"
translate-context="Content/Channel/Paragraph"
translate-plural="%{ count } episodes"
@ -35,7 +34,6 @@
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
:translate-params="{count: object.artist.tracks_count}"
:translate-n="object.artist.tracks_count"

View File

@ -102,14 +102,12 @@
>
<translate
v-if="updating"
key="2"
translate-context="Content/Applications/Button.Label/Verb"
>
Update application
</translate>
<translate
v-else
key="3"
translate-context="Content/Applications/Button.Label/Verb"
>
Create application

View File

@ -116,7 +116,6 @@
</button>
<p
v-if="redirectUri === 'urn:ietf:wg:oauth:2.0:oob'"
key="1"
v-translate
translate-context="Content/Auth/Paragraph"
>
@ -124,7 +123,6 @@
</p>
<p
v-else
key="2"
v-translate="{url: redirectUri}"
translate-context="Content/Auth/Paragraph"
:translate-params="{url: redirectUri}"

View File

@ -73,10 +73,9 @@
</div>
</div>
<template v-if="plugin.conf?.length > 0">
<template v-for="(field, key) in plugin.conf">
<template v-for="(field, key) in plugin.conf" :key="key">
<div
v-if="field.type === 'text'"
:key="key"
class="field"
>
<label :for="`plugin-${field.name}`">{{ field.label || field.name }}</label>
@ -92,7 +91,6 @@
</div>
<div
v-if="field.type === 'long_text'"
:key="key"
class="field"
>
<label :for="`plugin-${field.name}`">{{ field.label || field.name }}</label>
@ -109,7 +107,6 @@
</div>
<div
v-if="field.type === 'url'"
:key="key"
class="field"
>
<label :for="`plugin-${field.name}`">{{ field.label || field.name }}</label>
@ -125,7 +122,6 @@
</div>
<div
v-if="field.type === 'password'"
:key="key"
class="field"
>
<label :for="`plugin-${field.name}`">{{ field.label || field.name }}</label>

View File

@ -6,14 +6,12 @@
<h4 class="header">
<translate
v-if="channel.content_category === 'podcasts'"
key="1"
translate-context="Popup/Channels/Title/Verb"
>
New series
</translate>
<translate
v-else
key="2"
translate-context="Popup/Channels/Title"
>
New album

View File

@ -44,12 +44,10 @@ fetchData()
<label for="album-dropdown">
<translate
v-if="channel && channel.artist && channel.artist.content_category === 'podcast'"
key="1"
translate-context="*/*/*"
>Series</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>Album</translate>
</label>

View File

@ -101,8 +101,8 @@
:class="[{hidden: step === 3}]"
>
<div
v-for="(file, idx) in uploadedFiles"
:key="idx"
v-for="file in uploadedFiles"
:key="file.id"
class="channel-file"
>
<div class="content">
@ -145,21 +145,18 @@
<template v-else>
<translate
v-if="file.active"
key="1"
translate-context="Channels/*/*"
>
Uploading
</translate>
<translate
v-else-if="file.error"
key="2"
translate-context="Channels/*/*"
>
Errored
</translate>
<translate
v-else
key="3"
translate-context="Channels/*/*"
>
Pending
@ -182,7 +179,6 @@
</div>
<upload-metadata-form
v-if="selectedUpload"
:key="selectedUploadId"
:upload="selectedUpload"
:values="uploadImportData[selectedUploadId]"
@values="setDynamic('uploadImportData', selectedUploadId, $event)"

View File

@ -6,28 +6,24 @@
<h4 class="header">
<translate
v-if="step === 1"
key="1"
translate-context="Popup/Channels/Title/Verb"
>
Publish audio
</translate>
<translate
v-else-if="step === 2"
key="2"
translate-context="Popup/Channels/Title"
>
Files to upload
</translate>
<translate
v-else-if="step === 3"
key="3"
translate-context="Popup/Channels/Title"
>
Upload details
</translate>
<translate
v-else-if="step === 4"
key="4"
translate-context="Popup/Channels/Title"
>
Processing uploads

View File

@ -102,7 +102,6 @@
<div class="count field">
<translate
v-if="selectAll"
key="1"
translate-context="Content/*/Paragraph"
tag="span"
:translate-n="objectsData.count"
@ -113,7 +112,6 @@
</translate>
<translate
v-else
key="2"
translate-context="Content/*/Paragraph"
tag="span"
:translate-n="checked.length"

View File

@ -28,12 +28,10 @@ const truncated = computed(() => props.content.slice(0, props.length))
<br>
<translate
v-if="expanded"
key="1"
translate-context="*/*/Button,Label"
>Show less</translate>
<translate
v-else
key="2"
translate-context="*/*/Button,Label"
>Show more</translate>
</a>

View File

@ -61,7 +61,6 @@
<div class="ui hidden very small divider" />
<translate
v-if="isSerie"
key="1"
translate-context="Content/Channel/Paragraph"
translate-plural="%{ count } episodes"
:translate-n="totalTracks"
@ -145,7 +144,6 @@
<template v-if="totalTracks > 0">
<translate
v-if="isSerie"
key="1"
translate-context="Content/Channel/Paragraph"
translate-plural="%{ count } episodes"
:translate-n="totalTracks"

View File

@ -3,14 +3,12 @@
<h2 class="ui header">
<translate
v-if="isSerie"
key="1"
translate-context="Content/Channels/*"
>
Episodes
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
Tracks

View File

@ -4,14 +4,12 @@
<h2>
<translate
v-if="canEdit"
key="1"
translate-context="Content/*/Title"
>
Edit this album
</translate>
<translate
v-else
key="2"
translate-context="Content/*/Title"
>
Suggest an edit on this album

View File

@ -4,14 +4,12 @@
<h2>
<translate
v-if="canEdit"
key="1"
translate-context="Content/*/Title"
>
Edit this artist
</translate>
<translate
v-else
key="2"
translate-context="Content/*/Title"
>
Suggest an edit on this artist

View File

@ -224,14 +224,12 @@
>
<translate
v-if="canEdit"
key="1"
translate-context="Content/Library/Button.Label/Verb"
>
Submit and apply edit
</translate>
<translate
v-else
key="2"
translate-context="Content/Library/Button.Label/Verb"
>
Submit suggestion

View File

@ -1,3 +1,13 @@
<script setup lang="ts">
import { FSLogs } from '~/types'
interface Props {
data: FSLogs
}
defineProps<Props>()
</script>
<template>
<div class="ui segment component-fs-logs">
<div
@ -10,19 +20,10 @@
</translate>
</div>
</div>
<template
v-for="(row, idx) in data.logs"
v-else
:key="idx"
>
<p>
<template v-else>
<p v-for="row in data.logs">
{{ row }}
</p>
</template>
</div>
</template>
<script>
export default {
props: { data: { type: Object, required: true } }
}
</script>

View File

@ -25,14 +25,12 @@
<h3 class="ui header">
<translate
v-if="track.artist.content_category === 'music'"
key="1"
translate-context="Content/*/*"
>
Track Details
</translate>
<translate
v-else
key="2"
translate-context="Content/*/*"
>
Episode Details
@ -159,14 +157,12 @@
<td>
<translate
v-if="track.album.artist.content_category === 'music'"
key="1"
translate-context="*/*/*/Noun"
>
Album
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
Serie

View File

@ -4,13 +4,11 @@
<h2>
<translate
v-if="canEdit"
key="1"
translate-context="Content/*/Title"
>
Edit this track
</translate>
<translate
v-else
key="2"
translate-context="Content/*/Title"
>

View File

@ -6,14 +6,12 @@
<h3 class="ui header">
<translate
v-if="object"
key="1"
translate-context="Content/Moderation/Card.Title/Verb"
>
Edit moderation rule
</translate>
<translate
v-else
key="2"
translate-context="Content/Moderation/Card.Button.Label/Verb"
>
Add a new moderation rule
@ -52,12 +50,10 @@
<label for="policy-is-active">
<translate
v-if="current.isActive"
key="1"
translate-context="*/*/*/State of feature"
>Enabled</translate>
<translate
v-else
key="2"
translate-context="*/*/*/State of feature"
>Disabled</translate>
<tooltip :content="labels.isActiveHelp" />
@ -127,14 +123,12 @@
>
<translate
v-if="object"
key="1"
translate-context="Content/Moderation/Card.Button.Label/Verb"
>
Update
</translate>
<translate
v-else
key="2"
translate-context="Content/Moderation/Card.Button.Label/Verb"
>
Create

View File

@ -360,11 +360,11 @@
</translate>
</button>
<template
v-for="(action, key) in actions"
v-for="action in actions"
:key="action.label"
>
<dangerous-button
v-if="action.dangerous && action.show(obj)"
:key="key"
:class="['ui', {loading: isLoading}, 'button']"
:action="action.handler"
>

View File

@ -241,11 +241,11 @@ const labels = computed(() => ({
</td>
<td>
<template
v-for="(p, key) in permissions"
v-for="p in permissions"
:key="p.code"
>
<span
v-if="scope.obj.permissions[p.code]"
:key="key"
class="ui basic tiny label"
>{{ p.label }}</span>
</template>

View File

@ -6,7 +6,6 @@
<h4 class="header">
<translate
v-if="type === 'artist'"
key="1"
translate-context="Popup/Moderation/Title/Verb"
:translate-params="{name: target.name}"
>

View File

@ -167,6 +167,13 @@ export interface Upload {
uuid: string
}
// FileSystem Logs
export interface FSLogs {
status: 'pending' | 'started'
reference: unknown // TODO (wvffle): Find correct type
logs: string[]
}
// Yet uncategorized stuff
export interface Actor {
preferred_username: string

View File

@ -219,26 +219,22 @@
<label for="is-active">
<translate
v-if="object.user.is_active"
key="1"
translate-context="*/*/*/State of feature"
>Enabled</translate>
<translate
v-else
key="2"
translate-context="*/*/*/State of feature"
>Disabled</translate>
</label>
</div>
<translate
v-else-if="object.user.is_active"
key="1"
translate-context="*/*/*/State of feature"
>
Enabled
</translate>
<translate
v-else
key="2"
translate-context="*/*/*/State of feature"
>
Disabled

View File

@ -58,21 +58,18 @@
<h4 class="header">
<translate
v-if="step === 1"
key="1"
translate-context="Content/Channel/*/Verb"
>
Create channel
</translate>
<translate
v-else-if="category === 'podcast'"
key="2"
translate-context="Content/Channel/*"
>
Podcast channel
</translate>
<translate
v-else
key="3"
translate-context="Content/Channel/*"
>
Artist channel

View File

@ -44,7 +44,6 @@
<div class="ui hidden very small divider" />
<translate
v-if="object.artist.content_category === 'podcast'"
key="1"
translate-context="Content/Channel/Paragraph"
translate-plural="%{ count } episodes"
:translate-n="totalTracks"
@ -54,7 +53,6 @@
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
:translate-params="{count: totalTracks}"
:translate-n="totalTracks"
@ -350,14 +348,12 @@
<h4 class="header">
<translate
v-if="object.artist.content_category === 'podcast'"
key="1"
translate-context="Content/Channel/*"
>
Podcast channel
</translate>
<translate
v-else
key="2"
translate-context="Content/Channel/*"
>
Artist channel
@ -418,14 +414,12 @@
>
<translate
v-if="isPodcast"
key="1"
translate-context="Content/Channels/*"
>
All Episodes
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
Tracks

View File

@ -84,14 +84,12 @@
<h2 class="ui header">
<translate
v-if="isPodcast"
key="1"
translate-context="Content/Channel/Paragraph"
>
Latest episodes
</translate>
<translate
v-else
key="2"
translate-context="Content/Channel/Paragraph"
>
Latest tracks
@ -107,14 +105,12 @@
<h2 class="ui with-actions header">
<translate
v-if="isPodcast"
key="1"
translate-context="Content/Channel/Paragraph"
>
Series
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
Albums

View File

@ -12,14 +12,12 @@
<p>
<translate
v-if="isOwner"
key="1"
translate-context="*/*/*"
>
This library is empty, you should upload something in it!
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
You may need to follow this library to see its content.

View File

@ -21,14 +21,12 @@
<p>
<translate
v-if="isOwner"
key="1"
translate-context="*/*/*"
>
This library is empty, you should upload something in it!
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
You may need to follow this library to see its content.

View File

@ -11,14 +11,12 @@
<p>
<translate
v-if="isOwner"
key="1"
translate-context="*/*/*"
>
This library is empty, you should upload something in it!
</translate>
<translate
v-else
key="2"
translate-context="*/*/*"
>
You may need to follow this library to see its content.