Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2025-09-03 07:22:18 -04:00
commit ad028f75b6
No known key found for this signature in database
13 changed files with 61 additions and 40 deletions

View file

@ -0,0 +1,15 @@
export const enum ChannelType {
GUILD_TEXT = 0,
DM = 1,
GUILD_VOICE = 2,
GROUP_DM = 3,
GUILD_CATEGORY = 4,
GUILD_ANNOUNCEMENT = 5,
ANNOUNCEMENT_THREAD = 10,
PUBLIC_THREAD = 11,
PRIVATE_THREAD = 12,
GUILD_STAGE_VOICE = 13,
GUILD_DIRECTORY = 14,
GUILD_FORUM = 15,
GUILD_MEDIA = 16
}

View file

@ -1,2 +1,3 @@
export * from "./commands";
export * from "./messages";
export * from "./channel";

View file

@ -1,5 +1,5 @@
/* the profile popout badge container(s) */
[class*="biteSize_"] [class*="tags_"] [class*="container_"] {
/* Discord has padding set to 2px instead of 1px, which causes the 12th badge to wrap to a new line. */
padding: 0 1px;
}
[class*="profile_"] [class*="tags_"] [class*="container_"] {
/* Discord has gap set to 2px instead of 1px, which causes the 12th badge to wrap to a new line. */
gap: 1px;
}

View file

@ -0,0 +1,4 @@
.align-chat-input [class*="panels"] [class*="inner_"],
.align-chat-input [class*="rtcConnectionStatus_"] {
height: fit-content;
}

View file

