Optimise Web via treeshaking, cleanup build scripts

This commit is contained in:
Vendicated
2022-10-16 17:15:15 +02:00
parent 845088ec02
commit 01ae0983b3
14 changed files with 261 additions and 269 deletions

View File

@ -18,7 +18,16 @@ export default definePlugin({
],
copyToClipBoard(color: string) {
window.DiscordNative.clipboard.copy(color);
if (IS_WEB) {
navigator.clipboard.writeText(color)
.then(() => this.notifySuccess);
} else {
DiscordNative.clipboard.copy(color);
this.notifySuccess();
}
},
notifySuccess() {
Toasts.show({
message: "Copied to Clipboard!",
type: Toasts.Type.SUCCESS,