mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-11 03:41:42 +00:00
Update: custom provider strings
This commit is contained in:
parent
3527802a3f
commit
e6b7287c2b
3 changed files with 15 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
<modals-modal ref="modal" v-model="show" name="custom-metadata-provider" :width="600" :height="'unset'" :processing="processing">
|
<modals-modal ref="modal" v-model="show" name="custom-metadata-provider" :width="600" :height="'unset'" :processing="processing">
|
||||||
<template #outer>
|
<template #outer>
|
||||||
<div class="absolute top-0 left-0 p-5 w-2/3 overflow-hidden">
|
<div class="absolute top-0 left-0 p-5 w-2/3 overflow-hidden">
|
||||||
<p class="text-3xl text-white truncate">Add custom metadata provider</p>
|
<p class="text-3xl text-white truncate">{{ $strings.HeaderAddCustomMetadataProvider }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<form @submit.prevent="submitForm">
|
<form @submit.prevent="submitForm">
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<ui-text-input-with-label v-model="newUrl" label="URL" />
|
<ui-text-input-with-label v-model="newUrl" label="URL" />
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full mb-2 p-1">
|
<div class="w-full mb-2 p-1">
|
||||||
<ui-text-input-with-label v-model="newAuthHeaderValue" :label="'Authorization Header Value'" type="password" />
|
<ui-text-input-with-label v-model="newAuthHeaderValue" :label="$strings.LabelProviderAuthorizationValue" type="password" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex px-1 pt-4">
|
<div class="flex px-1 pt-4">
|
||||||
<div class="flex-grow" />
|
<div class="flex-grow" />
|
||||||
|
|
@ -67,7 +67,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if (!this.newName || !this.newUrl) {
|
if (!this.newName || !this.newUrl) {
|
||||||
this.$toast.error('Must add name and url')
|
this.$toast.error(this.$strings.ToastProviderNameAndUrlRequired)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -81,13 +81,13 @@ export default {
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
this.$emit('added', data.provider)
|
this.$emit('added', data.provider)
|
||||||
this.$toast.success('New provider added')
|
this.$toast.success(this.$strings.ToastProviderCreatedSuccess)
|
||||||
this.show = false
|
this.show = false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
const errorMsg = error.response?.data || 'Unknown error'
|
const errorMsg = error.response?.data || 'Unknown error'
|
||||||
console.error('Failed to add provider', error)
|
console.error('Failed to add provider', error)
|
||||||
this.$toast.error('Failed to add provider: ' + errorMsg)
|
this.$toast.error(this.$strings.ToastProviderCreatedFailed + ': ' + errorMsg)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.processing = false
|
this.processing = false
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
removeProvider(provider) {
|
removeProvider(provider) {
|
||||||
const payload = {
|
const payload = {
|
||||||
message: `Are you sure you want remove custom metadata provider "${provider.name}"?`,
|
message: this.$getString('MessageConfirmDeleteMetadataProvider', [provider.name]),
|
||||||
callback: (confirmed) => {
|
callback: (confirmed) => {
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
this.$emit('update:processing', true)
|
this.$emit('update:processing', true)
|
||||||
|
|
@ -53,12 +53,12 @@ export default {
|
||||||
this.$axios
|
this.$axios
|
||||||
.$delete(`/api/custom-metadata-providers/${provider.id}`)
|
.$delete(`/api/custom-metadata-providers/${provider.id}`)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$toast.success('Provider removed')
|
this.$toast.success(this.$strings.ToastProviderRemoveSuccess)
|
||||||
this.$emit('removed', provider.id)
|
this.$emit('removed', provider.id)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Failed to remove provider', error)
|
console.error('Failed to remove provider', error)
|
||||||
this.$toast.error('Failed to remove provider')
|
this.$toast.error(this.$strings.ToastRemoveFailed)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.$emit('update:processing', false)
|
this.$emit('update:processing', false)
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@
|
||||||
"ErrorUploadFetchMetadataNoResults": "Could not fetch metadata - try updating title and/or author",
|
"ErrorUploadFetchMetadataNoResults": "Could not fetch metadata - try updating title and/or author",
|
||||||
"ErrorUploadLacksTitle": "Must have a title",
|
"ErrorUploadLacksTitle": "Must have a title",
|
||||||
"HeaderAccount": "Account",
|
"HeaderAccount": "Account",
|
||||||
|
"HeaderAddCustomMetadataProvider": "Add Custom Metadata Provider",
|
||||||
"HeaderAdvanced": "Advanced",
|
"HeaderAdvanced": "Advanced",
|
||||||
"HeaderAppriseNotificationSettings": "Apprise Notification Settings",
|
"HeaderAppriseNotificationSettings": "Apprise Notification Settings",
|
||||||
"HeaderAudioTracks": "Audio Tracks",
|
"HeaderAudioTracks": "Audio Tracks",
|
||||||
|
|
@ -458,6 +459,7 @@
|
||||||
"LabelPrimaryEbook": "Primary ebook",
|
"LabelPrimaryEbook": "Primary ebook",
|
||||||
"LabelProgress": "Progress",
|
"LabelProgress": "Progress",
|
||||||
"LabelProvider": "Provider",
|
"LabelProvider": "Provider",
|
||||||
|
"LabelProviderAuthorizationValue": "Authorization Header Value",
|
||||||
"LabelPubDate": "Pub Date",
|
"LabelPubDate": "Pub Date",
|
||||||
"LabelPublishYear": "Publish Year",
|
"LabelPublishYear": "Publish Year",
|
||||||
"LabelPublished": "Published",
|
"LabelPublished": "Published",
|
||||||
|
|
@ -659,6 +661,7 @@
|
||||||
"MessageConfirmDeleteLibrary": "Are you sure you want to permanently delete library \"{0}\"?",
|
"MessageConfirmDeleteLibrary": "Are you sure you want to permanently delete library \"{0}\"?",
|
||||||
"MessageConfirmDeleteLibraryItem": "This will delete the library item from the database and your file system. Are you sure?",
|
"MessageConfirmDeleteLibraryItem": "This will delete the library item from the database and your file system. Are you sure?",
|
||||||
"MessageConfirmDeleteLibraryItems": "This will delete {0} library items from the database and your file system. Are you sure?",
|
"MessageConfirmDeleteLibraryItems": "This will delete {0} library items from the database and your file system. Are you sure?",
|
||||||
|
"MessageConfirmDeleteMetadataProvider": "Are you sure you want to delete custom metadata provider \"{0}\"?",
|
||||||
"MessageConfirmDeleteNotification": "Are you sure you want to delete this notification?",
|
"MessageConfirmDeleteNotification": "Are you sure you want to delete this notification?",
|
||||||
"MessageConfirmDeleteSession": "Are you sure you want to delete this session?",
|
"MessageConfirmDeleteSession": "Are you sure you want to delete this session?",
|
||||||
"MessageConfirmForceReScan": "Are you sure you want to force re-scan?",
|
"MessageConfirmForceReScan": "Are you sure you want to force re-scan?",
|
||||||
|
|
@ -934,6 +937,10 @@
|
||||||
"ToastPodcastNoEpisodesInFeed": "No episodes found in RSS feed",
|
"ToastPodcastNoEpisodesInFeed": "No episodes found in RSS feed",
|
||||||
"ToastPodcastNoRssFeed": "Podcast does not have an RSS feed",
|
"ToastPodcastNoRssFeed": "Podcast does not have an RSS feed",
|
||||||
"ToastProgressReset": "Your progress was reset",
|
"ToastProgressReset": "Your progress was reset",
|
||||||
|
"ToastProviderCreatedFailed": "Failed to add provider",
|
||||||
|
"ToastProviderCreatedSuccess": "New provider added",
|
||||||
|
"ToastProviderNameAndUrlRequired": "Name and Url required",
|
||||||
|
"ToastProviderRemoveSuccess": "Provider removed",
|
||||||
"ToastRSSFeedCloseFailed": "Failed to close RSS feed",
|
"ToastRSSFeedCloseFailed": "Failed to close RSS feed",
|
||||||
"ToastRSSFeedCloseSuccess": "RSS feed closed",
|
"ToastRSSFeedCloseSuccess": "RSS feed closed",
|
||||||
"ToastRemoveFailed": "Failed to remove",
|
"ToastRemoveFailed": "Failed to remove",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue