2019-10-29 07:20:54 +00:00
|
|
|
<template>
|
2020-01-13 06:40:40 +00:00
|
|
|
<header class="header-expanded">
|
2020-04-20 06:25:06 +00:00
|
|
|
<img v-if="avatarUrl" class="logo" :src="avatarUrl" />
|
2020-03-07 18:09:41 +00:00
|
|
|
<span class="close close-button" @click="closeWindow"></span>
|
|
|
|
<h2 class="title">
|
|
|
|
{{ introHeading }}
|
|
|
|
</h2>
|
|
|
|
<p class="body">
|
|
|
|
{{ introBody }}
|
|
|
|
</p>
|
2019-10-29 07:20:54 +00:00
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-25 18:40:27 +00:00
|
|
|
import { mapGetters } from 'vuex';
|
2020-03-07 18:09:41 +00:00
|
|
|
import { IFrameHelper } from 'widget/helpers/utils';
|
2019-11-25 18:40:27 +00:00
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
export default {
|
|
|
|
name: 'ChatHeaderExpanded',
|
|
|
|
props: {
|
2020-04-20 06:25:06 +00:00
|
|
|
avatarUrl: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
introHeading: {
|
|
|
|
type: String,
|
2020-04-20 06:25:06 +00:00
|
|
|
default: '',
|
2019-10-29 07:20:54 +00:00
|
|
|
},
|
|
|
|
introBody: {
|
|
|
|
type: String,
|
2020-04-20 06:25:06 +00:00
|
|
|
default: '',
|
2019-10-29 07:20:54 +00:00
|
|
|
},
|
|
|
|
},
|
2020-04-19 18:10:28 +00:00
|
|
|
computed: {
|
|
|
|
...mapGetters({
|
|
|
|
widgetColor: 'appConfig/getWidgetColor',
|
|
|
|
}),
|
|
|
|
},
|
2020-03-07 18:09:41 +00:00
|
|
|
methods: {
|
|
|
|
closeWindow() {
|
|
|
|
if (IFrameHelper.isIFrame()) {
|
|
|
|
IFrameHelper.sendMessage({
|
|
|
|
event: 'toggleBubble',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
2020-01-17 08:06:05 +00:00
|
|
|
@import '~widget/assets/scss/mixins.scss';
|
2019-10-29 07:20:54 +00:00
|
|
|
|
|
|
|
.header-expanded {
|
2020-04-20 06:25:06 +00:00
|
|
|
padding: $space-large $space-medium $space-large;
|
2019-10-29 07:20:54 +00:00
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
2020-03-07 18:09:41 +00:00
|
|
|
position: relative;
|
2020-01-13 06:40:40 +00:00
|
|
|
|
|
|
|
.logo {
|
2020-04-20 06:25:06 +00:00
|
|
|
width: 56px;
|
|
|
|
height: 56px;
|
2020-01-13 06:40:40 +00:00
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
|
2020-03-07 18:09:41 +00:00
|
|
|
.close {
|
|
|
|
position: absolute;
|
|
|
|
right: $space-medium;
|
|
|
|
top: $space-medium;
|
|
|
|
display: none;
|
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
.title {
|
2020-01-13 06:40:40 +00:00
|
|
|
color: $color-heading;
|
2019-10-29 07:20:54 +00:00
|
|
|
font-size: $font-size-mega;
|
2020-01-13 06:40:40 +00:00
|
|
|
font-weight: $font-weight-normal;
|
|
|
|
margin-bottom: $space-slab;
|
2020-04-20 06:25:06 +00:00
|
|
|
margin-top: $space-medium;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.body {
|
2020-01-13 06:40:40 +00:00
|
|
|
color: $color-body;
|
|
|
|
font-size: 1.8rem;
|
2020-02-05 05:57:22 +00:00
|
|
|
line-height: 1.5;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|