2017-12-14 05:43:56 +01:00
< template lang = "html" >
2018-09-25 18:37:14 -04:00
< div class = "ffz-auto-host-options tw-c-background-base" >
2018-03-30 17:58:56 -04:00
< header class = "tw-full-width tw-align-items-center tw-flex tw-flex-nowrap" >
< h4 > { { t ( 'metadata.host.title' , 'Auto Host Management' ) } } < / h4 >
2017-12-14 05:43:56 +01:00
< / header >
2018-03-30 17:58:56 -04:00
< div
v - show = "activeTab === 'auto-host'"
: class = "{ active: activeTab === 'auto-host'}"
class = "tab tw-overflow-hidden"
>
< section class = "tw-border-t tw-full-width tw-full-height" >
< main class = "tw-flex-grow-1 scrollable-area" data -simplebar = " init " >
< div class = "simplebar-scroll-content" >
< draggable
v - model = "hosts"
: options = " {
draggable : '.ffz--host-user' ,
animation : 150 ,
} "
class = "simplebar-content"
@ update = "rearrangeHosts"
>
< div
v - for = "host in hosts"
: key = "host._id"
: data - id = "host._id"
class = "tw-border-t ffz--host-user"
>
2018-07-13 14:32:12 -04:00
< div class = "tw-interactable tw-interactable--inverted" >
2018-03-30 17:58:56 -04:00
< div class = "tw-align-items-center tw-flex tw-flex-row tw-flex-nowrap tw-mg-x-1" >
< figure class = "ffz-i-ellipsis-vert handle" / >
< div class = "ffz-channel-avatar" >
< img :src = "host.logo" : alt = "host.display_name + '(' + host.name + ')'" >
< / div >
2019-06-20 15:15:54 -04:00
< p class = "tw-ellipsis tw-flex-grow-1 tw-mg-l-1 tw-font-size-5" >
{ { host . name } }
< / p >
2018-03-30 17:58:56 -04:00
< div class = "tw-flex-grow-1 tw-pd-x-2" / >
< button class = "tw-button-icon tw-mg-x-05 ffz--host-remove-user" @click ="removeFromHosts" >
< figure class = "ffz-i-trash" / >
< / button >
< / div >
2017-12-14 05:43:56 +01:00
< / div >
< / div >
2018-03-30 17:58:56 -04:00
< / draggable >
< / div >
< / main >
< / section >
< header class = "tw-border-t tw-full-width tw-align-items-center tw-flex tw-flex-noxwrap tw-pd-1" >
< div class = "tw-flex-grow-1 tw-pd-x-2" / >
< button
: class = "{'tw-button--disabled': addedToHosts}"
2019-08-09 14:24:26 -04:00
class = "tw-button ffz-button--hollow tw-mg-x-05"
2018-03-30 17:58:56 -04:00
@ click = "addToAutoHosts"
>
< span class = "tw-button__text" > { { t ( 'metadata.host.add-channel' , 'Add To Auto Host' ) } } < / span >
< / button >
< / header >
< / div >
< div
2018-04-13 13:36:05 -04:00
v - if = "activeTab === 'settings'"
2018-03-30 17:58:56 -04:00
: class = "{ active: activeTab === 'settings'}"
class = "tab tw-overflow-hidden"
>
< section class = "tw-border-t tw-full-width tw-full-height" >
< main class = "tw-flex-grow-1 scrollable-area" data -simplebar = " init " >
< div class = "simplebar-scroll-content" >
< div class = "simplebar-content" >
< div class = "tw-pd-1" >
< div class = "ffz--widget ffz--checkbox" >
2019-02-12 17:39:54 -05:00
< div class = "tw-flex tw-align-items-center tw-checkbox" >
2018-03-30 17:58:56 -04:00
< input
id = "autoHostSettings:enabled"
: checked = "autoHostSettings.enabled"
type = "checkbox"
class = "tw-checkbox__input"
data - setting = "enabled"
@ change = "updateCheckbox"
>
< label for = "autoHostSettings:enabled" class = "tw-checkbox__label" >
2020-02-09 15:10:12 -05:00
< span class = "tw-mg-l-1" >
{ { t ( 'metadata.host.setting.auto-hosting.title' , 'Auto Hosting' ) } }
< / span >
2018-03-30 17:58:56 -04:00
< / label >
< / div >
< section class = "tw-c-text-alt-2 ffz-checkbox-description" >
{ { t ( 'metadata.host.setting.auto-hosting.description' , 'Toggle all forms of auto hosting: teammates, host list, and similar channels.' ) } } < br >
< a href = "https://blog.twitch.tv/grow-your-community-with-auto-hosting-e80c1460f6e1" target = "_blank" rel = "noopener" > { { t ( 'metadata.host.setting.auto-hosting.link' , 'Learn More' ) } } < / a >
< / section >
2017-12-14 05:43:56 +01:00
< / div >
2018-03-30 17:58:56 -04:00
< div class = "ffz--widget ffz--checkbox" >
2019-02-12 17:39:54 -05:00
< div class = "tw-flex tw-align-items-center tw-checkbox" >
2018-03-30 17:58:56 -04:00
< input
id = "autoHostSettings:team_host"
: checked = "autoHostSettings.team_host"
type = "checkbox"
class = "tw-checkbox__input"
data - setting = "team_host"
@ change = "updateCheckbox"
>
< label for = "autoHostSettings:team_host" class = "tw-checkbox__label" >
2020-02-09 15:10:12 -05:00
< span class = "tw-mg-l-1" >
{ { t ( 'metadata.host.setting.team-hosting.title' , 'Team Hosting' ) } }
< / span >
2018-03-30 17:58:56 -04:00
< / label >
< / div >
< section class = "tw-c-text-alt-2 ffz-checkbox-description" >
{ { t ( 'metadata.host.setting.team-hosting.description' ,
"Automatically host random channels from your team when you're not live. " +
2019-06-20 15:15:54 -04:00
'Team channels will be hosted before any channels in your host list.' ) } }
2018-03-30 17:58:56 -04:00
< / section >
2017-12-14 05:43:56 +01:00
< / div >
2018-03-30 17:58:56 -04:00
< div class = "ffz--widget ffz--checkbox" >
2019-02-12 17:39:54 -05:00
< div class = "tw-flex tw-align-items-center tw-checkbox" >
2018-03-30 17:58:56 -04:00
< input
id = "autoHostSettings:vodcast_hosting"
: checked = "!autoHostSettings.deprioritize_vodcast"
type = "checkbox"
class = "tw-checkbox__input"
data - setting = "deprioritize_vodcast"
@ change = "updateCheckbox"
>
< label for = "autoHostSettings:vodcast_hosting" class = "tw-checkbox__label" >
2020-02-09 15:10:12 -05:00
< span class = "tw-mg-l-1" >
{ { t ( 'metadata.host.setting.vodcast-hosting.title' , 'Vodcast Hosting' ) } }
< / span >
2018-03-30 17:58:56 -04:00
< / label >
< / div >
< section class = "tw-c-text-alt-2 ffz-checkbox-description" >
{ { t ( 'metadata.host.setting.vodcast-hosting.description' , 'Include Vodcasts in auto host.' ) } }
< a href = "https://blog.twitch.tv/vodcast-brings-the-twitch-community-experience-to-uploads-54098498715" target = "_blank" rel = "noopener" > { { t ( 'metadata.host.setting.vodcast-hosting.link' , 'Learn about Vodcasts' ) } } < / a >
< / section >
2017-12-14 05:43:56 +01:00
< / div >
2018-03-30 17:58:56 -04:00
< div class = "ffz--widget ffz--checkbox" >
2019-02-12 17:39:54 -05:00
< div class = "tw-flex tw-align-items-center tw-checkbox" >
2018-03-30 17:58:56 -04:00
< input
id = "autoHostSettings:recommended_host"
: checked = "autoHostSettings.recommended_host"
type = "checkbox"
class = "tw-checkbox__input"
data - setting = "recommended_host"
@ change = "updateCheckbox"
>
< label for = "autoHostSettings:recommended_host" class = "tw-checkbox__label" >
2020-02-09 15:10:12 -05:00
< span class = "tw-mg-l-1" >
{ { t ( 'metadata.host.setting.recommended-hosting.title' , 'Auto Host Channels Similar To Yours' ) } }
< / span >
2018-03-30 17:58:56 -04:00
< / label >
< / div >
< section class = "tw-c-text-alt-2 ffz-checkbox-description" >
{ { t ( 'metadata.host.setting.recommended-hosting.description' , 'Streamers on your primary team & host list will always be hosted first' ) } }
< / section >
< / div >
< div class = "ffz--widget ffz--checkbox" >
2019-02-12 17:39:54 -05:00
< div class = "tw-flex tw-align-items-center tw-checkbox" >
2018-03-30 17:58:56 -04:00
< input
id = "autoHostSettings:strategy"
: checked = "autoHostSettings.strategy === 'random'"
type = "checkbox"
class = "tw-checkbox__input"
data - setting = "strategy"
@ change = "updateCheckbox"
>
< label for = "autoHostSettings:strategy" class = "tw-checkbox__label" >
2020-02-09 15:10:12 -05:00
< span class = "tw-mg-l-1" >
{ { t ( 'metadata.host.setting.strategy.title' , 'Randomize Host Order' ) } }
< / span >
2018-03-30 17:58:56 -04:00
< / label >
< / div >
< section class = "tw-c-text-alt-2 ffz-checkbox-description" >
{ { t ( 'metadata.host.setting.strategy.description' ,
'If enabled, auto-hosts will be picked at random. ' +
2019-06-20 15:15:54 -04:00
"Otherwise they're picked in order." ) } }
2018-03-30 17:58:56 -04:00
< / section >
2017-12-14 05:43:56 +01:00
< / div >
< / div >
< / div >
< / div >
2018-03-30 17:58:56 -04:00
< / main >
< / section >
< / div >
< footer >
< div class = "host-options__tabs-container tw-border-t" >
< div
id = "host-options__auto-host"
: class = "{active: activeTab === 'auto-host'}"
class = "host-options__tab tw-pd-x-1"
@ click = "setActiveTab('auto-host')"
>
< span > { { t ( 'metadata.host.tab.auto-host' , 'Auto Host' ) } } < / span >
< / div >
< div
2018-04-13 13:36:05 -04:00
v - if = "autoHostSettings"
2018-03-30 17:58:56 -04:00
id = "host-options__settings"
: class = "{active: activeTab === 'settings'}"
class = "host-options__tab tw-pd-x-1"
@ click = "setActiveTab('settings')"
>
< span > { { t ( 'metadata.host.tab.settings' , 'Settings' ) } } < / span >
2017-12-14 05:43:56 +01:00
< / div >
< / div >
2018-03-30 17:58:56 -04:00
< / footer >
< / div >
2017-12-14 05:43:56 +01:00
< / template >
< script >
import draggable from 'vuedraggable' ;
export default {
components : {
draggable
} ,
2018-03-30 17:58:56 -04:00
data ( ) {
2017-12-14 05:43:56 +01:00
return this . $vnode . data ;
} ,
updated ( ) {
this . updatePopper ( ) ;
}
}
< / script >