@afeefa/vue-app 0.0.52 → 0.0.55

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.
Files changed (92) hide show
  1. package/.afeefa/package/release/version.txt +1 -1
  2. package/package.json +3 -10
  3. package/src/api-resources/ApiActions.js +31 -0
  4. package/src/components/AAlert.vue +1 -1
  5. package/src/components/AAutocomplete.vue +1 -1
  6. package/src/components/ABadge.vue +1 -1
  7. package/src/components/ABreadcrumbs.vue +1 -1
  8. package/src/components/ACheckbox.vue +35 -0
  9. package/src/components/AContextMenu.vue +2 -2
  10. package/src/components/AContextMenuItem.vue +2 -2
  11. package/src/components/ADatePicker.vue +1 -1
  12. package/src/components/ADialog.vue +1 -1
  13. package/src/components/AGrid.vue +2 -1
  14. package/src/components/AIcon.vue +1 -1
  15. package/src/components/AIconButton.vue +1 -1
  16. package/src/components/ALoadingIndicator.vue +1 -1
  17. package/src/components/AModal.vue +1 -1
  18. package/src/components/APagination.vue +1 -1
  19. package/src/components/ARadioGroup.vue +1 -1
  20. package/src/components/ARichTextArea.vue +121 -0
  21. package/src/components/ARow.vue +1 -1
  22. package/src/components/ASaveIndicator.vue +1 -1
  23. package/src/components/ASearchSelect.vue +34 -18
  24. package/src/components/ASelect.vue +1 -1
  25. package/src/components/ATable.vue +1 -1
  26. package/src/components/ATableHeader.vue +1 -1
  27. package/src/components/ATableRow.vue +1 -1
  28. package/src/components/ATextArea.vue +1 -1
  29. package/src/components/ATextField.vue +1 -1
  30. package/src/components/form/EditForm.vue +2 -6
  31. package/src/components/form/EditModal.vue +1 -1
  32. package/src/components/form/FormFieldMixin.js +2 -3
  33. package/src/components/form/fields/FormFieldCheckbox.vue +18 -0
  34. package/src/components/form/fields/FormFieldDate.vue +1 -1
  35. package/src/components/form/fields/FormFieldRadioGroup.vue +1 -1
  36. package/src/components/form/fields/FormFieldRichTextArea.vue +14 -0
  37. package/src/components/form/fields/FormFieldSearchSelect.vue +1 -1
  38. package/src/components/form/fields/FormFieldSelect.vue +1 -1
  39. package/src/components/form/fields/FormFieldSelect2.vue +1 -1
  40. package/src/components/form/fields/FormFieldText.vue +1 -1
  41. package/src/components/form/fields/FormFieldTextArea.vue +1 -1
  42. package/src/components/index.js +4 -0
  43. package/src/components/list/ListFilterMixin.js +1 -1
  44. package/src/components/list/ListFilterRow.vue +1 -1
  45. package/src/components/list/ListViewMixin.js +7 -4
  46. package/src/components/list/filters/ListFilterPage.vue +1 -1
  47. package/src/components/list/filters/ListFilterSearch.vue +1 -1
  48. package/src/components/list/filters/ListFilterSelect.vue +1 -1
  49. package/src/components/mixins/ClickOutsideMixin.js +1 -1
  50. package/src/components/mixins/ComponentWidthMixin.js +1 -1
  51. package/src/components/search-select/SearchSelectFilters.vue +1 -1
  52. package/src/components/search-select/SearchSelectList.vue +13 -3
  53. package/src/components/vue/Component.js +46 -0
  54. package/src/index.js +4 -0
  55. package/src/plugins/api-resources/ApiResourcesPlugin.js +12 -0
  56. package/src/plugins/route-config/RouteConfigPlugin.js +25 -1
  57. package/src/services/escape/CancelOnEscMixin.js +1 -1
  58. package/src/services/position/UsesPositionServiceMixin.js +1 -1
  59. package/src/styles/forms.scss +8 -0
  60. package/src/styles/vue-app.scss +1 -0
  61. package/src-admin/bootstrap.js +2 -5
  62. package/src-admin/components/App.vue +1 -1
  63. package/src-admin/components/NotFound.vue +65 -0
  64. package/src-admin/components/SidebarMenu.vue +1 -1
  65. package/src-admin/components/Splash.vue +34 -34
  66. package/src-admin/components/Start.vue +2 -2
  67. package/src-admin/components/app/AppBarButton.vue +1 -1
  68. package/src-admin/components/app/AppBarButtons.vue +1 -1
  69. package/src-admin/components/app/AppBarTitle.vue +1 -1
  70. package/src-admin/components/app/AppBarTitleContainer.vue +1 -1
  71. package/src-admin/components/controls/SearchSelectFormField.vue +223 -0
  72. package/src-admin/components/detail/DetailProperty.vue +2 -4
  73. package/src-admin/components/list/ListColumnHeader.vue +5 -4
  74. package/src-admin/components/list/ListTitle.vue +1 -1
  75. package/src-admin/components/list/ListView.vue +12 -10
  76. package/src-admin/components/menu/SidebarMenuItem.vue +1 -1
  77. package/src-admin/components/model/ModelCount.vue +1 -1
  78. package/src-admin/components/model/ModelIcon.vue +1 -1
  79. package/src-admin/components/pages/CreatePage.vue +2 -3
  80. package/src-admin/components/pages/DetailPage.vue +4 -4
  81. package/src-admin/components/pages/EditPage.vue +5 -6
  82. package/src-admin/components/pages/EditPageMixin.js +1 -1
  83. package/src-admin/components/pages/ListPage.vue +3 -4
  84. package/src-admin/components/routes/CreateRoute.vue +1 -1
  85. package/src-admin/components/routes/DetailRoute.vue +4 -4
  86. package/src-admin/components/routes/EditRoute.vue +4 -4
  87. package/src-admin/components/routes/ListRoute.vue +4 -4
  88. package/src-admin/config/vuetify.js +3 -1
  89. package/src-admin/models/Model.js +13 -0
  90. package/src-admin/models/ModelAdminConfig.js +20 -0
  91. package/src-components/AMdiIcon.vue +14 -0
  92. package/src/utils/props-helper.js +0 -21
