2018-10-12 16:42:54 +02:00
|
|
|
<template>
|
|
|
|
|
<div>
|
2019-01-05 20:11:41 +01:00
|
|
|
|
2018-12-26 21:02:16 +01:00
|
|
|
<q-layout-header>
|
2018-10-12 16:42:54 +02:00
|
|
|
<q-toolbar
|
|
|
|
|
color="primary"
|
|
|
|
|
:glossy="$q.theme === 'mat'"
|
|
|
|
|
:inverted="$q.theme === 'ios'"
|
2018-10-13 19:14:58 +02:00
|
|
|
class="toolbar"
|
2018-10-12 16:42:54 +02:00
|
|
|
>
|
2018-12-25 19:44:39 +01:00
|
|
|
|
2018-10-12 16:42:54 +02:00
|
|
|
<q-btn
|
|
|
|
|
flat
|
|
|
|
|
dense
|
|
|
|
|
round
|
|
|
|
|
@click="leftDrawerOpen = !leftDrawerOpen"
|
|
|
|
|
aria-label="Menu"
|
|
|
|
|
>
|
|
|
|
|
<q-icon name="menu"/>
|
|
|
|
|
</q-btn>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<q-toolbar-title>
|
|
|
|
|
{{$t('msg.myAppName')}}
|
|
|
|
|
<div slot="subtitle">{{$t('msg.myDescriz')}}</div>
|
|
|
|
|
</q-toolbar-title>
|
|
|
|
|
|
2018-12-22 18:42:00 +01:00
|
|
|
<q-select class="sel_lang" v-model="lang" stack-label="" :options="selectOpLang"/>
|
2018-10-12 16:42:54 +02:00
|
|
|
|
2018-12-26 21:02:16 +01:00
|
|
|
<!--
|
|
|
|
|
<message-popover></message-popover>
|
|
|
|
|
-->
|
2018-10-26 22:25:35 +02:00
|
|
|
|
|
|
|
|
<!--
|
2018-10-13 19:14:58 +02:00
|
|
|
<div class="right-itens">
|
2018-10-26 00:30:10 +02:00
|
|
|
<label>{{ $t('msg.hello') }}</label> <span v-model="prova"></span> !
|
2018-10-26 22:25:35 +02:00
|
|
|
</div>-->
|
2018-10-12 16:42:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
</q-toolbar>
|
|
|
|
|
|
|
|
|
|
</q-layout-header>
|
|
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
<q-layout-drawer side="left"
|
|
|
|
|
v-model="leftDrawerOpen"
|
2019-01-05 20:11:41 +01:00
|
|
|
:content-class="['bg-grey-1', 'q-pa-sm']"
|
2018-10-13 19:14:58 +02:00
|
|
|
:content-style="{padding: '0px'}"
|
2018-10-12 16:42:54 +02:00
|
|
|
>
|
2018-10-13 19:14:58 +02:00
|
|
|
<drawer></drawer>
|
|
|
|
|
|
2018-10-12 16:42:54 +02:00
|
|
|
</q-layout-drawer>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2018-12-15 01:30:21 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
import Component from 'vue-class-component'
|
|
|
|
|
|
2018-11-02 20:10:45 +01:00
|
|
|
import drawer from '../layouts/drawer/drawer.vue'
|
2018-12-26 21:02:16 +01:00
|
|
|
import messagePopover from '../layouts/toolbar/messagePopover/messagePopover.vue'
|
2018-10-13 19:14:58 +02:00
|
|
|
|
2019-01-02 18:01:36 +01:00
|
|
|
import { GlobalStore } from '@modules'
|
2019-01-05 20:11:41 +01:00
|
|
|
import { rescodes } from '../store/Modules/rescodes'
|
2019-01-02 18:01:36 +01:00
|
|
|
|
2018-12-15 01:30:21 +01:00
|
|
|
@Component({
|
2018-10-13 19:14:58 +02:00
|
|
|
components: {
|
|
|
|
|
drawer,
|
|
|
|
|
messagePopover,
|
2018-10-12 16:42:54 +02:00
|
|
|
}
|
2018-12-15 01:30:21 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default class Header extends Vue {
|
|
|
|
|
public $v
|
|
|
|
|
public $q
|
|
|
|
|
|
|
|
|
|
public selectOpLang = [
|
|
|
|
|
{ label: 'English (UK)', icon: 'fa-flag-us', value: 'en-uk' },
|
|
|
|
|
{ label: 'German', icon: 'fa-flag-de', value: 'de' },
|
|
|
|
|
{ label: 'Spanish', icon: 'fa-flag-es', value: 'es' },
|
|
|
|
|
{ label: 'Italian', icon: 'fa-facebook', value: 'it' }
|
|
|
|
|
]
|
2019-01-05 20:11:41 +01:00
|
|
|
|
|
|
|
|
get leftDrawerOpen() {
|
2019-01-02 18:01:36 +01:00
|
|
|
return GlobalStore.state.leftDrawerOpen
|
|
|
|
|
}
|
2019-01-05 20:11:41 +01:00
|
|
|
|
|
|
|
|
set leftDrawerOpen(value) {
|
2019-01-02 18:01:36 +01:00
|
|
|
GlobalStore.state.leftDrawerOpen = value
|
2019-01-05 20:11:41 +01:00
|
|
|
localStorage.setItem(rescodes.localStorage.leftDrawerOpen, value.toString())
|
2019-01-02 18:01:36 +01:00
|
|
|
}
|
2018-12-15 01:30:21 +01:00
|
|
|
|
2018-12-22 18:42:00 +01:00
|
|
|
get lang() {
|
|
|
|
|
return this.$q.i18n.lang
|
|
|
|
|
}
|
2018-12-15 01:30:21 +01:00
|
|
|
|
2018-12-22 18:42:00 +01:00
|
|
|
set lang(lang) {
|
|
|
|
|
this.$i18n.locale = this.snakeToCamel(lang)
|
2018-12-15 01:30:21 +01:00
|
|
|
|
|
|
|
|
// dynamic import, so loading on demand only
|
|
|
|
|
import(`quasar-framework/i18n/${lang}`).then(lang => {
|
|
|
|
|
this.$q.i18n.set(lang.default)
|
|
|
|
|
import(`src/i18n`).then(function () {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public snakeToCamel(str) {
|
|
|
|
|
return str.replace(/(-\w)/g, m => {
|
|
|
|
|
return m[1].toUpperCase()
|
|
|
|
|
})
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
}
|
|
|
|
|
|
2018-12-15 01:30:21 +01:00
|
|
|
|
2018-10-12 16:42:54 +02:00
|
|
|
</script>
|
2018-10-13 19:14:58 +02:00
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
<style lang="scss">
|
2018-10-13 19:14:58 +02:00
|
|
|
.layout-padding {
|
|
|
|
|
padding: 1em 4em;
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
.item-content {
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
font-weight: 350;
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
@media screen and (max-width: 600px) {
|
|
|
|
|
.layout-padding {
|
|
|
|
|
padding: 1.5em .5em;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
/*
|
2018-10-13 19:14:58 +02:00
|
|
|
@-webkit-keyframes moveFromLeftFade {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
-webkit-transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes moveFromLeftFade {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
-webkit-transform: translateX(-100%);
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
@-webkit-keyframes moveFromTopFade {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
-webkit-transform: translateY(0%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@keyframes moveFromTopFade {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
-webkit-transform: translateY(0%);
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
@-webkit-keyframes moveToRight {
|
|
|
|
|
from {
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
-webkit-transform: translateX(100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes cartOut {
|
|
|
|
|
from {
|
|
|
|
|
transform: translate(0px, 0px);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
transform: translate(1200px, 0px);
|
|
|
|
|
animation-timing-function: ease-out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@-webkit-keyframes moveToLeft {
|
|
|
|
|
from {
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: .5;
|
|
|
|
|
-webkit-transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes moveToLeft {
|
|
|
|
|
from {
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: .5;
|
|
|
|
|
-webkit-transform: translateX(-100%);
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
@-webkit-keyframes moveToBottom {
|
|
|
|
|
from {
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: .5;
|
|
|
|
|
-webkit-transform: translateY(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes moveToBottom {
|
|
|
|
|
from {
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: .5;
|
|
|
|
|
-webkit-transform: translateY(-100%);
|
|
|
|
|
transform: translateY(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
@-webkit-keyframes moveFromRight {
|
|
|
|
|
from {
|
|
|
|
|
opacity: .7;
|
|
|
|
|
-webkit-transform: translateX(100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes moveFromRight {
|
|
|
|
|
from {
|
|
|
|
|
opacity: .7;
|
|
|
|
|
-webkit-transform: translateX(100%);
|
|
|
|
|
transform: translateX(100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-01-05 20:11:41 +01:00
|
|
|
*/
|
2018-10-13 19:14:58 +02:00
|
|
|
|
|
|
|
|
.drawer-closer .item-content {
|
2019-01-05 20:11:41 +01:00
|
|
|
margin-left: 20px !important;
|
2018-10-13 19:14:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer-content .list-label {
|
2019-01-05 20:11:41 +01:00
|
|
|
line-height: 25px;
|
2018-10-13 19:14:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer-content .item {
|
2019-01-05 20:11:41 +01:00
|
|
|
height: 25px;
|
2018-10-13 19:14:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.router-link-active .item-primary {
|
|
|
|
|
color: #027be3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.q-picker-textfield .q-picker-textfield-label {
|
|
|
|
|
color: inherit !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.label-success .q-picker-textfield-label {
|
|
|
|
|
color: #4caf50 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.label-error .q-picker-textfield-label {
|
|
|
|
|
color: #f44336 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
select {
|
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
-moz-appearance: none;
|
|
|
|
|
text-indent: 1px;
|
|
|
|
|
text-overflow: '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.label-success .q-picker-textfield:after, .label-error .q-picker-textfield:after {
|
|
|
|
|
content: "" !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#android-preview iframe {
|
|
|
|
|
margin-top: 64px;
|
|
|
|
|
width: 357px;
|
|
|
|
|
height: 590px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ios-preview iframe {
|
|
|
|
|
margin-top: 64px;
|
|
|
|
|
width: 320px;
|
|
|
|
|
height: 590px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
canvas {
|
|
|
|
|
width: 270px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media only screen and (min-width: 601px) {
|
|
|
|
|
.adv-form-one .timeline-badge {
|
|
|
|
|
right: auto !important;
|
|
|
|
|
left: auto !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.adv-form-one .timeline-content {
|
|
|
|
|
margin-left: 3.9rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.adv-form-one .timeline-item {
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.adv-form-one .timeline-title {
|
|
|
|
|
text-align: inherit !important;
|
|
|
|
|
margin-left: 3.9rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.timeline:before {
|
|
|
|
|
left: 1.6rem;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.adv-form-one .timeline-content .group .primary {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.underline {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.toolbar {
|
2019-01-05 20:11:41 +01:00
|
|
|
min-height: 30px;
|
2018-10-13 19:14:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right-itens a, .right-itens button {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sel_lang {
|
|
|
|
|
padding: 5px;
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fa-facebook:before {
|
|
|
|
|
content: url('../statics/icons/flag_it.svg');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fa-flag-it:before {
|
|
|
|
|
content: url('../statics/icons/flag_it.svg');
|
|
|
|
|
}
|
2019-01-05 20:11:41 +01:00
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
</style>
|
2019-01-05 20:11:41 +01:00
|
|
|
|