1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Dropzone: Polished image manager elements

- Added file placeholder for non-image uploads.
- Added use of upload limits.
- Removed upload timeout variable.
- Added pass-through and usage of filetypes.
- Extracted some view text to language files and made use of existing
  text.
This commit is contained in:
Dan Brown
2023-04-25 16:41:39 +01:00
parent b21a9007c5
commit 61d2ea6ac7
6 changed files with 43 additions and 36 deletions

View File

@@ -1,11 +1,11 @@
<div components="image-manager dropzone"
option:dropzone:url="{{ url('/images/gallery?' . http_build_query(['uploaded_to' => $uploaded_to ?? 0])) }}"
option:dropzone:success-message="{{ trans('components.image_upload_success') }}"
option:dropzone:remove-message="{{ trans('components.image_upload_remove') }}"
option:dropzone:error-message="{{ trans('components.image_upload_failure') }}"
option:dropzone:upload-limit="{{ config('app.upload_limit') }}"
option:dropzone:upload-limit-message="{{ trans('errors.server_upload_limit') }}"
option:dropzone:timeout-message="{{ trans('errors.file_upload_timeout') }}"
option:dropzone:zone-text="{{ trans('components.image_dropzone_drop') }}"
option:dropzone:file-accept="image/*"
option:image-manager:uploaded-to="{{ $uploaded_to ?? 0 }}"
class="image-manager">
@@ -66,9 +66,8 @@
</div>
<div refs="image-manager@form-container-placeholder" class="p-m text-small text-muted">
<p>Here you can manage or select images that have been previously uploaded to the system.</p>
<p>Upload a new image by dragging an image file into this window,
or by using the "Upload Image" button above.</p>
<p>{{ trans('components.image_intro') }}</p>
<p>{{ trans('components.image_intro_upload') }}</p>
</div>
<div refs="image-manager@formContainer" class="inner flex">