Skip to content

Commit 85ea022

Browse files
[6.x] Add max files count (#13477)
Co-authored-by: Jason Varga <[email protected]>
1 parent 59091d5 commit 85ea022

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

resources/js/components/fieldtypes/assets/AssetsFieldtype.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
<div class="text-xs">
5151
<span class="leading-tight" v-text="`${__('Drag & drop here or')}&nbsp;`" />
5252
<button type="button" class="text-left underline underline-offset-2 cursor-pointer hover:text-gray-925 dark:hover:text-gray-200" @click.prevent="uploadFile">
53-
{{ __('choose a file') }}.
54-
</button>
53+
{{ __('choose a file') }}
54+
</button>.
55+
<span class="leading-tight" v-if="selectedFilesText" v-text="selectedFilesText" />
5556
</div>
5657
</div>
5758

@@ -414,6 +415,12 @@ export default {
414415
});
415416
},
416417
418+
selectedFilesText() {
419+
if (this.maxFiles !== Infinity) {
420+
return __n(':count\/:max selected', this.assets.length, { max: this.maxFiles });
421+
}
422+
},
423+
417424
internalFieldActions() {
418425
return [
419426
{

0 commit comments

Comments
 (0)