@bildvitta/quasar-ui-asteroid 3.13.0-beta.8 → 3.13.0

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 (65) hide show
  1. package/package.json +1 -1
  2. package/src/components/actions/QasActions.vue +54 -47
  3. package/src/components/actions-menu/QasActionsMenu.vue +147 -149
  4. package/src/components/actions-menu/QasActionsMenu.yml +13 -0
  5. package/src/components/app-bar/QasAppBar.vue +59 -87
  6. package/src/components/app-menu/QasAppMenu.vue +128 -256
  7. package/src/components/app-menu/composables/use-app-menu-dropdown.js +71 -0
  8. package/src/components/app-menu/composables/use-app-user.js +46 -0
  9. package/src/components/app-menu/composables/use-development-badge.js +23 -0
  10. package/src/components/app-menu/private/PvAppMenuDropdown.vue +33 -39
  11. package/src/components/app-user/QasAppUser.vue +94 -92
  12. package/src/components/avatar/QasAvatar.vue +67 -85
  13. package/src/components/avatar/enums/AvatarColors.js +9 -0
  14. package/src/components/badge/QasBadge.vue +21 -22
  15. package/src/components/badge/QasBadge.yml +1 -1
  16. package/src/components/box/QasBox.vue +17 -19
  17. package/src/components/btn/QasBtn.vue +132 -135
  18. package/src/components/btn/QasBtn.yml +3 -3
  19. package/src/components/btn-dropdown/QasBtnDropdown.vue +2 -2
  20. package/src/components/chart-view/QasChartView.vue +2 -2
  21. package/src/components/date/QasDate.vue +3 -3
  22. package/src/components/date-time-input/QasDateTimeInput.vue +2 -2
  23. package/src/components/delete/QasDelete.vue +1 -1
  24. package/src/components/dialog/QasDialog.vue +135 -244
  25. package/src/components/dialog/composables/use-cancel.js +40 -0
  26. package/src/components/dialog/composables/use-dynamic-components.js +86 -0
  27. package/src/components/dialog/composables/use-ok.js +45 -0
  28. package/src/components/filters/QasFilters.vue +1 -1
  29. package/src/components/filters/private/PvFiltersButton.vue +2 -2
  30. package/src/components/form-generator/QasFormGenerator.yml +1 -1
  31. package/src/components/gallery/QasGallery.vue +1 -1
  32. package/src/components/gallery/private/PvGalleryCarouselDialog.vue +2 -2
  33. package/src/components/gallery-card/QasGalleryCard.vue +2 -2
  34. package/src/components/label/QasLabel.vue +1 -1
  35. package/src/components/label/QasLabel.yml +1 -1
  36. package/src/components/nested-fields/QasNestedFields.vue +37 -14
  37. package/src/components/nested-fields/QasNestedFields.yml +63 -17
  38. package/src/components/page-header/QasPageHeader.vue +1 -11
  39. package/src/components/pagination/QasPagination.vue +1 -1
  40. package/src/components/search-input/QasSearchInput.vue +2 -2
  41. package/src/components/select-list-dialog/QasSelectListDialog.vue +3 -3
  42. package/src/components/table-generator/QasTableGenerator.vue +8 -4
  43. package/src/components/tabs-generator/QasTabsGenerator.vue +1 -1
  44. package/src/components/timeline/QasTimeline.vue +2 -2
  45. package/src/components/tree-generator/QasTreeGenerator.vue +1 -1
  46. package/src/components/uploader/QasUploader.vue +1 -1
  47. package/src/components/uploader/private/PvUploaderGalleryCard.vue +1 -1
  48. package/src/components/welcome/QasWelcome.vue +2 -2
  49. package/src/composables/use-history.js +4 -4
  50. package/src/css/components/base.scss +1 -0
  51. package/src/css/components/button.scss +2 -2
  52. package/src/css/components/checkbox.scss +12 -0
  53. package/src/css/components/editor.scss +7 -0
  54. package/src/css/components/field.scss +23 -3
  55. package/src/css/components/index.scss +3 -0
  56. package/src/css/components/item.scss +1 -1
  57. package/src/css/components/radio.scss +15 -2
  58. package/src/css/components/toggle.scss +11 -0
  59. package/src/css/variables/typography.scss +11 -1
  60. package/src/enums/Align.js +7 -0
  61. package/src/index.scss +4 -4
  62. package/src/pages/ErrorComponent.vue +1 -2
  63. package/src/plugins/dialog/Dialog.js +1 -1
  64. package/src/shared/notify-config.js +1 -1
  65. package/src/vue-plugin.js +4 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.13.0-beta.8",
