mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
fixing not allow unsealed channel type
This commit is contained in:
parent
9f1b502d5b
commit
8071db8f35
@ -1,4 +1,4 @@
|
||||
import { Modal, Input, List, Button } from 'antd';
|
||||
import { Modal, Input, List, Button, Tooltip } from 'antd';
|
||||
import { ChannelsWrapper } from './Channels.styled';
|
||||
import { CommentOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import { useChannels } from './useChannels.hook';
|
||||
@ -42,7 +42,9 @@ export function Channels({ open, active }) {
|
||||
</div>
|
||||
{ state.display !== 'small' && (
|
||||
<div class="bar">
|
||||
<Button type="primary" disabled={!state.allowAdd} icon={<CommentOutlined />} onClick={actions.setShowAdd}>New Topic</Button>
|
||||
<Tooltip placement="right" title={ state.allowAdd ? '' : 'Account Sealing Key Required' }>
|
||||
<Button type="primary" disabled={!state.allowAdd} icon={<CommentOutlined />} onClick={actions.setShowAdd}>New Topic</Button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)}
|
||||
<Modal bodyStyle={{ padding: 16 }} title="New Topic" centered visible={state.showAdd && state.allowAdd} footer={null} destroyOnClose={true}
|
||||
|
@ -42,7 +42,7 @@ export function useAddChannel() {
|
||||
try {
|
||||
updateState({ busy: true });
|
||||
const cards = Array.from(state.members.values());
|
||||
if (state.seal) {
|
||||
if (state.seal || !state.allowUnsealed) {
|
||||
const keys = [ account.state.sealKey.public ];
|
||||
cards.forEach(id => {
|
||||
keys.push(card.state.cards.get(id).data.cardProfile.seal);
|
||||
|
Loading…
Reference in New Issue
Block a user