@@ -1,6 +1,5 @@
1
+ import { Component, Vue } from '@a-vue'
1
2
  import { ListAction } from '@a-vue/api-resources/ApiActions'
2
- import { apiResources } from '@afeefa/api-resources-client'
3
- import { Component, Vue } from 'vue-property-decorator'
4
3
 
5
4
  @Component({
6
5
  props: ['name', 'label']
@@ -17,7 +16,7 @@ export class FormFieldMixin extends Vue {
17
16
  }
18
17
 
19
18
  get modelType () {
20
- return apiResources.getType(this.model.type)
19
+ return this.$apiResources.getType(this.model.type)
21
20
  }
22
21
 
23
22
  get field () {
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <a-checkbox
3
+ v-model="model[name]"
4
+ :label="label || name"
5
+ :validator="validator"
6
+ v-bind="$attrs"
7
+ v-on="$listeners"
8
+ />
9
+ </template>
10
+
11
+ <script>
12
+ import { Component, Mixins } from '@a-vue'
13
+ import { FormFieldMixin } from '../FormFieldMixin'
14
+
15
+ @Component
16
+ export default class FormFieldCheckbox extends Mixins(FormFieldMixin) {
17
+ }
18
+ </script>
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script>
11
- import { Component, Mixins } from 'vue-property-decorator'
11
+ import { Component, Mixins } from '@a-vue'
12
12
  import { FormFieldMixin } from '../FormFieldMixin'
13
13
 
14
14
  @Component
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- import { Component, Mixins } from 'vue-property-decorator'
13
+ import { Component, Mixins } from '@a-vue'
14
14
  import { FormFieldMixin } from '../FormFieldMixin'
15
15
 
16
16
  @Component
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <a-rich-text-area
3
+ v-model="model[name]"
4
+ />
5
+ </template>
6
+
7
+ <script>
8
+ import { Component, Mixins } from '@a-vue'
9
+ import { FormFieldMixin } from '../FormFieldMixin'
10
+
11
+ @Component
12
+ export default class FormFieldRichTextArea extends Mixins(FormFieldMixin) {
13
+ }
14
+ </script>
@@ -35,7 +35,7 @@
35
35
  </template>
36
36
 
37
37
  <script>
38
- import { Component, Mixins } from 'vue-property-decorator'
38
+ import { Component, Mixins } from '@a-vue'
39
39
  import { FormFieldMixin } from '../FormFieldMixin'
40
40
 
41
41
  @Component({
@@ -13,7 +13,7 @@
13
13
  </template>
14
14
 
15
15
  <script>
16
- import { Component, Mixins } from 'vue-property-decorator'
16
+ import { Component, Mixins } from '@a-vue'
17
17
  import { FormFieldMixin } from '../FormFieldMixin'
18
18
 
19
19
  @Component
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
 
16
16
  <script>
17
- import { Component, Mixins } from 'vue-property-decorator'
17
+ import { Component, Mixins } from '@a-vue'
18
18
  import { FormFieldMixin } from '../FormFieldMixin'
19
19
  import { ComponentWidthMixin } from '../../mixins/ComponentWidthMixin'
20
20
 
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script>
11
- import { Component, Mixins } from 'vue-property-decorator'
11
+ import { Component, Mixins } from '@a-vue'
12
12
  import { FormFieldMixin } from '../FormFieldMixin'
13
13
 
14
14
  @Component
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script>
11
- import { Component, Mixins } from 'vue-property-decorator'
11
+ import { Component, Mixins } from '@a-vue'
12
12
  import { FormFieldMixin } from '../FormFieldMixin'
13
13
 
14
14
  @Component
@@ -2,8 +2,10 @@ import Vue from 'vue'
2
2
 
3
3
  import EditForm from './form/EditForm'
4
4
  import EditModal from './form/EditModal'
5
+ import FormFieldCheckbox from './form/fields/FormFieldCheckbox'
5
6
  import FormFieldDate from './form/fields/FormFieldDate'
6
7
  import FormFieldRadioGroup from './form/fields/FormFieldRadioGroup'
8
+ import FormFieldRichTextArea from './form/fields/FormFieldRichTextArea'
7
9
  import FormFieldSearchSelect from './form/fields/FormFieldSearchSelect'
8
10
  import FormFieldSelect from './form/fields/FormFieldSelect'
9
11
  import FormFieldSelect2 from './form/fields/FormFieldSelect2'
@@ -18,7 +20,9 @@ Vue.component('EditForm', EditForm)
18
20
  Vue.component('EditModal', EditModal)
19
21
  Vue.component('FormFieldText', FormFieldText)
20
22
  Vue.component('FormFieldTextArea', FormFieldTextArea)
23
+ Vue.component('FormFieldRichTextArea', FormFieldRichTextArea)
21
24
  Vue.component('FormFieldRadioGroup', FormFieldRadioGroup)
25
+ Vue.component('FormFieldCheckbox', FormFieldCheckbox)
22
26
  Vue.component('FormFieldDate', FormFieldDate)
23
27
  Vue.component('FormFieldSearchSelect', FormFieldSearchSelect)
24
28
  Vue.component('FormFieldSelect', FormFieldSelect)
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  @Component({
4
4
  props: ['name', 'label']
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
  <script>
12
- import { Component, Vue } from 'vue-property-decorator'
12
+ import { Component, Vue } from '@a-vue'
13
13
 
14
14
  @Component({
15
15
  props: ['gap']
@@ -1,13 +1,12 @@
1
+ import { Component, Vue, Watch } from '@a-vue'
1
2
  import { ListAction } from '@a-vue/api-resources/ApiActions'
2
- import { propsWithDefaults } from '@a-vue/utils/props-helper'
3
3
  import { ListViewModel } from '@afeefa/api-resources-client'
4
- import { Component, Vue, Watch } from 'vue-property-decorator'
5
4
 
6
5
  import { CurrentRouteFilterSource } from './CurrentRouteFilterSource'
7
6
  import { FilterSourceType } from './FilterSourceType'
8
7
 
9
8
  @Component({
10
- ...propsWithDefaults([
9
+ props: [
11
10
  'models', 'meta', // given, if already loaded
12
11
  'listViewConfig',
13
12
  'filterHistoryKey',
@@ -17,7 +16,7 @@ import { FilterSourceType } from './FilterSourceType'
17
16
  events: true,
18
17
  history: true
19
18
  }
20
- ])
19
+ ]
21
20
  })
22
21
  export class ListViewMixin extends Vue {
23
22
  LIST_VIEW = true
@@ -93,6 +92,10 @@ export class ListViewMixin extends Vue {
93
92
  this.load()
94
93
  }
95
94
 
95
+ reload () {
96
+ this.load()
97
+ }
98
+
96
99
  resetFilters () {
97
100
  this.listViewModel.resetFilters()
98
101
  }
@@ -27,7 +27,7 @@
27
27
 
28
28
 
29
29
  <script>
30
- import { Component, Mixins } from 'vue-property-decorator'
30
+ import { Component, Mixins } from '@a-vue'
31
31
  import { ListFilterMixin } from '../ListFilterMixin'
32
32
 
33
33
  @Component({
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
  <script>
15
- import { Component, Mixins } from 'vue-property-decorator'
15
+ import { Component, Mixins } from '@a-vue'
16
16
  import { ListFilterMixin } from '../ListFilterMixin'
17
17
 
18
18
  @Component
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
  <script>
16
- import { Component, Mixins } from 'vue-property-decorator'
16
+ import { Component, Mixins } from '@a-vue'
17
17
  import { ListFilterMixin } from '../ListFilterMixin'
18
18
  import { ListAction } from '@a-vue/api-resources/ApiActions'
19
19
 
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
  import { getZIndex } from 'vuetify/lib/util/helpers'
3
3
 
4
4
  @Component
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  @Component({
4
4
  props: ['maxWidth', 'width']
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
  <script>
12
- import { Component, Vue } from 'vue-property-decorator'
12
+ import { Component, Vue } from '@a-vue'
13
13
 
14
14
  @Component({
15
15
  props: ['filters', 'count']
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="searchSelectList">
2
+ <div :class="['searchSelectList', {isLoading}]">
3
3
  <template v-if="models_.length">
4
4
  <a-table v-bind="$attrs">
5
5
  <a-table-header
@@ -13,6 +13,7 @@
13
13
  v-for="model in models_"
14
14
  :key="model.id"
15
15
  small
16
+ :class="{selected: isSelected(model)}"
16
17
  >
17
18
  <slot
18
19
  name="row"
@@ -38,11 +39,11 @@
38
39
 
39
40
 
40
41
  <script>
41
- import { Component, Mixins } from 'vue-property-decorator'
42
+ import { Component, Mixins } from '@a-vue'
42
43
  import { ListViewMixin } from '@a-vue/components/list/ListViewMixin'
43
44
 
44
45
  @Component({
45
- props: ['q']
46
+ props: ['q', 'selectedItems']
46
47
  })
47
48
  export default class SearchSelectList extends Mixins(ListViewMixin) {
48
49
  get hasHeader () {
@@ -58,16 +59,25 @@ export default class SearchSelectList extends Mixins(ListViewMixin) {
58
59
  }
59
60
  }
60
61
 
62
+ isSelected (model) {
63
+ return !!this.selectedItems.find(i => i.equals(model))
64
+ }
65
+
61
66
  _filtersInitialized () {
62
67
  if (this.q) {
63
68
  this.filters.q.value = this.q
64
69
  }
70
+ this.$emit('update:filters', this.filters)
65
71
  }
66
72
  }
67
73
  </script>
68
74
 
69
75
 
70
76
  <style scoped lang="scss">
77
+ .isLoading {
78
+ opacity: .6;
79
+ }
80
+
71
81
  .notFound {
72
82
  padding: 0 .5rem .3rem;
73
83
  }
@@ -0,0 +1,46 @@
1
+ import { Component as VueComponent } from 'vue-property-decorator'
2
+
3
+ const Component = function (options) {
4
+ if (options.props) {
5
+ options.props = propsWithDefaults(options.props)
6
+ }
7
+ return VueComponent(options)
8
+ }
9
+
10
+ Component.registerHooks = VueComponent.registerHooks
11
+
12
+ export { Component }
13
+
14
+ function propsWithDefaults (props) {
15
+ if (props && typeof props === 'object' && props.constructor === Object) {
16
+ return props
17
+ }
18
+
19
+ const normalizedProps = {}
20
+
21
+ for (const prop of props) {
22
+ if (typeof prop === 'object') {
23
+ Object.keys(prop).forEach(subProp => {
24
+ const value = prop[subProp]
25
+ // property: []
26
+ if (Array.isArray(value)) {
27
+ normalizedProps[subProp] = {
28
+ default () { // must be a function according to vue spec
29
+ return value
30
+ }
31
+ }
32
+ // property: { some object }, should be a normal vue props object
33
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
34
+ normalizedProps[subProp] = value
35
+ // property: true, null, ...
36
+ } else {
37
+ normalizedProps[subProp] = { default: value }
38
+ }
39
+ })
40
+ } else {
41
+ normalizedProps[prop] = null
42
+ }
43
+ }
44
+
45
+ return normalizedProps
46
+ }
package/src/index.js CHANGED
@@ -0,0 +1,4 @@
1
+ import './styles/vue-app.scss'
2
+
3
+ export { Mixins, Vue, Watch } from 'vue-property-decorator'
4
+ export { Component } from '@a-vue/components/vue/Component'
@@ -1,6 +1,18 @@
1
1
  import { apiResources } from '@afeefa/api-resources-client'
2
2
 
3
3
  class ApiResourcesPlugin {
4
+ apiResources = apiResources
5
+
6
+ register (models, apis) {
7
+ apiResources
8
+ .registerModels(models)
9
+ .registerApis(apis)
10
+ }
11
+
12
+ schemasLoaded () {
13
+ return apiResources.schemasLoaded()
14
+ }
15
+
4
16
  install (Vue) {
5
17
  Object.defineProperty(Vue.prototype, '$apiResources', {
6
18
  get () {
@@ -121,7 +121,8 @@ class RouteConfigPlugin {
121
121
  this._promise = this._promise.then(() => {
122
122
  callback = callback({
123
123
  ROUTESET: this.routeSet,
124
- ROUTE: this.route
124
+ ROUTE: this.route,
125
+ GETROUTE: this.getRoute
125
126
  })
126
127
 
127
128
  if (!(callback instanceof Promise)) {
@@ -290,6 +291,29 @@ class RouteConfigPlugin {
290
291
  return new RouteSetDefinition(options).getDefinitions()
291
292
  }
292
293
 
294
+ getRoute = (name, component) => {
295
+ switch (name) {
296
+ case 'notfound':
297
+ return this.route({
298
+ path: '/:pathMatch(.*)*',
299
+ name: 'notfound',
300
+ ignoreBreadcrumb: true,
301
+ component: component || {
302
+ template: '<div>Not found</div>'
303
+ }
304
+ })
305
+ case 'auth':
306
+ return this.route({
307
+ path: '/auth2',
308
+ name: 'auth',
309
+ ignoreBreadcrumb: true,
310
+ component: {
311
+ template: '<div>Auth</div>'
312
+ }
313
+ })
314
+ }
315
+ }
316
+
293
317
  breadcrumb = options => {
294
318
  options.config = {
295
319
  ...this._config,
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  import { cascadingWindowEventDispatcher } from './CascadingWindowEventDispatcher'
4
4
 
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  import { positionService } from '../PositionService'
4
4
 
@@ -0,0 +1,8 @@
1
+ .a-text-input {
2
+ border: 1px solid #CCCCCC;
3
+ padding: .5rem;
4
+
5
+ &-focused {
6
+ outline: 1px solid #9999FF;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ @import "forms";
@@ -4,7 +4,6 @@ import './config/components'
4
4
  import { apiResourcesPlugin } from '@a-vue/plugins/api-resources/ApiResourcesPlugin'
5
5
  import { hasOptionsPlugin } from '@a-vue/plugins/has-options/HasOptionsPlugin'
6
6
  import { timeout } from '@a-vue/utils/timeout'
7
- import { apiResources } from '@afeefa/api-resources-client'
8
7
  import Vue from 'vue'
9
8
 
10
9
  import { appConfig } from './config/AppConfig'
@@ -17,9 +16,7 @@ Vue.use(hasOptionsPlugin)
17
16
  Vue.config.productionTip = false
18
17
 
19
18
  export async function bootstrap ({ apis, models, routing, authService, app, components }) {
20
- apiResources
21
- .registerModels(models)
22
- .registerApis(apis)
19
+ apiResourcesPlugin.register(models, apis)
23
20
 
24
21
  appConfig.authService = authService
25
22
  appConfig.app = app
@@ -36,7 +33,7 @@ export async function bootstrap ({ apis, models, routing, authService, app, comp
36
33
 
37
34
  routing(routeConfigPlugin)
38
35
  const router = await routeConfigPlugin.getRouter()
39
- await apiResources.schemasLoaded()
36
+ await apiResourcesPlugin.schemasLoaded()
40
37
 
41
38
  if (authService) {
42
39
  authService.initApp(router)
@@ -136,7 +136,7 @@
136
136
  </template>
137
137
 
138
138
  <script>
139
- import { Component, Vue, Watch } from 'vue-property-decorator'
139
+ import { Component, Vue, Watch } from '@a-vue'
140
140
  import { LoadingEvent } from '@a-vue/events'
141
141
  import { appConfig } from '@a-admin/config/AppConfig'
142
142
  import { sleep } from '@a-vue/utils/timeout'
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <div class="notFound">
3
+ <a-row
4
+ vertical
5
+ center
6
+ class="content"
7
+ >
8
+ <div class="logo">
9
+ <slot />
10
+ </div>
11
+
12
+ <a-row
13
+ vertical
14
+ center
15
+ >
16
+ <div class="mt-0">
17
+ {{ title || '404 - Not Found' }}
18
+ </div>
19
+
20
+ <div class="mt-4">
21
+ <router-link :to="backlink || { path: '/'}">
22
+ {{ backlinkTitle || 'Zurück' }}
23
+ </router-link>
24
+ </div>
25
+ </a-row>
26
+ </a-row>
27
+ </div>
28
+ </template>
29
+
30
+
31
+ <script>
32
+ import { Component, Vue } from '@a-vue'
33
+
34
+ @Component({
35
+ name: 'adminNotFound',
36
+ props: ['title', 'backlink', 'backlinkTitle']
37
+ })
38
+ export default class NotFound extends Vue {
39
+ created () {
40
+ this.$parent.$emit('appLoaded')
41
+ }
42
+ }
43
+ </script>
44
+
45
+ <style lang="scss" scoped>
46
+ .notFound {
47
+ position: fixed;
48
+ top: 0;
49
+ left: 0;
50
+ width: 100vw;
51
+ height: 100vh;
52
+ }
53
+
54
+ .content {
55
+ position: absolute;
56
+ top: 50%;
57
+ left: 50%;
58
+ min-height: 50vh;
59
+ transform: translate(-50%, -50%);
60
+ }
61
+
62
+ .logo {
63
+ margin-bottom: 2rem;
64
+ }
65
+ </style>
@@ -32,7 +32,7 @@
32
32
  </template>
33
33
 
34
34
  <script>
35
- import { Component, Vue } from 'vue-property-decorator'
35
+ import { Component, Vue } from '@a-vue'
36
36
  import SidebarMenuItem from './menu/SidebarMenuItem'
37
37
 
38
38
  @Component({
@@ -1,41 +1,37 @@
1
1
  <template>
2
2
  <v-app class="splash">
3
- <v-container
4
- fill-height
5
- fluid
6
- pb-0
7
- d-flex
8
- align-center
9
- justify-center
3
+ <a-row
4
+ vertical
5
+ center
6
+ class="content"
10
7
  >
11
- <div>
12
- <div class="logo">
13
- <slot />
14
- </div>
8
+ <div class="logo">
9
+ <slot />
10
+ </div>
15
11
 
16
- <a-row
17
- vertical
18
- center
19
- >
20
- <v-progress-linear
21
- :size="45"
22
- :width="6"
23
- indeterminate
24
- :color="color || 'green'"
25
- />
12
+ <a-row
13
+ vertical
14
+ center
15
+ fullWidth
16
+ >
17
+ <v-progress-linear
18
+ :size="45"
19
+ :width="6"
20
+ indeterminate
21
+ :color="color || 'green'"
22
+ />
26
23
 
27
- <div class="mt-4">
28
- {{ title || 'Lade App ...' }}
29
- </div>
30
- </a-row>
31
- </div>
32
- </v-container>
24
+ <div class="mt-4">
25
+ {{ title || 'Lade App ...' }}
26
+ </div>
27
+ </a-row>
28
+ </a-row>
33
29
  </v-app>
34
30
  </template>
35
31
 
36
32
 
37
33
  <script>
38
- import { Component, Vue } from 'vue-property-decorator'
34
+ import { Component, Vue } from '@a-vue'
39
35
 
40
36
  @Component({
41
37
  props: ['title', 'color']
@@ -47,20 +43,24 @@ export default class Splash extends Vue {
47
43
  }
48
44
  </script>
49
45
 
50
-
51
46
  <style lang="scss" scoped>
52
47
  .splash {
53
- position: absolute;
48
+ position: fixed;
54
49
  top: 0;
55
50
  left: 0;
56
51
  width: 100vw;
52
+ height: 100vh;
57
53
  }
58
54
 
59
- .logo {
60
- margin-bottom: 2rem;
55
+ .content {
56
+ position: absolute;
57
+ top: 50%;
58
+ left: 50%;
59
+ min-height: 50vh;
60
+ transform: translate(-50%, -50%);
61
61
  }
62
62
 
63
- .container {
64
- transform: translateY(-10%);
63
+ .logo {
64
+ margin-bottom: 2rem;
65
65
  }
66
66
  </style>