mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 17:26:22 +00:00
fixed status icon and renderRememberButton
This commit is contained in:
parent
5402c0ac3d
commit
5c35f1df0f
1 changed files with 2 additions and 8 deletions
|
@ -26,10 +26,6 @@ import { Button, Menu, Text, Toasts } from "@webpack/common";
|
||||||
const Components = findByPropsLazy("Status");
|
const Components = findByPropsLazy("Status");
|
||||||
const StatusStyles = findByPropsLazy("statusItem");
|
const StatusStyles = findByPropsLazy("statusItem");
|
||||||
|
|
||||||
const statusCrossSponding = {
|
|
||||||
"online": "rgb(35, 165, 90)"
|
|
||||||
};
|
|
||||||
|
|
||||||
interface Emoji {
|
interface Emoji {
|
||||||
animated: boolean;
|
animated: boolean;
|
||||||
id: bigint | null;
|
id: bigint | null;
|
||||||
|
@ -71,9 +67,8 @@ function MakeContextCallback(): NavContextMenuPatchCallback {
|
||||||
label={status.status}
|
label={status.status}
|
||||||
action={() => console.log("pog")}
|
action={() => console.log("pog")}
|
||||||
render={() => (<div className={StatusStyles.statusItem}><Components.Status
|
render={() => (<div className={StatusStyles.statusItem}><Components.Status
|
||||||
status={status} className={StatusStyles.icon}
|
status={status.status} className={StatusStyles.icon}
|
||||||
size={10}
|
size={10}
|
||||||
color={statusCrossSponding[status.status] || "currentColor"}
|
|
||||||
/>
|
/>
|
||||||
<div className={StatusStyles.status}>{status.status}</div>
|
<div className={StatusStyles.status}>{status.status}</div>
|
||||||
<div className={StatusStyles.description}>{status.text}</div>
|
<div className={StatusStyles.description}>{status.text}</div>
|
||||||
|
@ -102,8 +97,7 @@ export default definePlugin({
|
||||||
contextMenus: {
|
contextMenus: {
|
||||||
"set-status-submenu": MakeContextCallback()
|
"set-status-submenu": MakeContextCallback()
|
||||||
},
|
},
|
||||||
renderRememberButton({ statue }: { statue: DiscordStatus; }) {
|
renderRememberButton(statue: DiscordStatus) {
|
||||||
if (!statue) return;
|
|
||||||
return <Button onClick={() => {
|
return <Button onClick={() => {
|
||||||
settings.store.StatusPresets[statue.text] = statue;
|
settings.store.StatusPresets[statue.text] = statue;
|
||||||
Toasts.show({
|
Toasts.show({
|
||||||
|
|
Loading…
Reference in a new issue