mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 11:43:32 -05:00
feat(PluginsTab): make it alot more prettier
This commit is contained in:
parent
983a79743a
commit
58c7eea90a
2 changed files with 56 additions and 9 deletions
|
@ -6,24 +6,54 @@
|
|||
|
||||
import "./styles.css";
|
||||
|
||||
import { Text } from "@webpack/common";
|
||||
import { Text, Tooltip } from "@webpack/common";
|
||||
|
||||
export function StockPluginsCard({ totalStockPlugins, enabledStockPlugins }) {
|
||||
return (
|
||||
<div className="vc-plugin-stats vc-stockplugins-stats-card">
|
||||
<Text variant="text-md/bold">Enabled Stock Plugins</Text>
|
||||
<Text variant="heading-xxl/bold" style={{ textAlign: "center" }}>{enabledStockPlugins}</Text>
|
||||
<Text variant="text-sm/normal">Total Stock Plugins: {totalStockPlugins} </Text>
|
||||
<div className="vc-plugin-stats-card-container">
|
||||
<div className="vc-plugin-stats-card-section">
|
||||
<Text variant="text-md/semibold">Enabled Plugins</Text>
|
||||
<Text variant="heading-xl/bold">{enabledStockPlugins}</Text>
|
||||
</div>
|
||||
<div className="vc-plugin-stats-card-divider"></div>
|
||||
<div className="vc-plugin-stats-card-section">
|
||||
<Text variant="text-md/semibold">Total Plugins</Text>
|
||||
<Text variant="heading-xl/bold">{totalStockPlugins}</Text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function UserPluginsCard({ totalUserPlugins, enabledUserPlugins }) {
|
||||
return (
|
||||
<div className="vc-plugin-stats vc-userplugins-stats-card">
|
||||
<Text variant="text-md/bold">Enabled UserPlugins</Text>
|
||||
<Text variant="heading-xxl/bold" style={{ textAlign: "center" }}>{totalUserPlugins}</Text>
|
||||
<Text variant="text-sm/normal">Total UserPlugins: {enabledUserPlugins} </Text>
|
||||
if (totalUserPlugins <= 1) return (
|
||||
<div className="vc-plugin-stats vc-stockplugins-stats-card">
|
||||
<div className="vc-plugin-stats-card-container ">
|
||||
<div className="vc-plugin-stats-card-section">
|
||||
<Text variant="text-md/semibold">Total UserPlugins</Text>
|
||||
<Tooltip text={<img src="https://files.catbox.moe/x4plqa.png" style={{ width: "40px", height: "40px" }} />}>
|
||||
{tooltipProps => (
|
||||
<Text variant="heading-xl/bold" {...tooltipProps}>{totalUserPlugins}</Text>
|
||||
)}
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
else return (
|
||||
<div className="vc-plugin-stats vc-stockplugins-stats-card">
|
||||
<div className="vc-plugin-stats-card-container">
|
||||
<div className="vc-plugin-stats-card-section">
|
||||
<Text variant="text-md/semibold">Enabled UserPlugins</Text>
|
||||
<Text variant="heading-xl/bold">{enabledUserPlugins}</Text>
|
||||
</div>
|
||||
<div className="vc-plugin-stats-card-divider"></div>
|
||||
<div className="vc-plugin-stats-card-section">
|
||||
<Text variant="text-md/semibold">Total UserPlugins</Text>
|
||||
<Text variant="heading-xl/bold">{totalUserPlugins}</Text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -104,3 +104,20 @@
|
|||
transform: translateY(-1px);
|
||||
box-shadow: var(--elevation-high);
|
||||
}
|
||||
|
||||
.vc-plugin-stats-card-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.vc-plugin-stats-card-section {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.vc-plugin-stats-card-divider {
|
||||
border-left: 1px solid #ccc;
|
||||
height: 100%;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue