@bildvitta/quasar-ui-asteroid 3.13.0-beta.8 → 3.13.0-beta.9
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 +1 -1
- package/src/components/actions/QasActions.vue +54 -47
- package/src/components/actions-menu/QasActionsMenu.vue +144 -147
- package/src/components/app-bar/QasAppBar.vue +56 -84
- package/src/components/app-menu/QasAppMenu.vue +127 -245
- package/src/components/app-menu/composables/use-app-menu-dropdown.js +71 -0
- package/src/components/app-menu/composables/use-app-user.js +46 -0
- package/src/components/app-menu/composables/use-development-badge.js +23 -0
- package/src/components/app-menu/private/PvAppMenuDropdown.vue +33 -39
- package/src/components/app-user/QasAppUser.vue +92 -90
- package/src/components/avatar/QasAvatar.vue +67 -85
- package/src/components/avatar/enums/AvatarColors.js +9 -0
- package/src/components/badge/QasBadge.vue +21 -22
- package/src/components/box/QasBox.vue +17 -19
- package/src/components/btn/QasBtn.vue +132 -135
- package/src/components/dialog/QasDialog.vue +131 -242
- package/src/components/dialog/composables/use-cancel.js +40 -0
- package/src/components/dialog/composables/use-dynamic-components.js +86 -0
- package/src/components/dialog/composables/use-ok.js +45 -0
- package/src/components/form-generator/QasFormGenerator.yml +1 -1
- package/src/components/nested-fields/QasNestedFields.vue +31 -8
- package/src/components/nested-fields/QasNestedFields.yml +50 -16
- package/src/enums/Align.js +7 -0
package/package.json
CHANGED
|
@@ -10,58 +10,65 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
-
return this.gutter || this.$qas.screen.isSmall ? 'md' : 'lg'
|
|
50
|
-
},
|
|
20
|
+
defineOptions({ name: 'QasActions' })
|
|
51
21
|
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
|
|
29
|
+
gutter: {
|
|
30
|
+
default: '',
|
|
31
|
+
type: String,
|
|
32
|
+
validator: value => !value || Object.values(Spacing).includes(value)
|
|
33
|
+
},
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
35
|
+
useFullWidth: {
|
|
36
|
+
type: Boolean
|
|
37
|
+
},
|
|
61
38
|
|
|
62
|
-
|
|
63
|
-
|
|
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>
|
|
@@ -22,193 +22,190 @@
|
|
|
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
|
-
|
|
30
|
-
|
|
29
|
+
import Delete from '../../plugins/delete/Delete'
|
|
30
|
+
import useScreen from '../../composables/use-screen'
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
QasBtn,
|
|
34
|
-
QasBtnDropdown
|
|
35
|
-
},
|
|
32
|
+
import { computed } from 'vue'
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
buttonProps: {
|
|
39
|
-
default: () => ({}),
|
|
40
|
-
type: Object
|
|
41
|
-
},
|
|
34
|
+
defineOptions({ name: 'QasActionsMenu' })
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
deleteIcon: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: 'sym_r_delete'
|
|
51
|
-
},
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
buttonProps: {
|
|
38
|
+
default: () => ({}),
|
|
39
|
+
type: Object
|
|
40
|
+
},
|
|
52
41
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
deleteLabel: {
|
|
43
|
+
default: 'Excluir',
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
47
|
+
deleteIcon: {
|
|
48
|
+
default: 'sym_r_delete',
|
|
49
|
+
type: String
|
|
50
|
+
},
|
|
62
51
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
deleteProps: {
|
|
53
|
+
default: () => ({}),
|
|
54
|
+
type: Object
|
|
55
|
+
},
|
|
67
56
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
dropdownIcon: {
|
|
58
|
+
default: 'sym_r_more_vert',
|
|
59
|
+
type: String
|
|
60
|
+
},
|
|
72
61
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
list: {
|
|
63
|
+
default: () => ({}),
|
|
64
|
+
type: Object
|
|
65
|
+
},
|
|
77
66
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
splitName: {
|
|
68
|
+
default: '',
|
|
69
|
+
type: String
|
|
81
70
|
},
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
72
|
+
useLabel: {
|
|
73
|
+
default: true,
|
|
74
|
+
type: Boolean
|
|
75
|
+
},
|
|
86
76
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
77
|
+
useTooltip: {
|
|
78
|
+
type: Boolean
|
|
79
|
+
}
|
|
80
|
+
})
|
|
92
81
|
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
const screen = useScreen()
|
|
83
|
+
const { deleteBtnProps, hasDelete } = useDelete()
|
|
95
84
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
icon: this.deleteIcon,
|
|
103
|
-
label: this.deleteLabel,
|
|
104
|
-
handler: () => this.$qas.delete(this.deleteProps)
|
|
105
|
-
}
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
},
|
|
85
|
+
const fullList = computed(() => {
|
|
86
|
+
return {
|
|
87
|
+
...props.list,
|
|
88
|
+
...deleteBtnProps
|
|
89
|
+
}
|
|
90
|
+
})
|
|
109
91
|
|
|
110
|
-
|
|
111
|
-
const is = this.isBtnDropdown ? 'qas-btn-dropdown' : 'qas-btn'
|
|
92
|
+
const hasSplit = computed(() => !!props.splitName)
|
|
112
93
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
...(this.isBtnDropdown ? this.btnDropdownProps : this.btnProps),
|
|
117
|
-
...(this.hasDelete && this.deleteProps)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
94
|
+
// --------------------------------- actions -----------------------------------
|
|
95
|
+
const actions = computed(() => {
|
|
96
|
+
const list = { ...fullList.value }
|
|
121
97
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
98
|
+
if (hasSplit.value && list[props.splitName] && isBtnDropdown.value) {
|
|
99
|
+
screen.isSmall
|
|
100
|
+
? Object.assign(list, { [props.splitName]: list[props.splitName] })
|
|
101
|
+
: delete list[props.splitName]
|
|
102
|
+
}
|
|
125
103
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
},
|
|
104
|
+
return list
|
|
105
|
+
})
|
|
129
106
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
107
|
+
const hasActions = computed(() => !!Object.keys(actions.value).length)
|
|
108
|
+
const firstItemKey = computed(() => Object.keys(actions.value)?.[0])
|
|
133
109
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
110
|
+
// -------------------------------- tooltip ------------------------------------
|
|
111
|
+
const tooltipLabel = computed(() => actions.value[firstItemKey.value]?.label)
|
|
112
|
+
const hasTooltip = computed(() => {
|
|
113
|
+
return !isBtnDropdown.value && !props.useLabel && props.useTooltip
|
|
114
|
+
})
|
|
137
115
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
116
|
+
// --------------------------------- button ------------------------------------
|
|
117
|
+
const defaultButtonProps = computed(() => {
|
|
118
|
+
const { label, variant, ...buttonProps } = props.buttonProps
|
|
141
119
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
120
|
+
return {
|
|
121
|
+
useHoverOnWhiteColor: true,
|
|
122
|
+
useLabelOnSmallScreen: false,
|
|
123
|
+
...buttonProps
|
|
124
|
+
}
|
|
125
|
+
})
|
|
145
126
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
127
|
+
const btnDropdownProps = computed(() => {
|
|
128
|
+
const { icon, label } = fullList.value[props.splitName] || {}
|
|
149
129
|
|
|
150
|
-
|
|
151
|
-
|
|
130
|
+
const {
|
|
131
|
+
icon: defaultIcon,
|
|
132
|
+
...defaultBtnProps
|
|
133
|
+
} = defaultButtonProps.value
|
|
152
134
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
135
|
+
return {
|
|
136
|
+
buttonProps: {
|
|
137
|
+
...(props.useLabel && { label: hasSplit.value ? label : 'Opções' }),
|
|
138
|
+
...defaultBtnProps,
|
|
139
|
+
icon: icon || defaultIcon
|
|
158
140
|
},
|
|
159
141
|
|
|
160
|
-
|
|
161
|
-
|
|
142
|
+
dropdownIcon: props.dropdownIcon,
|
|
143
|
+
useSplit: hasSplit.value,
|
|
162
144
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
145
|
+
onClick: () => onClick(fullList.value[props.splitName])
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
const btnProps = computed(() => {
|
|
150
|
+
const { color, icon } = actions.value[firstItemKey.value] || {}
|
|
151
|
+
const { color: defaultColor, ...defaultBtnProps } = defaultButtonProps.value
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
color: color || defaultColor,
|
|
155
|
+
icon,
|
|
156
|
+
label: props.useLabel ? tooltipLabel.value : '',
|
|
157
|
+
onClick,
|
|
158
|
+
...defaultBtnProps
|
|
159
|
+
}
|
|
160
|
+
})
|
|
167
161
|
|
|
168
|
-
|
|
169
|
-
buttonProps: {
|
|
170
|
-
...(this.useLabel && { label: this.hasSplit ? label : 'Opções' }),
|
|
171
|
-
...defaultButtonProps,
|
|
172
|
-
icon: icon || defaultIcon
|
|
173
|
-
},
|
|
162
|
+
const isBtnDropdown = computed(() => Object.keys(fullList.value || {}).length > 1)
|
|
174
163
|
|
|
175
|
-
|
|
176
|
-
|
|
164
|
+
// -------------------------------- component ----------------------------------
|
|
165
|
+
const component = computed(() => {
|
|
166
|
+
const is = isBtnDropdown.value ? QasBtnDropdown : QasBtn
|
|
177
167
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
168
|
+
return {
|
|
169
|
+
is,
|
|
170
|
+
props: {
|
|
171
|
+
...(isBtnDropdown.value ? btnDropdownProps.value : btnProps.value),
|
|
172
|
+
...(hasDelete.value && props.deleteProps)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
})
|
|
182
176
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
// --------------------------------- methods -----------------------------------
|
|
178
|
+
function onClick (item = {}) {
|
|
179
|
+
if (!isBtnDropdown.value) {
|
|
180
|
+
item = actions.value[firstItemKey.value]
|
|
181
|
+
}
|
|
186
182
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
...defaultButtonProps
|
|
193
|
-
}
|
|
194
|
-
},
|
|
183
|
+
if (typeof item.handler === 'function') {
|
|
184
|
+
const { handler, ...filtered } = item
|
|
185
|
+
item.handler(filtered)
|
|
186
|
+
}
|
|
187
|
+
}
|
|
195
188
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
},
|
|
189
|
+
// ------------------------------- composables ---------------------------------
|
|
190
|
+
function useDelete () {
|
|
191
|
+
const deleteBtnProps = {}
|
|
200
192
|
|
|
201
|
-
|
|
202
|
-
onClick (item = {}) {
|
|
203
|
-
if (!this.isBtnDropdown) {
|
|
204
|
-
item = this.actions[this.firstItemKey]
|
|
205
|
-
}
|
|
193
|
+
const hasDelete = computed(() => !!Object.keys(props.deleteProps).length)
|
|
206
194
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
195
|
+
if (hasDelete.value) {
|
|
196
|
+
Object.assign(deleteBtnProps, {
|
|
197
|
+
delete: {
|
|
198
|
+
color: 'grey-9',
|
|
199
|
+
icon: props.deleteIcon,
|
|
200
|
+
label: props.deleteLabel,
|
|
201
|
+
handler: () => Delete(props.deleteProps)
|
|
210
202
|
}
|
|
211
|
-
}
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
deleteBtnProps,
|
|
208
|
+
hasDelete
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
</script>
|
|
@@ -6,7 +6,9 @@
|
|
|
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
|
-
|
|
26
|
-
name: 'QasAppBar',
|
|
27
|
+
import { useScreen } from '../../composables'
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
QasBtn
|
|
31
|
-
},
|
|
29
|
+
import { computed } from 'vue'
|
|
30
|
+
import { useRouter } from 'vue-router'
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
appUserProps: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: true,
|
|
37
|
-
default: () => ({})
|
|
38
|
-
},
|
|
32
|
+
defineOptions({ name: 'QasAppBar' })
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
appUserProps: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: true,
|
|
38
|
+
default: () => ({})
|
|
39
|
+
},
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
brand: {
|
|
42
|
+
default: '',
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
46
|
+
notifications: {
|
|
47
|
+
default: () => ({}),
|
|
48
|
+
type: Object
|
|
54
49
|
},
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
title: {
|
|
52
|
+
required: true,
|
|
53
|
+
type: String
|
|
54
|
+
}
|
|
55
|
+
})
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
menuDrawer: true
|
|
61
|
-
}
|
|
62
|
-
},
|
|
57
|
+
const emits = defineEmits(['sign-out', 'toggle-menu'])
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
70
|
+
onSignOut: signOut,
|
|
71
|
+
...props.appUserProps
|
|
72
|
+
}
|
|
73
|
+
})
|
|
91
74
|
|
|
92
|
-
|
|
93
|
-
return hosts.localhost
|
|
94
|
-
}
|
|
75
|
+
const rootRoute = router.hasRoute('Root') ? { name: 'Root' } : { path: '/' }
|
|
95
76
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
77
|
+
const developmentBadgeLabel = computed(() => {
|
|
78
|
+
const hosts = {
|
|
79
|
+
localhost: 'Local',
|
|
80
|
+
'.dev.': 'Develop'
|
|
81
|
+
}
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
},
|
|
83
|
+
if (process.env.DEV) return hosts.localhost
|
|
102
84
|
|
|
103
|
-
|
|
104
|
-
return !!this.developmentBadgeLabel
|
|
105
|
-
},
|
|
85
|
+
const current = Object.keys(hosts).find(host => location.hostname.includes(host))
|
|
106
86
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
87
|
+
return current ? hosts[current] : ''
|
|
88
|
+
})
|
|
110
89
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
90
|
+
const hasDevelopmentBadge = computed(() => !!developmentBadgeLabel.value)
|
|
91
|
+
const hasUser = computed(() => !!Object.keys(defaultAppUserProps.value.user || {}).length)
|
|
114
92
|
|
|
115
|
-
|
|
116
|
-
return this.$qas.screen.isSmall && 'justify-center'
|
|
117
|
-
}
|
|
118
|
-
},
|
|
93
|
+
const routerLinkClass = computed(() => screen.isSmall && 'justify-center')
|
|
119
94
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
},
|
|
95
|
+
function signOut () {
|
|
96
|
+
emits('sign-out')
|
|
97
|
+
}
|
|
124
98
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
}
|
|
99
|
+
function toggleMenuDrawer () {
|
|
100
|
+
emits('toggle-menu')
|
|
129
101
|
}
|
|
130
102
|
</script>
|
|
131
103
|
|