4
+ "version": "3.13.0",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -10,58 +10,65 @@
10
10
  </div>
11
11
  </template>
12
12
 
13
- <script>
14
- export default {
15
- name: 'QasActions',
16
-
17
- props: {
18
- align: {
19
- default: 'end',
20
- type: String,
21
- validator: value => ['start', 'around', 'between', 'center', 'end'].includes(value)
22
- },
23
-
24
- gutter: {
25
- default: '',
26
- type: String,
27
- validator: value => !value || ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
28
- },
29
-
30
- useFullWidth: {
31
- type: Boolean
32
- },
33
-
34
- useEqualWidth: {
35
- type: Boolean
36
- }
37
- },
13
+ <script setup>
14
+ import useScreen from '../../composables/use-screen'
15
+ import { FlexAlign } from '../../enums/Align'
16
+ import { Spacing } from '../../enums/Spacing'
38
17
 
39
- computed: {
40
- classes () {
41
- return [
42
- `justify-${this.align}`,
43
- `q-col-gutter-${this.defaultGutter}`,
44
- (this.$qas.screen.isSmall || this.useFullWidth) ? 'column reverse' : 'row'
45
- ]
46
- },
18
+ import { computed, useSlots } from 'vue'
47
19
 
48
- defaultGutter () {
49
- return this.gutter || this.$qas.screen.isSmall ? 'md' : 'lg'
50
- },
20
+ defineOptions({ name: 'QasActions' })
51
21
 
52
- columnClasses () {
53
- if (this.useEqualWidth) return 'col-12 col-sm-6'
22
+ const props = defineProps({
23
+ align: {
24
+ default: FlexAlign.End,
25
+ type: String,
26
+ validator: value => Object.values(FlexAlign).includes(value)
27
+ },
54
28
 
55
- return this.useFullWidth ? 'col-12' : 'col-12 col-sm-auto'
56
- },
29
+ gutter: {
30
+ default: '',
31
+ type: String,
32
+ validator: value => !value || Object.values(Spacing).includes(value)
33
+ },
57
34
 
58
- hasPrimarySlot () {
59
- return !!this.$slots.primary
60
- },
35
+ useFullWidth: {
36
+ type: Boolean
37
+ },
61
38
 
62
- hasSecondarySlot () {
63
- return !!this.$slots.secondary
64
- }
39
+ useEqualWidth: {
40
+ type: Boolean
65
41
  }
66
- }
42
+ })
43
+
44
+ const slots = useSlots()
45
+ const screen = useScreen()
46
+
47
+ const defaultGutter = computed(() => {
48
+ return props.gutter || (screen.isSmall ? 'md' : 'lg')
49
+ })
50
+
51
+ const classes = computed(() => {
52
+ const isSmallOrFullWidth = screen.isSmall || props.useFullWidth
53
+
54
+ return [
55
+ // alinhamento
56
+ `justify-${props.align}`,
57
+
58
+ // espaçamento
59
+ `q-col-gutter-${defaultGutter.value}`,
60
+
61
+ // disposição
62
+ isSmallOrFullWidth ? 'column reverse' : 'row'
63
+ ]
64
+ })
65
+
66
+ const columnClasses = computed(() => {
67
+ if (props.useEqualWidth) return 'col-12 col-sm-6'
68
+
69
+ return props.useFullWidth ? 'col-12' : 'col-12 col-sm-auto'
70
+ })
71
+
72
+ const hasPrimarySlot = computed(() => !!slots.primary)
73
+ const hasSecondarySlot = computed(() => !!slots.secondary)
67
74
  </script>
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div v-if="hasActions" class="qas-actions-menu">
2
+ <div v-if="hasActions" class="qas-actions-menu" data-cy="actions-menu">
3
3
  <component :is="component.is" v-bind="component.props" variant="tertiary" @click.stop.prevent>
4
- <q-list v-if="isBtnDropdown">
4
+ <q-list v-if="isBtnDropdown" data-cy="actions-menu-list">
5
5
  <slot v-for="(item, key) in actions" :item="item" :name="key">
6
- <q-item v-bind="item.props" :key="key" clickable @click="onClick(item)">
6
+ <q-item v-bind="item.props" :key="key" clickable data-cy="actions-menu-list-item" @click="onClick(item)">
7
7
  <q-item-section avatar>
8
8
  <q-icon :name="item.icon" />
9
9
  </q-item-section>
@@ -22,193 +22,191 @@
22
22
  </div>
23
23
  </template>
24
24
 
25
- <script>
25
+ <script setup>
26
26
  import QasBtn from '../btn/QasBtn.vue'
27
27
  import QasBtnDropdown from '../btn-dropdown/QasBtnDropdown.vue'
28
28
 
29
- export default {
30
- name: 'QasActionsMenu',
29
+ import useScreen from '../../composables/use-screen'
31
30
 
32
- components: {
33
- QasBtn,
34
- QasBtnDropdown
35
- },
31
+ import { computed, inject } from 'vue'
36
32
 
37
- props: {
38
- buttonProps: {
39
- default: () => ({}),
40
- type: Object
41
- },
33
+ defineOptions({ name: 'QasActionsMenu' })
42
34
 
43
- deleteLabel: {
44
- type: String,
45
- default: 'Excluir'
46
- },
35
+ const qas = inject('qas')
47
36
 
48
- deleteIcon: {
49
- type: String,
50
- default: 'sym_r_delete'
51
- },
37
+ const props = defineProps({
38
+ buttonProps: {
39
+ default: () => ({}),
40
+ type: Object
41
+ },
52
42
 
53
- deleteProps: {
54
- default: () => ({}),
55
- type: Object
56
- },
43
+ deleteLabel: {
44
+ default: 'Excluir',
45
+ type: String
46
+ },
57
47
 
58
- dropdownIcon: {
59
- default: 'sym_r_more_vert',
60
- type: String
61
- },
48
+ deleteIcon: {
49
+ default: 'sym_r_delete',
50
+ type: String
51
+ },
62
52
 
63
- list: {
64
- default: () => ({}),
65
- type: Object
66
- },
53
+ deleteProps: {
54
+ default: () => ({}),
55
+ type: Object
56
+ },
67
57
 
68
- splitName: {
69
- type: String,
70
- default: ''
71
- },
58
+ dropdownIcon: {
59
+ default: 'sym_r_more_vert',
60
+ type: String
61
+ },
72
62
 
73
- useLabel: {
74
- default: true,
75
- type: Boolean
76
- },
63
+ list: {
64
+ default: () => ({}),
65
+ type: Object
66
+ },
77
67
 
78
- useTooltip: {
79
- type: Boolean
80
- }
68
+ splitName: {
69
+ default: '',
70
+ type: String
81
71
  },
82
72
 
83
- computed: {
84
- actions () {
85
- const list = { ...this.fullList }
73
+ useLabel: {
74
+ default: true,
75
+ type: Boolean
76
+ },
86
77
 
87
- if (this.hasSplit && list[this.splitName] && this.isBtnDropdown) {
88
- this.isSmall
89
- ? Object.assign(list, { [this.splitName]: list[this.splitName] })
90
- : delete list[this.splitName]
91
- }
78
+ useTooltip: {
79
+ type: Boolean
80
+ }
81
+ })
92
82
 
93
- return list
94
- },
83
+ const screen = useScreen()
84
+ const { deleteBtnProps, hasDelete } = useDelete()
95
85
 
96
- fullList () {
97
- return {
98
- ...this.list,
99
- ...(this.hasDelete && {
100
- delete: {
101
- color: 'grey-9',
102
- icon: this.deleteIcon,
103
- label: this.deleteLabel,
104
- handler: () => this.$qas.delete(this.deleteProps)
105
- }
106
- })
107
- }
108
- },
86
+ const fullList = computed(() => {
87
+ return {
88
+ ...props.list,
89
+ ...deleteBtnProps
90
+ }
91
+ })
109
92
 
110
- component () {
111
- const is = this.isBtnDropdown ? 'qas-btn-dropdown' : 'qas-btn'
93
+ const hasSplit = computed(() => !!props.splitName)
112
94
 
113
- return {
114
- is,
115
- props: {
116
- ...(this.isBtnDropdown ? this.btnDropdownProps : this.btnProps),
117
- ...(this.hasDelete && this.deleteProps)
118
- }
119
- }
120
- },
95
+ // --------------------------------- actions -----------------------------------
96
+ const actions = computed(() => {
97
+ const list = { ...fullList.value }
121
98
 
122
- firstItemKey () {
123
- return Object.keys(this.actions)?.[0]
124
- },
99
+ if (hasSplit.value && list[props.splitName] && isBtnDropdown.value) {
100
+ screen.isSmall
101
+ ? Object.assign(list, { [props.splitName]: list[props.splitName] })
102
+ : delete list[props.splitName]
103
+ }
125
104
 
126
- hasActions () {
127
- return !!Object.keys(this.actions).length
128
- },
105
+ return list
106
+ })
129
107
 
130
- hasDelete () {
131
- return !!Object.keys(this.deleteProps).length
132
- },
108
+ const hasActions = computed(() => !!Object.keys(actions.value).length)
109
+ const firstItemKey = computed(() => Object.keys(actions.value)?.[0])
133
110
 
134
- hasSplit () {
135
- return !!this.splitName
136
- },
111
+ // -------------------------------- tooltip ------------------------------------
112
+ const tooltipLabel = computed(() => actions.value[firstItemKey.value]?.label)
113
+ const hasTooltip = computed(() => {
114
+ return !isBtnDropdown.value && !props.useLabel && props.useTooltip
115
+ })
137
116
 
138
- isBtnDropdown () {
139
- return Object.keys(this.fullList || {}).length > 1
140
- },
117
+ // --------------------------------- button ------------------------------------
118
+ const defaultButtonProps = computed(() => {
119
+ const { label, variant, ...buttonProps } = props.buttonProps
141
120
 
142
- hasTooltip () {
143
- return !this.isBtnDropdown && !this.useLabel && this.useTooltip
144
- },
121
+ return {
122
+ useHoverOnWhiteColor: true,
123
+ useLabelOnSmallScreen: false,
124
+ ...buttonProps
125
+ }
126
+ })
145
127
 
146
- tooltipLabel () {
147
- return this.actions[this.firstItemKey]?.label
148
- },
128
+ const btnDropdownProps = computed(() => {
129
+ const { icon, label } = fullList.value[props.splitName] || {}
149
130
 
150
- defaultButtonProps () {
151
- const { label, variant, ...buttonProps } = this.buttonProps
131
+ const {
132
+ icon: defaultIcon,
133
+ ...defaultBtnProps
134
+ } = defaultButtonProps.value
152
135
 
153
- return {
154
- useHoverOnWhiteColor: true,
155
- useLabelOnSmallScreen: false,
156
- ...buttonProps
157
- }
136
+ return {
137
+ buttonProps: {
138
+ ...(props.useLabel && { label: hasSplit.value ? label : 'Opções' }),
139
+ ...defaultBtnProps,
140
+ icon: icon || defaultIcon
158
141
  },
159
142
 
160
- btnDropdownProps () {
161
- const { icon, label } = this.fullList[this.splitName] || {}
143
+ dropdownIcon: props.dropdownIcon,
144
+ useSplit: hasSplit.value,
162
145
 
163
- const {
164
- icon: defaultIcon,
165
- ...defaultButtonProps
166
- } = this.defaultButtonProps
146
+ onClick: () => onClick(fullList.value[props.splitName])
147
+ }
148
+ })
149
+
150
+ const btnProps = computed(() => {
151
+ const { color, icon } = actions.value[firstItemKey.value] || {}
152
+ const { color: defaultColor, ...defaultBtnProps } = defaultButtonProps.value
153
+
154
+ return {
155
+ color: color || defaultColor,
156
+ icon,
157
+ label: props.useLabel ? tooltipLabel.value : '',
158
+ onClick,
159
+ ...defaultBtnProps
160
+ }
161
+ })
167
162
 
168
- return {
169
- buttonProps: {
170
- ...(this.useLabel && { label: this.hasSplit ? label : 'Opções' }),
171
- ...defaultButtonProps,
172
- icon: icon || defaultIcon
173
- },
163
+ const isBtnDropdown = computed(() => Object.keys(fullList.value || {}).length > 1)
174
164
 
175
- dropdownIcon: this.dropdownIcon,
176
- useSplit: this.hasSplit,
165
+ // -------------------------------- component ----------------------------------
166
+ const component = computed(() => {
167
+ const is = isBtnDropdown.value ? QasBtnDropdown : QasBtn
177
168
 
178
- // evento
179
- onClick: () => this.onClick(this.fullList[this.splitName])
180
- }
181
- },
169
+ return {
170
+ is,
171
+ props: {
172
+ ...(isBtnDropdown.value ? btnDropdownProps.value : btnProps.value),
173
+ ...(hasDelete.value && props.deleteProps)
174
+ }
175
+ }
176
+ })
182
177
 
183
- btnProps () {
184
- const { color, icon } = this.actions[this.firstItemKey] || {}
185
- const { color: defaultColor, ...defaultButtonProps } = this.defaultButtonProps
178
+ // --------------------------------- methods -----------------------------------
179
+ function onClick (item = {}) {
180
+ if (!isBtnDropdown.value) {
181
+ item = actions.value[firstItemKey.value]
182
+ }
186
183
 
187
- return {
188
- color: color || defaultColor,
189
- icon,
190
- label: this.useLabel ? this.tooltipLabel : '',
191
- onClick: this.onClick,
192
- ...defaultButtonProps
193
- }
194
- },
184
+ if (typeof item.handler === 'function') {
185
+ const { handler, ...filtered } = item
186
+ item.handler(filtered)
187
+ }
188
+ }
195
189
 
196
- isSmall () {
197
- return this.$qas.screen.isSmall
198
- }
199
- },
190
+ // ------------------------------- composables ---------------------------------
191
+ function useDelete () {
192
+ const deleteBtnProps = {}
200
193
 
201
- methods: {
202
- onClick (item = {}) {
203
- if (!this.isBtnDropdown) {
204
- item = this.actions[this.firstItemKey]
205
- }
194
+ const hasDelete = computed(() => !!Object.keys(props.deleteProps).length)
206
195
 
207
- if (typeof item.handler === 'function') {
208
- const { handler, ...filtered } = item
209
- item.handler(filtered)
196
+ if (hasDelete.value) {
197
+ Object.assign(deleteBtnProps, {
198
+ delete: {
199
+ color: 'grey-10',
200
+ icon: props.deleteIcon,
201
+ label: props.deleteLabel,
202
+ handler: () => qas.delete(props.deleteProps)
210
203
  }
211
- }
204
+ })
205
+ }
206
+
207
+ return {
208
+ deleteBtnProps,
209
+ hasDelete
212
210
  }
213
211
  }
214
212
  </script>
@@ -70,3 +70,16 @@ slots:
70
70
  }
71
71
  "
72
72
  ]
73
+
74
+ selectors:
75
+ 'actions-menu':
76
+ desc: Seletor do componente.
77
+ examples: ['data-cy="actions-menu"']
78
+
79
+ 'actions-menu-list':
80
+ desc: Seletor da lista de ações.
81
+ examples: ['data-cy="actions-menu-list"']
82
+
83
+ 'actions-menu-list-item':
84
+ desc: Seletor para cada item da lista de ações.
85
+ examples: ['data-cy="actions-menu-list-item"']
@@ -1,12 +1,14 @@
1
1
  <template>
2
2
  <q-header class="qas-app-bar shadow-2" height-hint="56">
3
- <q-toolbar class="bg-white qas-app-bar__toolbar text-grey-9">
4
- <qas-btn color="grey-9" icon="sym_r_menu" variant="tertiary" @click="toggleMenuDrawer" />
3
+ <q-toolbar class="bg-white qas-app-bar__toolbar text-grey-10">
4
+ <qas-btn color="grey-10" icon="sym_r_menu" variant="tertiary" @click="toggleMenuDrawer" />
5
5
 
6
6
  <q-toolbar-title>
7
7
  <router-link class="flex items-center no-wrap text-no-decoration" :class="routerLinkClass" :to="rootRoute">
8
8
  <img v-if="brand" :alt="title" class="qas-app-bar__brand" :src="brand">
9
+
9
10
  <span v-else class="ellipsis text-bold text-primary">{{ title }}</span>
11
+
10
12
  <q-badge v-if="hasDevelopmentBadge" class="q-ml-sm" color="red" :label="developmentBadgeLabel" />
11
13
  </router-link>
12
14
  </q-toolbar-title>
@@ -18,114 +20,84 @@
18
20
  </q-header>
19
21
  </template>
20
22
 
21
- <script>
23
+ <script setup>
22
24
  import QasAppUser from '../app-user/QasAppUser.vue'
23
25
  import QasBtn from '../btn/QasBtn.vue'
24
26
 
25
- export default {
26
- name: 'QasAppBar',
27
+ import { useScreen } from '../../composables'
27
28
 
28
- components: {
29
- QasAppUser,
30
- QasBtn
31
- },
29
+ import { computed } from 'vue'
30
+ import { useRouter } from 'vue-router'
32
31
 
33
- props: {
34
- appUserProps: {
35
- type: Object,
36
- required: true,
37
- default: () => ({})
38
- },
32
+ defineOptions({ name: 'QasAppBar' })
39
33
 
40
- brand: {
41
- default: '',
42
- type: String
43
- },
34
+ const props = defineProps({
35
+ appUserProps: {
36
+ type: Object,
37
+ required: true,
38
+ default: () => ({})
39
+ },
44
40
 
45
- notifications: {
46
- default: () => ({}),
47
- type: Object
48
- },
41
+ brand: {
42
+ default: '',
43
+ type: String
44
+ },
49
45
 
50
- title: {
51
- required: true,
52
- type: String
53
- }
46
+ notifications: {
47
+ default: () => ({}),
48
+ type: Object
54
49
  },
55
50
 
56
- emits: ['sign-out', 'toggle-menu'],
51
+ title: {
52
+ required: true,
53
+ type: String
54
+ }
55
+ })
57
56
 
58
- data () {
59
- return {
60
- menuDrawer: true
61
- }
62
- },
57
+ const emits = defineEmits(['sign-out', 'toggle-menu'])
63
58
 
64
- computed: {
65
- appUserMenuProps () {
66
- return {
67
- anchor: 'bottom end',
68
- offset: [0, 5],
69
- self: 'top end'
70
- }
71
- },
59
+ const router = useRouter()
60
+ const screen = useScreen()
72
61
 
73
- defaultAppUserProps () {
74
- return {
75
- menuProps: {
76
- anchor: 'bottom end',
77
- offset: [0, 5],
78
- self: 'top end'
79
- },
80
-
81
- onSignOut: this.signOut,
82
- ...this.appUserProps
83
- }
62
+ const defaultAppUserProps = computed(() => {
63
+ return {
64
+ menuProps: {
65
+ anchor: 'bottom end',
66
+ offset: [0, 5],
67
+ self: 'top end'
84
68
  },
85
69
 
86
- developmentBadgeLabel () {
87
- const hosts = {
88
- localhost: 'Local',
89
- '.dev.': 'Develop'
90
- }
70
+ onSignOut: signOut,
71
+ ...props.appUserProps
72
+ }
73
+ })
91
74
 
92
- if (process.env.DEV) {
93
- return hosts.localhost
94
- }
75
+ const rootRoute = router.hasRoute('Root') ? { name: 'Root' } : { path: '/' }
95
76
 
96
- const current = Object.keys(hosts).find(
97
- host => location.hostname.includes(host)
98
- )
77
+ const developmentBadgeLabel = computed(() => {
78
+ const hosts = {
79
+ localhost: 'Local',
80
+ '.dev.': 'Develop'
81
+ }
99
82
 
100
- return current ? hosts[current] : ''
101
- },
83
+ if (process.env.DEV) return hosts.localhost
102
84
 
103
- hasDevelopmentBadge () {
104
- return !!this.developmentBadgeLabel
105
- },
85
+ const current = Object.keys(hosts).find(host => location.hostname.includes(host))
106
86
 
107
- hasUser () {
108
- return !!Object.keys(this.defaultAppUserProps.user || {}).length
109
- },
87
+ return current ? hosts[current] : ''
88
+ })
110
89
 
111
- rootRoute () {
112
- return this.$router.hasRoute('Root') ? { name: 'Root' } : { path: '/' }
113
- },
90
+ const hasDevelopmentBadge = computed(() => !!developmentBadgeLabel.value)
91
+ const hasUser = computed(() => !!Object.keys(defaultAppUserProps.value.user || {}).length)
114
92
 
115
- routerLinkClass () {
116
- return this.$qas.screen.isSmall && 'justify-center'
117
- }
118
- },
93
+ const routerLinkClass = computed(() => screen.isSmall && 'justify-center')
119
94
 
120
- methods: {
121
- signOut () {
122
- this.$emit('sign-out')
123
- },
95
+ function signOut () {
96
+ emits('sign-out')
97
+ }
124
98
 
125
- toggleMenuDrawer () {
126
- this.$emit('toggle-menu')
127
- }
128
- }
99
+ function toggleMenuDrawer () {
100
+ emits('toggle-menu')
129
101
  }
130
102
  </script>
131
103
 
@@ -136,7 +108,7 @@ export default {
136
108
  }
137
109
 
138
110
  &__brand {
139
- max-width: 164px;
111
+ max-width: 115px;
140
112
  }
141
113
  }
142
114
  </style>