mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-23 02:27:14 +00:00
修复插件管理卡片样式
This commit is contained in:
@@ -46,14 +46,15 @@ export default function PluginCardComponent({
|
|||||||
</div>
|
</div>
|
||||||
{/* footer */}
|
{/* footer */}
|
||||||
<div className={`${styles.cardFooter}`}>
|
<div className={`${styles.cardFooter}`}>
|
||||||
<div className={`${styles.linkSettingContainer}`}>
|
<div className={`${styles.footerContainer}`}>
|
||||||
|
<div className={`${styles.linkAndToolContainer}`}>
|
||||||
<div className={`${styles.link}`}>
|
<div className={`${styles.link}`}>
|
||||||
<LinkOutlined style={{ fontSize: "22px" }} />
|
<LinkOutlined style={{ fontSize: "22px" }} />
|
||||||
<span>1</span>
|
<span>1</span>
|
||||||
</div>
|
</div>
|
||||||
<ToolOutlined style={{ fontSize: "22px" }} />
|
<ToolOutlined style={{ fontSize: "22px" }} />
|
||||||
</div>
|
</div>
|
||||||
|
<div className={`${styles.switchContainer}`}>
|
||||||
<Switch
|
<Switch
|
||||||
value={initialized}
|
value={initialized}
|
||||||
onClick={handleEnable}
|
onClick={handleEnable}
|
||||||
@@ -61,5 +62,7 @@ export default function PluginCardComponent({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -41,8 +41,29 @@
|
|||||||
.cardFooter {
|
.cardFooter {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footerContainer {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.linkAndToolContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switchContainer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
.fontGray {
|
.fontGray {
|
||||||
color: #6C6C6C;
|
color: #6C6C6C;
|
||||||
|
|||||||
+8
-15
@@ -1,17 +1,15 @@
|
|||||||
import styles from "./pluginMarketCard.module.css"
|
import styles from "./pluginMarketCard.module.css";
|
||||||
import {GithubOutlined, StarOutlined} from '@ant-design/icons';
|
import { GithubOutlined, StarOutlined } from "@ant-design/icons";
|
||||||
import { PluginMarketCardVO } from "@/app/home/plugins/plugin-market/plugin-market-card/PluginMarketCardVO";
|
import { PluginMarketCardVO } from "@/app/home/plugins/plugin-market/plugin-market-card/PluginMarketCardVO";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
|
|
||||||
export default function PluginMarketCardComponent({
|
export default function PluginMarketCardComponent({
|
||||||
cardVO
|
cardVO
|
||||||
}: {
|
}: {
|
||||||
cardVO: PluginMarketCardVO
|
cardVO: PluginMarketCardVO;
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
|
||||||
function handleInstallClick(pluginId: string) {
|
function handleInstallClick(pluginId: string) {
|
||||||
console.log("Install plugin: ", pluginId)
|
console.log("Install plugin: ", pluginId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -21,10 +19,7 @@ export default function PluginMarketCardComponent({
|
|||||||
{/* left author */}
|
{/* left author */}
|
||||||
<div className={`${styles.fontGray}`}>{cardVO.author}</div>
|
<div className={`${styles.fontGray}`}>{cardVO.author}</div>
|
||||||
{/* right icon */}
|
{/* right icon */}
|
||||||
<GithubOutlined
|
<GithubOutlined style={{ fontSize: "26px" }} type="setting" />
|
||||||
style={{fontSize: '26px'}}
|
|
||||||
type="setting"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{/* content */}
|
{/* content */}
|
||||||
<div className={`${styles.cardContent}`}>
|
<div className={`${styles.cardContent}`}>
|
||||||
@@ -35,17 +30,15 @@ export default function PluginMarketCardComponent({
|
|||||||
<div className={`${styles.cardFooter}`}>
|
<div className={`${styles.cardFooter}`}>
|
||||||
<div className={`${styles.linkSettingContainer}`}>
|
<div className={`${styles.linkSettingContainer}`}>
|
||||||
<div className={`${styles.link}`}>
|
<div className={`${styles.link}`}>
|
||||||
<StarOutlined
|
<StarOutlined style={{ fontSize: "22px" }} />
|
||||||
style={{fontSize: '22px'}}
|
<span style={{ paddingLeft: "5px" }}>{cardVO.starCount}</span>
|
||||||
/>
|
|
||||||
<span>{cardVO.starCount}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
size={"small"}
|
size={"small"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleInstallClick(cardVO.pluginId)
|
handleInstallClick(cardVO.pluginId);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
安装
|
安装
|
||||||
|
|||||||
@@ -71,5 +71,6 @@
|
|||||||
color: #6062E7;
|
color: #6062E7;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user