Merge branch 'dev'

This commit is contained in:
thororen1234 2024-11-25 01:50:45 -05:00
commit b0922e34bd
4 changed files with 51 additions and 22 deletions

View file

@ -4,10 +4,11 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import "styles.css?managed";
import { NavContextMenuPatchCallback } from "@api/ContextMenu"; import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { DataStore } from "@api/index"; import { DataStore } from "@api/index";
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { ExpandableHeader } from "@components/ExpandableHeader";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { useForceUpdater } from "@utils/react"; import { useForceUpdater } from "@utils/react";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
@ -108,7 +109,9 @@ function TagConfigCard(props) {
<TextInput value={tagName} onChange={setTagName}></TextInput> <TextInput value={tagName} onChange={setTagName}></TextInput>
<Text variant={"heading-md/normal"}>Users (Seperated by comma)</Text> <Text variant={"heading-md/normal"}>Users (Seperated by comma)</Text>
<TextInput value={userIds} onChange={setUserIDs}></TextInput> <TextInput value={userIds} onChange={setUserIDs}></TextInput>
<ExpandableHeader headerText="User List (Click A User To Remove)" defaultState={true}> <div className={"vc-friend-tags-user-header-container"}>
<Text variant="eyebrow">User List (Click A User To Remove)</Text>
<div className={"vc-friend-tags-user-header-btns"}>
{ {
userIds.split(", ").map(user => { userIds.split(", ").map(user => {
const userData: any = UserStore.getUser(user); const userData: any = UserStore.getUser(user);
@ -121,7 +124,8 @@ function TagConfigCard(props) {
); );
}) })
} }
</ExpandableHeader> </div>
</div>
<Button onClick={async () => { <Button onClick={async () => {
SavedData = SavedData.filter(data => (data.tagName !== tagName)); SavedData = SavedData.filter(data => (data.tagName !== tagName));
await SetData(); await SetData();

View file

@ -0,0 +1,11 @@
.vc-permviewer-user-header-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.vc-permviewer-user-header-btns {
display: flex;
gap: 8px;
}

View file

@ -4,9 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import "styles.css?managed";
import { DataStore } from "@api/index"; import { DataStore } from "@api/index";
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents"; import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
import { ExpandableHeader } from "@components/ExpandableHeader";
import { Heart } from "@components/Heart"; import { Heart } from "@components/Heart";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { openUserProfile } from "@utils/discord"; import { openUserProfile } from "@utils/discord";
@ -211,12 +212,14 @@ class DataUI {
return <aside key={key} > return <aside key={key} >
<ExpandableHeader defaultState={true} headerText={key.toUpperCase()}> <div className={"vc-i-remember-you-user-header-container"}>
<Text>{key.toUpperCase()}</Text>
<div className={"vc-i-remember-you-user-header-btns"}>
<Flex style={{ gap: "calc(0.5em + 0.5vw) 0.2em", flexDirection: "column" }}> <Flex style={{ gap: "calc(0.5em + 0.5vw) 0.2em", flexDirection: "column" }}>
{usersElements} {usersElements}
</Flex> </Flex>
</ExpandableHeader> </div>
</div>
</aside>; </aside>;
} }

View file

@ -0,0 +1,11 @@
.vc-i-remember-you-user-header-container {
display: contents;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.vc-i-remember-you-user-header-btns {
display: none;
gap: 8px;
}