Skip to content

Commit 8b19bde

Browse files
committed
cancel change password button, menu button padding
1 parent 19e7137 commit 8b19bde

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
<form @submit.prevent="handleSubmit(onSubmit)" class="w-full">
66
<div class="flex justify-between items-center w-full">
77
<h1 class="text-md font-bold capitalize text-gray-matcha">{{ name }}</h1>
8-
<input v-if="edit" type="submit" :disabled="invalid" value="Save"
9-
v-bind:class="{'text-sm': 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-sm text-purple-matcha">{{ buttonText }}</h1>
8+
<div class="flex">
9+
<h1 v-if="type === 'password' && edit" v-on:click="cancelEditing()" class="mr-4 text-sm text-purple-matcha cursor-pointer">Cancel</h1>
10+
<input v-if="edit" type="submit" :disabled="invalid" value="Save"
11+
v-bind:class="{'text-sm': true,'text-purple-matcha': true, 'bg-transparent': true, 'focus:outline-none': true, 'active:outline-none': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}">
12+
<h1 v-if="!edit" v-on:click="startEditing()" class="cursor-pointer text-sm text-purple-matcha">{{ buttonText }}</h1>
13+
</div>
1114
</div>
1215
<div class="break-words" v-if="!edit && type !== 'password'"><h1 class="text-md opacity-50 md:max-w-sm">{{ currentValue }}</h1></div>
1316
<div v-if="edit">
@@ -57,6 +60,13 @@ export default {
5760
startEditing() {
5861
this.edit = true;
5962
},
63+
cancelEditing() {
64+
if (this.type === 'password') {
65+
this.currentValue = '';
66+
this.passwordRepeat = '';
67+
}
68+
this.edit = false;
69+
},
6070
onSubmit() {
6171
if (this.type === 'password') {
6272
this.currentValue = '';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<!-- eslint-disable max-len -->
33
<div class="flex w-full mx-auto cursor-pointer md:hover:bg-gray-300">
4-
<h1 class="text-gray-matcha py-4 md:py-2 text-xl md:text-base w-full md:w-auto text-center md:text-left">{{text}}</h1>
4+
<h1 class="text-gray-matcha py-6 md:py-4 md:py-2 text-xl md:text-base w-full md:w-auto text-center md:text-left">{{text}}</h1>
55
</div>
66
</template>
77

0 commit comments

Comments
 (0)