@ -2,67 +2,157 @@
< div class = "frontends-tab" :label ="$t('admin_dash.tabs.frontends')" >
< div class = "frontends-tab" :label ="$t('admin_dash.tabs.frontends')" >
< div class = "setting-item" >
< div class = "setting-item" >
< h2 > { { $t ( 'admin_dash.tabs.frontends' ) } } < / h2 >
< h2 > { { $t ( 'admin_dash.tabs.frontends' ) } } < / h2 >
< ul class = "setting-list cards-list" >
< p > { { $t ( 'admin_dash.frontend.wip_notice' ) } } < / p >
< li v-for ="frontend in frontends" :key="frontend.name" >
< ul class = "setting-list" >
< strong > { { frontend . name } } < / strong >
< li >
< dl >
< h3 > { { $t ( 'admin_dash.frontend.default_frontend' ) } } < / h3 >
< dt > { { $t ( 'admin_dash.frontend.repository' ) } } < / dt >
< p > { { $t ( 'admin_dash.frontend.default_frontend_tip' ) } } < / p >
< dd > < a :href ="frontend.git" > { { frontend . git } } < / a > < / dd >
< p > { { $t ( 'admin_dash.frontend.default_frontend_tip2' ) } } < / p >
< dt v-if ="expertLevel" > {{ $ t ( ' admin_dash.frontend.versions ' ) }} < / dt >
< / li >
< dd v-if ="expertLevel" > {{ frontend.refs }} < / dd >
< li >
< dt v-if ="expertLevel" > {{ $ t ( ' admin_dash.frontend.build_url ' ) }} < / dt >
< StringSetting path = ":pleroma.:frontends.:primary.name" >
< dd v-if ="expertLevel" > {{ frontend.build_url }} < / dd >
NAME
< / dl >
< / StringSetting >
< div >
< / li >
< span class = "btn-group" >
< li >
< button
< StringSetting path = ":pleroma.:frontends.:primary.ref" >
class = "button button-default btn"
REF
type = "button"
< / StringSetting >
: title = "$t('admin_dash.frontend.update')"
< / li >
@ click = "update(frontend)"
< li >
>
< GroupSetting path = ":pleroma.:frontends.:primary" / >
{ {
< / li >
frontend . installed
< / ul >
? $t ( 'admin_dash.frontend.reinstall' )
< div class = "setting-list" >
: $t ( 'admin_dash.frontend.install' )
< h3 > { { $t ( 'admin_dash.frontend.available_frontends' ) } } < / h3 >
} }
< ul class = "cards-list" >
< / button >
< li v-for ="frontend in frontends" :key="frontend.name" >
< Popover
< strong > { { frontend . name } } < / strong >
v - if = "frontend.refs.length > 1"
{ { ' ' } }
trigger = "click"
< span v-if ="adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name" >
class = "button-dropdown"
< i18n -t
placement = "bottom"
keypath = "admin_dash.frontend.is_default"
v - if = "adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]"
/ >
< i18n -t
keypath = "admin_dash.frontend.is_default_custom"
v - else
>
>
< template # content >
< template # version >
< div class = "dropdown-menu" >
< code > { { adminDraft [ ':pleroma' ] [ ':frontends' ] [ ':primary' ] . ref } } < / code >
< / template >
< / i 1 8 n - t >
< / span >
< dl >
< dt > { { $t ( 'admin_dash.frontend.repository' ) } } < / dt >
< dd > < a :href ="frontend.git" target = "_blank" > { { frontend . git } } < / a > < / dd >
< template v-if ="expertLevel" >
< dt > { { $t ( 'admin_dash.frontend.versions' ) } } < / dt >
< dd v-for ="ref in frontend.refs" :key ="ref" > < code > { { ref } } < / code > < / dd >
< / template >
< dt v-if ="expertLevel" > {{ $ t ( ' admin_dash.frontend.build_url ' ) }} < / dt >
< dd v-if ="expertLevel" > < a :href ="frontend.build_url" target = "_blank" > { { frontend . build _url } } < / a > < / dd >
< / dl >
< div >
< span class = "btn-group" >
< button
class = "button button-default btn"
type = "button"
: title = "$t('admin_dash.frontend.update')"
@ click = "update(frontend)"
>
{ {
frontend . installed
? $t ( 'admin_dash.frontend.reinstall' )
: $t ( 'admin_dash.frontend.install' )
} }
< / button >
< Popover
v - if = "frontend.refs.length > 1"
trigger = "click"
class = "button-dropdown"
placement = "bottom"
>
< template # content >
< div class = "dropdown-menu" >
< button
v - for = "ref in frontend.refs"
: key = "ref"
class = "button-default dropdown-item"
@ click = "update(frontend, ref)"
>
< i18n -t keypath = "admin_dash.frontend.install_version" >
< template # version >
< code > { { ref } } < / code >
< / template >
< / i 1 8 n - t >
< / button >
< / div >
< / template >
< template # trigger >
< button
< button
v - for = "ref in frontend.refs"
class = "button button-default btn dropdown-button"
: key = "ref"
type = "button"
class = "button-default dropdown-item"
: title = "$t('admin_dash.frontend.update')"
@ click = "update(frontend, ref)"
>
>
< i18n -t keypath = "admin_dash.frontend.install_version" >
< FAIcon icon = "chevron-down" / >
< template # version >
< code > { { ref } } < / code >
< / template >
< / i 1 8 n - t >
< / button >
< / button >
< / div >
< / template >
< / template >
< / Popover >
< template # trigger >
< / span >
< button
< span class = "btn-group" v-if ="frontend.name !== 'admin-fe'" >
class = "button button-default btn"
< button
type = "button"
class = "button button-default btn"
: title = "$t('admin_dash.frontend.update')"
type = "button"
>
: disabled = "
< FAIcon icon = "chevron-down" / >
adminDraft [ ':pleroma' ] [ ':frontends' ] [ ':primary' ] . name === frontend . name &&
< / button >
adminDraft [ ':pleroma' ] [ ':frontends' ] [ ':primary' ] . ref === frontend . refs [ 0 ]
< / template >
"
< / Popover >
: title = "$t('admin_dash.frontend.update')"
< / span >
@ click = "setDefault(frontend)"
< / div >
>
< / li >
{ {
< / ul >
$t ( 'admin_dash.frontend.set_default' )
} }
< / button >
{ { ' ' } }
< Popover
v - if = "frontend.refs.length > 1"
trigger = "click"
class = "button-dropdown"
placement = "bottom"
>
< template # content >
< div class = "dropdown-menu" >
< button
v - for = "ref in frontend.refs.slice(1)"
: key = "ref"
class = "button-default dropdown-item"
@ click = "setDefault(frontend, ref)"
>
< i18n -t keypath = "admin_dash.frontend.set_default_version" >
< template # version >
< code > { { ref } } < / code >
< / template >
< / i 1 8 n - t >
< / button >
< / div >
< / template >
< template # trigger >
< button
class = "button button-default btn dropdown-button"
type = "button"
: title = "$t('admin_dash.frontend.update')"
>
< FAIcon icon = "chevron-down" / >
< / button >
< / template >
< / Popover >
< / span >
< / div >
< / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
< / div >
< / template >
< / template >