diff --git a/doc/api.oa3 b/doc/api.oa3 index 244f9fea..689e6670 100644 --- a/doc/api.oa3 +++ b/doc/api.oa3 @@ -183,36 +183,7 @@ paths: description: account not found '500': description: internal server error - - /admin/accounts/{accountId}/reset: - put: - tags: - - admin - description: Generate a password reset url for specified account. Access granted to admin username and password. - operationId: set-node-account - security: - - basicAuth: [] - parameters: - - name: accountId - in: path - description: id of profile to access - required: true - schema: - type: string - responses: - '201': - description: success - content: - application/json: - schema: - type: string - '401': - description: invalid password - '404': - description: unknown portal - '500': - description: internal server error - + /admin/accounts/{accountId}: delete: tags: @@ -460,7 +431,29 @@ paths: application/json: schema: type: boolean - + + /account/login: + put: + tags: + - account + description: Reset account login credentials + operationId: set-account-login + security: + - basicAuth: [] + responses: + '201': + description: success + content: + application/json: + schema: + type: string + '401': + description: invalid password + '404': + description: unknown portal + '500': + description: internal server error + /account/profile: post: tags: diff --git a/net/web/src/User/Conversation/Conversation.jsx b/net/web/src/User/Conversation/Conversation.jsx index bbd8b56a..c9c9f00f 100644 --- a/net/web/src/User/Conversation/Conversation.jsx +++ b/net/web/src/User/Conversation/Conversation.jsx @@ -84,10 +84,9 @@ export function Conversation() { - setShowMembers(false)} width={400} bodyStyle={{ padding: 0 }} - footer={[ - ]} > - + setShowMembers(false)} + width={400} bodyStyle={{ padding: 0 }} footer={[]} > + onSaveSubject()} onCancel={() => setShowEdit(false)}> diff --git a/net/web/src/User/SideBar/Contacts/Channels/AddChannel/AddChannel.jsx b/net/web/src/User/SideBar/Contacts/Channels/AddChannel/AddChannel.jsx index 28176e9e..c61fbc50 100644 --- a/net/web/src/User/SideBar/Contacts/Channels/AddChannel/AddChannel.jsx +++ b/net/web/src/User/SideBar/Contacts/Channels/AddChannel/AddChannel.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react' -import { Button, Select, Modal, Collapse, Input } from 'antd'; +import { Space, Button, Select, Modal, Collapse, Input } from 'antd'; import { SelectItem, ConversationWrapper, Description, BusySpin } from './AddChannel.styled'; import { Logo } from '../../../../../Logo/Logo'; @@ -18,22 +18,19 @@ export function AddChannel({ state, actions }) { return ( - actions.setStartSubject(e.target.value)} value={state.startSubject} /> - actions.setStartDescription(e.target.value)} value={state.startDescription} /> - - + + actions.setStartSubject(e.target.value)} + value={state.startSubject} /> + } diff --git a/net/web/src/User/SideBar/Identity/useIdentity.hook.js b/net/web/src/User/SideBar/Identity/useIdentity.hook.js index ba90d695..52b5a462 100644 --- a/net/web/src/User/SideBar/Identity/useIdentity.hook.js +++ b/net/web/src/User/SideBar/Identity/useIdentity.hook.js @@ -20,7 +20,8 @@ export function useIdentity() { passwordStatus: null, confirm: null, confirmStatus: null, - + busy: false, + showLogin: false, }); const navigate = useNavigate(); @@ -69,6 +70,9 @@ export function useIdentity() { setConfirm: (value) => { updateState({ confirm: value }); }, + setShowLogin: (value) => { + updateState({ showLogin: value }); + }, setLogin: async () => { if (state.username == null || state.username == '') { updateState({ usernameStatus: 'username required' }); @@ -91,7 +95,17 @@ export function useIdentity() { else { updateState({ confirmStatus: null }); } - await account.actions.setLogin(state.username, state.password); + if (!state.busy) { + updateState({ busy: true }); + try { + await account.actions.setLogin(state.username, state.password); + updateState({ showLogin: false }); + } + catch (err) { + window.alert(err); + } + updateState({ busy: false }); + } }, };