67 lines
1.2 KiB
Vue
67 lines
1.2 KiB
Vue
<template>
|
|
<div
|
|
id="app"
|
|
class="woot-widget-wrap"
|
|
:class="{
|
|
'is-mobile': isMobile,
|
|
'is-widget-right': !isLeftAligned,
|
|
'is-bubble-hidden': hideMessageBubble,
|
|
}"
|
|
>
|
|
<home
|
|
v-if="!showUnreadView"
|
|
:has-fetched="hasFetched"
|
|
:unread-message-count="unreadMessageCount"
|
|
:show-popout-button="showPopoutButton"
|
|
/>
|
|
<unread
|
|
v-else
|
|
:has-fetched="hasFetched"
|
|
:unread-message-count="unreadMessageCount"
|
|
:hide-message-bubble="hideMessageBubble"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Home from './Home';
|
|
import Unread from './Unread';
|
|
|
|
export default {
|
|
name: 'Router',
|
|
components: {
|
|
Home,
|
|
Unread,
|
|
},
|
|
props: {
|
|
hasFetched: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
isMobile: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
isLeftAligned: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
showUnreadView: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
hideMessageBubble: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
unreadMessageCount: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
showPopoutButton: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
},
|
|
};
|
|
</script>
|