Skip to content

Commit 95b8caa

Browse files
committed
added account input bio field
1 parent 5244870 commit 95b8caa

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

frontend/src/components/app/settings/AccountInput.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<div class="flex justify-between items-center w-full">
77
<h1 class="text-md font-bold capitalize text-gray-matcha">{{ name }}</h1>
88
<input v-if="edit" type="submit" :disabled="invalid" value="Save"
9-
v-bind:class="{'text-lg': true,'text-purple-matcha': true, 'bg-transparent': true, 'focus:outline-none': true, 'active:outline-none': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}">
10-
<h1 v-if="!edit" v-on:click="startEditing()" class="cursor-pointer text-md text-purple-matcha">{{ buttonText }}</h1>
9+
v-bind:class="{'text-base': true,'text-purple-matcha': true, 'bg-transparent': true, 'focus:outline-none': true, 'active:outline-none': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}">
10+
<h1 v-if="!edit" v-on:click="startEditing()" class="cursor-pointer text-base text-purple-matcha">{{ buttonText }}</h1>
1111
</div>
12-
<div v-if="!edit && type !== 'password'"><h1 class="text-md opacity-50">{{ currentValue }}</h1></div>
12+
<div class="break-words" v-if="!edit && type !== 'password'"><h1 class="text-md opacity-50 max-w-xs">{{ currentValue }}</h1></div>
1313
<div v-if="edit">
1414
<ValidationProvider v-if="type === 'firstName'" name="First Name" rules="required|alpha|max:20" v-slot="{errors}">
1515
<input type="text" placeholder="First Name" v-model="currentValue" class="matcha-input max-w-xs">
@@ -27,6 +27,10 @@
2727
<input type="text" placeholder="Username" v-model="currentValue" class="matcha-input max-w-xs">
2828
<span class="matcha-input-error">{{ errors[0] }}</span>
2929
</ValidationProvider>
30+
<ValidationProvider v-if="type === 'bio'" name="Biography" rules="required|min:50|max:200" v-slot="{errors}">
31+
<textarea style="resize: none;" rows="4" type="text" placeholder="Biography" v-model="currentValue" class="matcha-input max-w-xs block"></textarea>
32+
<span class="matcha-input-error">{{ errors[0] }}</span>
33+
</ValidationProvider>
3034
<ValidationProvider v-if="type === 'password'" name="Password" rules="required|min:6|validPassword" v-slot="{errors}">
3135
<input type="password" placeholder="Password" v-model="currentValue" class="matcha-input max-w-xs">
3236
<span class="matcha-input-error">{{ passwordErrorHandler(errors[0]) }}</span>

0 commit comments

Comments
 (0)