mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 11:43:32 -05:00
Merge branch 'main' into dev
This commit is contained in:
commit
983a79743a
3 changed files with 68 additions and 5 deletions
29
src/components/PluginSettings/PluginStatCards.tsx
Normal file
29
src/components/PluginSettings/PluginStatCards.tsx
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* Vencord, a Discord client mod
|
||||||
|
* Copyright (c) 2024 Vendicated and contributors
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
import "./styles.css";
|
||||||
|
|
||||||
|
import { Text } 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -38,6 +38,8 @@ import { Alerts, Button, Card, Forms, lodash, Parser, React, Select, Text, TextI
|
||||||
|
|
||||||
import Plugins, { ExcludedPlugins, PluginMeta } from "~plugins";
|
import Plugins, { ExcludedPlugins, PluginMeta } from "~plugins";
|
||||||
|
|
||||||
|
import { StockPluginsCard, UserPluginsCard } from "./PluginStatCards";
|
||||||
|
|
||||||
// Avoid circular dependency
|
// Avoid circular dependency
|
||||||
const { startDependenciesRecursive, startPlugin, stopPlugin } = proxyLazy(() => require("../../plugins"));
|
const { startDependenciesRecursive, startPlugin, stopPlugin } = proxyLazy(() => require("../../plugins"));
|
||||||
|
|
||||||
|
@ -343,11 +345,23 @@ export default function PluginSettings() {
|
||||||
|
|
||||||
<ReloadRequiredCard required={changes.hasChanges} />
|
<ReloadRequiredCard required={changes.hasChanges} />
|
||||||
|
|
||||||
<Card className={cl("info-card")} style={{ marginTop: "12px" }}>
|
<div className={cl("stats-container")} style={{
|
||||||
<Forms.FormTitle tag="h5">Plugins Information</Forms.FormTitle>
|
marginTop: "12px",
|
||||||
<Forms.FormText>Total Plugins: {totalStockPlugins}, Total User Plugins: {totalUserPlugins}</Forms.FormText>
|
gap: "16px",
|
||||||
<Forms.FormText>Enabled Plugins: {enabledStockPlugins}, Enabled User Plugins: {enabledUserPlugins}</Forms.FormText>
|
display: "flex",
|
||||||
</Card>
|
flexDirection: "row",
|
||||||
|
width: "100%"
|
||||||
|
}}>
|
||||||
|
<StockPluginsCard
|
||||||
|
totalStockPlugins={totalStockPlugins}
|
||||||
|
enabledStockPlugins={enabledStockPlugins}
|
||||||
|
/>
|
||||||
|
<UserPluginsCard
|
||||||
|
totalUserPlugins={totalUserPlugins}
|
||||||
|
enabledUserPlugins={enabledUserPlugins}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<Forms.FormTitle tag="h5" className={classes(Margins.top20, Margins.bottom8)}>
|
<Forms.FormTitle tag="h5" className={classes(Margins.top20, Margins.bottom8)}>
|
||||||
Filters
|
Filters
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
height: 8em;
|
height: 8em;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
background-color: var(--background-secondary-alt) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vc-plugins-info-card div {
|
.vc-plugins-info-card div {
|
||||||
|
@ -84,3 +85,22 @@
|
||||||
.vc-plugins-info-button svg:not(:hover, :focus) {
|
.vc-plugins-info-button svg:not(:hover, :focus) {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vc-plugin-stats {
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
transition: 0.1s ease-out;
|
||||||
|
transition-property: box-shadow, transform, background, opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vc-plugin-stats:hover {
|
||||||
|
background-color: var(--background-tertiary);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: var(--elevation-high);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue