Update label styles on MediaProxy tab

This commit is contained in:
Angelina Filippova 2020-04-23 02:57:40 +03:00
parent 73a87b440a
commit abb375d2ac
2 changed files with 5 additions and 2 deletions

View file

@ -25,7 +25,7 @@
:nested="true"/> :nested="true"/>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item v-if="setting.type !== 'keyword'" :label-width="customLabelWidth" :class="labelClass"> <el-form-item v-if="setting.type !== 'keyword'" :label-width="customLabelWidth" :class="labelClass" :style="isDesktop ? '' : `margin-left:${margin}px`">
<span slot="label"> <span slot="label">
{{ setting.label }} {{ setting.label }}
<el-tooltip v-if="canBeDeleted && isDesktop" :content="$t('settings.removeFromDB')" placement="bottom-end"> <el-tooltip v-if="canBeDeleted && isDesktop" :content="$t('settings.removeFromDB')" placement="bottom-end">

View file

@ -1,6 +1,6 @@
<template> <template>
<div v-if="!loading" :class="isSidebarOpen" class="form-container"> <div v-if="!loading" :class="isSidebarOpen" class="form-container">
<el-form v-if="!loading" ref="mediaProxy" :model="mediaProxyData" :label-width="labelWidth"> <el-form v-if="!loading" ref="mediaProxy" :model="mediaProxyData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mediaProxy" :data="mediaProxyData"/> <setting :setting-group="mediaProxy" :data="mediaProxyData"/>
</el-form> </el-form>
<div class="submit-button-container"> <div class="submit-button-container">
@ -31,6 +31,9 @@ export default {
isTablet() { isTablet() {
return this.$store.state.app.device === 'tablet' return this.$store.state.app.device === 'tablet'
}, },
labelPosition() {
return this.isMobile ? 'top' : 'right'
},
labelWidth() { labelWidth() {
if (this.isMobile) { if (this.isMobile) {
return '120px' return '120px'