mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update:Uploader shows item title on success/failure message #2958
This commit is contained in:
		
							parent
							
								
									91be9eb0fc
								
							
						
					
					
						commit
						b82ac3d536
					
				@ -21,15 +21,16 @@
 | 
				
			|||||||
          <div v-if="!isPodcast" class="flex items-end">
 | 
					          <div v-if="!isPodcast" class="flex items-end">
 | 
				
			||||||
            <ui-text-input-with-label v-model.trim="itemData.author" :disabled="processing" :label="$strings.LabelAuthor" />
 | 
					            <ui-text-input-with-label v-model.trim="itemData.author" :disabled="processing" :label="$strings.LabelAuthor" />
 | 
				
			||||||
            <ui-tooltip :text="$strings.LabelUploaderItemFetchMetadataHelp">
 | 
					            <ui-tooltip :text="$strings.LabelUploaderItemFetchMetadataHelp">
 | 
				
			||||||
              <div
 | 
					              <div class="ml-2 mb-1 w-8 h-8 bg-bg border border-white border-opacity-10 flex items-center justify-center rounded-full hover:bg-primary cursor-pointer" @click="fetchMetadata">
 | 
				
			||||||
                class="ml-2 mb-1 w-8 h-8 bg-bg border border-white border-opacity-10 flex items-center justify-center rounded-full hover:bg-primary cursor-pointer"
 | 
					 | 
				
			||||||
                @click="fetchMetadata">
 | 
					 | 
				
			||||||
                <span class="text-base text-white text-opacity-80 font-mono material-icons">sync</span>
 | 
					                <span class="text-base text-white text-opacity-80 font-mono material-icons">sync</span>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </ui-tooltip>
 | 
					            </ui-tooltip>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div v-else class="w-full">
 | 
					          <div v-else class="w-full">
 | 
				
			||||||
            <p class="px-1 text-sm font-semibold">{{ $strings.LabelDirectory }} <em class="font-normal text-xs pl-2">(auto)</em></p>
 | 
					            <p class="px-1 text-sm font-semibold">
 | 
				
			||||||
 | 
					              {{ $strings.LabelDirectory }}
 | 
				
			||||||
 | 
					              <em class="font-normal text-xs pl-2">(auto)</em>
 | 
				
			||||||
 | 
					            </p>
 | 
				
			||||||
            <ui-text-input :value="directory" disabled class="w-full font-mono text-xs" />
 | 
					            <ui-text-input :value="directory" disabled class="w-full font-mono text-xs" />
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -40,7 +41,10 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="w-1/2 px-2">
 | 
					        <div class="w-1/2 px-2">
 | 
				
			||||||
          <div class="w-full">
 | 
					          <div class="w-full">
 | 
				
			||||||
            <label class="px-1 text-sm font-semibold">{{ $strings.LabelDirectory }} <em class="font-normal text-xs pl-2">(auto)</em></label>
 | 
					            <label class="px-1 text-sm font-semibold">
 | 
				
			||||||
 | 
					              {{ $strings.LabelDirectory }}
 | 
				
			||||||
 | 
					              <em class="font-normal text-xs pl-2">(auto)</em>
 | 
				
			||||||
 | 
					            </label>
 | 
				
			||||||
            <ui-text-input :value="directory" disabled class="w-full font-mono text-xs h-10" />
 | 
					            <ui-text-input :value="directory" disabled class="w-full font-mono text-xs h-10" />
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -51,10 +55,10 @@
 | 
				
			|||||||
      <tables-uploaded-files-table v-if="item.ignoredFiles.length" :title="$strings.HeaderIgnoredFiles" :files="item.ignoredFiles" />
 | 
					      <tables-uploaded-files-table v-if="item.ignoredFiles.length" :title="$strings.HeaderIgnoredFiles" :files="item.ignoredFiles" />
 | 
				
			||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
    <widgets-alert v-if="uploadSuccess" type="success">
 | 
					    <widgets-alert v-if="uploadSuccess" type="success">
 | 
				
			||||||
      <p class="text-base">{{ $strings.MessageUploaderItemSuccess }}</p>
 | 
					      <p class="text-base">"{{ itemData.title }}" {{ $strings.MessageUploaderItemSuccess }}</p>
 | 
				
			||||||
    </widgets-alert>
 | 
					    </widgets-alert>
 | 
				
			||||||
    <widgets-alert v-if="uploadFailed" type="error">
 | 
					    <widgets-alert v-if="uploadFailed" type="error">
 | 
				
			||||||
      <p class="text-base">{{ $strings.MessageUploaderItemFailed }}</p>
 | 
					      <p class="text-base">"{{ itemData.title }}" {{ $strings.MessageUploaderItemFailed }}</p>
 | 
				
			||||||
    </widgets-alert>
 | 
					    </widgets-alert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div v-if="isNonInteractable" class="absolute top-0 left-0 w-full h-full bg-black bg-opacity-50 flex items-center justify-center z-20">
 | 
					    <div v-if="isNonInteractable" class="absolute top-0 left-0 w-full h-full bg-black bg-opacity-50 flex items-center justify-center z-20">
 | 
				
			||||||
@ -70,7 +74,7 @@ export default {
 | 
				
			|||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    item: {
 | 
					    item: {
 | 
				
			||||||
      type: Object,
 | 
					      type: Object,
 | 
				
			||||||
      default: () => { }
 | 
					      default: () => {}
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mediaType: String,
 | 
					    mediaType: String,
 | 
				
			||||||
    processing: Boolean,
 | 
					    processing: Boolean,
 | 
				
			||||||
@ -99,7 +103,7 @@ export default {
 | 
				
			|||||||
      if (this.isPodcast) return this.itemData.title
 | 
					      if (this.isPodcast) return this.itemData.title
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const outputPathParts = [this.itemData.author, this.itemData.series, this.itemData.title]
 | 
					      const outputPathParts = [this.itemData.author, this.itemData.series, this.itemData.title]
 | 
				
			||||||
      const cleanedOutputPathParts = outputPathParts.filter(Boolean).map(part => this.$sanitizeFilename(part))
 | 
					      const cleanedOutputPathParts = outputPathParts.filter(Boolean).map((part) => this.$sanitizeFilename(part))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return Path.join(...cleanedOutputPathParts)
 | 
					      return Path.join(...cleanedOutputPathParts)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user