@mythpe/quasar-ui-qui 0.1.27 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -333,7 +333,7 @@ defineOptions({
333
333
  :disable="disable"
334
334
  :factory="startUpload"
335
335
  :field-name="fieldName"
336
- :label="__(label)"
336
+ :label="label !== undefined ? __(label):label"
337
337
  :readonly="readonly"
338
338
  style="width: 100%;max-height: 450px;"
339
339
  v-bind="{...pluginOptions.uploader as any,...$attrs}"
@@ -347,56 +347,67 @@ defineOptions({
347
347
  v-if="scope.isUploading"
348
348
  class="q-uploader__spinner"
349
349
  />
350
- <div class="col">
351
- <div class="q-uploader__title">
350
+ <div
351
+ v-if="label || !readonly"
352
+ class="col"
353
+ >
354
+ <div
355
+ v-if="!!label"
356
+ class="q-uploader__title"
357
+ >
352
358
  {{ __(label) }}
353
359
  </div>
354
- <div class="q-uploader__subtitle">
360
+ <div
361
+ v-if="!readonly"
362
+ class="q-uploader__subtitle"
363
+ >
355
364
  {{ scope.uploadSizeLabel }} / {{ scope.uploadProgressLabel }}
356
365
  </div>
357
366
  </div>
358
- <q-btn
359
- v-if="scope.queuedFiles.length > 0"
360
- :icon="removeQueuedIcon"
361
- :label="__('myth.uploader.clearAll')"
362
- dense
363
- flat
364
- @click="scope.removeQueuedFiles"
365
- />
366
- <q-btn
367
- v-if="scope.uploadedFiles.length > 0"
368
- :icon="removeUploadedIcon"
369
- :label="__('myth.uploader.removeUploadedFiles')"
370
- dense
371
- flat
372
- @click="scope.removeUploadedFiles"
373
- />
374
- <q-btn
375
- v-if="scope.canAddFiles && !hideUploadBtn"
376
- :icon="pickFilesIcon"
377
- :label="__('myth.uploader.pickFiles')"
378
- dense
379
- flat
380
- @click="scope.pickFiles"
381
- >
382
- <q-uploader-add-trigger />
383
- </q-btn>
384
- <q-btn
385
- v-if="scope.canUpload && !hideUploadBtn"
386
- :icon="uploadFilesIcon"
387
- :label="__('myth.uploader.uploadFiles')"
388
- dense
389
- flat
390
- @click="scope.upload"
391
- />
392
- <q-btn
393
- v-if="scope.isUploading"
394
- :icon="abortUploadIcon"
395
- :label="__('myth.uploader.abortUpload')"
396
- dense
397
- flat
398
- @click="scope.abort"
399
- />
367
+ <template v-if="!readonly">
368
+ <q-btn
369
+ v-if="scope.queuedFiles.length > 0"
370
+ :icon="removeQueuedIcon"
371
+ :label="__('myth.uploader.clearAll')"
372
+ dense
373
+ flat
374
+ @click="scope.removeQueuedFiles"
375
+ />
376
+ <q-btn
377
+ v-if="scope.uploadedFiles.length > 0"
378
+ :icon="removeUploadedIcon"
379
+ :label="__('myth.uploader.removeUploadedFiles')"
380
+ dense
381
+ flat
382
+ @click="scope.removeUploadedFiles"
383
+ />
384
+ <q-btn
385
+ v-if="scope.canAddFiles && !hideUploadBtn"
386
+ :icon="pickFilesIcon"
387
+ :label="__('myth.uploader.pickFiles')"
388
+ dense
389
+ flat
390
+ @click="scope.pickFiles"
391
+ >
392
+ <q-uploader-add-trigger />
393
+ </q-btn>
394
+ <q-btn
395
+ v-if="scope.canUpload && !hideUploadBtn"
396
+ :icon="uploadFilesIcon"
397
+ :label="__('myth.uploader.uploadFiles')"
398
+ dense
399
+ flat
400
+ @click="scope.upload"
401
+ />
402
+ <q-btn
403
+ v-if="scope.isUploading"
404
+ :icon="abortUploadIcon"
405
+ :label="__('myth.uploader.abortUpload')"
406
+ dense
407
+ flat
408
+ @click="scope.abort"
409
+ />
410
+ </template>
400
411
  </MRow>
401
412
  <slot
402
413
  name="header"
@@ -102,7 +102,11 @@ export const useMyth = () => {
102
102
  const parents: string[] = routeName.split('.')
103
103
  if (parents.length > 1) {
104
104
  const e = `choice.${Str.pascalCase(lodash.pluralize(parents[parents.length - 2]))}`
105
- str = te(e) ? t(k, { name: t(e, '1') }) : null
105
+ if (te(e)) {
106
+ str = t(k, { name: t(e, '1') })
107
+ } else {
108
+ str = te(k) ? t(k, { name: '' }) : null
109
+ }
106
110
  } else {
107
111
  str = te(k) ? t(k, { name: '' }) : null
108
112
  }