2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

fix(ui): clean up styling

This commit is contained in:
18alantom 2022-09-18 19:37:26 +05:30
parent 62a418cacc
commit 23bb908957
13 changed files with 24 additions and 35 deletions

View File

@ -39,6 +39,7 @@
style="background: inherit; margin-right: -3px"
viewBox="0 0 5 10"
xmlns="http://www.w3.org/2000/svg"
@click="(e) => !isReadOnly && onFocus(e, toggleDropdown)"
>
<path
d="M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636"

View File

@ -73,7 +73,7 @@ export default {
];
if (isNumeric(this.df)) {
classes.push('text-right')
classes.push('text-right');
}
if (this.size === 'small') {
@ -83,7 +83,7 @@ export default {
}
if (this.isReadOnly) {
classes.push('text-gray-800');
classes.push('text-gray-800 cursor-default');
} else {
classes.push('text-gray-900');
}

View File

@ -4,7 +4,10 @@
<div class="mr-3 text-gray-600 text-sm" v-if="showLabel && !labelRight">
{{ df.label }}
</div>
<div style="width: 14px; height: 14px; overflow: hidden; cursor: pointer">
<div
style="width: 14px; height: 14px; overflow: hidden"
:class="isReadOnly ? 'cursor-default' : 'cursor-pointer'"
>
<svg
v-if="checked"
width="14"

View File

@ -18,7 +18,7 @@
/>
<div
v-show="!showInput"
class="cursor-text whitespace-nowrap overflow-x-auto"
class="whitespace-nowrap overflow-x-auto"
:class="[inputClasses, containerClasses, ,]"
@click="activateInput"
@focus="activateInput"

View File

@ -6,7 +6,11 @@
<DatePicker
ref="input"
:input-class="[inputClasses, 'cursor-text', containerClasses]"
:input-class="[
'cursor-text bg-transparent',
inputClasses,
containerClasses,
]"
:value="value"
:placeholder="inputPlaceholder"
:readonly="isReadOnly"

View File

@ -3,7 +3,8 @@
:df="languageDf"
:value="value"
@change="onChange"
:input-class="'focus:outline-none rounded ' + inputClass"
:border="true"
:input-class="'rounded py-1.5'"
/>
</template>
<script>
@ -17,11 +18,6 @@ export default {
setLanguageMap,
},
props: {
inputClass: {
type: String,
default:
'px-3 py-2 text-base',
},
dontReload: {
type: Boolean,
default: false,

View File

@ -17,7 +17,7 @@
"
:class="{
'pointer-events-none': isReadOnly,
'text-gray-400': !value,
'text-gray-500': !value,
}"
:value="value"
@change="(e) => triggerChange(e.target.value)"

View File

@ -56,9 +56,9 @@
</span>
</div>
<FormControl
:border="true"
size="small"
class="w-24"
input-class="bg-gray-100"
:df="{
placeholder: t`Field`,
fieldname: 'fieldname',
@ -69,9 +69,9 @@
@change="(value) => (filter.fieldname = value)"
/>
<FormControl
:border="true"
size="small"
class="w-24"
input-class="bg-gray-100"
:df="{
placeholder: t`Condition`,
fieldname: 'condition',
@ -82,9 +82,9 @@
@change="(value) => (filter.condition = value)"
/>
<FormControl
:border="true"
size="small"
class="w-24"
input-class="bg-gray-100"
:df="{
placeholder: t`Value`,
fieldname: 'value',
@ -124,9 +124,9 @@
</template>
<script>
import { fyo } from 'src/initFyo';
import { t } from 'fyo';
import { FieldTypeEnum } from 'schemas/types';
import { fyo } from 'src/initFyo';
import { getRandomString } from 'utils';
import Button from './Button';
import FormControl from './Controls/FormControl.vue';

View File

@ -80,7 +80,6 @@
:value="getRegularValue(df)"
:class="{ 'p-2': df.fieldtype === 'Check' }"
:read-only="evaluateReadOnly(df)"
input-class="bg-transparent"
@change="async (value) => await onChange(df, value)"
@focus="activateInlineEditing(df)"
@new-doc="async (newdoc) => await onChange(df, newdoc.name)"

View File

@ -137,17 +137,13 @@
"
style="top: 100%; transform: translateY(-100%)"
>
<LanguageSelector
v-show="!creatingDemo"
class="text-sm w-28 bg-gray-100 rounded-md"
input-class="py-1.5 bg-transparent"
/>
<LanguageSelector v-show="!creatingDemo" class="text-sm w-28" />
<button
class="
text-sm
bg-gray-100
hover:bg-gray-200
rounded-md
rounded
px-4
py-1.5
w-28

View File

@ -17,12 +17,10 @@
<div v-if="report" class="grid grid-cols-5 gap-2 p-4 border-b">
<FormControl
v-for="field in report.filters"
:border="true"
size="small"
:show-label="field.fieldtype === 'Check'"
:key="field.fieldname + '-filter'"
class="bg-gray-100 rounded"
:class="field.fieldtype === 'Check' ? 'flex pl-2 py-1' : ''"
input-class="bg-transparent text-sm"
:df="field"
:value="report.get(field.fieldname)"
:read-only="loading"

View File

@ -9,10 +9,7 @@
@change="forwardChangeEvent"
/>
<div class="flex p-4 justify-between">
<LanguageSelector
class="text-sm w-28 bg-gray-100 rounded-md"
input-class="py-1.5 bg-transparent"
/>
<LanguageSelector class="text-sm w-28" />
<p class="mt-auto text-gray-600 text-base select-none">
{{ `v${fyo.store.appVersion}` }}
</p>

View File

@ -30,7 +30,6 @@
:value="doc.companyName"
@change="(value) => setValue('companyName', value)"
input-class="
bg-transparent
font-semibold
text-xl
"
@ -40,10 +39,6 @@
:df="getField('email')"
:value="doc.email"
@change="(value) => setValue('email', value)"
input-class="
text-base
bg-transparent
"
/>
</div>
</div>