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

This commit is contained in:
thororen1234 2025-04-16 22:52:20 -04:00
commit 5d00294ee5
No known key found for this signature in database
17 changed files with 62 additions and 77 deletions

View file

@ -16,8 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Clipboard, Toasts } from "@webpack/common";
import { Toasts } from "@webpack/common";
import { copyToClipboard } from "./clipboard";
import { EquicordDevsById, VencordDevsById } from "./constants";
/**
@ -35,12 +36,8 @@ export function sleep(ms: number): Promise<void> {
return new Promise(r => setTimeout(r, ms));
}
export function copyWithToast(text: string, toastMessage = "Copied to clipboard!") {
if (Clipboard.SUPPORTS_COPY) {
Clipboard.copy(text);
} else {
toastMessage = "Your browser does not support copying to clipboard";
}
export async function copyWithToast(text: string, toastMessage = "Copied to clipboard!") {
await copyToClipboard(text);
Toasts.show({
message: toastMessage,
id: Toasts.genId(),