mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-24 22:07:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts: # eslint.config.mjs # package.json # pnpm-lock.yaml # src/components/PluginSettings/index.tsx # src/plugins/imageZoom/index.tsx # src/plugins/messageLogger/index.tsx # src/plugins/pictureInPicture/index.tsx # src/plugins/serverInfo/GuildInfoModal.tsx # src/plugins/whoReacted/index.tsx
This commit is contained in:
commit
f8879cc801
114 changed files with 2092 additions and 893 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
import { React } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
||||
import { CategoryImageProps, StickerCategoryProps } from "../types";
|
||||
import { cl } from "../utils";
|
||||
|
@ -51,7 +52,7 @@ export function CategoryScroller(props: { children: React.ReactNode, categoryLen
|
|||
<div className={cl("category-scroller")}>
|
||||
<div>{
|
||||
children.map(child => (
|
||||
<div role="listitem">
|
||||
<div role="listitem" key={cl("category-scroller")}>
|
||||
{child}
|
||||
</div>
|
||||
))
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { JSX } from "react";
|
||||
|
||||
export function IconContainer(props: { children: JSX.Element | JSX.Element[]; }) {
|
||||
return (
|
||||
<div style={{
|
||||
|
@ -46,7 +48,7 @@ export function RecentlyUsedIcon({ width, height, color }: { width: number, heig
|
|||
export function CogIcon({ width, height }: { width: number, height: number; }) {
|
||||
return (
|
||||
<svg role="img" width={width} height={height} viewBox="0 0 24 24">
|
||||
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"></path>
|
||||
<path fill="currentColor" fillRule="evenodd" clipRule="evenodd" d="M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"></path>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import * as DataStore from "@api/DataStore";
|
|||
import { CheckedTextInput } from "@components/CheckedTextInput";
|
||||
import { Flex } from "@components/Flex";
|
||||
import { Button, Forms, React, TabBar, Text, TextArea, Toasts } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
||||
import { convert as convertLineEP, getIdFromUrl as getLineEmojiPackIdFromUrl, getStickerPackById as getLineEmojiPackById, isLineEmojiPackHtml, parseHtml as getLineEPFromHtml } from "../lineEmojis";
|
||||
import { convert as convertLineSP, getIdFromUrl as getLineStickerPackIdFromUrl, getStickerPackById as getLineStickerPackById, isLineStickerPackHtml, parseHtml as getLineSPFromHtml } from "../lineStickers";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
import { debounce } from "@shared/debounce";
|
||||
import { ModalContent, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { React, Text, TextInput } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
||||
import { PickerContent, PickerContentHeader, PickerContentRow, PickerContentRowGrid, PickerHeaderProps, SidebarProps, Sticker, StickerCategoryType, StickerPack } from "../types";
|
||||
import { sendSticker } from "../upload";
|
||||
|
@ -141,7 +142,6 @@ function PickerContentRowGrid({
|
|||
alt={sticker.title}
|
||||
src={sticker.image}
|
||||
draggable="false"
|
||||
datatype="sticker"
|
||||
data-id={sticker.id}
|
||||
className={clPicker("content-row-grid-img")}
|
||||
loading="lazy"
|
||||
|
@ -177,7 +177,7 @@ function HeaderCollapseIcon({ isExpanded }: { isExpanded: boolean; }) {
|
|||
transform: `rotate(${isExpanded ? "0" : "-90deg"})`
|
||||
}}
|
||||
>
|
||||
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M16.59 8.59004L12 13.17L7.41 8.59004L6 10L12 16L18 10L16.59 8.59004Z"></path>
|
||||
<path fill="currentColor" fillRule="evenodd" clipRule="evenodd" d="M16.59 8.59004L12 13.17L7.41 8.59004L6 10L12 16L18 10L16.59 8.59004Z"></path>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
@ -297,6 +297,7 @@ export function PickerContent({ stickerPacks, selectedStickerPackId, setSelected
|
|||
}, [] as Sticker[][])
|
||||
.map((stickers, i) => (
|
||||
<PickerContentRow
|
||||
key={i}
|
||||
rowIndex={i}
|
||||
channelId={channelId}
|
||||
grid1={{
|
||||
|
@ -360,6 +361,7 @@ export function PickerContent({ stickerPacks, selectedStickerPackId, setSelected
|
|||
const rows = stickersToRows(queryFilter(sp.stickers));
|
||||
return (
|
||||
<PickerContentHeader
|
||||
key={sp.id}
|
||||
image={sp.logo.image}
|
||||
title={sp.title}
|
||||
isSelected={sp.id === selectedStickerPackId}
|
||||
|
@ -400,7 +402,6 @@ export function PickerContent({ stickerPacks, selectedStickerPackId, setSelected
|
|||
alt={currentSticker?.title ?? ""}
|
||||
src={currentSticker?.image}
|
||||
draggable="false"
|
||||
datatype="sticker"
|
||||
data-id={currentSticker?.id ?? ""}
|
||||
className={clPicker("content-inspector-img")}
|
||||
/>
|
||||
|
|
|
@ -64,7 +64,7 @@ export default definePlugin({
|
|||
}
|
||||
},
|
||||
{
|
||||
find: `role:"tablist","aria-label":`,
|
||||
find: "role:\"tablist\",\"aria-label\":",
|
||||
replacement: {
|
||||
match: /role:"tablist",.*?,?"aria-label":.+?\),children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s,
|
||||
replace: m => {
|
||||
|
|
|
@ -91,7 +91,7 @@ async function toGIF(url: string, ffmpeg: FFmpeg): Promise<File> {
|
|||
if (typeof data === "string") {
|
||||
throw new Error("Could not read file");
|
||||
}
|
||||
return new File([data.buffer], outputFilename, { type: "image/gif" });
|
||||
return new File([new Uint8Array(data.buffer)], outputFilename, { type: "image/gif" });
|
||||
}
|
||||
|
||||
export async function sendSticker({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue