@ -1,7 +1,7 @@
< template >
< csc -page
ref = "page"
class = "csc-list-page "
class = "csc-list-page csc-page-conversations "
>
< q -tabs
inverted
@ -39,42 +39,52 @@
label = "Voicemails"
@ click = "filterByType('voicemail')"
/ >
< q -list
no - border
inset - separator
sparse
multiline
>
< csc -conversation -item
v - for = "(item, index) in items"
: key = "item._id"
: item = "item"
: call - available = "isCallAvailable"
@ init - call = "initCall"
@ download - fax = "downloadFax"
@ download - voice - mail = "downloadVoiceMail"
@ play - voice - mail = "playVoiceMail"
/ >
< / q - l i s t >
< div
v - if = "isNextPageRequesting"
class = "row justify-center"
>
< q -spinner -dots
color = "primary"
: size = "40"
/ >
< / div >
< div
v - if = "!isNextPageRequesting && items.length === 0"
class = "row justify-center"
>
{ { noResultsMessage } }
< / div >
< q -scroll -observable
@ scroll = "scroll"
/ >
< / q - t a b s >
< q -list
v - if = "!isNextPageRequesting && items.length > 0"
no - border
inset - separator
sparse
multiline
class = "csc-conversation-list"
>
< csc -conversation -item
v - for = "(item, index) in items"
: key = "item._id"
: item = "item"
: call - available = "isCallAvailable"
@ init - call = "initCall"
@ download - fax = "downloadFax"
@ download - voice - mail = "downloadVoiceMail"
@ play - voice - mail = "playVoiceMail"
/ >
< / q - l i s t >
< div
v - else - if = "!isNextPageRequesting && items.length === 0"
class = "row justify-center csc-conversation-list-message"
>
{ { noResultsMessage } }
< / div >
< div
v - if = "isNextPageRequesting"
class = "row justify-center"
>
< q -spinner -dots
color = "primary"
: size = "40"
/ >
< / div >
< q -scroll -observable
@ scroll = "scroll"
/ >
< q -btn
v - back - to - top . animate = "backToTopProps"
round
color = "primary"
class = "fixed-bottom-right animate-pop csc-back-to-top"
>
< q -icon name = "keyboard_arrow_up" / >
< / q - b t n >
< / c s c - p a g e >
< / template >
@ -98,7 +108,10 @@
dom ,
QTabs ,
QTab ,
QTabPane
QTabPane ,
BackToTop ,
QBtn ,
QIcon
} from 'quasar-framework'
const { offset } = dom
export default {
@ -134,7 +147,12 @@
QSpinnerDots ,
QTabs ,
QTab ,
QTabPane
QTabPane ,
QBtn ,
QIcon
} ,
directives : {
BackToTop
} ,
mounted ( ) {
this . $store . commit ( 'conversations/resetList' ) ;
@ -168,6 +186,9 @@
else if ( this . selectedTab === 'voicemail' ) {
return this . $t ( 'pages.conversations.noVoicemailsMessage' ) ;
}
} ,
backToTopProps ( ) {
return { offset : 100 , duration : 200 } ;
}
} ,
methods : {
@ -278,9 +299,30 @@
< / script >
< style lang = "stylus" rel = "stylesheet/stylus" >
@ import '../../../themes/app.variables.styl'
. page . csc - page - conversations
padding - top 0
. csc - conversation - list
padding 0
. csc - conversation - list - message
padding 16
padding 16 px
. q - infinite - scroll - message
margin - bottom 50 px
. conversations - tabs
position sticky
top $toolbar - min - height
z - index 12
background white
padding - top 16 px
padding - bottom 16 px
. csc - voice - mail - item
. csc - item - buttons
position absolute
@ -288,7 +330,10 @@
. csc - item - buttons
. q - btn
padding - left 8 px ;
padding - right 8 px ;
padding - left 8 px
padding - right 8 px
. csc - back - to - top
margin 0 15 px 15 px 0
< / style >