|
1 | 1 | <template>
|
2 |
| - <BaseWrapper :wrapper="Transition" :wrap="!unwrap" name="fade" appear> |
3 |
| - <div |
4 |
| - v-if="!content || (errors && !ignoreErrors)" |
5 |
| - class="flx --flxColumn --flx-center --width-100" |
6 |
| - :class="loaderClasses" |
7 |
| - > |
8 |
| - <!-- first load --> |
9 |
| - <template v-if="!loading"> |
10 |
| - <BoxMessage v-if="errors" :theme="eColors.DANGER" class="--width-100"> |
11 |
| - <div class="flx --flxRow --flx-center"> |
12 |
| - <span>{{ t("could_not_get_data") }}</span> |
13 |
| - <ActionButtonToggle |
14 |
| - v-if="refresh" |
15 |
| - :theme="eColors.DANGER" |
16 |
| - :tooltip="t('refresh')" |
17 |
| - round |
18 |
| - @click="refresh()" |
19 |
| - > |
20 |
| - <IconFa name="rotate-right" /> |
21 |
| - <IconFa name="rotate-right" regular /> |
22 |
| - </ActionButtonToggle> |
23 |
| - </div> |
24 |
| - </BoxMessage> |
25 |
| - <BoxMessage v-else :theme="theme" class="--width-100"> |
26 |
| - <div class="flx --flxRow --flx-center"> |
27 |
| - <span>{{ noContentMessage || t("nothing_to_show") }}</span> |
28 |
| - <ActionButtonToggle |
29 |
| - v-if="refresh" |
30 |
| - :theme="theme" |
31 |
| - :tooltip="t('refresh')" |
32 |
| - round |
33 |
| - @click="refresh()" |
34 |
| - > |
35 |
| - <IconFa name="rotate-right" /> |
36 |
| - <IconFa name="rotate-right" regular /> |
37 |
| - </ActionButtonToggle> |
38 |
| - </div> |
39 |
| - </BoxMessage> |
40 |
| - </template> |
41 |
| - <LoaderSimple v-else-if="!noLoader" :label="label" :theme="theme" /> |
| 2 | + <div |
| 3 | + v-if="!content || (errors && !ignoreErrors)" |
| 4 | + class="flx --flxColumn --flx-center --width-100" |
| 5 | + :class="loaderClasses" |
| 6 | + > |
| 7 | + <!-- first load --> |
| 8 | + <template v-if="!loading"> |
| 9 | + <BoxMessage v-if="errors" :theme="eColors.DANGER" class="--width-100"> |
| 10 | + <div class="flx --flxRow --flx-center"> |
| 11 | + <span>{{ t("could_not_get_data") }}</span> |
| 12 | + <ActionButtonToggle |
| 13 | + v-if="refresh" |
| 14 | + :theme="eColors.DANGER" |
| 15 | + :tooltip="t('refresh')" |
| 16 | + round |
| 17 | + @click="refresh()" |
| 18 | + > |
| 19 | + <IconFa name="rotate-right" /> |
| 20 | + <IconFa name="rotate-right" regular /> |
| 21 | + </ActionButtonToggle> |
| 22 | + </div> |
| 23 | + </BoxMessage> |
| 24 | + <BoxMessage v-else :theme="theme" class="--width-100"> |
| 25 | + <div class="flx --flxRow --flx-center"> |
| 26 | + <span>{{ noContentMessage || t("nothing_to_show") }}</span> |
| 27 | + <ActionButtonToggle |
| 28 | + v-if="refresh" |
| 29 | + :theme="theme" |
| 30 | + :tooltip="t('refresh')" |
| 31 | + round |
| 32 | + @click="refresh()" |
| 33 | + > |
| 34 | + <IconFa name="rotate-right" /> |
| 35 | + <IconFa name="rotate-right" regular /> |
| 36 | + </ActionButtonToggle> |
| 37 | + </div> |
| 38 | + </BoxMessage> |
| 39 | + </template> |
| 40 | + <LoaderSimple v-else-if="!noLoader" key="loader-no-content" :label="label" :theme="theme" /> |
| 41 | + </div> |
| 42 | + <BaseWrapper v-else :wrap="!unwrap" :el="el" v-bind="$attrs"> |
| 43 | + <div class="back --overlay" :class="{ 'is--active': loading && !noLoader }"> |
| 44 | + <LoaderSimple key="loader-content" :label="label" :theme="theme" /> |
42 | 45 | </div>
|
43 |
| - <BaseWrapper v-else :wrap="!unwrap" :el="el" v-bind="$attrs"> |
44 |
| - <div class="back --overlay" :class="{ 'is--active': loading && !noLoader }"> |
45 |
| - <LoaderSimple :label="label" :theme="theme" /> |
46 |
| - </div> |
47 |
| - <slot></slot> |
48 |
| - </BaseWrapper> |
| 46 | + <slot></slot> |
49 | 47 | </BaseWrapper>
|
50 | 48 | </template>
|
51 | 49 |
|
52 | 50 | <script setup lang="ts">
|
53 |
| - import { Transition } from "vue"; |
54 |
| -
|
55 | 51 | import type { tProps } from "@open-xamu-co/ui-common-types";
|
56 | 52 | import { useI18n } from "@open-xamu-co/ui-common-helpers";
|
57 | 53 | import { eColors } from "@open-xamu-co/ui-common-enums";
|
|
0 commit comments