refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -17,26 +17,30 @@
|
||||
/>
|
||||
</template>
|
||||
<template #footer>
|
||||
<n8n-button :loading="loading" :label="$locale.baseText('auth.changePassword')" @click="onSubmitClick" float="right" />
|
||||
<n8n-button
|
||||
:loading="loading"
|
||||
:label="$locale.baseText('auth.changePassword')"
|
||||
@click="onSubmitClick"
|
||||
float="right"
|
||||
/>
|
||||
</template>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import mixins from "vue-typed-mixins";
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
import { showMessage } from "@/mixins/showMessage";
|
||||
import Modal from "./Modal.vue";
|
||||
import Vue from "vue";
|
||||
import { IFormInputs } from "@/Interface";
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import Modal from './Modal.vue';
|
||||
import Vue from 'vue';
|
||||
import { IFormInputs } from '@/Interface';
|
||||
import { CHANGE_PASSWORD_MODAL_KEY } from '../constants';
|
||||
import { mapStores } from "pinia";
|
||||
import { useUsersStore } from "@/stores/users";
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
|
||||
export default mixins(showMessage).extend({
|
||||
components: { Modal },
|
||||
name: "ChangePasswordModal",
|
||||
name: 'ChangePasswordModal',
|
||||
props: {
|
||||
modalName: {
|
||||
type: String,
|
||||
@@ -74,7 +78,7 @@ export default mixins(showMessage).extend({
|
||||
label: this.$locale.baseText('auth.newPassword'),
|
||||
type: 'password',
|
||||
required: true,
|
||||
validationRules: [{name: 'DEFAULT_PASSWORD_RULES'}],
|
||||
validationRules: [{ name: 'DEFAULT_PASSWORD_RULES' }],
|
||||
infoText: this.$locale.baseText('auth.defaultPasswordRequirements'),
|
||||
autocomplete: 'new-password',
|
||||
capitalize: true,
|
||||
@@ -91,7 +95,7 @@ export default mixins(showMessage).extend({
|
||||
validate: this.passwordsMatch,
|
||||
},
|
||||
},
|
||||
validationRules: [{name: 'TWO_PASSWORDS_MATCH'}],
|
||||
validationRules: [{ name: 'TWO_PASSWORDS_MATCH' }],
|
||||
autocomplete: 'new-password',
|
||||
capitalize: true,
|
||||
},
|
||||
@@ -112,12 +116,12 @@ export default mixins(showMessage).extend({
|
||||
|
||||
return false;
|
||||
},
|
||||
onInput(e: {name: string, value: string}) {
|
||||
onInput(e: { name: string; value: string }) {
|
||||
if (e.name === 'password') {
|
||||
this.password = e.value;
|
||||
}
|
||||
},
|
||||
async onSubmit(values: {[key: string]: string}) {
|
||||
async onSubmit(values: { [key: string]: string }) {
|
||||
try {
|
||||
this.loading = true;
|
||||
await this.usersStore.updateCurrentUserPassword(values);
|
||||
@@ -129,7 +133,6 @@ export default mixins(showMessage).extend({
|
||||
});
|
||||
|
||||
this.modalBus.$emit('close');
|
||||
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('auth.changePassword.error'));
|
||||
}
|
||||
@@ -140,5 +143,4 @@ export default mixins(showMessage).extend({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user