Skip to content
Merged
11 changes: 9 additions & 2 deletions resources/js/components/fieldtypes/assets/AssetsFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
<div class="text-xs">
<span class="leading-tight" v-text="`${__('Drag & drop here or')}&nbsp;`" />
<button type="button" class="text-left underline underline-offset-2 cursor-pointer hover:text-gray-925 dark:hover:text-gray-200" @click.prevent="uploadFile">
{{ __('choose a file') }}.
</button>
{{ __('choose a file') }}
</button>.
<span class="leading-tight" v-if="selectedFilesText" v-text="selectedFilesText" />
</div>
</div>

Expand Down Expand Up @@ -414,6 +415,12 @@ export default {
});
},

selectedFilesText() {
if (this.maxFiles !== Infinity) {
return __n(':count\/:max selected', this.assets.length, { max: this.maxFiles });
}
},

internalFieldActions() {
return [
{
Expand Down