Conversation
| language: node_js | ||
| node_js: | ||
| - stable | ||
| - "8" |
There was a problem hiding this comment.
I did try using Gulp v4 with Node.js v10.0.0 and it worked fine. Maybe we should be updating Gulp instead of downgrading Node.js?
There was a problem hiding this comment.
Yeah that works for me, v4 should be stable enough
| } | ||
|
|
||
|
|
||
| /** |
There was a problem hiding this comment.
You've used a mix of spaces and tabs here (and in other places). Also there should probably be a Toasts object here (as everything else in the plugin API has).
There was a problem hiding this comment.
That's what I get for trying to change editor while working lol. I can do toasts as an object
| @@ -0,0 +1,31 @@ | |||
| /** | |||
| * BetterDiscord Modals Component | |||
| */ | ||
|
|
||
| <template> | ||
| <bd-toasts> |
There was a problem hiding this comment.
Generally custom elements shouldn't be used in Vue as Vue doesn't know exactly what to do with them. If this component was defined globally this would cause an infinite loop.
There was a problem hiding this comment.
I made the toasts by looking at the modals and I believe they used a custom element as well. At least that's how I see it registered in the other file and in the DOM as well.
| @@ -0,0 +1,46 @@ | |||
| /** | |||
| * BetterDiscord Modal Component | |||
| @@ -0,0 +1,72 @@ | |||
| /** | |||
| * BetterDiscord Modals | |||
|
Merged into samuelthomas2774/discord-api. |
|
Approve of toasts in that fork, closing this. |
I also added it to the global bd object for debugging/testing. Also have it popup a toast on setting changed for debugging purposes.
Haven't worked with Vue too much so let me know how bad I fucked up.