Skip to content

Commit

Permalink
fix: disabeld the publish button (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwanying authored Sep 5, 2024
1 parent 94c8eed commit 5fefd9e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assistant/src/icons/ThunderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const ThunderIcon = () => {
>
<path
fillRule="evenodd"
clip-rule="evenodd"
clipRule="evenodd"
d="M9.74348 1.0633C9.94431 1.17526 10.0429 1.40975 9.98239 1.63158L8.65464 6.50002H13.5C13.6991 6.50002 13.8792 6.61814 13.9586 6.80074C14.0379 6.98335 14.0014 7.19562 13.8655 7.34118L6.86554 14.8412C6.70866 15.0093 6.45736 15.0487 6.25654 14.9367C6.05571 14.8248 5.95713 14.5903 6.01763 14.3685L7.34539 9.50002H2.50001C2.30091 9.50002 2.12079 9.38189 2.04144 9.19929C1.96209 9.01669 1.99863 8.80441 2.13448 8.65886L9.13448 1.15886C9.29137 0.990769 9.54266 0.951339 9.74348 1.0633Z"
fill="white"
/>
Expand Down
5 changes: 3 additions & 2 deletions client/app/factory/edit/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,11 @@ export default function Edit({ params }: { params: { id: string } }) {
</Tabs>
</div>
<div className="flex items-center gap-2">
<PublicSwitcher
{/* TODO 暂时关闭上架入口 */}
{/* <PublicSwitcher
isSelected={!!botProfile?.public}
setBotProfile={setBotProfile}
/>
/> */}
</div>
</div>
<div className="h-full grow overflow-y-auto overflow-x-hidden flex h-full flex-col">
Expand Down
31 changes: 24 additions & 7 deletions client/components/PublishBotEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
ModalBody,
ModalFooter,
Spinner,
Tooltip,
} from '@nextui-org/react';
import { StoreIcon } from '../public/icons/StoreIcon';
import { useBotList } from '@/app/hooks/useBot';
Expand Down Expand Up @@ -56,14 +57,30 @@ const PublishBotEntity = (props: { area: 'nav' | 'list' }) => {
{area === 'nav' && (
<>
<ToastContainer />
<Button
key="public"
onPress={onOpen}
className="bg-[#3F3F46] text-[#FFFFFF] rounded-full px-4 py-2 mr-[16px]"
startContent={<StoreIcon />}
<Tooltip
content={
<span>
coming soon, 请先前往 GitHub
<a
href="https://github.com/petercat-ai/petercat/issues"
target="_blank"
>
Issue 区
</a>
给我们提一个 Issue,留下宁的机器人信息
</span>
}
>
上架机器人
</Button>
<Button
disabled={true}
key="public"
onPress={onOpen}
className="bg-[#3F3F46] text-[#FFFFFF] rounded-full px-4 py-2 mr-[16px]"
startContent={<StoreIcon />}
>
上架机器人
</Button>
</Tooltip>
</>
)}
{area === 'list' && <PublishBotCard onPress={onOpen} />}
Expand Down

0 comments on commit 5fefd9e

Please sign in to comment.