@afeefa/vue-app 0.0.146 → 0.0.148

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.146
1
+ 0.0.148
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -52,6 +52,8 @@ export class ApiAction extends ApiResourcesApiAction {
52
52
  }
53
53
 
54
54
  async beforeBulkRequest () {
55
+ this._startTime = Date.now()
56
+
55
57
  if (this._dispatchGlobalLoadingEvents) {
56
58
  eventBus.dispatch(new LoadingEvent(LoadingEvent.START_LOADING))
57
59
  }
@@ -80,6 +82,14 @@ export class ApiAction extends ApiResourcesApiAction {
80
82
  }
81
83
 
82
84
  async afterBulkRequest () {
85
+ if (this._minDuration) {
86
+ const diffTime = Date.now() - this._startTime
87
+ const restTime = Math.max(0, this._minDuration - diffTime)
88
+ if (restTime) {
89
+ await sleep(restTime / 1000)
90
+ }
91
+ }
92
+
83
93
  if (this._dispatchGlobalLoadingEvents) {
84
94
  eventBus.dispatch(new LoadingEvent(LoadingEvent.STOP_LOADING))
85
95
  }
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <v-alert
3
+ v-bind="$attrs"
4
+ :style="{display: inline ? 'inline-block' : 'block'}"
5
+ dense
6
+ border="left"
7
+ colored-border
8
+ elevation="3"
9
+ v-on="$listeners"
10
+ >
11
+ <slot />
12
+ </v-alert>
13
+ </template>
14
+
15
+ <script>
16
+ import { Component, Vue } from '@a-vue'
17
+
18
+ @Component({
19
+ props: [{inline: true}]
20
+ })
21
+ export default class AInfo extends Vue {
22
+ }
23
+ </script>
24
+
25
+ <style lang="scss" scoped>
26
+ </style>
@@ -70,16 +70,18 @@
70
70
  </template>
71
71
 
72
72
  <div v-else-if="!isLoading">
73
- <div v-if="$has.filters">
74
- Nichts gefunden. <a
75
- href=""
76
- @click.prevent="resetFilters()"
77
- >Filter zurücksetzen</a>
78
- </div>
79
-
80
- <div v-else>
81
- Nichts gefunden.
82
- </div>
73
+ <a-info type="warning">
74
+ <div v-if="$has.filters">
75
+ Nichts gefunden. <a
76
+ href=""
77
+ @click.prevent="resetFilters()"
78
+ >Filter zurücksetzen</a>
79
+ </div>
80
+
81
+ <div v-else>
82
+ Nichts gefunden.
83
+ </div>
84
+ </a-info>
83
85
  </div>
84
86
  <div
85
87
  v-if="$has.filters"