mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 00:53:04 -04:00
Clipboard Fixes
This commit is contained in:
parent
5d00294ee5
commit
506e3dcfd6
12 changed files with 38 additions and 34 deletions
|
@ -6,9 +6,10 @@
|
|||
|
||||
import { showNotification } from "@api/Notifications";
|
||||
import { Settings } from "@api/Settings";
|
||||
import { copyToClipboard } from "@utils/clipboard";
|
||||
import { relaunch, showItemInFolder } from "@utils/native";
|
||||
import { checkForUpdates, getRepo } from "@utils/updater";
|
||||
import { Clipboard, GuildStore, NavigationRouter, SettingsRouter, Toasts } from "@webpack/common";
|
||||
import { GuildStore, NavigationRouter, SettingsRouter, Toasts } from "@webpack/common";
|
||||
|
||||
import gitHash from "~git-hash";
|
||||
import gitRemote from "~git-remote";
|
||||
|
@ -89,7 +90,7 @@ export const actions: ButtonAction[] = [
|
|||
const newUrl = url.replace(/(https?:\/\/)?([a-zA-Z0-9-]+)\.([a-zA-Z0-9-]+)/, "https://$2.$3");
|
||||
const res = (await fetch(newUrl));
|
||||
const text = await res.text();
|
||||
Clipboard.copy(text);
|
||||
copyToClipboard(text);
|
||||
|
||||
Toasts.show({
|
||||
message: "Copied response to clipboard!",
|
||||
|
@ -115,7 +116,7 @@ export const actions: ButtonAction[] = [
|
|||
|
||||
{
|
||||
id: "copyGitInfo", label: "Copy Git Info", callback: async () => {
|
||||
Clipboard.copy(`gitHash: ${gitHash}\ngitRemote: ${gitRemote}`);
|
||||
copyToClipboard(`gitHash: ${gitHash}\ngitRemote: ${gitRemote}`);
|
||||
|
||||
Toasts.show({
|
||||
message: "Copied git info to clipboard!",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue