diff --git a/client/components/MessageTypes/join.vue b/client/components/MessageTypes/join.vue index baeab726..2cc451c9 100644 --- a/client/components/MessageTypes/join.vue +++ b/client/components/MessageTypes/join.vue @@ -6,7 +6,7 @@ [{{ message.account }}] has joined the channel diff --git a/client/components/Settings/Account.vue b/client/components/Settings/Account.vue index c0ca2a92..14e0c966 100644 --- a/client/components/Settings/Account.vue +++ b/client/components/Settings/Account.vue @@ -102,7 +102,7 @@ import socket from "../../js/socket"; import RevealPassword from "../RevealPassword.vue"; import Session from "../Session.vue"; -import {computed, defineComponent, onMounted, ref} from "vue"; +import {computed, defineComponent, onMounted, PropType, ref} from "vue"; import {useStore} from "../../js/store"; export default defineComponent({ @@ -111,9 +111,15 @@ export default defineComponent({ RevealPassword, Session, }, - setup() { + props: { + settingsForm: { + type: Object as PropType, + required: true, + }, + }, + setup(props) { const store = useStore(); - const settingsForm = ref(); + const passwordErrors = { missing_fields: "Please enter a new password", password_mismatch: "Both new password fields must match", @@ -143,7 +149,8 @@ export default defineComponent({ }); const changePassword = () => { - const allFields = new FormData(settingsForm.value); + const allFields = new FormData(props.settingsForm); + const data = { old_password: allFields.get("old_password"), new_password: allFields.get("new_password"), diff --git a/client/components/Windows/Settings.vue b/client/components/Windows/Settings.vue index 19c3a02e..61b265cf 100644 --- a/client/components/Windows/Settings.vue +++ b/client/components/Windows/Settings.vue @@ -7,14 +7,14 @@
- +