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