@ -24,10 +24,36 @@ import { formatDurationMs } from "@utils/text";
import definePlugin, { OptionType } from "@utils/types";
import { React } from "@webpack/common";
import alignedChatInputFix from "./alignedChatInputFix.css?managed";
function formatDuration(ms: number) {
// here be dragons (moment fucking sucks)
const human = Settings.plugins.CallTimer.format === "human";
const format = (n: number) => human ? n : n.toString().padStart(2, "0");
const unit = (s: string) => human ? s : "";
const delim = human ? " " : ":";
// thx copilot
const d = Math.floor(ms / 86400000);
const h = Math.floor((ms % 86400000) / 3600000);
const m = Math.floor(((ms % 86400000) % 3600000) / 60000);
const s = Math.floor((((ms % 86400000) % 3600000) % 60000) / 1000);
let res = "";
if (d) res += `${d}d `;
if (h || res) res += `${format(h)}${unit("h")}${delim}`;
if (m || res || !human) res += `${format(m)}${unit("m")}${delim}`;
res += `${format(s)}${unit("s")}`;
return res;
}
export default definePlugin({
name: "CallTimer",
description: "Adds a timer to vcs",
authors: [Devs.Ven],
managedStyle: alignedChatInputFix,
startTime: 0,
interval: void 0 as NodeJS.Timeout | undefined,

View file

@ -17,7 +17,7 @@ import { useCurrentUserDecorationsStore } from "../../lib/stores/CurrentUserDeco
import { cl, DecorationModalStyles, requireAvatarDecorationModal, requireCreateStickerModal } from "../";
import { AvatarDecorationModalPreview } from "../components";
const FileUpload = findComponentByCodeLazy("fileUpload),");
const FileUpload = findComponentByCodeLazy(".fileUpload),");
const { HelpMessage, HelpMessageTypes } = mapMangledModuleLazy('POSITIVE="positive', {
HelpMessageTypes: filters.byProps("POSITIVE", "WARNING", "INFO"),

View file

@ -53,7 +53,7 @@ const settings = definePluginSettings({
export default definePlugin({
name: "NoReplyMention",
description: "Disables reply pings by default",
authors: [Devs.DustyAngel47, Devs.axyie, Devs.pylix, Devs.outfoxxed],
authors: [Devs.DustyAngel47, Devs.rae, Devs.pylix, Devs.outfoxxed],
settings,
shouldMention(message: Message, isHoldingShift: boolean) {

View file

@ -8,13 +8,9 @@ import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { MessageJSON } from "@vencord/discord-types";
import { ChannelType } from "@vencord/discord-types/enums";
import { ChannelStore, ReadStateStore, UserStore } from "@webpack/common";
const enum ChannelType {
DM = 1,
GROUP_DM = 3
}
const settings = definePluginSettings({
channelToAffect: {
type: OptionType.SELECT,

View file

@ -17,10 +17,11 @@
*/
import { getUniqueUsername, openUserProfile } from "@utils/discord";
import { ChannelType } from "@vencord/discord-types/enums";
import { UserUtils } from "@webpack/common";
import settings from "./settings";
import { ChannelDelete, ChannelType, GuildDelete, RelationshipRemove, RelationshipType } from "./types";
import { ChannelDelete, GuildDelete, RelationshipRemove, RelationshipType } from "./types";
import { deleteGroup, deleteGuild, getGroup, getGuild, GuildAvailabilityStore, notify } from "./utils";
let manuallyRemovedFriend: string | undefined;

View file

@ -52,10 +52,6 @@ export interface SimpleGuild {
iconURL?: string;
}
export const enum ChannelType {
GROUP_DM = 3,
}
export const enum RelationshipType {
FRIEND = 1,
BLOCKED = 2,

View file

@ -20,11 +20,12 @@ import { DataStore, Notices } from "@api/index";
import { showNotification } from "@api/Notifications";
import { getUniqueUsername, openUserProfile } from "@utils/discord";
import { FluxStore } from "@vencord/discord-types";
import { ChannelType } from "@vencord/discord-types/enums";
import { findStoreLazy } from "@webpack";
import { ChannelStore, GuildMemberStore, GuildStore, RelationshipStore, UserStore, UserUtils } from "@webpack/common";
import settings from "./settings";
import { ChannelType, RelationshipType, SimpleGroupChannel, SimpleGuild } from "./types";
import { RelationshipType, SimpleGroupChannel, SimpleGuild } from "./types";
export const GuildAvailabilityStore = findStoreLazy("GuildAvailabilityStore") as FluxStore & {
totalGuilds: number;

View file

@ -25,7 +25,7 @@ import { useForceUpdater } from "@utils/react";
import definePlugin, { OptionType } from "@utils/types";
import { CustomEmoji, Message, ReactionEmoji, User } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack";
import { ChannelStore, Constants, FluxDispatcher, React, RestAPI, Tooltip, useEffect, useLayoutEffect, UserSummaryItem } from "@webpack/common";
import { ChannelStore, Constants, FluxDispatcher, React, RestAPI, useEffect, useLayoutEffect, UserSummaryItem } from "@webpack/common";
const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
let Scroll: any = null;
@ -74,24 +74,6 @@ function getReactionsWithQueue(msg: Message, e: ReactionEmoji, type: number) {
return cache.users;
}
function makeRenderMoreUsers(users: User[]) {
return function renderMoreUsers(_label: string, _count: number) {
return (
<Tooltip text={users.slice(4).map(u => u.username).join(", ")} >
{({ onMouseEnter, onMouseLeave }) => (
<div
className={AvatarStyles.moreUsers}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
>
+{users.length - 4}
</div>
)}
</Tooltip >
);
};
}
function handleClickAvatar(event: React.UIEvent<HTMLElement, Event>) {
event.stopPropagation();
}
@ -185,7 +167,6 @@ export default definePlugin({
max={5}
showDefaultAvatarsForNullUsers
showUserPopout
renderMoreUsers={makeRenderMoreUsers(users)}
/>
</div>
</div>

View file

@ -216,9 +216,9 @@ export const Devs = /* #__PURE__*/ Object.freeze({
name: "sunnie",
id: 406028027768733696n
},
axyie: {
name: "'ax",
id: 929877747151548487n,
rae: {
name: "rae",
id: 1398136199503282277n
},
pointy: {
name: "pointy",