v-container
v-card-title {{ $t('common.pages') }}
v-card-subtitle(v-html="$t('admin.page_description')")
v-dialog(v-model='dialog' width='800px' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card
v-card-title {{ $t('admin.new_page') }}
v-card-text.px-0
v-form(v-model='valid' ref='page' @submit.prevent='save' lazy-validation)
v-text-field.col-12(v-model='page.title'
:rules="[$validators.required('common.title')]"
:label='$t("common.title")')
Editor.col-12(v-model='page.content' label='Content' height='250px'
border no-save :placeholder="$t('common.description')")
v-card-actions
v-spacer
v-btn(@click='dialog = false' color='error' outlined) {{ $t('common.cancel') }}
v-btn(@click='save' color='primary' :disabled='!valid || loading' :loading='loading' outlined) {{ $t(`common.${editing ? 'save' : 'send'}`) }}
v-btn(@click='openDialog' text color='primary') {{ $t('common.add') }}
v-card-text
v-data-table(
v-if='pages.length'
:hide-default-footer='pages.length<10'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:header-props='{ sortIcon: mdiChevronDown }'
:headers='headers'
:items='pages')
template(v-slot:item.actions='{ item }')
t-btn(@click='toggle(item)' :color='item.visible ? "warning" : "success"' :tooltip="item.visible ? $t('common.disable') : $t('common.enable')")
v-icon(v-text='item.visible ? mdiEyeOff : mdiEye')
t-btn(@click='edit(item)' color='info' :tooltip="$t('common.edit')")
v-icon(v-text='mdiPencil')
t-btn(@click='remove(item)' color='error' :tooltip="$t('common.delete')")
v-icon(v-text='mdiDeleteForever')